aboutsummaryrefslogtreecommitdiff
path: root/guix-qa-frontpage/manage-patch-branches.scm
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2023-10-06 11:31:14 +0100
committerChristopher Baines <mail@cbaines.net>2023-10-06 11:31:14 +0100
commitdb4344f6429139cf082fe400bcb24d1fb7c1cade (patch)
treeca3bc819cb45921df81e7acc82db5b12be347df2 /guix-qa-frontpage/manage-patch-branches.scm
parent3f289bcb7e58f8c3061c5b7ccf8786d7b456b893 (diff)
downloadqa-frontpage-db4344f6429139cf082fe400bcb24d1fb7c1cade.tar
qa-frontpage-db4344f6429139cf082fe400bcb24d1fb7c1cade.tar.gz
Instrument manage patch branches
Diffstat (limited to 'guix-qa-frontpage/manage-patch-branches.scm')
-rw-r--r--guix-qa-frontpage/manage-patch-branches.scm9
1 files changed, 8 insertions, 1 deletions
diff --git a/guix-qa-frontpage/manage-patch-branches.scm b/guix-qa-frontpage/manage-patch-branches.scm
index 7764375..88601b4 100644
--- a/guix-qa-frontpage/manage-patch-branches.scm
+++ b/guix-qa-frontpage/manage-patch-branches.scm
@@ -11,6 +11,7 @@
#:use-module (web uri)
#:use-module (web client)
#:use-module (json)
+ #:use-module (prometheus)
#:use-module (guix sets)
#:use-module (guix memoization)
#:use-module (guix build utils)
@@ -284,6 +285,7 @@
#:remove-after? #t)))
(define* (start-manage-patch-branches-thread database
+ metrics-registry
#:key (series-count 200))
(define (dig alist . parts)
(if (pair? alist)
@@ -484,7 +486,12 @@
exn))
(lambda ()
(with-throw-handler #t
- perform-pass
+ (lambda ()
+ (call-with-duration-metric
+ metrics-registry
+ "manage_patch_branches_duration_seconds"
+ perform-pass
+ #:buckets (list 30 60 120 240 480 960 1920 3840 (inf))))
(lambda args
(display (backtrace) (current-error-port))
(newline (current-error-port)))))