diff options
author | Linus Nordberg <linus@nordberg.se> | 2009-06-26 07:04:52 +0200 |
---|---|---|
committer | Linus Nordberg <linus@nordberg.se> | 2009-06-26 07:04:52 +0200 |
commit | cf9c330668cdd350c067669b926f3af7e355f2a4 (patch) | |
tree | be2e7fe9e2da63dd229442c8bb6172c64d8caa86 /src/bgpstore.lisp | |
parent | 7be08db4bf7bce7f31004225c2eb0777c6d51e86 (diff) |
* src/bgpstore.lisp: Display counter.
* src/util.lisp (iso-date): New function.
Diffstat (limited to 'src/bgpstore.lisp')
-rw-r--r-- | src/bgpstore.lisp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/bgpstore.lisp b/src/bgpstore.lisp index 2c3b8ed..ba448ee 100644 --- a/src/bgpstore.lisp +++ b/src/bgpstore.lisp @@ -4,12 +4,20 @@ (defun start-bgpstore (host port) (with-connection *db-spec* - (let ((reader (new-reader host port))) + (let ((reader (new-reader host port)) + (count 0)) (do ((e (next-xml-blurb reader "BGP_MESSAGE") (next-xml-blurb reader "BGP_MESSAGE"))) ((null e)) (dolist (obj (new-entries (xml-top-elem-from-octets e))) - (insert-dao obj))) + (insert-dao obj) + (incf count) + (if (mod count 100) (format t ".") + (if (mod count 1000) (format t "+") + (if (mod count 10000) + (format t "~%~A ~A " + (iso-date (get-universal-time) t) + count)))) (close-reader)))) (defun stop-bgpstore ()) |