From: Karl Cronburg Date: Wed, 20 Jul 2016 20:21:55 +0000 (-0400) Subject: drifting in output of interval-averaged values was eventually causing IOP samples... X-Git-Tag: fio-2.13~4 X-Git-Url: https://git.kernel.dk/?p=fio.git;a=commitdiff_plain;h=c16556af62cd1cd1ae31b6ee8706efc43c137f77 drifting in output of interval-averaged values was eventually causing IOP samples to be dropped. --- diff --git a/stat.c b/stat.c index 96cd7649..08a402a7 100644 --- 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)