Remove BenchmarkResult::new

This commit is contained in:
David Peter authored and David Peter committed 2022-02-06 20:19:50 +01:00
1 parent 4fa0aba266
commit 81b737fdc1
5 files changed
+201 -243

No files matched your search

+26 -27
View File
@@ -60,44 +60,43 @@ fn test_csv() {
use std::collections::BTreeMap;
let exporter = CsvExporter::default();
// NOTE: results are fabricated
let results = vec![
BenchmarkResult::new(
String::from("FOO=one BAR=two command | 1"),
1.0,
Some(2.0),
1.0,
3.0,
4.0,
5.0,
6.0,
vec![7.0, 8.0, 9.0],
vec![Some(0), Some(0), Some(0)],
{
BenchmarkResult {
command: String::from("FOO=one BAR=two command | 1"),
mean: 1.0,
stddev: Some(2.0),
median: 1.0,
user: 3.0,
system: 4.0,
min: 5.0,
max: 6.0,
times: Some(vec![7.0, 8.0, 9.0]),
exit_codes: vec![Some(0), Some(0), Some(0)],
parameters: {
let mut params = BTreeMap::new();
params.insert("foo".into(), "one".into());
params.insert("bar".into(), "two".into());
params
},
),
BenchmarkResult::new(
String::from("FOO=one BAR=seven command | 2"),
11.0,
Some(12.0),
11.0,
13.0,
14.0,
15.0,
16.5,
vec![17.0, 18.0, 19.0],
vec![Some(0), Some(0), Some(0)],
{
},
BenchmarkResult {
command: String::from("FOO=one BAR=seven command | 2"),
mean: 11.0,
stddev: Some(12.0),
median: 11.0,
user: 13.0,
system: 14.0,
min: 15.0,
max: 16.5,
times: Some(vec![17.0, 18.0, 19.0]),
exit_codes: vec![Some(0), Some(0), Some(0)],
parameters: {
let mut params = BTreeMap::new();
params.insert("foo".into(), "one".into());
params.insert("bar".into(), "seven".into());
params
},
),
},
];
let exps: String = String::from(
"command,mean,stddev,median,user,system,min,max,parameter_bar,parameter_foo\n\