aboutsummaryrefslogtreecommitdiff
path: root/guix-build-coordinator/agent-messaging/http
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2020-12-04 18:47:10 +0000
committerChristopher Baines <mail@cbaines.net>2020-12-04 18:47:10 +0000
commitf757ac79ad0825159235240e3a37a83915fd4ccd (patch)
treedcd51067006eb9411e642a744cec455c77e4d79f /guix-build-coordinator/agent-messaging/http
parentb34287c1295526eb771c9aa78575ae73ff2f84b9 (diff)
downloadbuild-coordinator-f757ac79ad0825159235240e3a37a83915fd4ccd.tar
build-coordinator-f757ac79ad0825159235240e3a37a83915fd4ccd.tar.gz
Move some metrics out of base-datastore-metrics-updater
Some parts of this were quite slow with anything other than a small database, so instead of doing slow queries on every request, do some slow queries to setup the metrics, and then change them as part of the regular changes to the database.
Diffstat (limited to 'guix-build-coordinator/agent-messaging/http')
-rw-r--r--guix-build-coordinator/agent-messaging/http/server.scm47
1 files changed, 0 insertions, 47 deletions
diff --git a/guix-build-coordinator/agent-messaging/http/server.scm b/guix-build-coordinator/agent-messaging/http/server.scm
index 098253c..fe393be 100644
--- a/guix-build-coordinator/agent-messaging/http/server.scm
+++ b/guix-build-coordinator/agent-messaging/http/server.scm
@@ -144,25 +144,10 @@ port. Also, the port used can be changed by passing the --port option.\n"
(make-gauge-metric registry "guile_internal_real_time"))
(internal-run-time
(make-gauge-metric registry "guile_internal_run_time"))
- (builds-total
- (make-gauge-metric registry "builds_total"
- #:labels '(system)))
(allocated-builds-total
(make-gauge-metric registry
"allocated_builds_total"
#:labels '(agent_id)))
- (build-results-total
- (make-gauge-metric registry
- "build_results_total"
- #:labels '(agent_id result)))
- (setup-failures-total
- (make-gauge-metric registry
- "setup_failures_total"
- #:labels '(agent_id reason)))
- (build-allocation-plan-total
- (make-gauge-metric registry
- "build_allocation_plan_total"
- #:labels '(agent_id)))
(unprocessed-hook-events-total
(make-gauge-metric registry
"unprocessed_hook_events_total"
@@ -184,14 +169,6 @@ port. Also, the port used can be changed by passing the --port option.\n"
;; These are the db size metrics
(datastore-update-metrics! datastore)
- (for-each (match-lambda
- ((system . count)
- (metric-set builds-total
- count
- #:label-values
- `((system . ,system)))))
- (datastore-count-builds datastore))
-
(zero-metric-for-agents allocated-builds-total)
(for-each (match-lambda
((agent-id . count)
@@ -200,30 +177,6 @@ port. Also, the port used can be changed by passing the --port option.\n"
#:label-values
`((agent_id . ,agent-id)))))
(datastore-count-allocated-builds datastore))
- (for-each (match-lambda
- (((agent-id result) . count)
- (metric-set build-results-total
- count
- #:label-values
- `((agent_id . ,agent-id)
- (result . ,result)))))
- (datastore-count-build-results datastore))
- (for-each (match-lambda
- (((agent-id reason) . count)
- (metric-set setup-failures-total
- count
- #:label-values
- `((agent_id . ,agent-id)
- (reason . ,reason)))))
- (datastore-count-setup-failures datastore))
- (zero-metric-for-agents build-allocation-plan-total)
- (for-each (match-lambda
- ((agent-id . count)
- (metric-set build-allocation-plan-total
- count
- #:label-values
- `((agent_id . ,agent-id)))))
- (datastore-count-build-allocation-plan-entries datastore))
(for-each (match-lambda
((event . _)