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

Function BenchmarkOneBigTimer

statsdaemon_test.go:776–787  ·  view source on GitHub ↗
(t *testing.B)

Source from the content-addressed store, hash-verified

774}
775
776func BenchmarkOneBigTimer(t *testing.B) {
777 r := rand.New(rand.NewSource(438))
778 bucket := "response_time"
779 for i := 0; i < 10000000; i++ {
780 a := float64(r.Uint32() % 1000)
781 timers[bucket] = append(timers[bucket], a)
782 }
783
784 var buff bytes.Buffer
785 t.ResetTimer()
786 processTimers(&buff, time.Now().Unix(), commonPercentiles)
787}
788
789func BenchmarkLotsOfTimers(t *testing.B) {
790 r := rand.New(rand.NewSource(438))

Callers

nothing calls this directly

Calls 1

processTimersFunction · 0.85

Tested by

no test coverage detected