Profiling Rust With Tracy
09.04.2024 09:54
Profiling a Rust application using Tracy
-
Install Tracy tools with Homebrew (MacOS)
$ brew install tracy
-
Start the
tracy-capture
server listening for an application, capture its trace to a file with-o
$ tracy-capture -o server.tracy
-
Start the application, in my case a Bevy game, with the tracy features enabled
$ cargo run --release --features bevy/trace_tracy --bin app -- server
-
Run the application for some amount of time to capture the actions you need profiled
-
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.