Micro-timer
This crate exposes a simple procedural macro that logs you how much time was spent during each call of the function it wraps.
Installing
In Cargo.toml
:
[]
= "0.1.2"
= "0.4.8"
The community-standard log
crate is used for output. In reality, since procedural macros don't have hygiene, you could define log
as being anything that has the same interface as the log
crate.
Usage
use timed;
/// Expose the `log` crate as `crate::log`.
use log;
Result