diff options
author | Christopher Baines <mail@cbaines.net> | 2023-02-21 11:03:40 +0000 |
---|---|---|
committer | Christopher Baines <mail@cbaines.net> | 2023-02-21 11:03:40 +0000 |
commit | d016d16abb3bd047829b76a1ba3194889715150f (patch) | |
tree | bb801302cc29b52ed95a3aa96cfd1c81969bcb56 /guix-build-coordinator/datastore/sqlite.scm | |
parent | 5f092e0370002caeb6584deff45a5db18fdd9231 (diff) | |
download | build-coordinator-d016d16abb3bd047829b76a1ba3194889715150f.tar build-coordinator-d016d16abb3bd047829b76a1ba3194889715150f.tar.gz |
Support multiple return values in call-with-time-tracking
Diffstat (limited to 'guix-build-coordinator/datastore/sqlite.scm')
-rw-r--r-- | guix-build-coordinator/datastore/sqlite.scm | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/guix-build-coordinator/datastore/sqlite.scm b/guix-build-coordinator/datastore/sqlite.scm index 211f09d..0c3c8b0 100644 --- a/guix-build-coordinator/datastore/sqlite.scm +++ b/guix-build-coordinator/datastore/sqlite.scm @@ -367,11 +367,13 @@ PRAGMA optimize;"))))) (make-histogram-metric registry metric-name))) (start-time (get-internal-real-time))) - (let ((result (thunk))) - (metric-observe metric - (/ (- (get-internal-real-time) start-time) - internal-time-units-per-second)) - result)) + (call-with-values + thunk + (lambda vals + (metric-observe metric + (/ (- (get-internal-real-time) start-time) + internal-time-units-per-second)) + (apply values vals)))) (thunk))) (define (call-with-worker-thread/delay-logging channel proc) |