Class Measure.MeasureDouble

java.lang.Object
io.opencensus.stats.Measure
io.opencensus.stats.Measure.MeasureDouble
Direct Known Subclasses:
AutoValue_Measure_MeasureDouble
Enclosing class:
Measure

@Immutable public abstract static class Measure.MeasureDouble extends Measure
Measure with Double typed values.
Since:
0.8
  • Constructor Details

    • MeasureDouble

      MeasureDouble()
  • Method Details

    • create

      public static Measure.MeasureDouble create(String name, String description, String unit)
      Constructs a new Measure.MeasureDouble.
      Parameters:
      name - name of Measure. Suggested format: <web_host>/<path>.
      description - description of Measure.
      unit - unit of Measure.
      Returns:
      a MeasureDouble.
      Since:
      0.8
    • match

      public <T> T match(Function<? super Measure.MeasureDouble,T> p0, Function<? super Measure.MeasureLong,T> p1, Function<? super Measure,T> defaultFunction)
      Description copied from class: Measure
      Applies the given match function to the underlying data type.
      Specified by:
      match in class Measure
    • getName

      public abstract String getName()
      Description copied from class: Measure
      Name of measure, as a String. Should be a ASCII string with a length no greater than 255 characters.

      Suggested format for name: <web_host>/<path>.

      Specified by:
      getName in class Measure
    • getDescription

      public abstract String getDescription()
      Description copied from class: Measure
      Detailed description of the measure, used in documentation.
      Specified by:
      getDescription in class Measure
    • getUnit

      public abstract String getUnit()
      Description copied from class: Measure
      The units in which Measure values are measured.

      The suggested grammar for a unit is as follows:

      • Expression = Component { "." Component } {"/" Component };
      • Component = [ PREFIX ] UNIT [ Annotation ] | Annotation | "1";
      • Annotation = "{" NAME "}" ;

      For example, string “MBy{transmitted}/ms” stands for megabytes per milliseconds, and the annotation transmitted inside {} is just a comment of the unit.

      Specified by:
      getUnit in class Measure