Timed
Macros for measuring function execution.
It will output:
// function=add duration=112ns
Times the execution of the function
Examples
use timed;
async
#[timed(printer = "info!")]
fn add_info(x: i32, y: i32) -> i32 {
x + y
}
#[tokio::main]
#[timed]
async fn main() {
reqwest::get("https://google.com").await;
}