diff --git a/Cargo.toml b/Cargo.toml index 232a28b5..bfd3f166 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -87,7 +87,7 @@ proptest = { version = "1", optional = true, default-features = false, features serde_json = "1.0" rand_xorshift = "0.3" rand_isaac = "0.3" -criterion = "0.2.10" +criterion = { version = "0.3", features = ["html_reports"] } # For matrix comparison macro matrixcompare = "0.3.0" @@ -105,6 +105,7 @@ required-features = ["compare"] name = "nalgebra_bench" harness = false path = "benches/lib.rs" +required-features = ["rand"] [profile.bench] lto = true diff --git a/benches/core/matrix.rs b/benches/core/matrix.rs index df4a5a5b..3c483c35 100644 --- a/benches/core/matrix.rs +++ b/benches/core/matrix.rs @@ -188,7 +188,7 @@ fn tr_mul_to(bench: &mut criterion::Criterion) { let b = DVector::::new_random(1000); let mut c = DVector::from_element(1000, 0.0); - bench.bench_function("", move |bh| bh.iter(|| a.tr_mul_to(&b, &mut c))); + bench.bench_function("tr_mul_to", move |bh| bh.iter(|| a.tr_mul_to(&b, &mut c))); } fn mat_mul_mat(bench: &mut criterion::Criterion) { diff --git a/benches/lib.rs b/benches/lib.rs index a77cc743..1f75ff7e 100644 --- a/benches/lib.rs +++ b/benches/lib.rs @@ -1,4 +1,4 @@ -#![feature(test)] +#![feature(bench_black_box)] #![allow(unused_macros)] extern crate nalgebra as na; diff --git a/benches/linalg/eigen.rs b/benches/linalg/eigen.rs index 0b1e6b26..ec775d86 100644 --- a/benches/linalg/eigen.rs +++ b/benches/linalg/eigen.rs @@ -1,4 +1,3 @@ -use test::Bencher; use na::{DMatrix, Eigen}; fn eigen_100x100(bh: &mut criterion::Criterion) {