From c16556af62cd1cd1ae31b6ee8706efc43c137f77 Mon Sep 17 00:00:00 2001 From: Karl Cronburg Date: Wed, 20 Jul 2016 16:21:55 -0400 Subject: [PATCH] drifting in output of interval-averaged values was eventually causing IOP samples to be dropped. --- stat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) -- 2.25.1