MCPcopy Create free account
hub / github.com/bytedance/bolt / addOperatorRuntimeStats

Function addOperatorRuntimeStats

bolt/exec/OperatorUtils.cpp:481–492  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

479void addOperatorRuntimeStats(
480 const std::string& name,
481 const RuntimeCounter& value,
482 std::unordered_map<std::string, RuntimeMetric>& stats) {
483 auto statIt = stats.find(name);
484 if (UNLIKELY(statIt == stats.end())) {
485 statIt = stats.insert(std::pair(name, RuntimeMetric(value.unit))).first;
486 } else {
487 BOLT_CHECK_EQ(statIt->second.unit, value.unit);
488 }
489 statIt->second.addValue(value.value);
490}
491
492void setOperatorRuntimeStats(
493 const std::string& name,
494 const RuntimeCounter& value,
495 std::unordered_map<std::string, RuntimeMetric>& stats) {

Callers 6

addRuntimeStatMethod · 0.85
addRuntimeStatMethod · 0.85
addRuntimeStatMethod · 0.85
addRuntimeStatMethod · 0.85
TEST_FFunction · 0.85
addRuntimeStatMethod · 0.85

Calls 5

RuntimeMetricClass · 0.85
findMethod · 0.45
endMethod · 0.45
insertMethod · 0.45
addValueMethod · 0.45

Tested by 5

addRuntimeStatMethod · 0.68
addRuntimeStatMethod · 0.68
addRuntimeStatMethod · 0.68
TEST_FFunction · 0.68
addRuntimeStatMethod · 0.68