implement 'unit_base' option to select between KB and Kbit et. al.
[fio.git] / eta.c
diff --git a/eta.c b/eta.c
index e08b5f7975a2ef1d5b91b071725b90192f706b92..50d229c4a9f16d172c3429620df8e5837545b1ce 100644 (file)
--- a/eta.c
+++ b/eta.c
@@ -319,6 +319,7 @@ int calc_thread_status(struct jobs_eta *je, int force)
                unified_rw_rep += td->o.unified_rw_rep;
                if (is_power_of_2(td->o.kb_base))
                        je->is_pow2 = 1;
                unified_rw_rep += td->o.unified_rw_rep;
                if (is_power_of_2(td->o.kb_base))
                        je->is_pow2 = 1;
+               je->unit_base = td->o.unit_base;
                if (td->o.bw_avg_time < bw_avg_time)
                        bw_avg_time = td->o.bw_avg_time;
                if (td->runstate == TD_RUNNING || td->runstate == TD_VERIFYING
                if (td->o.bw_avg_time < bw_avg_time)
                        bw_avg_time = td->o.bw_avg_time;
                if (td->runstate == TD_RUNNING || td->runstate == TD_VERIFYING
@@ -474,7 +475,7 @@ void display_thread_status(struct jobs_eta *je)
 
                for (ddir = DDIR_READ; ddir < DDIR_RWDIR_CNT; ddir++) {
                        rate_str[ddir] = num2str(je->rate[ddir], 5,
 
                for (ddir = DDIR_READ; ddir < DDIR_RWDIR_CNT; ddir++) {
                        rate_str[ddir] = num2str(je->rate[ddir], 5,
-                                               1024, je->is_pow2, 8);
+                                               1024, je->is_pow2, je->unit_base);
                        iops_str[ddir] = num2str(je->iops[ddir], 4, 1, 0, 0);
                }
 
                        iops_str[ddir] = num2str(je->iops[ddir], 4, 1, 0, 0);
                }