https://crates.io/crates/voxell_timer
i got this idea literaly out of nowhere while working on one of my nested loop projects. it's basically a flamegraph type of thing but it doesn't make use of sampling but rather Instant::now() but it has a very slight overhead. its not the traditional
let start = Instant::now()
let elapsed = start.elapsed() business.
you create scopes, and those scopes, when joined, will time the logic between its creation and join. then, these values are propagated through a tree to the root node at the end where every scope only shows how much time it has spent doing stuff, and excludes time from its children.