4 ms·
Tracy has been around for a while. It works well for Rust. It's intended for frame-oriented applications, where you're looking for bottlenecks which delay a fr
by Animats 4y ago
Tracy has been around for a while. It works well for Rust.
It's intended for frame-oriented applications, where you're looking for bottlenecks which delay a frame. Unlike most profilers, where you're concerned about average time, Tracy is most useful when you're concerned about worst-case time. You can find the slowest frame and zoom way in to see what went wrong.
The program has to be instrumented. You add
profiling::finish_frame!()
to be called once per frame. Around scopes of interest, you add
profiling::scope!("Event");
then run and look at the result, which is a zoomable timeline. If a profiling scope is using a lot of time, you go back in and add more "scope" calls around subsections of that scope. This gets you more rows on the profile graph and more detail about where time is going.
It's more of a microscope than most profilers.
- cyber_kinetist 4y ago> Unlike most profilers, where you're concerned about average time, Tracy is most useful when you're concerned about worst-case time. Tracy is also really useful for measuring average time of functions! It gives you the average / median execution time of each function along with a a nice distribution graph, which is far better than any other profiler I've used so far. You can even compare the execution time / distribution between two profiling results, which is really handy when you're doing any optimization work.