drifting in output of interval-averaged values was eventually causing IOP samples...
authorKarl Cronburg <kcronbur@redhat.com>
Wed, 20 Jul 2016 20:21:55 +0000 (16:21 -0400)
committerKarl Cronburg <kcronbur@redhat.com>
Wed, 20 Jul 2016 20:21:55 +0000 (16:21 -0400)
stat.c

diff --git a/stat.c b/stat.c
index 96cd764..08a402a 100644 (file)
--- a/stat.c
+++ b/stat.c
@@ -2142,7 +2142,7 @@ static void add_log_sample(struct thread_data *td, struct io_log *iolog,
 
        _add_stat_to_log(iolog, elapsed, td->o.log_max != 0);
 
-       iolog->avg_last = elapsed;
+       iolog->avg_last = elapsed - (this_window - iolog->avg_msec);
 }
 
 void finalize_logs(struct thread_data *td, bool unit_logs)