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

Function printThroughput

cachelib/interface/Stats.cpp:71–81  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

69
70template <typename OpThroughputCounterT>
71void printThroughput(std::ostream& os, const OpThroughputCounterT& t) {
72 os << std::endl
73 << " calls=" << t.calls_ << " successes=" << t.successes_
74 << " errors=" << t.errors_;
75 printRate(os, "successRate", t.successes_, t.calls_);
76 if constexpr (std::is_same_v<OpThroughputCounterT,
77 detail::OpFindThroughputCounters<size_t>>) {
78 os << std::endl << " hits=" << t.hits_ << " misses=" << t.misses_;
79 printRate(os, "hitRate", t.hits_, t.hits_ + t.misses_);
80 }
81}
82
83template <typename OpCounterT>
84void printOpCounters(std::ostream& os, const char* name, const OpCounterT& op) {

Callers 1

printOpCountersFunction · 0.85

Calls 1

printRateFunction · 0.85

Tested by

no test coverage detected