1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-07-03 06:11:46 +02:00

Drop the block count in the garbage collector

This commit is contained in:
Eelco Dolstra 2012-08-01 22:34:46 -04:00
parent 967d066d8e
commit 01d56c1eec
9 changed files with 23 additions and 37 deletions

View file

@ -544,10 +544,9 @@ static void opCheckValidity(Strings opFlags, Strings opArgs)
}
static string showBytes(unsigned long long bytes, unsigned long long blocks)
static string showBytes(unsigned long long bytes)
{
return (format("%d bytes (%.2f MiB, %d blocks)")
% bytes % (bytes / (1024.0 * 1024.0)) % blocks).str();
return (format("%.2f MiB") % (bytes / (1024.0 * 1024.0))).str();
}
@ -562,7 +561,7 @@ struct PrintFreed
if (show)
cout << format("%1% store paths deleted, %2% freed\n")
% results.paths.size()
% showBytes(results.bytesFreed, results.blocksFreed);
% showBytes(results.bytesFreed);
}
};
@ -735,7 +734,7 @@ static void showOptimiseStats(OptimiseStats & stats)
{
printMsg(lvlError,
format("%1% freed by hard-linking %2% files; there are %3% files with equal contents out of %4% files in total")
% showBytes(stats.bytesFreed, stats.blocksFreed)
% showBytes(stats.bytesFreed)
% stats.filesLinked
% stats.sameContents
% stats.totalFiles);