Refrain from issuing the summary twice.

Now that we have a proper flush system for reporting the summary at the
proper time (see 7c5396f0975be405910d66f4b5aedc89acd75c1d), refrain from
also taking care of the reporting when stopping the monitor.

Adapt the regression driver code to flush the summary after loading the
expected data, which also provides better output.

When the summary output is sent to a file, that would also create a
backup file and replace our summary with an empty new file at monitor
stop...

Fixes #499.
This commit is contained in:
Dimitri Fontaine 2017-01-03 22:57:43 +01:00
parent b239e6b556
commit 21a10235db
2 changed files with 3 additions and 6 deletions

View File

@ -68,7 +68,7 @@
:into expected-data-target
:options '(:truncate t)
:start-logger nil
:flush-summary nil)
:flush-summary t)
;; now compare both
(with-pgsql-connection (target-conn)

View File

@ -176,16 +176,13 @@
(stop
(cl-log:log-message :info "Stopping monitor")
;; report the summary now
(destructuring-bind (&key pre data post) *sections*
(unless (and (null pre) (null data) (null post))
(report-current-summary start-time)))
;; time to shut down the logger?
(when (stop-stop-logger event)
(pgloader.logs:stop-logger)))
(report-summary
(cl-log:log-message :log "report summary ~@[reset~]"
(report-summary-reset event))
(report-current-summary start-time)
(when (report-summary-reset event)