3 releases
0.1.2 | Sep 10, 2024 |
---|---|
0.1.1 | Sep 4, 2024 |
0.1.0 | Sep 4, 2024 |
#176 in Profiling
98 downloads per month
4KB
94 lines
Timing
Easily measure executable time of a code block in human readable form. A rdtsc variant is also available for x86_64 architectures.
let time = timing(|| {
println!("A fn that takes a few micros");
});
let (val, time) = timing_return(|| {
println!("A fn that takes a few micros");
5
});
let counter = timing_rdtsc(|| {
println!("...");
});
let (val, counter) = timing_rdtsc_return(|| {
println!("...");
42
});