Class Gauge

java.lang.Object
com.yahoo.metrics.simple.Gauge

public class Gauge extends Object
A gauge metric, i.e. a bucket of arbitrary sample values. Create a gauge metric by declaring it with MetricReceiver.declareGauge(String) or MetricReceiver.declareGauge(String, Point).
Author:
steinar
  • Method Details

    • 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 value
      p - 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