mirror of
https://github.com/sharkdp/hyperfine.git
synced 2026-11-02 17:11:28 +00:00
Add median run time to CSV and JSON export formats
This commit is contained in:
1 parent
4a67987079
commit
fb7ded6ebc
5 files changed
+21
-1
No files matched your search
@@ -3,7 +3,7 @@ use std::io;
|
||||
use std::process::Stdio;
|
||||
|
||||
use colored::*;
|
||||
use statistical::{mean, standard_deviation};
|
||||
use statistical::{mean, median, standard_deviation};
|
||||
|
||||
use crate::hyperfine::format::{format_duration, format_duration_unit};
|
||||
use crate::hyperfine::internal::{get_progress_bar, max, min, MIN_EXECUTION_TIME};
|
||||
@@ -313,6 +313,7 @@ pub fn run_benchmark(
|
||||
let t_num = times_real.len();
|
||||
let t_mean = mean(×_real);
|
||||
let t_stddev = standard_deviation(×_real, Some(t_mean));
|
||||
let t_median = median(×_real);
|
||||
let t_min = min(×_real);
|
||||
let t_max = max(×_real);
|
||||
|
||||
@@ -394,6 +395,7 @@ pub fn run_benchmark(
|
||||
cmd.get_shell_command(),
|
||||
t_mean,
|
||||
t_stddev,
|
||||
t_median,
|
||||
user_mean,
|
||||
system_mean,
|
||||
t_min,
|
||||
|
||||
Reference in new issue
Block a user