diff options
author | Gereon Kremer <nafur42@gmail.com> | 2021-08-02 17:05:54 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-08-03 00:05:54 +0000 |
commit | 9547af1fb7fa26d6a3299ede363fc2faaae85908 (patch) | |
tree | 18c7bc5ce076b52a6f3c39a394d9a745e63b2ae2 /src/main/command_executor.cpp | |
parent | be8c263a87f56a23c2af5cd61d04b3691bac2b19 (diff) |
Properly honor --stats-all and --stats-expert when printing statistics (#6967)
This PR fixes an issue that was introduced with fda4613 where printing the statistics would only show non-defaulted and non-expert options.
Diffstat (limited to 'src/main/command_executor.cpp')
-rw-r--r-- | src/main/command_executor.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/main/command_executor.cpp b/src/main/command_executor.cpp index ce7a46b4e..bf658dfe0 100644 --- a/src/main/command_executor.cpp +++ b/src/main/command_executor.cpp @@ -65,9 +65,15 @@ CommandExecutor::~CommandExecutor() void CommandExecutor::printStatistics(std::ostream& out) const { - if (d_solver->getOptions().base.statistics) + const auto& baseopts = d_solver->getOptions().base; + if (baseopts.statistics) { - out << d_solver->getStatistics(); + const auto& stats = d_solver->getStatistics(); + auto it = stats.begin(baseopts.statisticsExpert, baseopts.statisticsAll); + for (; it != stats.end(); ++it) + { + out << it->first << " = " << it->second << std::endl; + } } } |