guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

03/13: Add back inferior heap size reporting


From: Christopher Baines
Subject: 03/13: Add back inferior heap size reporting
Date: Fri, 19 Jan 2024 04:57:46 -0500 (EST)

cbaines pushed a commit to branch master
in repository data-service.

commit 45d9b1ad7cb9ecacd754cc3957c7280b299596e7
Author: Christopher Baines <mail@cbaines.net>
AuthorDate: Mon Jan 15 11:49:48 2024 +0000

    Add back inferior heap size reporting
    
    I'm sure this was present before, but maybe lost during some refactoring.
---
 guix-data-service/jobs/load-new-guix-revision.scm | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/guix-data-service/jobs/load-new-guix-revision.scm 
b/guix-data-service/jobs/load-new-guix-revision.scm
index a8ef88b..a3c6527 100644
--- a/guix-data-service/jobs/load-new-guix-revision.scm
+++ b/guix-data-service/jobs/load-new-guix-revision.scm
@@ -137,7 +137,7 @@
                       (assoc-ref stats 'heap-free-size))
                    (expt 2. 20)))
                (round
-                (/ (assoc-ref (gc-stats) 'heap-size)
+                (/ (assoc-ref stats 'heap-size)
                    (expt 2. 20)))))
 
             (list (system-test-name system-test)
@@ -492,6 +492,18 @@
               args)
              #f)))
 
+       (let ((stats (gc-stats)))
+         (simple-format
+          (current-error-port)
+          "inferior heap: ~a MiB used (~a MiB heap)~%"
+          (round
+           (/ (- (assoc-ref stats 'heap-size)
+                 (assoc-ref stats 'heap-free-size))
+              (expt 2. 20)))
+          (round
+           (/ (assoc-ref stats 'heap-size)
+              (expt 2. 20)))))
+
        (vector-map
         (lambda (_ package)
           (catch



reply via email to

[Prev in Thread] Current Thread [Next in Thread]