From: Kozlowski Mateusz Date: Tue, 29 Mar 2022 09:27:03 +0000 (+0200) Subject: Handle finished jobs when using status-interval X-Git-Tag: fio-3.30~3^2 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=61850e56907c0d3d41be27bd59f573984c8cf00d;p=fio.git Handle finished jobs when using status-interval stat: When printing job stats with status-interval, don't keep adding values to the total runtime if the jobs are already finished. This should fix the printing of the intermediate runtime/average BW etc. Signed-off-by: Kozlowski Mateusz --- diff --git a/stat.c b/stat.c index 7947edb4..356083e2 100644 --- a/stat.c +++ b/stat.c @@ -2731,6 +2731,9 @@ int __show_running_run_stats(void) fio_gettime(&ts, NULL); for_each_td(td, i) { + if (td->runstate >= TD_EXITED) + continue; + td->update_rusage = 1; for_each_rw_ddir(ddir) { td->ts.io_bytes[ddir] = td->io_bytes[ddir]; @@ -2759,6 +2762,9 @@ int __show_running_run_stats(void) __show_run_stats(); for_each_td(td, i) { + if (td->runstate >= TD_EXITED) + continue; + if (td_read(td) && td->ts.io_bytes[DDIR_READ]) td->ts.runtime[DDIR_READ] -= rt[i]; if (td_write(td) && td->ts.io_bytes[DDIR_WRITE])