Skip to content

Commit 7c225d7

Browse files
committed
emit fractional benchmark nanoseconds in libtest's JSON output format
1 parent 6431fc8 commit 7c225d7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/src/formatters/json.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -167,8 +167,8 @@ impl<T: Write> OutputFormatter for JsonFormatter<T> {
167167
),
168168

169169
TestResult::TrBench(ref bs) => {
170-
let median = bs.ns_iter_summ.median as usize;
171-
let deviation = (bs.ns_iter_summ.max - bs.ns_iter_summ.min) as usize;
170+
let median = bs.ns_iter_summ.median;
171+
let deviation = bs.ns_iter_summ.max - bs.ns_iter_summ.min;
172172

173173
let mbps = if bs.mb_s == 0 {
174174
String::new()

0 commit comments

Comments
 (0)