From: Jens Axboe Date: Wed, 17 Jan 2007 06:42:30 +0000 (+1100) Subject: [PATCH] Only generate global bandwidth log if write_bw_log set X-Git-Tag: fio-1.12~143 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=ae4020f762a87c428a430ffff1c10dd2a3644e98;p=fio.git [PATCH] Only generate global bandwidth log if write_bw_log set Signed-off-by: Jens Axboe --- diff --git a/eta.c b/eta.c index feda8d0f..0b022502 100644 --- a/eta.c +++ b/eta.c @@ -242,8 +242,10 @@ void print_thread_status(void) r_rate = (io_bytes[0] - prev_io_bytes[0]) / mtime; w_rate = (io_bytes[1] - prev_io_bytes[1]) / mtime; fio_gettime(&prev_time, NULL); - add_agg_sample(r_rate, DDIR_READ); - add_agg_sample(w_rate, DDIR_WRITE); + if (write_bw_log) { + add_agg_sample(r_rate, DDIR_READ); + add_agg_sample(w_rate, DDIR_WRITE); + } memcpy(prev_io_bytes, io_bytes, sizeof(io_bytes)); }