Expand description
Example usage:
use perfcnt::{AbstractPerfCounter, PerfCounter};
use perfcnt::linux::{PerfCounterBuilderLinux, HardwareEventType};
let mut pc: PerfCounter =
PerfCounterBuilderLinux::from_hardware_event(HardwareEventType::CacheMisses)
.finish().expect("Could not create the counter");
pc.start().expect("Can not start the counter");
pc.stop().expect("Can not start the counter");
let res = pc.read().expect("Can not read the counter");
println!("Measured {} cache misses.", res);
Re-exports§
pub use crate::linux::PerfCounter;
Modules§
- A wrapper around perf_event open (http://lxr.free-electrons.com/source/tools/perf/design.txt)
Traits§
- Abstract trait to control performance counters.