X-Git-Url: https://git.kernel.dk/?a=blobdiff_plain;f=libfio.c;h=960daf69f6c0d145998a58bbbcdb225b861c60d6;hb=ecb2083d39558db2664c41b5d78aa73cd51bff58;hp=20ce7cdf7d99f315777ed9d12813866154df765a;hpb=16e56d250f72e4fec4591d562a5f4d7a16ba1bb8;p=fio.git diff --git a/libfio.c b/libfio.c index 20ce7cdf..960daf69 100644 --- a/libfio.c +++ b/libfio.c @@ -34,6 +34,7 @@ #include "os/os.h" #include "filelock.h" #include "helper_thread.h" +#include "filehash.h" /* * Just expose an empty list, if the OS does not support disk util stats @@ -134,7 +135,6 @@ void clear_io_state(struct thread_data *td, int all) void reset_all_stats(struct thread_data *td) { - struct timeval tv; int i; reset_io_counters(td, 1); @@ -148,12 +148,11 @@ void reset_all_stats(struct thread_data *td) td->rwmix_issues = 0; } - fio_gettime(&tv, NULL); - memcpy(&td->epoch, &tv, sizeof(tv)); - memcpy(&td->start, &tv, sizeof(tv)); - memcpy(&td->iops_sample_time, &tv, sizeof(tv)); - memcpy(&td->bw_sample_time, &tv, sizeof(tv)); - memcpy(&td->ss.prev_time, &tv, sizeof(tv)); + set_epoch_time(td, td->o.log_unix_epoch); + memcpy(&td->start, &td->epoch, sizeof(struct timeval)); + memcpy(&td->iops_sample_time, &td->epoch, sizeof(struct timeval)); + memcpy(&td->bw_sample_time, &td->epoch, sizeof(struct timeval)); + memcpy(&td->ss.prev_time, &td->epoch, sizeof(struct timeval)); lat_target_reset(td); clear_rusage_stat(td); @@ -379,6 +378,8 @@ int initialize_fio(char *envp[]) return 1; } + file_hash_init(); + /* * We need locale for number printing, if it isn't set then just * go with the US format.