From b4f2e75acbee64474c4da4cfad33ac7b697b619e Mon Sep 17 00:00:00 2001 From: Zhiqiang Wang Date: Fri, 6 Feb 2015 11:00:14 +0800 Subject: [PATCH] osd: add perf counter for proxy read Signed-off-by: Zhiqiang Wang --- src/osd/OSD.cc | 1 + src/osd/OSD.h | 1 + src/osd/ReplicatedPG.cc | 2 ++ 3 files changed, 4 insertions(+) diff --git a/src/osd/OSD.cc b/src/osd/OSD.cc index 27296bcefdec6..ade620af9008a 100644 --- a/src/osd/OSD.cc +++ b/src/osd/OSD.cc @@ -2139,6 +2139,7 @@ void OSD::create_logger() osd_plb.add_u64_counter(l_osd_tier_dirty, "tier_dirty"); osd_plb.add_u64_counter(l_osd_tier_clean, "tier_clean"); osd_plb.add_u64_counter(l_osd_tier_delay, "tier_delay"); + osd_plb.add_u64_counter(l_osd_tier_proxy_read, "tier_proxy_read"); osd_plb.add_u64_counter(l_osd_agent_wake, "agent_wake"); osd_plb.add_u64_counter(l_osd_agent_skip, "agent_skip"); diff --git a/src/osd/OSD.h b/src/osd/OSD.h index 6bd518d600e5f..229b942de683e 100644 --- a/src/osd/OSD.h +++ b/src/osd/OSD.h @@ -134,6 +134,7 @@ enum { l_osd_tier_dirty, l_osd_tier_clean, l_osd_tier_delay, + l_osd_tier_proxy_read, l_osd_agent_wake, l_osd_agent_skip, diff --git a/src/osd/ReplicatedPG.cc b/src/osd/ReplicatedPG.cc index ba70567efd40b..f283d9dbf901a 100644 --- a/src/osd/ReplicatedPG.cc +++ b/src/osd/ReplicatedPG.cc @@ -2086,6 +2086,8 @@ void ReplicatedPG::finish_proxy_read(hobject_t oid, ceph_tid_t tid, int r) in_progress_proxy_reads.erase(oid); } + osd->logger->inc(l_osd_tier_proxy_read); + MOSDOp *m = static_cast(op->get_req()); OpContext *ctx = new OpContext(op, m->get_reqid(), prdop->ops, this); ctx->reply = new MOSDOpReply(m, 0, get_osdmap()->get_epoch(), 0, false); -- 2.39.5