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

Function metricsDataFromReader

stats/opentelemetry/e2e_test.go:557–567  ·  view source on GitHub ↗
(ctx context.Context, reader *metric.ManualReader)

Source from the content-addressed store, hash-verified

555}
556
557func metricsDataFromReader(ctx context.Context, reader *metric.ManualReader) map[string]metricdata.Metrics {
558 rm := &metricdata.ResourceMetrics{}
559 reader.Collect(ctx, rm)
560 gotMetrics := map[string]metricdata.Metrics{}
561 for _, sm := range rm.ScopeMetrics {
562 for _, m := range sm.Metrics {
563 gotMetrics[m.Name] = m
564 }
565 }
566 return gotMetrics
567}
568
569// TestWRRMetrics tests the metrics emitted from the WRR LB Policy. It
570// configures WRR as an endpoint picking policy through xDS on a ClientConn

Callers 2

pollForWantMetricsFunction · 0.70
checkMetricWithMethodFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected