Report on the GC when processing revisions
This commit is contained in:
parent
50127de12a
commit
cdffef2397
1 changed files with 14 additions and 1 deletions
|
|
@ -22,6 +22,7 @@
|
||||||
#:use-module (srfi srfi-71)
|
#:use-module (srfi srfi-71)
|
||||||
#:use-module (ice-9 match)
|
#:use-module (ice-9 match)
|
||||||
#:use-module (ice-9 threads)
|
#:use-module (ice-9 threads)
|
||||||
|
#:use-module (ice-9 format)
|
||||||
#:use-module (ice-9 exceptions)
|
#:use-module (ice-9 exceptions)
|
||||||
#:use-module (ice-9 textual-ports)
|
#:use-module (ice-9 textual-ports)
|
||||||
#:use-module (ice-9 hash-table)
|
#:use-module (ice-9 hash-table)
|
||||||
|
|
@ -2392,7 +2393,14 @@ SELECT 1 FROM derivation_source_file_nars WHERE derivation_source_file_id = $1"
|
||||||
(with-time-logging "updating builds.derivation_output_details_set_id"
|
(with-time-logging "updating builds.derivation_output_details_set_id"
|
||||||
(update-builds-derivation-output-details-set-id
|
(update-builds-derivation-output-details-set-id
|
||||||
conn
|
conn
|
||||||
(fibers-force guix-revision-id-promise))))
|
(fibers-force guix-revision-id-promise)))
|
||||||
|
(let ((stats (gc-stats)))
|
||||||
|
(format (current-error-port)
|
||||||
|
"gc-stats: time taken: ~3fs, times: ~d~%"
|
||||||
|
(/ (assq-ref stats 'gc-time-taken)
|
||||||
|
internal-time-units-per-second)
|
||||||
|
(assq-ref stats 'gc-times))
|
||||||
|
#t))
|
||||||
(begin
|
(begin
|
||||||
(simple-format #t "Failed to generate store item for ~A\n"
|
(simple-format #t "Failed to generate store item for ~A\n"
|
||||||
commit)
|
commit)
|
||||||
|
|
@ -2800,6 +2808,11 @@ SKIP LOCKED")
|
||||||
|
|
||||||
(resource-pool-retry-checkout-timeout 120)
|
(resource-pool-retry-checkout-timeout 120)
|
||||||
|
|
||||||
|
(add-hook! after-gc-hook
|
||||||
|
(lambda ()
|
||||||
|
(simple-format (current-error-port)
|
||||||
|
"after gc\n")))
|
||||||
|
|
||||||
(exec-query conn "BEGIN")
|
(exec-query conn "BEGIN")
|
||||||
|
|
||||||
;; (spawn-fiber
|
;; (spawn-fiber
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue