Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
labianchin committed Aug 3, 2018
1 parent 6a837f9 commit 75ded33
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ object MetricsHelper {
val metrics: MetricQueryResults = result.metrics().queryMetrics(MetricsFilter.builder().build())

val gauges = metricsAtSteps(metrics.getGauges.asScala)
.map{ case (k: MetricName, v: Map[String, MetricValue[GaugeResult]]) => (k.name(),
.map{ case (k: MetricName, v: Map[String, MetricValue[GaugeResult]]) => (k.getName(),
v.values.map(_.committed.getOrElse(GaugeResult.empty())).reduce(
(x: GaugeResult, y: GaugeResult) =>
if (x.getTimestamp isAfter y.getTimestamp) x else y).getValue
Expand All @@ -41,7 +41,7 @@ object MetricsHelper {
metrics.getCounters.asScala.asInstanceOf[Iterable[MetricResult[Long]]])
.map{
case (k: MetricName, v: Map[String, MetricValue[Long]]) =>
(k.name(), reduceMetricValues(v))}
(k.getName(), reduceMetricValues(v))}
(gauges.toSeq ++ counters.toSeq).toMap
}

Expand Down

0 comments on commit 75ded33

Please sign in to comment.