Package com.yahoo.metrics.simple
Class Counter
java.lang.Object
com.yahoo.metrics.simple.Counter
A counter metric. Create a counter by declaring it with
MetricReceiver.declareCounter(String)
or
MetricReceiver.declareCounter(String, Point)
.- Author:
- steinar
-
Method Summary
Modifier and TypeMethodDescriptionvoid
add()
Increase the dimension-less/zero-point value of this counter by 1.void
add
(long n) Add to the dimension-less/zero-point value of this counter.void
Add to this metric at the given point.void
Increase this metric at the given point by 1.builder()
Create a PointBuilder with default dimension values as given when this counter was declared.
-
Method Details
-
add
public void add()Increase the dimension-less/zero-point value of this counter by 1. -
add
public void add(long n) Add to the dimension-less/zero-point value of this counter.- Parameters:
n
- the amount by which to increase this counter
-
add
Increase this metric at the given point by 1.- Parameters:
p
- the point in the metric space at which to increase this metric by 1
-
add
Add to this metric at the given point.- Parameters:
n
- the amount by which to increase this counterp
- the point in the metric space at which to add to the metric
-
builder
Create a PointBuilder with default dimension values as given when this counter was declared.- Returns:
- a PointBuilder reflecting the default dimension values of this counter
-