#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

#451 in Procedural macros

Download history 104/week @ 2024-04-15 7/week @ 2024-04-22

111 downloads per month

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

~265–710KB
~17K SLoC