Log more information about heap size when loading derivation info

To better understand the memory usage when this is happening.
This commit is contained in:
Christopher Baines 2022-09-05 14:23:10 +01:00
parent b3d59c650a
commit 076331325a

View file

@ -854,7 +854,14 @@ WHERE job_id = $1")
(expt 2. 20)))) (expt 2. 20))))
(format (current-error-port) (format (current-error-port)
"inferior heap size: ~a MiB~%" "inferior heap: ~a MiB used (~a MiB heap)~%"
(round
(/ (inferior-eval
'(let ((stats (gc-stats)))
(- (assoc-ref stats 'heap-size)
(assoc-ref stats 'heap-free-size)))
inf)
(expt 2. 20)))
(round (round
(/ (inferior-eval '(assoc-ref (gc-stats) 'heap-size) inf) (/ (inferior-eval '(assoc-ref (gc-stats) 'heap-size) inf)
(expt 2. 20)))) (expt 2. 20))))