Skip to content

A benchmark suite that is like a pinscher: small but does its job

Notifications You must be signed in to change notification settings

jeandiegof/pinscher

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pinscher

A small benchmarking crate.

Usage

Add this to your Cargo.toml file:

[dependencies]
pinscher = { git = "https://github.com/jeandiegof/pinscher" } 

And then:

use pinscher::{BenchSuite, CpuTimeBencher, EnergyBencher};

fn main() {
    // Choose your Bencher
    let mut cpu_time_bencher = CpuTimeBencher::new();
    BenchSuite::bench(|| target_function(), &mut cpu_time_bencher).unwrap();
    println!("{}", cpu_time_bencher.cpu_time().unwrap().as_micros());
}

Benchers available

  • CpuTime: measure the active CPU taken by the function.
  • Energy: uses Intel RAPL to measure the energy used during the execution of the function.

About

A benchmark suite that is like a pinscher: small but does its job

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages