From 2ed14d595d326461897d06696aee049e9beb09cc Mon Sep 17 00:00:00 2001 From: Dimitri Fontaine Date: Tue, 20 Oct 2015 23:39:15 +0200 Subject: [PATCH] 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. --- src/utils/report.lisp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/utils/report.lisp b/src/utils/report.lisp index a1cb1aa..bde0f28 100644 --- a/src/utils/report.lisp +++ b/src/utils/report.lisp @@ -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