stat: fix unified_rw_reporting=both BW and IOPS
authorVincent Fu <vincent.fu@samsung.com>
Wed, 4 Dec 2024 19:00:53 +0000 (19:00 +0000)
committerVincent Fu <vincent.fu@samsung.com>
Wed, 4 Dec 2024 19:00:53 +0000 (19:00 +0000)
When unified_rw_reporting=both, the value for the significant_figures
option is not populated in the struct thread_stat containing the mixed
r/w/t data. Thus, when bandwidth and IOPS numerical values are converted
to strings, they are converted to "0".

This patch populates the significant figures member of struct
thread_stat for the mixed r/w/t data.

Fixes: https://github.com/axboe/fio/issues/1844
Signed-off-by: Vincent Fu <vincent.fu@samsung.com>
stat.c

diff --git a/stat.c b/stat.c
index c5413f2f138e6b231bf4114796873da3aa11874d..f1984dcea906d0921a006bd2638cba431a4f14f0 100644 (file)
--- a/stat.c
+++ b/stat.c
@@ -507,6 +507,7 @@ static struct thread_stat *gen_mixed_ddir_stats_from_ts(struct thread_stat *ts)
        ts_lcl->slat_percentiles = ts->slat_percentiles;
        ts_lcl->percentile_precision = ts->percentile_precision;
        memcpy(ts_lcl->percentile_list, ts->percentile_list, sizeof(ts->percentile_list));
+       ts_lcl->sig_figs = ts->sig_figs;
 
        sum_thread_stats(ts_lcl, ts);