stat: fix reversed check for ramp time
[fio.git] / stat.c
diff --git a/stat.c b/stat.c
index 53848843860011441ed60c199e17437199545a6c..a8ccd9ab2133bc0a67f1a38de6157f8513f384f2 100644 (file)
--- a/stat.c
+++ b/stat.c
@@ -2260,9 +2260,6 @@ static int add_bw_samples(struct thread_data *td, struct timeval *t)
        unsigned long spent, rate;
        enum fio_ddir ddir;
 
-       if (per_unit_log(td->bw_log))
-               return 0;
-
        spent = mtime_since(&td->bw_sample_time, t);
        if (spent < td->o.bw_avg_time &&
            td->o.bw_avg_time - spent >= 10)
@@ -2331,9 +2328,6 @@ static int add_iops_samples(struct thread_data *td, struct timeval *t)
        unsigned long spent, iops;
        enum fio_ddir ddir;
 
-       if (per_unit_log(td->iops_log))
-               return 0;
-
        spent = mtime_since(&td->iops_sample_time, t);
        if (spent < td->o.iops_avg_time &&
            td->o.iops_avg_time - spent >= 10)
@@ -2393,7 +2387,7 @@ int calc_log_samples(void)
        fio_gettime(&now, NULL);
 
        for_each_td(td, i) {
-               if (!ramp_time_over(td) ||
+               if (in_ramp_time(td) ||
                    !(td->runstate == TD_RUNNING || td->runstate == TD_VERIFYING)) {
                        next = min(td->o.iops_avg_time, td->o.bw_avg_time);
                        continue;