[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
01/06: Fix call-with-time-logging in (guix-data-service utils)
From: |
Christopher Baines |
Subject: |
01/06: Fix call-with-time-logging in (guix-data-service utils) |
Date: |
Sun, 1 Nov 2020 17:53:31 -0500 (EST) |
cbaines pushed a commit to branch master
in repository data-service.
commit 6235c6e33b046119e85889b834a16ee484bf5e2b
Author: Christopher Baines <mail@cbaines.net>
AuthorDate: Sun Nov 1 21:17:31 2020 +0000
Fix call-with-time-logging in (guix-data-service utils)
It was just recording 0.
---
guix-data-service/utils.scm | 13 ++++++-------
1 file changed, 6 insertions(+), 7 deletions(-)
diff --git a/guix-data-service/utils.scm b/guix-data-service/utils.scm
index 8ad60f9..7741671 100644
--- a/guix-data-service/utils.scm
+++ b/guix-data-service/utils.scm
@@ -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."
- branch master updated (e394d1d -> 375a6a3), Christopher Baines, 2020/11/01
- 02/06: Improve verbose output for fetching build information, Christopher Baines, 2020/11/01
- 01/06: Fix call-with-time-logging in (guix-data-service utils),
Christopher Baines <=
- 04/06: Support limiting fetching pending builds to specific revisions, Christopher Baines, 2020/11/01
- 05/06: Allow only fetching builds for a specific system, Christopher Baines, 2020/11/01
- 03/06: Only query recent pending builds, Christopher Baines, 2020/11/01
- 06/06: Support not querying pending builds, Christopher Baines, 2020/11/01