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

Function RegisterInt64Histo

experimental/stats/metricregistry.go:259–265  ·  view source on GitHub ↗

RegisterInt64Histo 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 same

(descriptor MetricDescriptor)

Source from the content-addressed store, hash-verified

257// an init() function), and is not thread-safe. If multiple metrics are
258// registered with the same name, this function will panic.
259func RegisterInt64Histo(descriptor MetricDescriptor) *Int64HistoHandle {
260 registerMetric(descriptor.Name, descriptor.Default)
261 descriptor.Type = MetricTypeIntHisto
262 descPtr := &descriptor
263 metricsRegistry[descriptor.Name] = descPtr
264 return (*Int64HistoHandle)(descPtr)
265}
266
267// RegisterFloat64Histo registers the metric description onto the global
268// registry. 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