return i8;
}
-static void finish_disk_stats(struct thread_data *td)
+static void update_io_ticks(struct thread_data *td)
{
unsigned long ticks;
ticks = get_io_ticks(td);
- td->io_ticks = ticks - td->io_ticks;
+ td->io_ticks += (ticks - td->start_io_ticks);
+ td->start_io_ticks = ticks;
}
static int init_disk_stats(struct thread_data *td)
sprintf(td->disk_stat_path, "%s/stat", p);
}
- td->io_ticks = get_io_ticks(td);
+ td->start_io_ticks = get_io_ticks(td);
return 0;
}
td->runtime += mtime_since_now(&td->start);
update_rusage_stat(td);
+ update_io_ticks(td);
if (td->verify == VERIFY_NONE)
continue;
ret = 0;
- finish_disk_stats(td);
-
if (td->bw_log)
finish_log(td, td->bw_log, "bw");
if (td->lat_log)
* disk util stats
*/
char disk_stat_path[256];
- unsigned long io_ticks;
+ unsigned long start_io_ticks, io_ticks;
};
extern int parse_jobs_ini(char *);