MCPcopy
hub / github.com/grafana/k6 / supportedAggregationMethods

Method supportedAggregationMethods

metrics/metric_type.go:93–113  ·  view source on GitHub ↗

supportedAggregationMethods returns the list of threshold aggregation methods that can be used against this MetricType.

()

Source from the content-addressed store, hash-verified

91// supportedAggregationMethods returns the list of threshold aggregation methods
92// that can be used against this MetricType.
93func (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.

Callers 2

ValidateMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected