MCPcopy Create free account
hub / github.com/cloudwego/netpoll / BenchmarkPollMod

Function BenchmarkPollMod

poll_test.go:129–142  ·  view source on GitHub ↗
(b *testing.B)

Source from the content-addressed store, hash-verified

127}
128
129func BenchmarkPollMod(b *testing.B) {
130 b.StopTimer()
131 p, _ := openDefaultPoll()
132 r, _ := GetSysFdPairs()
133 operator := &FDOperator{FD: r}
134 p.Control(operator, PollReadable)
135
136 // benchmark
137 b.ReportAllocs()
138 b.StartTimer()
139 for i := 0; i < b.N; i++ {
140 p.Control(operator, PollR2RW)
141 }
142}

Callers

nothing calls this directly

Calls 3

GetSysFdPairsFunction · 0.85
openDefaultPollFunction · 0.70
ControlMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…