1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-16 07:22:43 +01:00

SourceExprCommand: Print evaluator stats

This commit is contained in:
Eelco Dolstra 2019-04-29 22:11:45 +02:00
parent 76325ce5cd
commit b19b221f98
2 changed files with 7 additions and 0 deletions

View file

@ -75,6 +75,8 @@ struct Installable
struct SourceExprCommand : virtual Args, StoreCommand, MixEvalArgs
{
friend void mainWrapped(int argc, char * * argv);
Path file;
SourceExprCommand();

View file

@ -102,6 +102,11 @@ void mainWrapped(int argc, char * * argv)
args.command->prepare();
args.command->run();
auto c = dynamic_cast<SourceExprCommand *>(&*args.command);
if (c && c->evalState) {
c->evalState->printStats();
}
}
}