- fio_gettime(&td->end_time, NULL);
- td->runtime[0] = runtime[0] / 1000;
- td->runtime[1] = runtime[1] / 1000;
-
- if (td->ts->bw_log)
- finish_log(td, td->ts->bw_log, "bw");
- if (td->ts->slat_log)
- finish_log(td, td->ts->slat_log, "slat");
- if (td->ts->clat_log)
- finish_log(td, td->ts->clat_log, "clat");
- if (td->write_iolog_file)
- write_iolog_close(td);
- if (td->exec_postrun) {
- if (system(td->exec_postrun) < 0)
- log_err("fio: postrun %s failed\n", td->exec_postrun);
+ td->ts.runtime[0] = (runtime[0] + 999) / 1000;
+ td->ts.runtime[1] = (runtime[1] + 999) / 1000;
+ td->ts.total_run_time = mtime_since_now(&td->epoch);
+ td->ts.io_bytes[0] = td->io_bytes[0];
+ td->ts.io_bytes[1] = td->io_bytes[1];
+
+ if (td->ts.bw_log)
+ finish_log(td, td->ts.bw_log, "bw");
+ if (td->ts.slat_log)
+ finish_log(td, td->ts.slat_log, "slat");
+ if (td->ts.clat_log)
+ finish_log(td, td->ts.clat_log, "clat");
+ if (td->o.exec_postrun) {
+ if (system(td->o.exec_postrun) < 0)
+ log_err("fio: postrun %s failed\n", td->o.exec_postrun);