(t *testing.T)
| 31 | ) |
| 32 | |
| 33 | func TestRmForMemStats(t *testing.T) { |
| 34 | descs := bestEffortLookupRM(rmNamesForMemStatsMetrics) |
| 35 | |
| 36 | if got, want := len(descs), len(rmNamesForMemStatsMetrics); got != want { |
| 37 | t.Errorf("got %d, want %d metrics", got, want) |
| 38 | } |
| 39 | |
| 40 | for _, d := range descs { |
| 41 | // We don't expect histograms there. |
| 42 | if d.Kind == metrics.KindFloat64Histogram { |
| 43 | t.Errorf("we don't expect to use histograms for MemStats metrics, got %v", d.Name) |
| 44 | } |
| 45 | } |
| 46 | } |
| 47 | |
| 48 | func expectedBaseMetrics() map[string]struct{} { |
| 49 | metrics := map[string]struct{}{} |
nothing calls this directly
no test coverage detected