mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-10 08:16:15 +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()
|
EvalCommand::~EvalCommand()
|
||||||
{
|
{
|
||||||
if (evalState)
|
if (evalState)
|
||||||
evalState->printStats();
|
evalState->maybePrintStats();
|
||||||
}
|
}
|
||||||
|
|
||||||
ref<Store> EvalCommand::getEvalStore()
|
ref<Store> EvalCommand::getEvalStore()
|
||||||
|
|
|
@ -2491,7 +2491,7 @@ bool EvalState::fullGC() {
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void EvalState::printStats()
|
void EvalState::maybePrintStats()
|
||||||
{
|
{
|
||||||
bool showStats = getEnv("NIX_SHOW_STATS").value_or("0") != "0";
|
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
|
* Performs a full memory GC before printing the statistics, so that the
|
||||||
* GC statistics are more accurate.
|
* GC statistics are more accurate.
|
||||||
*/
|
*/
|
||||||
void printStats();
|
void maybePrintStats();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Print statistics, unconditionally, cheaply, without performing a GC first.
|
* 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) {
|
auto buildPaths = [&](const std::vector<DerivedPath> & paths) {
|
||||||
/* Note: we do this even when !printMissing to efficiently
|
/* 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));
|
op(globals, std::move(opFlags), std::move(opArgs));
|
||||||
|
|
||||||
globals.state->printStats();
|
globals.state->maybePrintStats();
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -189,7 +189,7 @@ static int main_nix_instantiate(int argc, char * * argv)
|
||||||
evalOnly, outputKind, xmlOutputSourceLocation, e);
|
evalOnly, outputKind, xmlOutputSourceLocation, e);
|
||||||
}
|
}
|
||||||
|
|
||||||
state->printStats();
|
state->maybePrintStats();
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue