aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2020-12-23 18:26:42 +0000
committerChristopher Baines <mail@cbaines.net>2020-12-23 18:26:42 +0000
commit72e0e170ea3f084310c16cbdccaa292b9136329d (patch)
tree07cc32f7adbaa122e30f0524e7d115a64fd124f1
parent28342e3f951fa9e6125a6062afd43fee7e651849 (diff)
downloadbuild-coordinator-72e0e170ea3f084310c16cbdccaa292b9136329d.tar
build-coordinator-72e0e170ea3f084310c16cbdccaa292b9136329d.tar.gz
Fix issue with the change of the load average period
-rw-r--r--guix-build-coordinator/agent.scm2
-rw-r--r--scripts/guix-build-coordinator-agent.in2
2 files changed, 2 insertions, 2 deletions
diff --git a/guix-build-coordinator/agent.scm b/guix-build-coordinator/agent.scm
index f7a41b8..76be5bd 100644
--- a/guix-build-coordinator/agent.scm
+++ b/guix-build-coordinator/agent.scm
@@ -92,7 +92,7 @@
metrics-file)))
(define (wait-for-low-load build-id)
- (let ((current-load (get-load-average)))
+ (let ((current-load (get-load-average #:period 1)))
(when (>= current-load max-1min-load-average)
(log-msg lgr 'INFO
build-id
diff --git a/scripts/guix-build-coordinator-agent.in b/scripts/guix-build-coordinator-agent.in
index 4d0666d..7be261f 100644
--- a/scripts/guix-build-coordinator-agent.in
+++ b/scripts/guix-build-coordinator-agent.in
@@ -96,7 +96,7 @@
(systems . (,guix-config:%system))
(metrics-file
. "/var/lib/prometheus/node-exporter/guix-build-coordinator-agent.prom")
- (max-5min-load-average
+ (max-1min-load-average
. ,(get-available-processing-units))))
(define (parse-options options defaults args)