diff options
author | Gereon Kremer <gereon.kremer@cs.rwth-aachen.de> | 2021-04-15 21:30:49 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-15 19:30:49 +0000 |
commit | 63647b1d79df6f287ea6599958b16fce44b8271d (patch) | |
tree | b16d4c6c76f74a63c7695fdd7c03c4bd05501ee2 /src/util | |
parent | 1bbcce82a9b8c122a0921a46265534e796047faa (diff) |
Fix printing of stats when aborted. (#6362)
This PR improves/fixes printing of statistics when the solver has been aborted, i.e. when we use printSafe(), and a few other minor issues with the new statistics setup.
add toString() methods for TypeConstant, api::Kind to allow for automatic printing by print_safe<>()
improve kindToString() to avoid std::stringstream
fix newlines between statistics in printSafe()
make printing of histograms consistent
make --stats-all, --stats-expert and --stats-every-check automatically enable --stats (and vice versa)
Diffstat (limited to 'src/util')
-rw-r--r-- | src/util/statistics_registry.cpp | 2 | ||||
-rw-r--r-- | src/util/statistics_value.h | 2 |
2 files changed, 1 insertions, 3 deletions
diff --git a/src/util/statistics_registry.cpp b/src/util/statistics_registry.cpp index ebd16ebc0..51da36aba 100644 --- a/src/util/statistics_registry.cpp +++ b/src/util/statistics_registry.cpp @@ -97,7 +97,7 @@ void StatisticsRegistry::printSafe(int fd) const safe_print(fd, s.first); safe_print(fd, " = "); s.second->printSafe(fd); - safe_print(fd, '\n'); + safe_print(fd, "\n"); } } } diff --git a/src/util/statistics_value.h b/src/util/statistics_value.h index 09f429187..950bdd4ab 100644 --- a/src/util/statistics_value.h +++ b/src/util/statistics_value.h @@ -154,11 +154,9 @@ struct StatisticHistogramValue : StatisticBaseValue { safe_print(fd, ", "); } - safe_print(fd, "("); safe_print<Integral>(fd, static_cast<Integral>(i + d_offset)); safe_print(fd, ": "); safe_print<uint64_t>(fd, d_hist[i]); - safe_print(fd, ")"); } } safe_print(fd, " }"); |