[update patch]

wchargin-branch: param-list-matrix
wchargin-source: f866f0df2eae5f4bac2022c0db48edb0e8e6361e
This commit is contained in:
William Chargin authored and David Peter committed 2020-10-13 14:00:46 +02:00
1 parent a8a75a3b76
commit 89737785f8
2 files changed
+7 -7

No files matched your search

+3 -3
View File
@@ -16,16 +16,16 @@ impl Exporter for CsvExporter {
let mut writer = WriterBuilder::new().from_writer(vec![]);
{
let mut headers: Vec<String> = [
let mut headers: Vec<Cow<[u8]>> = [
// The list of times cannot be exported to the CSV file - omit it.
"command", "mean", "stddev", "median", "user", "system", "min", "max",
]
.iter()
.map(|x| (*x).to_string())
.map(|x| Cow::Borrowed(x.as_bytes()))
.collect();
if let Some(res) = results.first() {
for param_name in res.parameters.keys() {
headers.push(format!("parameter_{}", param_name));
headers.push(Cow::Owned(format!("parameter_{}", param_name).into_bytes()));
}
}
writer.write_record(headers)?;