diff options
author | Determinant <[email protected]> | 2019-07-02 15:16:01 -0400 |
---|---|---|
committer | Determinant <[email protected]> | 2019-07-02 15:16:01 -0400 |
commit | 454f6c0c18fa095505f285e283e108382fc53015 (patch) | |
tree | 8a8e663808afb486be7488cac7a4927ef1bd9d0d /src | |
parent | 6631333f378a98f1f8fe6ee6a86cb972707a216b (diff) |
uncomment the print_stat code
Diffstat (limited to 'src')
-rw-r--r-- | src/hotstuff.cpp | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/src/hotstuff.cpp b/src/hotstuff.cpp index bd3a42d..12a44dc 100644 --- a/src/hotstuff.cpp +++ b/src/hotstuff.cpp @@ -291,21 +291,21 @@ void HotStuffBase::print_stat() const { LOG_INFO("--- replica msg. (10s) ---"); size_t _nsent = 0; size_t _nrecv = 0; - //for (const auto &replica: peers) - //{ - // auto conn = pn.get_peer_conn(replica); - // if (conn == nullptr) continue; - // size_t ns = conn->get_nsent(); - // size_t nr = conn->get_nrecv(); - // size_t nsb = conn->get_nsentb(); - // size_t nrb = conn->get_nrecvb(); - // conn->clear_msgstat(); - // LOG_INFO("%s: %u(%u), %u(%u), %u", - // std::string(replica).c_str(), ns, nsb, nr, nrb, part_fetched_replica[replica]); - // _nsent += ns; - // _nrecv += nr; - // part_fetched_replica[replica] = 0; - //} + for (const auto &replica: peers) + { + auto conn = pn.get_peer_conn(replica); + if (conn == nullptr) continue; + size_t ns = conn->get_nsent(); + size_t nr = conn->get_nrecv(); + size_t nsb = conn->get_nsentb(); + size_t nrb = conn->get_nrecvb(); + conn->clear_msgstat(); + LOG_INFO("%s: %u(%u), %u(%u), %u", + std::string(replica).c_str(), ns, nsb, nr, nrb, part_fetched_replica[replica]); + _nsent += ns; + _nrecv += nr; + part_fetched_replica[replica] = 0; + } nsent += _nsent; nrecv += _nrecv; LOG_INFO("sent: %lu", _nsent); |