Skip to content

Commit 837f0cd

Browse files
Hao Wufacebook-github-bot
Hao Wu
authored andcommitted
Migrate object cache stats
Summary: .. and kill the isRate check. Reviewed By: jiayuebao Differential Revision: D41112357 fbshipit-source-id: 7e9c7f69950963711e6e863ec50a02c64280c471
1 parent 9b007a6 commit 837f0cd

File tree

1 file changed

+14
-7
lines changed

1 file changed

+14
-7
lines changed

cachelib/experimental/objcache2/ObjectCache-inl.h

+14-7
Original file line numberDiff line numberDiff line change
@@ -314,13 +314,20 @@ void ObjectCache<AllocatorT>::remove(folly::StringPiece key) {
314314
template <typename AllocatorT>
315315
void ObjectCache<AllocatorT>::getObjectCacheCounters(
316316
const util::CounterVisitor& visitor) const {
317-
visitor("objcache.lookups", lookups_.get());
318-
visitor("objcache.lookups.l1_hits", succL1Lookups_.get());
319-
visitor("objcache.inserts", inserts_.get());
320-
visitor("objcache.inserts.errors", insertErrors_.get());
321-
visitor("objcache.replaces", replaces_.get());
322-
visitor("objcache.removes", removes_.get());
323-
visitor("objcache.evictions", evictions_.get());
317+
visitor("objcache.lookups", lookups_.get(),
318+
util::CounterVisitor::CounterType::RATE);
319+
visitor("objcache.lookups.l1_hits", succL1Lookups_.get(),
320+
util::CounterVisitor::CounterType::RATE);
321+
visitor("objcache.inserts", inserts_.get(),
322+
util::CounterVisitor::CounterType::RATE);
323+
visitor("objcache.inserts.errors", insertErrors_.get(),
324+
util::CounterVisitor::CounterType::RATE);
325+
visitor("objcache.replaces", replaces_.get(),
326+
util::CounterVisitor::CounterType::RATE);
327+
visitor("objcache.removes", removes_.get(),
328+
util::CounterVisitor::CounterType::RATE);
329+
visitor("objcache.evictions", evictions_.get(),
330+
util::CounterVisitor::CounterType::RATE);
324331
visitor("objcache.object_size_bytes", getTotalObjectSize());
325332
}
326333

0 commit comments

Comments
 (0)