stat: remove redundant unit log check
authorJens Axboe <axboe@fb.com>
Mon, 6 Jun 2016 15:28:13 +0000 (09:28 -0600)
committerJens Axboe <axboe@fb.com>
Mon, 6 Jun 2016 15:28:13 +0000 (09:28 -0600)
We only call the two functions if we know that unit logging is
disabled.

Signed-off-by: Jens Axboe <axboe@fb.com>
stat.c

diff --git a/stat.c b/stat.c
index 2e0b1da00d11242ad459b130b5c3681ccbd53140..704947f548950a3076651b54087ff6653b73a198 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)