X-Git-Url: https://git.kernel.dk/?a=blobdiff_plain;f=fio.c;h=43cc6af14e8ab632f731ae4106fce2b4e27ce5e7;hb=b5af82930ccfd7dda6a1b11794efb452eb76d8dc;hp=f183eeb5f3ea8da9667068c718a1780171498202;hpb=c1302d44dd1720bebe5308f976b59d879d994fd3;p=fio.git diff --git a/fio.c b/fio.c index f183eeb5..43cc6af1 100644 --- a/fio.c +++ b/fio.c @@ -734,16 +734,13 @@ static void *thread_main(void *data) if (!td->create_serialize && setup_files(td)) goto err; - if (open_files(td)) - goto err; - /* - * Do this late, as some IO engines would like to have the - * files setup prior to initializing structures. - */ if (td_io_init(td)) goto err; + if (open_files(td)) + goto err; + if (td->exec_prerun) { if (system(td->exec_prerun) < 0) goto err; @@ -792,9 +789,11 @@ static void *thread_main(void *data) } update_rusage_stat(td); - fio_gettime(&td->end_time, NULL); - td->runtime[0] = runtime[0] / 1000; - td->runtime[1] = runtime[1] / 1000; + td->ts.runtime[0] = runtime[0] / 1000; + td->ts.runtime[1] = runtime[1] / 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");