MCPcopy Index your code
hub / github.com/coder/coder / asMetricType

Function asMetricType

agent/metrics.go:143–152  ·  view source on GitHub ↗
(typ clientmetric.Type)

Source from the content-addressed store, hash-verified

141}
142
143func asMetricType(typ clientmetric.Type) proto.Stats_Metric_Type {
144 switch typ {
145 case clientmetric.TypeGauge:
146 return proto.Stats_Metric_GAUGE
147 case clientmetric.TypeCounter:
148 return proto.Stats_Metric_COUNTER
149 default:
150 panic(fmt.Sprintf("unknown metric type: %d", typ))
151 }
152}

Callers 1

collectMetricsMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected