[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] scripts: gc: Report size in MiBs instead of bytes.
From: |
Taylan Kammer |
Subject: |
[PATCH] scripts: gc: Report size in MiBs instead of bytes. |
Date: |
Fri, 22 Jun 2018 22:18:50 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) |
Thoughts?
I'm quite out of the loop and would appreciate if someone told me where
to best push this if it's OK. :-)
>From 4742df4c050fdcfd6caa76baa2c191f5adaa2a30 Mon Sep 17 00:00:00 2001
From: Taylan Kammer <address@hidden>
Date: Fri, 22 Jun 2018 21:55:26 +0200
Subject: [PATCH] scripts: gc: Report size in MiBs instead of bytes.
* guix/scripts/gc.scm (guix-gc): Show info in MiBs not bytes.
---
guix/scripts/gc.scm | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/guix/scripts/gc.scm b/guix/scripts/gc.scm
index e4ed7227f..3ec2d76b1 100644
--- a/guix/scripts/gc.scm
+++ b/guix/scripts/gc.scm
@@ -199,10 +199,10 @@ Invoke the garbage collector.\n"))
;; Attempt to have at least SPACE bytes available in STORE.
(let ((free (free-disk-space (%store-prefix))))
(if (> free space)
- (info (G_ "already ~h bytes available on ~a, nothing to do~%")
- free (%store-prefix))
+ (info (G_ "already ~h MiBs available on ~a, nothing to do~%")
+ (/ free 1024 1024) (%store-prefix))
(let ((to-free (- space free)))
- (info (G_ "freeing ~h bytes~%") to-free)
+ (info (G_ "freeing ~h MiBs~%") (/ to-free 1024 1024))
(collect-garbage store to-free)))))
(with-error-handling
@@ -234,10 +234,10 @@ Invoke the garbage collector.\n"))
(ensure-free-space store free-space))
(min-freed
(let-values (((paths freed) (collect-garbage store min-freed)))
- (info (G_ "freed ~h bytes~%") freed)))
+ (info (G_ "freed ~h MiBs~%") (/ freed 1024 1024))))
(else
(let-values (((paths freed) (collect-garbage store)))
- (info (G_ "freed ~h bytes~%") freed))))))
+ (info (G_ "freed ~h MiBs~%") (/ freed 1024 1024)))))))
((delete)
(delete-paths store (map direct-store-path paths)))
((list-references)
--
2.17.1
Taylan
- [PATCH] scripts: gc: Report size in MiBs instead of bytes.,
Taylan Kammer <=