MCPcopy Index your code
hub / github.com/codesenberg/bombardier / BenchmarkErrorMapAdd

Function BenchmarkErrorMapAdd

error_map_test.go:59–68  ·  view source on GitHub ↗
(b *testing.B)

Source from the content-addressed store, hash-verified

57}
58
59func BenchmarkErrorMapAdd(b *testing.B) {
60 m := newErrorMap()
61 err := errors.New("benchmark")
62 b.ResetTimer()
63 b.RunParallel(func(pb *testing.PB) {
64 for pb.Next() {
65 m.add(err)
66 }
67 })
68}
69
70func BenchmarkErrorMapGet(b *testing.B) {
71 m := newErrorMap()

Callers

nothing calls this directly

Calls 2

newErrorMapFunction · 0.85
addMethod · 0.80

Tested by

no test coverage detected