mirror of
https://github.com/sharkdp/hyperfine.git
synced 2026-11-02 17:11:28 +00:00
[update patch]
wchargin-branch: param-list-matrix wchargin-source: f866f0df2eae5f4bac2022c0db48edb0e8e6361e
This commit is contained in:
1 parent
a8a75a3b76
commit
89737785f8
2 files changed
+7
-7
No files matched your search
@@ -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)?;
|
||||
|
||||
Reference in new issue
Block a user