rust_job_scheduling/benches/small.rs

13 lines
362 B
Rust
Raw Normal View History

2024-10-27 19:37:24 +01:00
use criterion::{black_box, criterion_group, criterion_main, Criterion};
use rust_job_scheduling::algorithm::*;
use rust_job_scheduling::data::SMALL;
fn criterion_benchmark(c: &mut Criterion) {
c.bench_function("single thread", |b| {
b.iter(|| single_thread(black_box(SMALL)))
});
}
criterion_group!(benches, criterion_benchmark);
criterion_main!(benches);