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

macro hitrace-macro

Convienience macros for instrumenting code with hitrace

1 unstable release

0.1.0 Apr 19, 2024

#996 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

~235–680KB
~16K SLoC