diff options
author | Christopher Baines <mail@cbaines.net> | 2020-11-02 23:13:17 +0000 |
---|---|---|
committer | Christopher Baines <mail@cbaines.net> | 2020-11-02 23:13:17 +0000 |
commit | 5b72f27494a0485b47701e3c054bf5da9862d1ff (patch) | |
tree | 1796e8232f86a3888db48d666e5f05c042e1055b /guix-build-coordinator/agent-messaging/http | |
parent | 6d497282ad2478d03a27894de8e8bb4074e9f741 (diff) | |
download | build-coordinator-5b72f27494a0485b47701e3c054bf5da9862d1ff.tar build-coordinator-5b72f27494a0485b47701e3c054bf5da9862d1ff.tar.gz |
Include the Guile internal real and run times as metrics
This will help track CPU time, as well as restarts/crashes.
Diffstat (limited to 'guix-build-coordinator/agent-messaging/http')
-rw-r--r-- | guix-build-coordinator/agent-messaging/http/server.scm | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/guix-build-coordinator/agent-messaging/http/server.scm b/guix-build-coordinator/agent-messaging/http/server.scm index a8e0d46..89b64f1 100644 --- a/guix-build-coordinator/agent-messaging/http/server.scm +++ b/guix-build-coordinator/agent-messaging/http/server.scm @@ -138,7 +138,11 @@ port. Also, the port used can be changed by passing the --port option.\n" (define registry (build-coordinator-metrics-registry build-coordinator)) - (let ((builds-total + (let ((internal-real-time + (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 @@ -170,6 +174,11 @@ port. Also, the port used can be changed by passing the --port option.\n" (datastore-list-agents datastore))) (lambda () + (metric-set internal-real-time + (get-internal-real-time)) + (metric-set internal-run-time + (get-internal-run-time)) + (for-each (match-lambda ((system . count) (metric-set builds-total |