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 | |
parent | 6631333f378a98f1f8fe6ee6a86cb972707a216b (diff) |
uncomment the print_stat code
m--------- | salticidae | 0 | ||||
-rw-r--r-- | src/hotstuff.cpp | 30 |
2 files changed, 15 insertions, 15 deletions
diff --git a/salticidae b/salticidae -Subproject ce842602ccac8c10d025a055c966bc32f204f75 +Subproject bca672b4d549e7fea43691ad387b003936ef2b8 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); |