#[macro_use] extern crate criterion; extern crate rainbowcazzi; use criterion::Criterion; use rainbowcazzi::rainbow; use std::fs::File; fn criterion_benchmark(c: &mut Criterion) { let infile = File::open("assets/sbocchino").unwrap(); c.bench_function("sbocchino", |b| b.iter(|| rainbow(&infile, true))); let infile = File::open("assets/sbocco").unwrap(); c.bench_function("sbocco", |b| b.iter(|| rainbow(&infile, true))); let infile = File::open("assets/sboccone").unwrap(); c.bench_function("sbocchino", |b| b.iter(|| rainbow(&infile, true))); } criterion_group!(benches, criterion_benchmark); criterion_main!(benches);