APISonar


com.linkedin.kafka.cruisecontrol.metricsreporter.metric.CruiseControlMetric.time

> com > linkedin > kafka > cruisecontrol > metricsreporter > metric > CruiseControlMetric > time
com APIs linkedin APIs kafka APIs cruisecontrol APIs metricsreporter APIs metric APIs CruiseControlMetric APIs time APIs

Example 1
void addMetric(CruiseControlMetric metric) {
    int brokerId = metric.brokerId();
    LOG.trace("Adding cruise control metric {}", metric);
    _maxMetricTimestamp = Math.max(metric.time(), _maxMetricTimestamp);
    _brokerLoad.compute(brokerId, (bid, load) -> {
      BrokerLoad brokerLoad = load == null ? new BrokerLoad() : load;
      brokerLoad.recordMetric(metric);
      return brokerLoad;
    });
  }
Example 2
void recordCruiseControlMetric(CruiseControlMetric ccm) {
    RawMetricType rawMetricType = ccm.rawMetricType();
    ValueHolder
        valueHolder = _rawMetricsByType.computeIfAbsent(rawMetricType, mt -> getValueHolderFor(rawMetricType));
    valueHolder.recordValue(ccm.value(), ccm.time());
  }