| 5 | namespace pmon::ipc |
| 6 | { |
| 7 | void MetricCapabilities::Set(PM_METRIC metricId, size_t arraySize) |
| 8 | { |
| 9 | if (arraySize == 0) { |
| 10 | // Zero-sized capabilities are effectively "not available"; |
| 11 | // ignore rather than storing. |
| 12 | return; |
| 13 | } |
| 14 | |
| 15 | auto it = caps_.find(metricId); |
| 16 | if (it == caps_.end()) { |
| 17 | caps_.emplace(metricId, arraySize); |
| 18 | } |
| 19 | else { |
| 20 | it->second = arraySize; |
| 21 | } |
| 22 | } |
| 23 | |
| 24 | void MetricCapabilities::Merge(const MetricCapabilities& capsToMerge) |
| 25 | { |
no test coverage detected