unit property
The unit in which the metric value is reported. It is only applicable
if the value_type is INT64, DOUBLE, or DISTRIBUTION. The
supported units are a subset of The Unified Code for Units of
Measure standard:
Basic units (UNIT)
bitbitBybytessecondminminutehhourdday
Prefixes (PREFIX)
kkilo (10**3)Mmega (10**6)Ggiga (10**9)Ttera (10**12)Ppeta (10**15)Eexa (10**18)Zzetta (10**21)Yyotta (10**24)mmilli (10**-3)umicro (10**-6)nnano (10**-9)ppico (10**-12)ffemto (10**-15)aatto (10**-18)zzepto (10**-21)yyocto (10**-24)Kikibi (2**10)Mimebi (2**20)Gigibi (2**30)Titebi (2**40)
Grammar
The grammar also includes these connectors:
/division (as an infix operator, e.g.1/s)..multiplication (as an infix operator, e.g.GBy.d)
The grammar for a unit is as follows:
Expression = Component { "." Component } { "/" Component } ;
Component = ( [ PREFIX ] UNIT | "%" ) [ Annotation ]
| Annotation
| "1"
;
Annotation = "{" NAME "}" ;
Notes:
Annotationis just a comment if it follows aUNITand is equivalent to1if it is used alone. For examples,{requests}/s == 1/s,By{transmitted}/s == By/s.NAMEis a sequence of non-blank printable ASCII characters not containing '{' or '}'.1represents dimensionless value 1, such as in1/s.%represents dimensionless value 1/100, and annotates values giving a percentage.
Implementation
@$pb.TagNumber(5)
$core.String get unit => $_getSZ(4);
Implementation
@$pb.TagNumber(5)
set unit($core.String v) { $_setString(4, v); }