MCPcopy
hub / github.com/google/gopacket / BenchmarkSerializeTcpNoOptions

Function BenchmarkSerializeTcpNoOptions

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

Source from the content-addressed store, hash-verified

122}
123
124func BenchmarkSerializeTcpNoOptions(b *testing.B) {
125 slayers := getSerializeLayers()
126 buf := gopacket.NewSerializeBuffer()
127 opts := gopacket.SerializeOptions{}
128 for i := 0; i < b.N; i++ {
129 gopacket.SerializeLayers(buf, opts, slayers...)
130 }
131}
132
133func BenchmarkSerializeTcpFixLengths(b *testing.B) {
134 slayers := getSerializeLayers()

Callers

nothing calls this directly

Calls 3

NewSerializeBufferFunction · 0.92
SerializeLayersFunction · 0.92
getSerializeLayersFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…