MCPcopy Index your code
hub / github.com/google/gopacket / BenchmarkDecodeFuncCallOverheadArrayCall

Function BenchmarkDecodeFuncCallOverheadArrayCall

layers/decode_test.go:342–350  ·  view source on GitHub ↗
(b *testing.B)

Source from the content-addressed store, hash-verified

340}
341
342func BenchmarkDecodeFuncCallOverheadArrayCall(b *testing.B) {
343 EthernetTypeMetadata[1] = EnumMetadata{DecodeWith: gopacket.DecodeFunc(testDecoder)}
344 d := EthernetType(1)
345 var data []byte
346 var pb gopacket.PacketBuilder
347 for i := 0; i < b.N; i++ {
348 _ = d.Decode(data, pb)
349 }
350}
351
352func BenchmarkFmtVerboseString(b *testing.B) {
353 b.StopTimer()

Callers

nothing calls this directly

Calls 3

DecodeFuncFuncType · 0.92
EthernetTypeTypeAlias · 0.85
DecodeMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…