mirror of
https://github.com/NixOS/nix.git
synced 2025-11-21 01:39:36 +01:00
Merge pull request #14364 from MarcelCoding/human-sizes
diff-closures: print sizes with dynamic unit
This commit is contained in:
commit
c5515bb22e
10 changed files with 24 additions and 30 deletions
|
|
@ -5,6 +5,7 @@
|
|||
#include "nix/util/finally.hh"
|
||||
#include "nix/util/unix-domain-socket.hh"
|
||||
#include "nix/util/signals.hh"
|
||||
#include "nix/util/util.hh"
|
||||
#include "nix/store/posix-fs-canonicalise.hh"
|
||||
|
||||
#include "store-config-private.hh"
|
||||
|
|
@ -906,9 +907,7 @@ void LocalStore::collectGarbage(const GCOptions & options, GCResults & results)
|
|||
#endif
|
||||
;
|
||||
|
||||
printInfo(
|
||||
"note: currently hard linking saves %.2f MiB",
|
||||
((unsharedSize - actualSize - overhead) / (1024.0 * 1024.0)));
|
||||
printInfo("note: currently hard linking saves %s", renderSize(unsharedSize - actualSize - overhead));
|
||||
}
|
||||
|
||||
/* While we're at it, vacuum the database. */
|
||||
|
|
|
|||
|
|
@ -312,7 +312,7 @@ void LocalStore::optimiseStore()
|
|||
|
||||
optimiseStore(stats);
|
||||
|
||||
printInfo("%s freed by hard-linking %d files", showBytes(stats.bytesFreed), stats.filesLinked);
|
||||
printInfo("%s freed by hard-linking %d files", renderSize(stats.bytesFreed), stats.filesLinked);
|
||||
}
|
||||
|
||||
void LocalStore::optimisePath(const Path & path, RepairFlag repair)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue