timing_rdtsc

Crates.iotiming_rdtsc
lib.rstiming_rdtsc
version0.1.2
sourcesrc
created_at2024-09-04 13:51:15.023337
updated_at2024-09-10 19:27:18.850375
descriptionEasily time a block of code
homepage
repositoryhttps://github.com/freergit/timing.git
max_upload_size
id1363358
size6,848
sven (FreerGit)

documentation

README

Timing

build & test license

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
});

Commit count: 0

cargo fmt