steadystate: clean up checks for when steadystate termination is not engaged
authorVincent Fu <Vincent.Fu@sandisk.com>
Thu, 8 Dec 2016 19:49:57 +0000 (14:49 -0500)
committerVincent Fu <Vincent.Fu@sandisk.com>
Thu, 8 Dec 2016 19:49:57 +0000 (14:49 -0500)
stat.c
steadystate.c

diff --git a/stat.c b/stat.c
index 75b4573..80e3b16 100644 (file)
--- a/stat.c
+++ b/stat.c
@@ -663,7 +663,7 @@ static void show_ss_normal(struct thread_stat *ts, struct buf_output *out)
        unsigned long long bw_mean, iops_mean;
        const int i2p = is_power_of_2(ts->kb_base);
 
-       if (!ts->ss_state)
+       if (!ts->ss_dur)
                return;
 
        bw_mean = steadystate_bw_mean(ts);
index 0563efd..bce35b9 100644 (file)
@@ -211,7 +211,8 @@ void steadystate_check(void)
                struct steadystate_data *ss = &td->ss;
 
                if (!ss->dur || td->runstate <= TD_SETTING_UP ||
-                   td->runstate >= TD_EXITED || (ss->state & __FIO_SS_ATTAINED))
+                   td->runstate >= TD_EXITED || !ss->state ||
+                   ss->state & __FIO_SS_ATTAINED)
                        continue;
 
                td_iops = 0;