diff options
Diffstat (limited to 'vespaclient-core/src/main/java/com/yahoo/clientmetrics/ClientMetrics.java')
-rwxr-xr-x | vespaclient-core/src/main/java/com/yahoo/clientmetrics/ClientMetrics.java | 26 |
1 files changed, 4 insertions, 22 deletions
diff --git a/vespaclient-core/src/main/java/com/yahoo/clientmetrics/ClientMetrics.java b/vespaclient-core/src/main/java/com/yahoo/clientmetrics/ClientMetrics.java index a94d006675f..ff54f3d4063 100755 --- a/vespaclient-core/src/main/java/com/yahoo/clientmetrics/ClientMetrics.java +++ b/vespaclient-core/src/main/java/com/yahoo/clientmetrics/ClientMetrics.java @@ -1,39 +1,21 @@ // Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.clientmetrics; -import com.yahoo.messagebus.Reply; -import com.yahoo.metrics.*; -import com.yahoo.text.XMLWriter; - -import java.io.IOException; -import java.io.OutputStream; -import java.io.PrintStream; -import java.text.DecimalFormat; -import java.text.NumberFormat; -import java.util.ArrayList; -import java.util.List; +import java.util.HashMap; +import java.util.Map; /** * @author thomasg */ public class ClientMetrics { - MetricSet topSet; - SumMetric sum; - List<String> routes = new ArrayList<String>(); + Map<String, RouteMetricSet> routes = new HashMap<>(); public ClientMetrics() { - topSet = new SimpleMetricSet("routes", "", "", null); - sum = new SumMetric("total", "", "Messages sent to all routes", topSet); - } - public MetricSet getMetricSet() { - return topSet; } public void addRouteMetricSet(RouteMetricSet metric) { - topSet.registerMetric(metric); - sum.addMetricToSum(metric); - routes.add(metric.getRoute()); + routes.put(metric.getRoute(), metric); } } |