scopetime 0.1.2

log runtime of arbitrary scope
Documentation
  • Coverage
  • 100%
    3 out of 3 items documented0 out of 2 items with examples
  • Size
  • Source code size: 4.2 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 291.72 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 8s Average build duration of successful builds.
  • all releases: 8s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Homepage
  • gitui-org/gitui
    22422 764 239
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • extrawurst

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