@Beta public class Gauge extends Object
MetricReceiver.declareGauge(String)
or
MetricReceiver.declareGauge(String, Point)
.Modifier and Type | Field and Description |
---|---|
private Point |
defaultPosition |
private String |
name |
private MetricReceiver |
receiver |
Constructor and Description |
---|
Gauge(String name,
Point defaultPosition,
MetricReceiver receiver) |
Modifier and Type | Method and 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.
|
@Nullable private final Point defaultPosition
private final String name
private final MetricReceiver receiver
Gauge(String name, Point defaultPosition, MetricReceiver receiver)
public void sample(double x)
x
- sample valuepublic void sample(double x, Point p)
x
- sample valuep
- position/dimension values for the samplepublic PointBuilder builder()
Copyright © 2018. All rights reserved.