mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-25 15:26:17 +02:00
printStats -> maybePrintStats
This commit is contained in:
parent
f95364a803
commit
c32084a12c
6 changed files with 6 additions and 6 deletions
|
@ -98,7 +98,7 @@ EvalCommand::EvalCommand()
|
|||
EvalCommand::~EvalCommand()
|
||||
{
|
||||
if (evalState)
|
||||
evalState->printStats();
|
||||
evalState->maybePrintStats();
|
||||
}
|
||||
|
||||
ref<Store> EvalCommand::getEvalStore()
|
||||
|
|
|
@ -2491,7 +2491,7 @@ bool EvalState::fullGC() {
|
|||
#endif
|
||||
}
|
||||
|
||||
void EvalState::printStats()
|
||||
void EvalState::maybePrintStats()
|
||||
{
|
||||
bool showStats = getEnv("NIX_SHOW_STATS").value_or("0") != "0";
|
||||
|
||||
|
|
|
@ -714,7 +714,7 @@ public:
|
|||
* Performs a full memory GC before printing the statistics, so that the
|
||||
* GC statistics are more accurate.
|
||||
*/
|
||||
void printStats();
|
||||
void maybePrintStats();
|
||||
|
||||
/**
|
||||
* Print statistics, unconditionally, cheaply, without performing a GC first.
|
||||
|
|
|
@ -344,7 +344,7 @@ static void main_nix_build(int argc, char * * argv)
|
|||
}
|
||||
}
|
||||
|
||||
state->printStats();
|
||||
state->maybePrintStats();
|
||||
|
||||
auto buildPaths = [&](const std::vector<DerivedPath> & paths) {
|
||||
/* Note: we do this even when !printMissing to efficiently
|
||||
|
|
|
@ -1531,7 +1531,7 @@ static int main_nix_env(int argc, char * * argv)
|
|||
|
||||
op(globals, std::move(opFlags), std::move(opArgs));
|
||||
|
||||
globals.state->printStats();
|
||||
globals.state->maybePrintStats();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -189,7 +189,7 @@ static int main_nix_instantiate(int argc, char * * argv)
|
|||
evalOnly, outputKind, xmlOutputSourceLocation, e);
|
||||
}
|
||||
|
||||
state->printStats();
|
||||
state->maybePrintStats();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue