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 75b45733cead570f402296f38a21cafec81483bf..80e3b1681245de82e76f2f763088624335374651 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 0563efd19d413510b1d5ce6b107f254d71eadca6..bce35b9718f237512597cba8a7710d890d705280 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;