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

Function BenchmarkEncodePacketEthernetOverGRE

layers/gre_test.go:246–256  ·  view source on GitHub ↗
(b *testing.B)

Source from the content-addressed store, hash-verified

244}
245
246func BenchmarkEncodePacketEthernetOverGRE(b *testing.B) {
247 buf := gopacket.NewSerializeBuffer()
248 opts := gopacket.SerializeOptions{
249 ComputeChecksums: true,
250 FixLengths: true,
251 }
252 for i := 0; i < b.N; i++ {
253 gopacket.SerializeLayers(buf, opts, testEthernetOverGRE...)
254 buf.Clear()
255 }
256}
257
258var testGREChecksum = map[uint16][]gopacket.SerializableLayer{
259 0x77ff: {

Callers

nothing calls this directly

Calls 3

ClearMethod · 0.95
NewSerializeBufferFunction · 0.92
SerializeLayersFunction · 0.92

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…