diff options
author | Mathias Preiner <mathias.preiner@gmail.com> | 2020-02-19 16:59:58 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-19 16:59:58 -0800 |
commit | 508ecb3007a2b6aa8b76b28dc8282247b5dba957 (patch) | |
tree | b80cab956e6b40b4cd783ceb78393006c09782b5 /src/parser | |
parent | 9705504973f6f85c6be4944c615984df7b614f67 (diff) |
resource manager: Add statistic for every resource. (#3772)
This commit adds statistics for all resource steps. A resource statistic is incremented by 1 if the resource is spent (via `spendResource`).
Fixes #3751.
Diffstat (limited to 'src/parser')
-rw-r--r-- | src/parser/parser.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/parser/parser.cpp b/src/parser/parser.cpp index 681b2a1c9..32d555718 100644 --- a/src/parser/parser.cpp +++ b/src/parser/parser.cpp @@ -640,8 +640,7 @@ Command* Parser::nextCommand() dynamic_cast<QuitCommand*>(cmd) == NULL) { // don't count set-option commands as to not get stuck in an infinite // loop of resourcing out - const Options& options = getExprManager()->getOptions(); - d_resourceManager->spendResource(options.getParseStep()); + d_resourceManager->spendResource(ResourceManager::Resource::ParseStep); } return cmd; } @@ -649,8 +648,7 @@ Command* Parser::nextCommand() Expr Parser::nextExpression() { Debug("parser") << "nextExpression()" << std::endl; - const Options& options = getExprManager()->getOptions(); - d_resourceManager->spendResource(options.getParseStep()); + d_resourceManager->spendResource(ResourceManager::Resource::ParseStep); Expr result; if (!done()) { try { |