Package com.yahoo.metrics.simple
Class Gauge
- java.lang.Object
-
- com.yahoo.metrics.simple.Gauge
-
@Beta public class Gauge extends java.lang.Object
A gauge metric, i.e. a bucket of arbitrary sample values. Create a gauge metric by declaring it withMetricReceiver.declareGauge(String)
orMetricReceiver.declareGauge(String, Point)
.- Author:
- steinar
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PointBuilder
builder()
Create a PointBuilder with the default dimension values reflecting those given when this gauge was declared.void
sample(double x)
Record a sample with default or no position.void
sample(double x, Point p)
Record a sample at the given position.
-
-
-
Method Detail
-
sample
public void sample(double x)
Record a sample with default or no position.- Parameters:
x
- sample value
-
sample
public void sample(double x, Point p)
Record a sample at the given position.- Parameters:
x
- sample valuep
- position/dimension values for the sample
-
builder
public PointBuilder builder()
Create a PointBuilder with the default dimension values reflecting those given when this gauge was declared.- Returns:
- a builder initialized with defaults from this metric instance
-
-