(b *testing.B)
| 188 | } |
| 189 | |
| 190 | func BenchmarkDecodingLayerParserIgnorePanic(b *testing.B) { |
| 191 | decoded := make([]gopacket.LayerType, 0, 20) |
| 192 | dlp := gopacket.NewDecodingLayerParser(LayerTypeEthernet, &Ethernet{}, &IPv4{}, &TCP{}, &gopacket.Payload{}) |
| 193 | dlp.IgnorePanic = true |
| 194 | for i := 0; i < b.N; i++ { |
| 195 | dlp.DecodeLayers(testSimpleTCPPacket, &decoded) |
| 196 | } |
| 197 | } |
| 198 | |
| 199 | func BenchmarkDecodingLayerParserHandlePanic(b *testing.B) { |
| 200 | decoded := make([]gopacket.LayerType, 0, 20) |
nothing calls this directly
no test coverage detected
searching dependent graphs…