Fix rate iops with ramp time
authorSEOKYOUNG KO <seokyoung.ko@samsung.com>
Thu, 7 Mar 2013 11:31:04 +0000 (12:31 +0100)
committerJens Axboe <axboe@kernel.dk>
Thu, 7 Mar 2013 11:31:04 +0000 (12:31 +0100)
When the ramp time is over, fio resets the ->io_issues[]
counters, but not the rwmix counters. This causes a problem
for mixed read/write workloads that are rate limited and
include a ramp time.

Fix it by resetting rwmix_issues with the regular issues.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
libfio.c

index ac629dcbb7943a0f7f0f98c21e6a5885ee05d32d..433fee4671559e0f1e4a5ad200770f0166c166fc 100644 (file)
--- a/libfio.c
+++ b/libfio.c
@@ -119,6 +119,7 @@ void reset_all_stats(struct thread_data *td)
                td->io_issues[i] = 0;
                td->ts.total_io_u[i] = 0;
                td->ts.runtime[i] = 0;
                td->io_issues[i] = 0;
                td->ts.total_io_u[i] = 0;
                td->ts.runtime[i] = 0;
+               td->rwmix_issues = 0;
        }
 
        fio_gettime(&tv, NULL);
        }
 
        fio_gettime(&tv, NULL);