[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
01/01: profiles: Add elapsed time to manual-database hook to output mess
From: |
Ludovic Courtès |
Subject: |
01/01: profiles: Add elapsed time to manual-database hook to output message. |
Date: |
Tue, 16 May 2017 17:39:47 -0400 (EDT) |
civodul pushed a commit to branch master
in repository guix.
commit 516bfed7a37b94970526997e562e14c0aa62ba57
Author: Maxim Cournoyer <address@hidden>
Date: Mon May 15 09:05:48 2017 -0700
profiles: Add elapsed time to manual-database hook to output message.
* guix/profiles.scm (manual-database): Add elapsed time to manual-database
hook to output message.
Signed-off-by: Ludovic Courtès <address@hidden>
---
guix/profiles.scm | 18 +++++++++++++-----
1 file changed, 13 insertions(+), 5 deletions(-)
diff --git a/guix/profiles.scm b/guix/profiles.scm
index eb172ef..6733f10 100644
--- a/guix/profiles.scm
+++ b/guix/profiles.scm
@@ -957,6 +957,7 @@ the entries in MANIFEST."
#~(begin
(use-modules (guix build utils)
(srfi srfi-1)
+ (srfi srfi-19)
(srfi srfi-26))
(define entries
@@ -1011,16 +1012,23 @@ the entries in MANIFEST."
(mkdir-p man-directory)
(setenv "MANPATH" (string-join entries ":"))
- (format #t "creating manual page database for ~a packages...~%"
+ (format #t "Creating manual page database for ~a packages... "
(length entries))
(force-output)
-
- (zero? (system* #+(file-append man-db "/bin/mandb")
- "--quiet" "--create"
- "-C" "man_db.conf"))))
+ (let* ((start-time (current-time))
+ (exit-status (system* #+(file-append man-db "/bin/mandb")
+ "--quiet" "--create"
+ "-C" "man_db.conf"))
+ (duration (time-difference (current-time) start-time)))
+ (format #t "done in ~,3f s~%"
+ (+ (time-second duration)
+ (* (time-nanosecond duration) (expt 10 -9))))
+ (force-output)
+ (zero? exit-status))))
(gexp->derivation "manual-database" build
#:modules '((guix build utils)
+ (srfi srfi-19)
(srfi srfi-26))
#:local-build? #t))