struct io_u *io_u = NULL;
struct timeval e;
- td->cur_off = 0;
- td->last_kb = 0;
-
for (td->this_io_kb = 0; td->this_io_kb < td->kb;) {
int ret;
struct timeval s, e;
unsigned long usec;
- td->cur_off = 0;
- td->last_kb = 0;
-
for (td->this_io_kb = 0; td->this_io_kb < td->kb;) {
struct timespec ts = { .tv_sec = 0, .tv_nsec = 0};
struct timespec *timeout;
gettimeofday(&td->start, NULL);
- if (td->ratemin)
- memcpy(&td->lastrate, &td->start, sizeof(td->start));
+ while (td->loops--) {
+ gettimeofday(&td->stat_sample_time, NULL);
+
+ if (td->ratemin)
+ memcpy(&td->lastrate, &td->stat_sample_time, sizeof(td->lastrate));
- memcpy(&td->stat_sample_time, &td->start, sizeof(td->start));
+ td->cur_off = 0;
+ td->last_kb = 0;
+ td->stat_io_kb = 0;
- while (td->loops--) {
if (!td->use_aio) {
do_sync_io(td);