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
Measure
with Double
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 -
Method Summary
Modifier and TypeMethodDescriptionstatic Measure.MeasureDouble
Constructs a newMeasure.MeasureDouble
.abstract String
Detailed description of the measure, used in documentation.abstract String
getName()
Name of measure, as aString
.abstract 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.
-
Constructor Details
-
MeasureDouble
MeasureDouble()
-
-
Method Details
-
create
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
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
Description copied from class:Measure
Detailed description of the measure, used in documentation.- Specified by:
getDescription
in classMeasure
-
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.
-