#macro #hitrace #trace #spans #hi-trace #instrumenting #convienience

macro hitrace-macro

Convienience macros for instrumenting code with hitrace

1 unstable release

0.1.0 Apr 19, 2024

#911 in Procedural macros

Apache-2.0

3KB

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....")
}

Dependencies

~225–660KB
~16K SLoC