Expand description
Superluminal Performance profiler Rust API for adding user events to captures.
§How to use
In Cargo.toml
add:
[dependencies]
superluminal-perf = "0.2.0"
Example usage:
superluminal_perf::begin_event("my-event");
calc();
superluminal_perf::end_event();
superluminal_perf::begin_event("my-event2");
calc2();
superluminal_perf::end_event();
On non-Windows platforms the events will be compiled out.
§Feature flags
enable
- this flag is used by default and enables calling the Superluminal Performance API. This can be useful to only enable the events only for specific application features
Functions§
- begin_
event - Begin an instrumentation event with the specified ID
- begin_
event_ with_ color - Begin an instrumentation event with the specified ID and color
- begin_
event_ with_ data - Begin an instrumentation event with the specified ID, runtime data, and color
- begin_
fiber_ switch - Begin a Windows Fiber Switch
- enabled
- Check if the API is enabled
- end_
event - End an instrumentation event.
- end_
fiber_ switch - End a Windows Fiber Switch
- register_
fiber - Register a Windows Fiber
- set_
current_ thread_ name - Set the name of the current thread
- unregister_
fiber - Unregister a Windows Fiber