Vendor dependencies
Let's see how I like this workflow.
This commit is contained in:
parent
34d1830413
commit
9c435dc440
7500 changed files with 1665121 additions and 99 deletions
16
vendor/procfs/benches/cpuinfo.rs
vendored
Normal file
16
vendor/procfs/benches/cpuinfo.rs
vendored
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
use criterion::{black_box, criterion_group, criterion_main, Criterion};
|
||||
use procfs::CpuInfo;
|
||||
|
||||
fn bench_cpuinfo(c: &mut Criterion) {
|
||||
c.bench_function("CpuInfo::new", |b| b.iter(|| black_box(CpuInfo::new().unwrap())));
|
||||
|
||||
let cpuinfo = black_box(CpuInfo::new().unwrap());
|
||||
c.bench_function("CpuInfo::get_info", |b| b.iter(|| black_box(cpuinfo.get_info(0))));
|
||||
c.bench_function("CpuInfo::model_name", |b| b.iter(|| cpuinfo.model_name(0)));
|
||||
c.bench_function("CpuInfo::vendor_id", |b| b.iter(|| cpuinfo.vendor_id(0)));
|
||||
c.bench_function("CpuInfo::physical_id", |b| b.iter(|| cpuinfo.physical_id(0)));
|
||||
c.bench_function("CpuInfo::flags", |b| b.iter(|| cpuinfo.flags(0)));
|
||||
}
|
||||
|
||||
criterion_group!(benches, bench_cpuinfo);
|
||||
criterion_main!(benches);
|
||||
Loading…
Add table
Add a link
Reference in a new issue