mirror of
https://github.com/dimitri/pgloader.git
synced 2025-08-09 07:47:00 +02:00
Improve summary output.
Try at having a deterministic ouput of it, which still apparently is not always the case when using SBCL, now that it's been switched to using the explicit *terminal-io* rather than t. This change is needed for CCL support, though, where you don't get to write to the same stream from different threads.
This commit is contained in:
parent
3abcfeb569
commit
0f62751a3f
@ -161,20 +161,26 @@
|
||||
(defvar *header-cols-names* '("table name" "read" "imported" "errors" "time"))
|
||||
|
||||
(defun report-header ()
|
||||
(apply #'format t *header-cols-format* *header-cols-names*)
|
||||
(format t *header-line*))
|
||||
(apply #'format *terminal-io* *header-cols-format* *header-cols-names*)
|
||||
(terpri)
|
||||
(format *terminal-io* *header-line*)
|
||||
(terpri))
|
||||
|
||||
(defun report-table-name (table-name)
|
||||
(format t *header-tname-format* table-name))
|
||||
(format *terminal-io* *header-tname-format* table-name))
|
||||
|
||||
(defun report-results (read rows errors seconds)
|
||||
(format t *header-stats-format* read rows errors (format-interval seconds nil)))
|
||||
(format *terminal-io* *header-stats-format*
|
||||
read rows errors (format-interval seconds nil))
|
||||
(terpri))
|
||||
|
||||
(defun report-footer (legend read rows errors seconds)
|
||||
(format t *header-line*)
|
||||
(apply #'format t *header-cols-format*
|
||||
(terpri)
|
||||
(format *terminal-io* *header-line*)
|
||||
(apply #'format *terminal-io* *header-cols-format*
|
||||
(list legend read rows errors (format-interval seconds nil)))
|
||||
(format t "~&"))
|
||||
(format *terminal-io* "~&")
|
||||
(terpri))
|
||||
|
||||
;;;
|
||||
;;; Pretty print a report from a pgtable and pgstats counters
|
||||
|
Loading…
Reference in New Issue
Block a user