gnostr-scopetime

Crates.iognostr-scopetime
lib.rsgnostr-scopetime
version1895.933117.678085
created_at2025-11-26 17:03:25.623619+00
updated_at2026-01-20 19:13:32.397851+00
descriptionlog runtime of arbitrary scope
homepagehttps://github.com/gnostr-org/gnostr
repositoryhttps://github.com/gnostr-org/gnostr
max_upload_size
id1951843
size4,815
@RandyMcMillan (RandyMcMillan)

documentation

README

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 something 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
Commit count: 941

cargo fmt