3 releases
0.1.2 | Jul 30, 2020 |
---|---|
0.1.1 | May 28, 2020 |
0.1.0 | Mar 16, 2020 |
#146 in Profiling
12,760 downloads per month
Used in 6 crates
(3 directly)
10KB
157 lines
tracy-rs
This provides a Rust integration for the Tracy profiling library (https://bitbucket.org/wolfpld/tracy).
Usage
- Clone the Tracy library from the above URL.
- Follow the steps to build the profiler GUI (e.g. in tracy/profiler/build/unix/).
- Follow the steps to build the profiler shared library (e.g. in tracy/library/unix).
- Add this crate to your project dependencies, with the 'enable_profiler' cargo feature.
- Call
tracy_rs::load
at the start of your application, providing path to library from (3). - Insert the main frame marker
tracy_frame_marker!();
at the end of your frame. - Optionally, add sub-frame markers with
tracy_begin_frame!()
andtracy_end_frame!()
. - Annotate functions to be profiled with
profile_scope!()
. - Run the application and profiler GUI.