BENCH Really make pfring implement PacketSource.
BENCH Really make pfring implement PacketSource.

----------------------------------------------------------
BENCHMARK_MARKER_DO_NOT_CHANGE
----------------------------------------------------------

TEST BENCHMARKS
If you see a crash here, it's serious business.  Report it!
Send this number with any crash reports: 1355531251164782000
No crash to see here... continuing with testing
PASS
BenchmarkTypeAssertion	500000000	         7.49 ns/op
BenchmarkMapLookup	100000000	        28.2 ns/op
BenchmarkNilMapLookup	100000000	        13.3 ns/op
BenchmarkNilMapLookupWithNilCheck	2000000000	         0.80 ns/op
BenchmarkArrayLookup	2000000000	         0.84 ns/op
BenchmarkLayerClassSliceContains	2000000000	         1.33 ns/op
BenchmarkLayerClassMapContains	50000000	        37.4 ns/op
BenchmarkLazyNoCopyEthLayer	 2000000	       804 ns/op
BenchmarkLazyNoCopyIPLayer	 1000000	      1245 ns/op
BenchmarkLazyNoCopyTCPLayer	 1000000	      1724 ns/op
BenchmarkLazyNoCopyAllLayers	 1000000	      2150 ns/op
BenchmarkDefault	 1000000	      2537 ns/op
BenchmarkLazy	 5000000	       755 ns/op
BenchmarkNoCopy	 1000000	      2153 ns/op
BenchmarkLazyNoCopy	 5000000	       363 ns/op
BenchmarkAlloc	20000000	       103 ns/op
BenchmarkFlow	10000000	       231 ns/op
BenchmarkEndpoints	100000000	        28.0 ns/op
BenchmarkTCPLayerFromDecodedPacket	100000000	        14.3 ns/op
BenchmarkTCPLayerClassFromDecodedPacket	20000000	        76.4 ns/op
BenchmarkCheckEthernetPrefix	50000000	        38.1 ns/op
ok  	github.com/gconnell/gopacket	48.535s

PCAP BENCHMARK
Reading file once through to hopefully cache most of it
Read in file /tmp/gopacket_benchmark.pcap , total of 341401548 bytes
Opening file /tmp/gopacket_benchmark.pcap for read
Read in 1237119 packets in 4.901333s, 3.961us per packet
----------------------------------------------------------
BENCHMARKING AGAINST COMMIT 38473894c0ba88778fe2a3132e218bae7c89487a
----------------------------------------------------------

OLD TEST BENCHMARKS
If you see a crash here, it's serious business.  Report it!
Send this number with any crash reports: 1355531317537108000
No crash to see here... continuing with testing
PASS
BenchmarkTypeAssertion	500000000	         7.47 ns/op
BenchmarkMapLookup	100000000	        29.8 ns/op
BenchmarkNilMapLookup	100000000	        25.1 ns/op
BenchmarkNilMapLookupWithNilCheck	2000000000	         0.80 ns/op
BenchmarkArrayLookup	2000000000	         0.83 ns/op
BenchmarkLayerClassSliceContains	2000000000	         1.33 ns/op
BenchmarkLayerClassMapContains	50000000	        37.3 ns/op
BenchmarkLazyNoCopyEthLayer	 2000000	       804 ns/op
BenchmarkLazyNoCopyIPLayer	 1000000	      1244 ns/op
BenchmarkLazyNoCopyTCPLayer	 1000000	      1713 ns/op
BenchmarkLazyNoCopyAllLayers	 1000000	      2147 ns/op
BenchmarkDefault	 1000000	      2514 ns/op
BenchmarkLazy	 5000000	       725 ns/op
BenchmarkNoCopy	 1000000	      2150 ns/op
BenchmarkLazyNoCopy	 5000000	       358 ns/op
BenchmarkAlloc	20000000	       102 ns/op
BenchmarkFlow	10000000	       231 ns/op
BenchmarkEndpoints	100000000	        28.0 ns/op
BenchmarkTCPLayerFromDecodedPacket	100000000	        14.3 ns/op
BenchmarkTCPLayerClassFromDecodedPacket	20000000	        76.3 ns/op
BenchmarkCheckEthernetPrefix	50000000	        40.3 ns/op
ok  	github.com/gconnell/gopacket	49.740s

OLD PCAP BENCHMARK
Reading file once through to hopefully cache most of it
Read in file /tmp/gopacket_benchmark.pcap , total of 341401548 bytes
Opening file /tmp/gopacket_benchmark.pcap for read
Read in 1237119 packets in 4.736237s, 3.828us per packet

1d4Nf6/gopacket,google/gopacket,adriantam/gopacket,aeppert/gopacket,chapayGhub/gopacket,vtolstov/gopacket,josephcopenhaver/gopacket,zerklabs/gopacket,ross-williams/gopacket,ccordes-snaproute/gopacket,urso/gopacket,chapayGhub/gopacket,aeppert/gopacket,dutchcoders/gopacket,ross-williams/gopacket,josephcopenhaver/gopacket,breml/gopacket,scroot/gopacket,urso/gopacket,packetbeat/gopacket,hkwi/gopacket,google/gopacket,wheelcomplex/gopacket,skyportsystems/gopacket,packetb-old/gopacket,scroot/gopacket,zerklabs/gopacket,ccordes-snaproute/gopacket,packetbeat/gopacket,josephcopenhaver/gopacket,clarktrimble/gopacket,dazer-chen/gopacket,UIKit0/gopacket-1,lokikiller/gopacket,cmillward/gopacket,LrsK/gopacket,LrsK/gopacket,hkwi/gopacket,hkwi/gopacket,levigross/gopacket,vtolstov/gopacket,adriantam/gopacket,zerklabs/gopacket,nhooyr/gopacket,dutchcoders/gopacket,ross-williams/gopacket,breml/gopacket,xuzhaokui/gopacket,packetb-old/gopacket,rouzier/gopacket,levigross/gopacket,dazer-chen/gopacket,lokikiller/gopacket,google/gopacket,packetb-old/gopacket,adriantam/gopacket,scroot/gopacket,dutchcoders/gopacket,xuzhaokui/gopacket,aeppert/gopacket,packetbeat/gopacket,rouzier/gopacket,wheelcomplex/gopacket,nhooyr/gopacket,packetb-old/gopacket,wheelcomplex/gopacket,UIKit0/gopacket-1,dazer-chen/gopacket,1d4Nf6/gopacket,UIKit0/gopacket-1,1d4Nf6/gopacket,levigross/gopacket,clarktrimble/gopacket,vtolstov/gopacket,skyportsystems/gopacket,cmillward/gopacket,xuzhaokui/gopacket,skyportsystems/gopacket,nhooyr/gopacket,rouzier/gopacket,ccordes-snaproute/gopacket,packetbeat/gopacket,urso/gopacket,LrsK/gopacket,chapayGhub/gopacket,breml/gopacket,clarktrimble/gopacket,cmillward/gopacket,lokikiller/gopacket