From 5ad21bdbfb1b2a3dd44234c892d0e4c644816f53 Mon Sep 17 00:00:00 2001 From: Dimitri Fontaine Date: Fri, 2 Sep 2016 13:39:21 +0200 Subject: [PATCH] Add stats about how many files we processed. In the FILENAME MATCHING case it might be good to have the information, which can also explain some of the timing spent. The example in test/bossa.load currently loads data from 296 files total... --- src/sources/common/md-methods.lisp | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/src/sources/common/md-methods.lisp b/src/sources/common/md-methods.lisp index f1edb03..43cc50f 100644 --- a/src/sources/common/md-methods.lisp +++ b/src/sources/common/md-methods.lisp @@ -140,14 +140,18 @@ (let* ((lp:*kernel* (make-kernel worker-count)) (channel (lp:make-channel)) (path-list (expand-spec (source copy)))) - (loop :for path-spec :in path-list - :do (let ((table-source (clone-copy-for copy path-spec))) - (copy-from table-source - :concurrency concurrency - :kernel lp:*kernel* - :channel channel - :on-error-stop on-error-stop - :disable-triggers disable-triggers))) + (with-stats-collection ("Files Processed" :section :post + :use-result-as-read t + :use-result-as-rows t) + (loop :for path-spec :in path-list + :count t + :do (let ((table-source (clone-copy-for copy path-spec))) + (copy-from table-source + :concurrency concurrency + :kernel lp:*kernel* + :channel channel + :on-error-stop on-error-stop + :disable-triggers disable-triggers)))) ;; end kernel (with-stats-collection ("COPY Threads Completion" :section :post