X-Git-Url: https://git.kernel.dk/?p=fio.git;a=blobdiff_plain;f=stat.c;h=74c2686c660ca33b76b12e85eefab3a68e933e7c;hp=5e7c593fc050dcc12420685bffa2855bda0a0b77;hb=7903bf87725b18495a06f7199342f167147712eb;hpb=d730bc584efd96359ecc838ee7316a2127100b68 diff --git a/stat.c b/stat.c index 5e7c593f..74c2686c 100644 --- a/stat.c +++ b/stat.c @@ -2020,7 +2020,7 @@ static void __add_log_sample(struct io_log *iolog, unsigned long val, s = get_sample(iolog, cur_log, cur_log->nr_samples); s->val = val; - s->time = t; + s->time = t + iolog->td->unix_epoch; io_sample_set_ddir(iolog, s, ddir); s->bs = bs; @@ -2457,12 +2457,12 @@ int calc_log_samples(void) next = min(td->o.iops_avg_time, td->o.bw_avg_time); continue; } - if (!per_unit_log(td->bw_log)) { + if (td->bw_log && !per_unit_log(td->bw_log)) { tmp = add_bw_samples(td, &now); if (tmp < next) next = tmp; } - if (!per_unit_log(td->iops_log)) { + if (td->iops_log && !per_unit_log(td->iops_log)) { tmp = add_iops_samples(td, &now); if (tmp < next) next = tmp;