We inadvertently only updated the read stat sample time cache,
so writes never logged any activity since negativ time spent is
rounded to zero.
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
clear_state = 0;
while (keep_running(td)) {
fio_gettime(&td->start, NULL);
clear_state = 0;
while (keep_running(td)) {
fio_gettime(&td->start, NULL);
- memcpy(&td->ts.stat_sample_time, &td->start, sizeof(td->start));
+ memcpy(&td->ts.stat_sample_time[0], &td->start,
+ sizeof(td->start));
+ memcpy(&td->ts.stat_sample_time[1], &td->start,
+ sizeof(td->start));
memcpy(&td->tv_cache, &td->start, sizeof(td->start));
if (td->o.ratemin[0] || td->o.ratemin[1])
memcpy(&td->tv_cache, &td->start, sizeof(td->start));
if (td->o.ratemin[0] || td->o.ratemin[1])