Attribute Macro time_graph::instrument[][src]

#[instrument]

Instruments a function to create and enter a time-graph span every time the function is called.

Examples

Instrumenting a function:

#[instrument]
pub fn my_function(my_arg: usize) {
    // ...
}

Overriding the generated span’s name:

#[instrument(name = "another name")]
pub fn my_function() {
    // ...
}