drifting in output of interval-averaged values was eventually causing IOP samples...
[fio.git] / stat.c
diff --git a/stat.c b/stat.c
index 96cd7649b7cf69c4fa82311b97d9532230b86811..08a402a74c6d12e6c7bb339acce638dec5234514 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)