From e83585ce14ab6ae325c83d815dce8eb77b0e5897 Mon Sep 17 00:00:00 2001 From: Brian Norris Date: Fri, 16 Nov 2012 17:44:50 -0800 Subject: [PATCH] print stats only at end of execution --- main.cc | 2 ++ model.cc | 1 - model.h | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/main.cc b/main.cc index 10e2d3b..f55b98d 100644 --- a/main.cc +++ b/main.cc @@ -130,6 +130,8 @@ static void model_main() { model->finish_execution(); } while (model->next_execution()); + model->print_stats(); + delete model; DEBUG("Exiting\n"); diff --git a/model.cc b/model.cc index 8dcb6f3..0bc2bde 100644 --- a/model.cc +++ b/model.cc @@ -436,7 +436,6 @@ bool ModelChecker::next_execution() checkDataRaces(); print_bugs(); model_print("\n"); - print_stats(); print_summary(); } else if (DBG_ENABLED()) { model_print("\n"); diff --git a/model.h b/model.h index 85deb05..86fa3e6 100644 --- a/model.h +++ b/model.h @@ -122,6 +122,7 @@ public: void set_assert() {asserted=true;} bool is_deadlocked() const; bool is_complete_execution() const; + void print_stats() const; /** @brief Alert the model-checker that an incorrectly-ordered * synchronization was made */ @@ -246,7 +247,6 @@ private: /** @brief The cumulative execution stats */ struct execution_stats stats; void record_stats(); - void print_stats() const; bool have_bug_reports() const; void print_bugs() const; -- 2.34.1