Skip to content

Commit

Permalink
Merge pull request ceph#3889 from XinzeChi/wip-tier-stat
Browse files Browse the repository at this point in the history
osd: add l_osd_op_cache_hit perf counter for cache pool

Reviewed-by: Sage Weil <[email protected]>
  • Loading branch information
liewegas committed Mar 21, 2015
2 parents 714fac3 + ee54806 commit 6710aec
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/osd/OSD.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2169,6 +2169,8 @@ void OSD::create_logger()
osd_plb.add_u64_counter(l_osd_object_ctx_cache_hit, "object_ctx_cache_hit", "Object context cache hits");
osd_plb.add_u64_counter(l_osd_object_ctx_cache_total, "object_ctx_cache_total", "Object context cache lookups");

osd_plb.add_u64_counter(l_osd_op_cache_hit, "op_cache_hit");

logger = osd_plb.create_perf_counters();
cct->get_perfcounters_collection()->add(logger);
}
Expand Down
2 changes: 2 additions & 0 deletions src/osd/OSD.h
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,8 @@ enum {
l_osd_object_ctx_cache_hit,
l_osd_object_ctx_cache_total,

l_osd_op_cache_hit,

l_osd_last,
};

Expand Down
1 change: 1 addition & 0 deletions src/osd/ReplicatedPG.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1872,6 +1872,7 @@ bool ReplicatedPG::maybe_handle_cache(OpRequestRef op,
}

if (obc.get() && obc->obs.exists) {
osd->logger->inc(l_osd_op_cache_hit);
return false;
}

Expand Down

0 comments on commit 6710aec

Please sign in to comment.