| 479 | void 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 | |
| 492 | void setOperatorRuntimeStats( |
| 493 | const std::string& name, |
| 494 | const RuntimeCounter& value, |
| 495 | std::unordered_map<std::string, RuntimeMetric>& stats) { |