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

Method Join

stats/metrics.go:62–67  ·  view source on GitHub ↗

Join joins the metrics passed in with the metrics set, and returns a new copy with the merged metrics.

(metrics *MetricSet)

Source from the content-addressed store, hash-verified

60// Join joins the metrics passed in with the metrics set, and returns a new copy
61// with the merged metrics.
62func (m *MetricSet) Join(metrics *MetricSet) *MetricSet {
63 newMetrics := make(map[string]bool)
64 maps.Copy(newMetrics, m.metrics)
65 maps.Copy(newMetrics, metrics.metrics)
66 return &MetricSet{metrics: newMetrics}
67}
68
69// Remove removes the metricNames from the metrics set and returns a new copy
70// with the metrics removed.

Calls 1

CopyMethod · 0.80