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

Function BenchmarkPacketDumpString

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

Source from the content-addressed store, hash-verified

368}
369
370func BenchmarkPacketDumpString(b *testing.B) {
371 b.StopTimer()
372 p := gopacket.NewPacket(testSimpleTCPPacket, LinkTypeEthernet, testDecodeOptions)
373 b.StartTimer()
374 for i := 0; i < b.N; i++ {
375 _ = p.String()
376 }
377}
378
379// TestFlowMapKey makes sure a flow and an endpoint can be used as map keys.
380func TestFlowMapKey(t *testing.T) {

Callers

nothing calls this directly

Calls 2

StringMethod · 0.95
NewPacketFunction · 0.92

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…