MCPcopy Index your code
hub / github.com/sourcegraph/conc / BenchmarkPool

Function BenchmarkPool

pool/pool_test.go:127–144  ·  view source on GitHub ↗
(b *testing.B)

Source from the content-addressed store, hash-verified

125}
126
127func BenchmarkPool(b *testing.B) {
128 b.Run("startup and teardown", func(b *testing.B) {
129 for i := 0; i < b.N; i++ {
130 p := New()
131 p.Go(func() {})
132 p.Wait()
133 }
134 })
135
136 b.Run("per task", func(b *testing.B) {
137 p := New()
138 f := func() {}
139 for i := 0; i < b.N; i++ {
140 p.Go(f)
141 }
142 p.Wait()
143 })
144}

Callers

nothing calls this directly

Calls 3

NewFunction · 0.70
GoMethod · 0.45
WaitMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…