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

Method getStats

cachelib/interface/components/FlashCacheComponent.cpp:691–711  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

689}
690
691CacheComponentStats FlashCacheComponent::getStats() const noexcept {
692 CacheComponentStats stats(*stats_);
693
694 // Populate find throughput from BlockCache's counters
695 stats.find_.throughput_.calls_ = cache_->lookupCount_.get();
696 stats.find_.throughput_.hits_ = cache_->succLookupCount_.get();
697 stats.find_.throughput_.misses_ =
698 stats.find_.throughput_.calls_ - stats.find_.throughput_.hits_;
699
700 coroToFiberLatency_->visitQuantileEstimator(
701 stats.extraStats_.createCountVisitor(), "coro_to_fiber_hop_latency_ns");
702 cache_->getCounters(stats.extraStats_.createCountVisitor());
703
704 // Populate numItems from BlockCache's index
705 auto it = stats.extraStats_.getCounts().find("navy_bc_items");
706 if (it != stats.extraStats_.getCounts().end()) {
707 stats.numItems = static_cast<size_t>(it->second);
708 }
709
710 return stats;
711}
712
713// ============================================================================
714// ConsistentFlashCacheComponent

Callers

nothing calls this directly

Calls 7

createCountVisitorMethod · 0.80
toEstimatesMethod · 0.80
getMethod · 0.45
getCountersMethod · 0.45
findMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected