aboutsummaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2018-01-29 12:17:20 +0100
committerLudovic Courtès <ludo@gnu.org>2018-01-29 18:06:47 +0100
commit23fecf8f3d2469a3de4f7ffae16224b0d21cc265 (patch)
treeea97ae0bcebbca263ceb08e8c85b810d122b80fb /bin
parentfcd1bc13bce741a96a315ed0b0d06dc8e88519f9 (diff)
downloadcuirass-23fecf8f3d2469a3de4f7ffae16224b0d21cc265.tar
cuirass-23fecf8f3d2469a3de4f7ffae16224b0d21cc265.tar.gz
cuirass: Log resource usage statistics regularly.
* src/cuirass/logging.scm (log-monitoring-stats): New procedure. * bin/cuirass.in (main): Add a fiber that calls it regularly.
Diffstat (limited to 'bin')
-rw-r--r--bin/cuirass.in8
1 files changed, 8 insertions, 0 deletions
diff --git a/bin/cuirass.in b/bin/cuirass.in
index 580c2be..5c11ff0 100644
--- a/bin/cuirass.in
+++ b/bin/cuirass.in
@@ -142,6 +142,14 @@ exec ${GUILE:-@GUILE@} --no-auto-compile -e main -s "$0" "$@"
(run-cuirass-server db #:host host #:port port))))
#:parallel? #t)
+ (spawn-fiber
+ (essential-task
+ 'monitor exit-channel
+ (lambda ()
+ (while #t
+ (log-monitoring-stats)
+ (sleep 600)))))
+
(primitive-exit (get-message exit-channel))))))
;; Most of our code is I/O so preemption doesn't matter much (it