From: Haomai Wang Date: Mon, 22 Jun 2015 05:01:24 +0000 (+0800) Subject: AsyncConnection: Fix msgr send bytes perf counter statistic X-Git-Tag: v9.0.3~115^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=53d6c1f1798450cba39a3ed3cb5bedaff7183549;p=ceph.git AsyncConnection: Fix msgr send bytes perf counter statistic prepare_send_message may be called twice, we need to move to write_message Signed-off-by: Haomai Wang --- diff --git a/src/msg/async/AsyncConnection.cc b/src/msg/async/AsyncConnection.cc index 921b9ba75072..977415011edd 100644 --- a/src/msg/async/AsyncConnection.cc +++ b/src/msg/async/AsyncConnection.cc @@ -2238,7 +2238,6 @@ void AsyncConnection::prepare_send_message(uint64_t features, Message *m, buffer old_footer.flags = footer.flags; bl.append((char*)&old_footer, sizeof(old_footer)); } - logger->inc(l_msgr_send_bytes, bl.length()); } int AsyncConnection::write_message(Message *m, bufferlist& bl) @@ -2276,6 +2275,7 @@ int AsyncConnection::write_message(Message *m, bufferlist& bl) complete_bl.claim_append(bl); + logger->inc(l_msgr_send_bytes, bl.length()); ldout(async_msgr->cct, 20) << __func__ << " sending " << m->get_seq() << " " << m << dendl; int rc = _try_send(complete_bl);