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

Function RegisterFloat64Histo

experimental/stats/metricregistry.go:273–279  ·  view source on GitHub ↗

RegisterFloat64Histo registers the metric description onto the global registry. It returns a typed handle to use to recording data. NOTE: this function must only be called during initialization time (i.e. in an init() function), and is not thread-safe. If multiple metrics are registered with the sa

(descriptor MetricDescriptor)

Source from the content-addressed store, hash-verified

271// an init() function), and is not thread-safe. If multiple metrics are
272// registered with the same name, this function will panic.
273func RegisterFloat64Histo(descriptor MetricDescriptor) *Float64HistoHandle {
274 registerMetric(descriptor.Name, descriptor.Default)
275 descriptor.Type = MetricTypeFloatHisto
276 descPtr := &descriptor
277 metricsRegistry[descriptor.Name] = descPtr
278 return (*Float64HistoHandle)(descPtr)
279}
280
281// RegisterInt64Gauge registers the metric description onto the global registry.
282// It returns a typed handle to use to recording data.

Callers 1

TestMetricRegistryMethod · 0.85

Calls 1

registerMetricFunction · 0.85

Tested by 1

TestMetricRegistryMethod · 0.68