(ctx context.Context, reader *metric.ManualReader)
| 555 | } |
| 556 | |
| 557 | func 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 |
no outgoing calls
no test coverage detected