diff options
author | Christopher Baines <mail@cbaines.net> | 2021-12-21 09:50:34 +0000 |
---|---|---|
committer | Christopher Baines <mail@cbaines.net> | 2021-12-21 09:50:34 +0000 |
commit | 7ab549e4eae56b3fa254e31da30d37e2e7e4d8eb (patch) | |
tree | e177aafd9251e8521e3c8f8f9091a9097b7722ff /guix-build-coordinator/coordinator.scm | |
parent | 3bdd3c72d99b0d6b64572dff3dc08d4d84071876 (diff) | |
download | build-coordinator-7ab549e4eae56b3fa254e31da30d37e2e7e4d8eb.tar build-coordinator-7ab549e4eae56b3fa254e31da30d37e2e7e4d8eb.tar.gz |
Log delays for the coordinator thread channels
Diffstat (limited to 'guix-build-coordinator/coordinator.scm')
-rw-r--r-- | guix-build-coordinator/coordinator.scm | 40 |
1 files changed, 31 insertions, 9 deletions
diff --git a/guix-build-coordinator/coordinator.scm b/guix-build-coordinator/coordinator.scm index 61e004d..f9081dc 100644 --- a/guix-build-coordinator/coordinator.scm +++ b/guix-build-coordinator/coordinator.scm @@ -217,16 +217,38 @@ (let ((chunked-request-channel ;; There are fibers issues when trying to read the chunked ;; requests, so do this in dedicated threads. - (make-worker-thread-channel (const '()) - #:parallelism 16 - #:log-exception? - (lambda (exn) - (not - (chunked-input-ended-prematurely-error? - exn))))) + (make-worker-thread-channel + (const '()) + #:parallelism 16 + #:log-exception? + (lambda (exn) + (not + (chunked-input-ended-prematurely-error? + exn))) + #:delay-logger + (lambda (seconds-delayed) + (log-delay "chunked request channel" + seconds-delayed) + (when (> seconds-delayed 0.1) + (format + (current-error-port) + "warning: chunked request channel delayed by ~1,2f seconds~%" + seconds-delayed))))) + + (substitutes-channel - (make-worker-thread-channel (const '()) - #:parallelism 2))) + (make-worker-thread-channel + (const '()) + #:parallelism 2 + #:delay-logger + (lambda (seconds-delayed) + (log-delay "substitute channel" + seconds-delayed) + (when (> seconds-delayed 0.1) + (format + (current-error-port) + "warning: substitutes channel delayed by ~1,2f seconds~%" + seconds-delayed)))))) (let ((finished? (make-condition))) (call-with-sigint |