(b *testing.B)
| 197 | } |
| 198 | |
| 199 | func BenchmarkDecodingLayerParserHandlePanic(b *testing.B) { |
| 200 | decoded := make([]gopacket.LayerType, 0, 20) |
| 201 | dlp := gopacket.NewDecodingLayerParser(LayerTypeEthernet, &Ethernet{}, &IPv4{}, &TCP{}, &gopacket.Payload{}) |
| 202 | dlp.IgnorePanic = false |
| 203 | for i := 0; i < b.N; i++ { |
| 204 | dlp.DecodeLayers(testSimpleTCPPacket, &decoded) |
| 205 | } |
| 206 | } |
| 207 | |
| 208 | func benchmarkDecodingLayerParser(b *testing.B, dlc gopacket.DecodingLayerContainer, ignorePanic bool) { |
| 209 | decoded := make([]gopacket.LayerType, 0, 20) |
nothing calls this directly
no test coverage detected
searching dependent graphs…