MCPcopy Create free account
hub / github.com/bytedance/terarkdb / ToString

Method ToString

utilities/simulator_cache/sim_cache.cc:282–292  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

280 }
281
282 virtual std::string ToString() const override {
283 std::string res;
284 res.append("SimCache MISSes: " + std::to_string(get_miss_counter()) + "\n");
285 res.append("SimCache HITs: " + std::to_string(get_hit_counter()) + "\n");
286 char buff[350];
287 auto lookups = get_miss_counter() + get_hit_counter();
288 snprintf(buff, sizeof(buff), "SimCache HITRATE: %.2f%%\n",
289 (lookups == 0 ? 0 : get_hit_counter() * 100.0f / lookups));
290 res.append(buff);
291 return res;
292 }
293
294 virtual std::string GetPrintableOptions() const override {
295 std::string ret;

Callers 4

AssertCursorResultsMethod · 0.45
DeserializeMethod · 0.45
ReportLookupMethod · 0.45
ReportAddMethod · 0.45

Calls 2

to_stringFunction · 0.85
appendMethod · 0.45

Tested by 1

AssertCursorResultsMethod · 0.36