MCPcopy Index your code
hub / github.com/deepflowio/deepflow / BenchmarkLockFreePoolOverPut

Function BenchmarkLockFreePoolOverPut

server/libs/pool/pool_test.go:136–145  ·  view source on GitHub ↗
(b *testing.B)

Source from the content-addressed store, hash-verified

134}
135
136func BenchmarkLockFreePoolOverPut(b *testing.B) {
137 pool := NewLockFreePool[int](func() int { return 0 })
138 for i := 0; i < 1024; i++ {
139 pool.Put(0)
140 }
141 b.ResetTimer()
142 for i := 0; i < b.N; i++ {
143 pool.Put(0)
144 }
145}

Callers

nothing calls this directly

Calls 1

PutMethod · 0.65

Tested by

no test coverage detected