Profiling Rust With Tracy

09.04.2024 09:54

Profiling a Rust application using Tracy

  1. Install Tracy tools with Homebrew (MacOS)

    $ brew install tracy
    
  2. Start the tracy-capture server listening for an application, capture its trace to a file with -o

    $ tracy-capture -o server.tracy
    
  3. Start the application, in my case a Bevy game, with the tracy features enabled

    $ cargo run --release --features bevy/trace_tracy --bin app -- server
    
  4. Run the application for some amount of time to capture the actions you need profiled

  5. Stop the application and open the trace file

    $ tracy server.tracy
    

note: you likely need to set the logging filter to trace for the module(s) you want to show up in the trace.


<< Back Top ^^