From 9547af1fb7fa26d6a3299ede363fc2faaae85908 Mon Sep 17 00:00:00 2001 From: Gereon Kremer Date: Mon, 2 Aug 2021 17:05:54 -0700 Subject: 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. --- src/main/command_executor.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'src/main/command_executor.cpp') 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; + } } } -- cgit v1.2.3