os/bluestore: add counter to trace extents have been removed due to compression

Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
This commit is contained in:
xie xingguo 2016-11-18 14:22:04 +08:00
parent 5013f9a3f5
commit 8037900c22
2 changed files with 7 additions and 1 deletions

View File

@ -2147,6 +2147,9 @@ int BlueStore::ExtentMap::compress_extent_map(uint64_t offset, uint64_t length)
}
}
}
if (removed && onode) {
onode->c->store->logger->inc(l_bluestore_extent_compress, removed);
}
return removed;
}
@ -2713,6 +2716,8 @@ void BlueStore::_init_logger()
"Onode extent map reshard events");
b.add_u64(l_bluestore_blob_split, "bluestore_blob_split",
"Sum for blob splitting due to resharding");
b.add_u64(l_bluestore_extent_compress, "bluestore_extent_compress",
"Sum for extents that have been removed due to compression");
logger = b.create_perf_counters();
g_ceph_context->get_perfcounters_collection()->add(logger);
}

View File

@ -94,6 +94,7 @@ enum {
l_bluestore_txc,
l_bluestore_onode_reshard,
l_bluestore_blob_split,
l_bluestore_extent_compress,
l_bluestore_last
};