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

Function printExtraOpCounters

cachelib/interface/Stats.cpp:94–109  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

92}
93
94void printExtraOpCounters(
95 std::ostream& os,
96 const std::string& type,
97 const std::unordered_map<std::string, double>& counters) {
98 if (!counters.empty()) {
99 // Sort counter names to keep relevant counters together
100 std::set<std::string> names;
101 for (const auto& [name, _] : counters) {
102 names.insert(name);
103 }
104 os << " " << type << ":" << std::endl;
105 for (const auto& name : names) {
106 os << " " << name << "=" << counters.at(name) << std::endl;
107 }
108 };
109}
110
111} // namespace
112

Callers 1

Stats.cppFile · 0.85

Calls 2

emptyMethod · 0.45
insertMethod · 0.45

Tested by

no test coverage detected