Fix benchmarks
They were forgotten when renaming average to mean.
This commit is contained in:
parent
978f6ec10e
commit
8c6c55190e
@ -19,7 +19,7 @@ rand = "0.3"
|
||||
streaming-stats = "0.1"
|
||||
|
||||
[[bench]]
|
||||
name = "average"
|
||||
name = "mean"
|
||||
harness = false
|
||||
|
||||
[[bench]]
|
||||
|
@ -23,16 +23,16 @@ fn initialize_vec() -> Vec<f64> {
|
||||
fn bench_average(b: &mut Bencher) {
|
||||
let values = initialize_vec();
|
||||
b.iter(|| {
|
||||
let a: average::AverageWithError = values.iter().map(|x| *x).collect();
|
||||
a
|
||||
let m: average::MeanWithError = values.iter().map(|x| *x).collect();
|
||||
m
|
||||
});
|
||||
}
|
||||
|
||||
fn bench_stats(b: &mut Bencher) {
|
||||
let values = initialize_vec();
|
||||
b.iter(|| {
|
||||
let a: stats::OnlineStats = values.iter().map(|x| *x).collect();
|
||||
a
|
||||
let m: stats::OnlineStats = values.iter().map(|x| *x).collect();
|
||||
m
|
||||
});
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user