aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2023-03-28 18:29:41 +0100
committerChristopher Baines <mail@cbaines.net>2023-03-28 18:29:41 +0100
commit0bdf88680d349591ad05da245bf36fbc0d11e2a4 (patch)
tree50e734a9a176cd0602327cf94a3b40370023292d
parent0ab4f17e57fb3e02a4f9869fe48b498164caa61d (diff)
downloadbuild-coordinator-0bdf88680d349591ad05da245bf36fbc0d11e2a4.tar
build-coordinator-0bdf88680d349591ad05da245bf36fbc0d11e2a4.tar.gz
Add more logging around parallel hooks
I still can't reproduce any problems locally, so this might help work out what the state of the different threads are.
-rw-r--r--guix-build-coordinator/utils.scm16
1 files changed, 16 insertions, 0 deletions
diff --git a/guix-build-coordinator/utils.scm b/guix-build-coordinator/utils.scm
index 30b26fe..c2e503f 100644
--- a/guix-build-coordinator/utils.scm
+++ b/guix-build-coordinator/utils.scm
@@ -1293,6 +1293,22 @@ References: ~a~%"
(let ((idle-threads (hash-count (lambda (index val)
(eq? #f val))
running-job-args)))
+
+ (let ((thread-info
+ (hash-fold
+ (lambda (k v result)
+ (string-append
+ result
+ (simple-format #f " ~A: ~A" k v)))
+ ""
+ running-job-args)))
+ (unless (string-null? thread-info)
+ (display
+ (string-append
+ (simple-format #f "~A thread pool: " name)
+ thread-info
+ "\n\n"))))
+
(when (= 0 idle-threads)
(start-new-threads-if-necessary (get-thread-count))))