Crate hitrace_macro

Source
Expand description

Convenience macro to instrument a function as a HiTrace span

The macro will automatically start a span when the function is entered, and close the span when the function is left.

§Examples

Cargo.toml:

[dependencies]
hitrace = "0.1"
hitrace-macro = "0.1"
use hitrace_macro::trace_fn;
#[trace_fn]
fn do_something_and_measure() {
    println!("Doing something expensive....")
}

Attribute Macros§

trace_fn