MCPcopy Create free account
hub / github.com/facebook/CacheLib / getObjectCacheCounters

Method getObjectCacheCounters

cachelib/object_cache/ObjectCache.h:1157–1182  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1155
1156template <typename AllocatorT>
1157void ObjectCache<AllocatorT>::getObjectCacheCounters(
1158 const util::CounterVisitor& visitor) const {
1159 visitor("objcache.lookups", lookups_.get(),
1160 util::CounterVisitor::CounterType::RATE);
1161 visitor("objcache.lookups.l1_hits", succL1Lookups_.get(),
1162 util::CounterVisitor::CounterType::RATE);
1163 visitor("objcache.inserts", inserts_.get(),
1164 util::CounterVisitor::CounterType::RATE);
1165 visitor("objcache.inserts.errors", insertErrors_.get(),
1166 util::CounterVisitor::CounterType::RATE);
1167 visitor("objcache.replaces", replaces_.get(),
1168 util::CounterVisitor::CounterType::RATE);
1169 visitor("objcache.removes", removes_.get(),
1170 util::CounterVisitor::CounterType::RATE);
1171 visitor("objcache.evictions", evictions_.get(),
1172 util::CounterVisitor::CounterType::RATE);
1173 visitor("objcache.object_size_bytes", getTotalObjectSize());
1174 visitor("objcache.key_padding_bytes", totalKeyPaddingBytes_.load());
1175 if (sizeController_) {
1176 sizeController_->getCounters(visitor);
1177 }
1178
1179 if (sizeDistTracker_) {
1180 sizeDistTracker_->getCounters(visitor);
1181 }
1182}
1183
1184template <typename AllocatorT>
1185std::map<std::string, std::string>

Calls 2

getMethod · 0.45
getCountersMethod · 0.45