raise exception if test start time can't be estimated
authorBen England <bengland@redhat.com>
Mon, 10 Sep 2018 12:48:05 +0000 (08:48 -0400)
committerBen England <bengland@redhat.com>
Mon, 10 Sep 2018 12:48:05 +0000 (08:48 -0400)
do not allow log_unix_epoch=1 with single-record histogram log
and no log_hist_msec parameter, because then we have no way of
estimating when the test started in absolute time.

tools/hist/fio-histo-log-pctiles.py

index a150e8e30250fb22420b3334397e411bf57a2eec..81f6de6e1a1e20842d4c83fc87594f9fe0911a6c 100755 (executable)
@@ -115,6 +115,8 @@ def parse_hist_file(logfn, buckets_per_interval, log_hist_msec):
     elif len(intervals) > 1:
         (second_timestamp, _, _, _) = intervals[1]
         start_time = first_timestamp - (second_timestamp - first_timestamp)
+    else:
+        raise FioHistoLogExc('no way to estimate test start time')
     (end_timestamp, _, _, _) = intervals[-1]
 
     return (intervals, start_time, end_timestamp)