| 344 | |
| 345 | template <MetricKind metric_kind, typename Value, int NumLabels> |
| 346 | MetricCollector<metric_kind, Value, NumLabels> MetricCollectorGetter::Get( |
| 347 | const MetricDef<metric_kind, Value, NumLabels>* const metric_def) { |
| 348 | if (allowed_metric_def_ != metric_def) { |
| 349 | LOG(FATAL) << "Expected collection for: " << allowed_metric_def_->name() |
| 350 | << " but instead got: " << metric_def->name(); |
| 351 | } |
| 352 | |
| 353 | return collector_->GetMetricCollector(metric_def, registration_time_millis_, |
| 354 | collector_); |
| 355 | } |
| 356 | |
| 357 | } // namespace monitoring |
| 358 | } // namespace tensorflow |