Expand description
This proc_macro library exposes the #[time_it] attribute macro.
Annotating a function with this macro will generate a corresponding tracing event with the
function’s execution time. By default the macro will emit DEBUG level events. This can be
customized by passing the desired log level as a macro argument: #[time_it("trace")].
Works with both regular fns and async fns.
Attribute Macros§
- time_it
- Attribute function used to annotate functions that should output their execution time using the
tracinglibrary. Works with both async and non-async functions. By default, this macro will use the “DEBUG” log level.