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

Function RegisterFloat64Count

experimental/stats/metricregistry.go:245–251  ·  view source on GitHub ↗

RegisterFloat64Count 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

243// an init() function), and is not thread-safe. If multiple metrics are
244// registered with the same name, this function will panic.
245func RegisterFloat64Count(descriptor MetricDescriptor) *Float64CountHandle {
246 registerMetric(descriptor.Name, descriptor.Default)
247 descriptor.Type = MetricTypeFloatCount
248 descPtr := &descriptor
249 metricsRegistry[descriptor.Name] = descPtr
250 return (*Float64CountHandle)(descPtr)
251}
252
253// RegisterInt64Histo registers the metric description onto the global registry.
254// 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