3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-15 05:18:44 +00:00

collect statistics under lock #3604

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2020-03-31 13:33:18 -07:00
parent ad2e6ff2b4
commit 98b43322b1

View file

@ -667,13 +667,15 @@ private:
std::ostream& display(std::ostream& out) {
unsigned n_models, n_unsat;
double n_progress;
statistics st;
{
std::lock_guard<std::mutex> lock(m_mutex);
n_models = m_models.size();
n_unsat = m_num_unsat;
n_progress = m_progress;
st.copy(m_stats);
}
m_stats.display(out);
st.display(out);
m_queue.display(out);
out << "(tactic.parallel :unsat " << n_unsat << " :progress " << n_progress << "% :models " << n_models << ")\n";
return out;