calculagraph

Crates.iocalculagraph
lib.rscalculagraph
version0.1.0
sourcesrc
created_at2021-08-22 10:01:10.978876
updated_at2021-08-22 10:01:10.978876
descriptionA handy library for measuring the execution time of function
homepage
repositoryhttps://github.com/kookyleo/calculagraph
max_upload_size
id440623
size23,112
(kookyleo)

documentation

README

calculagraph

A handy library for measuring the execution time of function.

Package

Usage

[dependencies]
calculagraph = "0.1"
use std::{thread, time};
use calculagraph::timer_println;

#[timer_println(ms)]
fn main() {
    thread::sleep(time::Duration::from_millis(10));
    println!("job done");
}

The above example will print fn:main cost 10ms at the end, You can also use the second argument to define the format string you need.

More

https://docs.rs/calculagraph

Commit count: 6

cargo fmt