[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
23/33: Fix the pool metrics
From: |
Christopher Baines |
Subject: |
23/33: Fix the pool metrics |
Date: |
Wed, 14 Aug 2024 05:01:29 -0400 (EDT) |
cbaines pushed a commit to branch master
in repository data-service.
commit d8ade0ea11a93011385208ea1cd1e2f2230fe6ba
Author: Christopher Baines <mail@cbaines.net>
AuthorDate: Mon Jul 29 11:24:24 2024 +0100
Fix the pool metrics
---
guix-data-service/web/server.scm | 44 ++++++++++++++++++++--------------------
1 file changed, 22 insertions(+), 22 deletions(-)
diff --git a/guix-data-service/web/server.scm b/guix-data-service/web/server.scm
index d56066e..1be3ef4 100644
--- a/guix-data-service/web/server.scm
+++ b/guix-data-service/web/server.scm
@@ -101,7 +101,6 @@
(%guix-data-service-metrics-registry registry)
(let ((finished? (make-condition))
- (render-metrics (make-render-metrics registry))
(request-scheduler #f))
(call-with-sigint
(lambda ()
@@ -218,27 +217,28 @@ port. Also, the port used can be changed by passing the
--port option.\n"
conn)))
request-scheduler)
- (run-server/patched
- (lambda (request body)
- (metric-increment requests-metric)
-
- (let ((reply (make-channel)))
- (spawn-fiber
- (lambda ()
- (call-with-values
- (lambda ()
- (handler request finished? body controller
- secret-key-base
- startup-completed
- render-metrics))
- (lambda vals
- (put-message reply vals))))
- request-scheduler
- #:parallel? #t)
-
- (apply values (get-message reply))))
- #:host host
- #:port port))
+ (let ((render-metrics (make-render-metrics registry)))
+ (run-server/patched
+ (lambda (request body)
+ (metric-increment requests-metric)
+
+ (let ((reply (make-channel)))
+ (spawn-fiber
+ (lambda ()
+ (call-with-values
+ (lambda ()
+ (handler request finished? body controller
+ secret-key-base
+ startup-completed
+ render-metrics))
+ (lambda vals
+ (put-message reply vals))))
+ request-scheduler
+ #:parallel? #t)
+
+ (apply values (get-message reply))))
+ #:host host
+ #:port port)))
#:unwind? #t)))
;; Guile sometimes just seems to stop listening on the port, so try
- 06/33: Add more time logging in to insert-missing-derivations, (continued)
- 06/33: Add more time logging in to insert-missing-derivations, Christopher Baines, 2024/08/14
- 27/33: Get the test suite working again, Christopher Baines, 2024/08/14
- 20/33: Try using 2 threads for the server, Christopher Baines, 2024/08/14
- 22/33: Tweak timeouts in resource-pool-stats, Christopher Baines, 2024/08/14
- 24/33: Stream the render-revision-package-derivations JSON response, Christopher Baines, 2024/08/14
- 28/33: Parallelise inserting package derivation distribution counts, Christopher Baines, 2024/08/14
- 29/33: Start trying to handle GC happening while processing revisions, Christopher Baines, 2024/08/14
- 33/33: Use system-ids for inserting distribution counts, Christopher Baines, 2024/08/14
- 31/33: Reduce chunk size, Christopher Baines, 2024/08/14
- 32/33: Add more logging to backfilling guix_revision_package_derivation_distribution_counts, Christopher Baines, 2024/08/14
- 23/33: Fix the pool metrics,
Christopher Baines <=
- 17/33: Reduce the WAL size threshold, Christopher Baines, 2024/08/14
- 25/33: Add the fiberize utility, Christopher Baines, 2024/08/14
- 30/33: Check the WAL size for each chunk, Christopher Baines, 2024/08/14