A set of procedural macros to simplify performance instrumentation of the code.
In Cargo.toml
add:
toml
[dependencies]
optick = "1.3.1"
optick_attr = "0.2.0"
Instrument function. Example: ```rust
fn calc() { // Do some stuff } ```
Generate performance capture for function. Capture is saved to {workingdir}/capturename(date-time).opt. Example: ```rust
pub fn main() { calc(); } ```
Use Optick GUI to open saved *.opt capture for further analysis: https://github.com/bombomby/optick/releases
Fully compatible with Rust Optick API.
Optick uses ETW to collect hardware counters: switch-contexts, auto-sampling, CPU core utilization, etc.
Run your app as administrator to enable the collection of ETW events:
Start-Process cargo run -Verb runAs