MCPcopy Create free account
hub / github.com/apple/foundationdb / log

Method log

fdbserver/KeyValueStoreRocksDB.actor.cpp:573–591  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

571}
572
573void PerfContextMetrics::log(bool ignoreZeroMetric) {
574 TraceEvent e("RocksDBPerfContextMetrics");
575 e.setMaxEventLength(20000);
576 for (auto& [name, metric, vals] : metrics) {
577 uint64_t s = 0;
578 for (auto& v : vals) {
579 s = s + v;
580 }
581 if (ignoreZeroMetric && s == 0)
582 continue;
583 e.detail("Sum" + (std::string)name, s);
584 for (int i = 0; i < SERVER_KNOBS->ROCKSDB_READ_PARALLELISM; i++) {
585 if (vals[i] != 0)
586 e.detail("RD" + std::to_string(i) + name, vals[i]);
587 }
588 if (vals[SERVER_KNOBS->ROCKSDB_READ_PARALLELISM] != 0)
589 e.detail("WR" + (std::string)name, vals[SERVER_KNOBS->ROCKSDB_READ_PARALLELISM]);
590 }
591}
592
593uint64_t PerfContextMetrics::getRocksdbPerfcontextMetric(int metric) {
594 switch (metric) {

Calls 2

detailMethod · 0.80
to_stringFunction · 0.50

Tested by 5

Future<Void> clearDataFunction · 0.36
Future<bool> runTestFunction · 0.36
whenFunction · 0.36