MCPcopy Create free account
hub / github.com/bitly/statsdaemon / BenchmarkPacketHandlerCounter

Function BenchmarkPacketHandlerCounter

statsdaemon_test.go:875–884  ·  view source on GitHub ↗
(b *testing.B)

Source from the content-addressed store, hash-verified

873 }
874}
875func 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}
885func BenchmarkPacketHandlerGauge(b *testing.B) {
886 d1 := parseLine([]byte("gaugor.whatever:333.4|g"))
887 d2 := parseLine([]byte("gaugor.whatever:-5|g"))

Callers

nothing calls this directly

Calls 2

parseLineFunction · 0.85
packetHandlerFunction · 0.85

Tested by

no test coverage detected