mirror of
https://github.com/sharkdp/hyperfine.git
synced 2026-11-01 08:50:19 +00:00
Group units, formatting, and statistics under quantity
This commit is contained in:
1 parent
bef66df7e4
commit
aa14b8c0d9
20 files changed
+266
-265
No files matched your search
+3
-3
@@ -5,7 +5,7 @@ use csv::WriterBuilder;
|
||||
use super::Exporter;
|
||||
use crate::benchmark::benchmark_result::BenchmarkResult;
|
||||
use crate::options::SortOrder;
|
||||
use crate::util::units::Unit;
|
||||
use crate::quantity::TimeUnit;
|
||||
|
||||
use anyhow::Result;
|
||||
|
||||
@@ -16,7 +16,7 @@ impl Exporter for CsvExporter {
|
||||
fn serialize(
|
||||
&self,
|
||||
results: &[BenchmarkResult],
|
||||
_unit: Option<Unit>,
|
||||
_unit: Option<TimeUnit>,
|
||||
_sort_order: SortOrder,
|
||||
) -> Result<Vec<u8>> {
|
||||
let mut writer = WriterBuilder::new().from_writer(vec![]);
|
||||
@@ -110,7 +110,7 @@ fn test_csv() {
|
||||
|
||||
let actual = String::from_utf8(
|
||||
exporter
|
||||
.serialize(&results, Some(Unit::Second), SortOrder::Command)
|
||||
.serialize(&results, Some(TimeUnit::Second), SortOrder::Command)
|
||||
.unwrap(),
|
||||
)
|
||||
.unwrap();
|
||||
|
||||
Reference in new issue
Block a user