diff options
author | Christopher Baines <mail@cbaines.net> | 2024-05-16 18:34:31 +0100 |
---|---|---|
committer | Christopher Baines <mail@cbaines.net> | 2024-05-17 14:39:38 +0100 |
commit | c688d06cb253f86f589ecbbc0b6e3248f73ed6ec (patch) | |
tree | 8cd2a80aaf187d9400885a11384cdd05d2d812ed | |
parent | 30e24683da243304a634e13c2b5774b9a4f1567c (diff) | |
download | qa-frontpage-c688d06cb253f86f589ecbbc0b6e3248f73ed6ec.tar qa-frontpage-c688d06cb253f86f589ecbbc0b6e3248f73ed6ec.tar.gz |
Write metrics as a single string
To reduce the number of system calls.
-rw-r--r-- | guix-qa-frontpage/server.scm | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/guix-qa-frontpage/server.scm b/guix-qa-frontpage/server.scm index 3f84a08..58262dc 100644 --- a/guix-qa-frontpage/server.scm +++ b/guix-qa-frontpage/server.scm @@ -154,9 +154,10 @@ #:code 200 #:headers '((content-type . (text/plain)) (vary . (accept)))) - (lambda (port) - (write-metrics metrics-registry port) - (write-metrics plain-metrics-registry port)))) + (call-with-output-string + (lambda (port) + (write-metrics metrics-registry port) + (write-metrics plain-metrics-registry port))))) (('GET "branches") (let ((branches (with-sqlite-cache |