From 2595ddaae3dc36a9986294008587bbecfd0db281 Mon Sep 17 00:00:00 2001 From: Dimitri Fontaine Date: Tue, 19 Sep 2017 12:28:24 +0200 Subject: [PATCH] Fix total-line in reporting. We did it correctly for the bytes, and we need to apply the same logic to other metric: the relevant information in the total summary line is the sum from the data parts, not the sum from the postload parts. --- src/utils/report.lisp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/utils/report.lisp b/src/utils/report.lisp index 53745f4..a72d739 100644 --- a/src/utils/report.lisp +++ b/src/utils/report.lisp @@ -70,9 +70,16 @@ (table-list (mapcar (lambda (table) (gethash table (pgstate-tables data))) (pgstate-tabnames data))) - (total-bytes (reduce #'+ table-list :key #'pgtable-bytes))) + (total-bytes (reduce #'+ table-list :key #'pgtable-bytes)) + (total-read (reduce #'+ table-list :key #'pgtable-read)) + (total-rows (reduce #'+ table-list :key #'pgtable-rows)) + (total-errs (reduce #'+ table-list :key #'pgtable-errs))) (setf (state-bytes state) total-bytes) - (setf (pgstate-bytes (state-postload state)) total-bytes)) + (setf (pgstate-bytes (state-postload state)) total-bytes) + + (setf (pgstate-read (state-postload state)) total-read) + (setf (pgstate-rows (state-postload state)) total-rows) + (setf (pgstate-errs (state-postload state)) total-errs)) (pretty-print *report-stream* state format)))