MCPcopy
hub / github.com/grpc/grpc-go / registerMetric

Function registerMetric

experimental/stats/metricregistry.go:215–223  ·  view source on GitHub ↗
(metricName string, def bool)

Source from the content-addressed store, hash-verified

213}
214
215func registerMetric(metricName string, def bool) {
216 if registeredMetrics[metricName] {
217 logger.Fatalf("metric %v already registered", metricName)
218 }
219 registeredMetrics[metricName] = true
220 if def {
221 DefaultMetrics = DefaultMetrics.Add(metricName)
222 }
223}
224
225// RegisterInt64Count registers the metric description onto the global registry.
226// It returns a typed handle to use to recording data.

Callers 7

RegisterInt64CountFunction · 0.85
RegisterFloat64CountFunction · 0.85
RegisterInt64HistoFunction · 0.85
RegisterFloat64HistoFunction · 0.85
RegisterInt64GaugeFunction · 0.85
RegisterInt64UpDownCountFunction · 0.85
RegisterInt64AsyncGaugeFunction · 0.85

Calls 2

FatalfMethod · 0.65
AddMethod · 0.65

Tested by

no test coverage detected