Trick the reporting to show non-zero timings.

When calling lparallel:receive-results from the main threads we loose
the ability to measure proper per-table processing times, because it all
happens in parallel and the main threads seems to receive events in the
same millisecond as when the worker is started, meaning it's all 0.0s.

So when we don't have "secs" stats, pick the greatest of read or write
time, which we do have from the worker threads themselves.

The number are still wrong, but less so than the "0.0s" displayed before
this patch.
This commit is contained in:
Dimitri Fontaine 2015-10-20 23:39:15 +02:00
parent 69b8b0305d
commit 2ed14d595d

View File

@ -152,7 +152,10 @@
*max-length-table-name*
(format-table-name table-name))
(report-results read rows errs
(format-interval secs nil)
(cond ((> 0 secs) (format-interval secs nil))
((and rs ws (= 0 secs))
(format-interval (max rs ws) nil))
(t (format-interval secs nil)))
(when (and rs (not (= rs 0.0))) (format-interval rs nil))
(when (and ws (not (= ws 0.0))) (format-interval ws nil))))
finally (when footer