From 75c08386a44c625d6d568d2f912ff5986f08b263 Mon Sep 17 00:00:00 2001 From: "Julian M. Kunkel" Date: Wed, 4 Nov 2020 20:47:30 +0000 Subject: [PATCH] Bugfix porting error for performance stats. --- src/md-workbench.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/md-workbench.c b/src/md-workbench.c index d981324..ed9ec4e 100644 --- a/src/md-workbench.c +++ b/src/md-workbench.c @@ -175,7 +175,7 @@ static void init_stats(phase_stat_t * p, size_t repeats){ static float add_timed_result(double start, double phase_start_timer, time_result_t * results, size_t pos, double * max_time, double * out_op_time){ float curtime = start - phase_start_timer; - double op_time = GetTimeStamp(); + double op_time = GetTimeStamp() - start; results[pos].runtime = (float) op_time; results[pos].time_since_app_start = curtime; if (op_time > *max_time){ @@ -248,7 +248,7 @@ static void print_p_stat(char * buff, const char * name, phase_stat_t * p, doubl // single line pos += sprintf(buff, "%s process max:%.2fs ", name, t); if(print_global){ - pos += sprintf(buff + pos, "min:%.1fs mean: %.1fs balance:%.1f stddev:%.1f ", r_min, r_mean, r_min/r_max * 100.0, r_std); + pos += sprintf(buff + pos, "min:%.2fs mean: %.2fs balance:%.1f stddev:%.1f ", r_min, r_mean, r_min/r_max * 100.0, r_std); } int ioops_per_iter = 4; if(o.read_only){