mirror of
git://git.savannah.gnu.org/guix/data-service.git
synced 2023-12-14 03:23:03 +01:00
Fix call-with-time-logging in (guix-data-service utils)
It was just recording 0.
This commit is contained in:
parent
e394d1d6ad
commit
6235c6e33b
|
@ -32,14 +32,13 @@
|
|||
|
||||
(define (call-with-time-logging action thunk)
|
||||
(simple-format #t "debug: Starting ~A\n" action)
|
||||
(let-values
|
||||
((result
|
||||
(thunk)))
|
||||
(let* ((start-time (current-time))
|
||||
(time-taken (- (current-time) start-time)))
|
||||
(let ((start-time (current-time)))
|
||||
(let-values
|
||||
((result (thunk)))
|
||||
(let ((time-taken (- (current-time) start-time)))
|
||||
(simple-format #t "debug: Finished ~A, took ~A seconds\n"
|
||||
action time-taken)
|
||||
(apply values result))))
|
||||
action time-taken))
|
||||
(apply values result))))
|
||||
|
||||
(define-syntax-rule (with-time-logging action exp ...)
|
||||
"Log under NAME the time taken to evaluate EXP."
|
||||
|
|
Loading…
Reference in a new issue