MCPcopy
hub / github.com/prometheus/client_golang / TestRmForMemStats

Function TestRmForMemStats

prometheus/go_collector_latest_test.go:33–46  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

31)
32
33func 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
48func expectedBaseMetrics() map[string]struct{} {
49 metrics := map[string]struct{}{}

Callers

nothing calls this directly

Calls 1

bestEffortLookupRMFunction · 0.85

Tested by

no test coverage detected