Class Gauge

java.lang.Object
com.codename1.backend.metrics.Instrument
com.codename1.backend.metrics.Gauge

public final class Gauge extends Instrument
A value read when metrics are collected -- a queue's depth, a pool's size, a @ManagedAttribute. Nothing is recorded in between, so a gauge costs nothing until something asks.
  • Method Details

    • point

      public static Map point(String key, Object label, double value)
      One labelled value, for a Gauge.MultiSource.
    • read

      public double read()

      The value now, or NaN when reading it failed.

      Application code runs here, on the exporter's thread and on the management endpoint's, so ANY throwable is contained -- an AssertionError or LinkageError escaping used to end the exporter's only thread, and every later export with it.

    • points

      public List points()
      Description copied from class: Instrument
      The current points, each a map with attributes (a map, possibly empty) and either value or, for a histogram, count, sum, min, max, bounds and buckets.
      Specified by:
      points in class Instrument