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

Function NopMetrics

coderd/x/chatd/chatloop/metrics.go:117–119  ·  view source on GitHub ↗

NopMetrics returns a Metrics instance that discards all data. Useful for tests and when metrics collection is not desired.

()

Source from the content-addressed store, hash-verified

115// NopMetrics returns a Metrics instance that discards all data.
116// Useful for tests and when metrics collection is not desired.
117func NopMetrics() *Metrics {
118 return NewMetrics(prometheus.NewRegistry())
119}
120
121// RecordCompaction classifies and records a compaction attempt.
122// It is a no-op when m is nil.

Calls 1

NewMetricsFunction · 0.70