Package io.opencensus.stats
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
withDouble
typed values.- Since:
- 0.8
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class io.opencensus.stats.Measure
Measure.MeasureDouble, Measure.MeasureLong
-
-
Field Summary
-
Fields inherited from class io.opencensus.stats.Measure
NAME_MAX_LENGTH
-
-
Constructor Summary
Constructors Constructor Description MeasureDouble()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description static Measure.MeasureDouble
create(java.lang.String name, java.lang.String description, java.lang.String unit)
Constructs a newMeasure.MeasureDouble
.abstract java.lang.String
getDescription()
Detailed description of the measure, used in documentation.abstract java.lang.String
getName()
Name of measure, as aString
.abstract java.lang.String
getUnit()
The units in whichMeasure
values are measured.<T> T
match(Function<? super Measure.MeasureDouble,T> p0, Function<? super Measure.MeasureLong,T> p1, Function<? super Measure,T> defaultFunction)
Applies the given match function to the underlying data type.
-
-
-
Method Detail
-
create
public static Measure.MeasureDouble create(java.lang.String name, java.lang.String description, java.lang.String unit)
Constructs a newMeasure.MeasureDouble
.- Parameters:
name
- name ofMeasure
. Suggested format:<web_host>/<path>
.description
- description ofMeasure
.unit
- unit ofMeasure
.- 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.
-
getName
public abstract java.lang.String getName()
Description copied from class:Measure
Name of measure, as aString
. Should be a ASCII string with a length no greater than 255 characters.Suggested format for name:
<web_host>/<path>
.
-
getDescription
public abstract java.lang.String getDescription()
Description copied from class:Measure
Detailed description of the measure, used in documentation.- Specified by:
getDescription
in classMeasure
-
getUnit
public abstract java.lang.String getUnit()
Description copied from class:Measure
The units in whichMeasure
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.
-
-