| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
package pmetric |
| 5 |
|
| 6 |
|
| 7 |
type MetricType int32 |
| 8 |
|
| 9 |
const ( |
| 10 |
|
| 11 |
MetricTypeEmpty MetricType = iota |
| 12 |
MetricTypeGauge |
| 13 |
MetricTypeSum |
| 14 |
MetricTypeHistogram |
| 15 |
MetricTypeExponentialHistogram |
| 16 |
MetricTypeSummary |
| 17 |
) |
| 18 |
|
| 19 |
|
| 20 |
func (mdt MetricType) String() string { |
| 21 |
switch mdt { |
| 22 |
case MetricTypeEmpty: |
| 23 |
return "Empty" |
| 24 |
case MetricTypeGauge: |
| 25 |
return "Gauge" |
| 26 |
case MetricTypeSum: |
| 27 |
return "Sum" |
| 28 |
case MetricTypeHistogram: |
| 29 |
return "Histogram" |
| 30 |
case MetricTypeExponentialHistogram: |
| 31 |
return "ExponentialHistogram" |
| 32 |
case MetricTypeSummary: |
| 33 |
return "Summary" |
| 34 |
} |
| 35 |
return "" |
| 36 |
} |