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

Function BenchmarkFlow

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

Source from the content-addressed store, hash-verified

275}
276
277func BenchmarkFlow(b *testing.B) {
278 p := gopacket.NewPacket(testSimpleTCPPacket, LinkTypeEthernet, gopacket.DecodeOptions{Lazy: true, NoCopy: true})
279 net := p.NetworkLayer()
280 for i := 0; i < b.N; i++ {
281 net.NetworkFlow()
282 }
283}
284
285func BenchmarkEndpoints(b *testing.B) {
286 p := gopacket.NewPacket(testSimpleTCPPacket, LinkTypeEthernet, gopacket.DecodeOptions{Lazy: true, NoCopy: true})

Callers

nothing calls this directly

Calls 3

NetworkLayerMethod · 0.95
NewPacketFunction · 0.92
NetworkFlowMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…