use criterion::{criterion_group, criterion_main, Bencher, Criterion}; use unit_testing_learn::Shapes::Circle; fn test_benchmark(c:&mut Criterion){ let x :Circle=Circle::new(5.0); let y :Circle=Circle::new(8.0); c.bench_function( "Test Benchmark",|b:&mut Bencher|{ b.iter(||{y.contains(&x)}) }); } criterion_group!(benches,test_benchmark); criterion_main!(benches);