mirror of
https://github.com/NixOS/nix
synced 2025-06-27 04:21:16 +02:00
nix-collect-garbage: Call collectGarbage() internally
This commit is contained in:
parent
4441e4cc13
commit
13493ef97c
4 changed files with 41 additions and 24 deletions
|
@ -342,4 +342,19 @@ RunPager::~RunPager()
|
|||
}
|
||||
|
||||
|
||||
string showBytes(unsigned long long bytes)
|
||||
{
|
||||
return (format("%.2f MiB") % (bytes / (1024.0 * 1024.0))).str();
|
||||
}
|
||||
|
||||
|
||||
PrintFreed::~PrintFreed()
|
||||
{
|
||||
if (show)
|
||||
std::cout << format("%1% store paths deleted, %2% freed\n")
|
||||
% results.paths.size()
|
||||
% showBytes(results.bytesFreed);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue