MCPcopy Create free account
hub / github.com/prometheus/procfs / TestDataBytes

Function TestDataBytes

proc_statm_test.go:113–122  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

111}
112
113func TestDataBytes(t *testing.T) {
114 statm, err := testProcStatm(26231)
115 if err != nil {
116 t.Fatal(err)
117 }
118
119 if want, have := statm.Data*uint64(os.Getpagesize()), statm.DataBytes(); want != have {
120 t.Errorf("want data + stack size %d, have %d", want, have)
121 }
122}
123
124func testProcStatm(pid int) (ProcStatm, error) {
125 fs, err := NewFS(procTestFixtures)

Callers

nothing calls this directly

Calls 2

testProcStatmFunction · 0.85
DataBytesMethod · 0.80

Tested by

no test coverage detected