Rust procedural macro library for Optick Profiler

How to use

In Cargo.toml add:

toml [dependencies] optick = "1.3.1" optick_attr = "0.1.0"

#[optick_attr::profile]

Instrument function. Example: ```rust

[optick_attr::profile]

fn fibonacci(n: u32) -> u32 { let res = match n { 0 => 1, 1 => 1, _ => fibonacci(n - 1) + fibonacci(n - 2), }; return res; } ```

#[optickattr::capture("capturename")]

Generate performance capture for function. Capture is saved to {workingdir}/capturename(date-time).opt. Example: ```rust

[optickattr::capture("capturename")]

pub fn main() { fibonacci(10); } ```

GUI

Use Optick GUI to open saved *.opt capture for further analysis: https://github.com/bombomby/optick/releases

Optick API

Based and fully compatible with Rust Optick API.

Run as Administartor to collect ETW events

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