mirror of
https://github.com/NixOS/nix.git
synced 2025-11-15 23:12:44 +01:00
SourceExprCommand: Print evaluator stats
This commit is contained in:
parent
76325ce5cd
commit
b19b221f98
2 changed files with 7 additions and 0 deletions
|
|
@ -75,6 +75,8 @@ struct Installable
|
||||||
|
|
||||||
struct SourceExprCommand : virtual Args, StoreCommand, MixEvalArgs
|
struct SourceExprCommand : virtual Args, StoreCommand, MixEvalArgs
|
||||||
{
|
{
|
||||||
|
friend void mainWrapped(int argc, char * * argv);
|
||||||
|
|
||||||
Path file;
|
Path file;
|
||||||
|
|
||||||
SourceExprCommand();
|
SourceExprCommand();
|
||||||
|
|
|
||||||
|
|
@ -102,6 +102,11 @@ void mainWrapped(int argc, char * * argv)
|
||||||
|
|
||||||
args.command->prepare();
|
args.command->prepare();
|
||||||
args.command->run();
|
args.command->run();
|
||||||
|
|
||||||
|
auto c = dynamic_cast<SourceExprCommand *>(&*args.command);
|
||||||
|
if (c && c->evalState) {
|
||||||
|
c->evalState->printStats();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue