Class DescriptiveRatioGauge

java.lang.Object
com.inductiveautomation.ignition.gateway.metrics.DescriptiveRatioGauge
All Implemented Interfaces:
com.codahale.metrics.Gauge<Double>, com.codahale.metrics.Metric, DescriptiveMetric
Direct Known Subclasses:
DatasourceResourcesMetric, DefaultResourceEntityDelegate.ActiveResourcesMetric, DefaultResourceEntityDelegate.EnabledResourcesMetric, MetricBuilder.SupplierDrivenDescriptiveRatioGauge

public abstract class DescriptiveRatioGauge extends Object implements com.codahale.metrics.Gauge<Double>, DescriptiveMetric
This class is mostly a copy of the RatioGauge from the Metrics library. The difference is that the Ratio itself and its numerator and denominator are exposed so that the gauge can be rendered as a radio of X over Y rather than just as a number.
  • Constructor Details

  • Method Details

    • getDescription

      public String getDescription(Locale locale)
      Description copied from interface: DescriptiveMetric
      A short description of what this metric represents. For example "JVM Heap Size" or "Thread Count" or "Subsystem X script executions"
      Specified by:
      getDescription in interface DescriptiveMetric
    • getUnits

      public String getUnits(Locale locale)
      Description copied from interface: DescriptiveMetric
      A short string representing the units of this metric. For example "MB" or "threads" or "executions"
      Specified by:
      getUnits in interface DescriptiveMetric
    • getRatio

      public abstract DescriptiveRatioGauge.Ratio getRatio()
      Returns:
      the Ratio which is the gauge's current value
    • getErrorValue

      public Double getErrorValue()
      Returns:
      how much of the gauge's current value represents an errored state
    • getValue

      public Double getValue()
      Specified by:
      getValue in interface com.codahale.metrics.Gauge<Double>