gitui/scopetime
Igor Raits 85a3d93077 chore: Add LICENSE file into the sub-crates
Those are released separately on crates.io and they do not contain
LICENSE file now that is required when packaging them in Linux
distributions.

Signed-off-by: Igor Raits <i.gnatenko.brain@gmail.com>
2020-05-28 16:11:54 +02:00
..
src consistent log:: usage 2020-05-23 23:31:15 +02:00
Cargo.toml some clippy cargo fixes 2020-05-22 12:25:42 +02:00
LICENSE.md chore: Add LICENSE file into the sub-crates 2020-05-28 16:11:54 +02:00
README.md more docs 2020-03-24 21:30:25 +01:00

scopetime

log runtime of arbitrary scope

This crate is part of the gitui project and can be used to annotate arbitrary scopes to trace their execution times via log:

in your crate:

[dependencies]
scopetime = "0.1"

in your code:

fn foo(){
    scope_time!("foo");

    // ... do something u wanna measure
}

the resulting log looks someting like this:

19:45:00 [TRACE] (7) scopetime: [scopetime/src/lib.rs:34] scopetime: 2 ms [my_crate::foo] @my_crate/src/bar.rs:5