supportedAggregationMethods returns the list of threshold aggregation methods that can be used against this MetricType.
()
| 91 | // supportedAggregationMethods returns the list of threshold aggregation methods |
| 92 | // that can be used against this MetricType. |
| 93 | func (t MetricType) supportedAggregationMethods() []string { |
| 94 | switch t { |
| 95 | case Counter: |
| 96 | return []string{tokenCount, tokenRate} |
| 97 | case Gauge: |
| 98 | return []string{tokenValue} |
| 99 | case Rate: |
| 100 | return []string{tokenRate} |
| 101 | case Trend: |
| 102 | return []string{ |
| 103 | tokenAvg, |
| 104 | tokenMin, |
| 105 | tokenMax, |
| 106 | tokenMed, |
| 107 | tokenPercentile, |
| 108 | } |
| 109 | default: |
| 110 | // unreachable! |
| 111 | panic("unreachable") |
| 112 | } |
| 113 | } |
| 114 | |
| 115 | // supportsAggregationMethod returns whether the MetricType supports a |
| 116 | // given threshold aggregation method or not. |
no outgoing calls
no test coverage detected