guix-commits
[Top][All Lists]
Advanced

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

03/03: Log heap size when computing system tests


From: Christopher Baines
Subject: 03/03: Log heap size when computing system tests
Date: Sun, 6 Nov 2022 09:23:47 -0500 (EST)

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

commit 95064d39a337da9f2eb7d5675e0e511301466f77
Author: Christopher Baines <mail@cbaines.net>
AuthorDate: Sun Nov 6 08:53:04 2022 +0100

    Log heap size when computing system tests
---
 guix-data-service/jobs/load-new-guix-revision.scm | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/guix-data-service/jobs/load-new-guix-revision.scm 
b/guix-data-service/jobs/load-new-guix-revision.scm
index 2eba411..5030576 100644
--- a/guix-data-service/jobs/load-new-guix-revision.scm
+++ b/guix-data-service/jobs/load-new-guix-revision.scm
@@ -382,6 +382,18 @@ WHERE job_id = $1")
     `(lambda (store)
        (map
         (lambda (system-test)
+          (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 (gc-stats) 'heap-size)
+                 (expt 2. 20)))))
+
           (list (system-test-name system-test)
                 (system-test-description system-test)
                 (filter-map



reply via email to

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