(b *testing.B)
| 873 | } |
| 874 | } |
| 875 | func BenchmarkPacketHandlerCounter(b *testing.B) { |
| 876 | d1 := parseLine([]byte("a.key.with-0.dash:4|c|@0.5")) |
| 877 | d2 := parseLine([]byte("normal.key.space:1|c")) |
| 878 | counters = make(map[string]float64) |
| 879 | |
| 880 | for i := 0; i < b.N; i++ { |
| 881 | packetHandler(d1) |
| 882 | packetHandler(d2) |
| 883 | } |
| 884 | } |
| 885 | func BenchmarkPacketHandlerGauge(b *testing.B) { |
| 886 | d1 := parseLine([]byte("gaugor.whatever:333.4|g")) |
| 887 | d2 := parseLine([]byte("gaugor.whatever:-5|g")) |
nothing calls this directly
no test coverage detected