Class Metric
- java.lang.Object
-
- com.yahoo.vespa.model.admin.monitoring.Metric
-
@Immutable public class Metric extends Object
Helper class to model a metric.- Author:
- trygve, gjoranv
-
-
Field Summary
Fields Modifier and Type Field Description String
description
Map<String,String>
dimensions
String
name
String
outputName
-
Constructor Summary
Constructors Constructor Description Metric(String name)
Creates a metric with same outputname as metricnameMetric(String name, String outputName)
Creates a metric with empty descriptionMetric(String name, String outputName, String description)
Metric(String name, String outputName, String description, Map<String,String> dimensions)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Metric
addDimensionsFrom(Metric other)
Returns a new Metric that is a combination of this and the given metric.boolean
equals(Object o)
Two metrics are considered equal if they have the same name.int
hashCode()
String
toString()
-
-
-
Method Detail
-
addDimensionsFrom
public Metric addDimensionsFrom(Metric other)
Returns a new Metric that is a combination of this and the given metric. New dimensions from the given metric are added, but already existing dimensions will be kept unchanged.- Parameters:
other
- The metric to add dimensions from.- Returns:
- A new metric with dimensions from this and the other.
-
equals
public boolean equals(Object o)
Two metrics are considered equal if they have the same name.
-
-