| 689 | } |
| 690 | |
| 691 | CacheComponentStats 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 |
nothing calls this directly
no test coverage detected