MCPcopy
hub / github.com/cilium/ebpf / BenchmarkProgramInfo

Function BenchmarkProgramInfo

info_test.go:227–238  ·  view source on GitHub ↗
(b *testing.B)

Source from the content-addressed store, hash-verified

225}
226
227func BenchmarkProgramInfo(b *testing.B) {
228 b.ReportAllocs()
229
230 spec := fixupProgramSpec(basicProgramSpec)
231 prog := mustNewProgram(b, spec, nil)
232
233 for b.Loop() {
234 if _, err := newProgramInfoFromFd(prog.fd); err != nil {
235 b.Fatal(err)
236 }
237 }
238}
239
240func TestProgramInfoProc(t *testing.T) {
241 spec := fixupProgramSpec(basicProgramSpec)

Callers

nothing calls this directly

Calls 3

fixupProgramSpecFunction · 0.85
mustNewProgramFunction · 0.85
newProgramInfoFromFdFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…