MCPcopy Create free account
hub / github.com/cloudwego/netpoll / BenchmarkPersistFDOperator2

Function BenchmarkPersistFDOperator2

fd_operator_cache_test.go:63–76  ·  view source on GitHub ↗
(b *testing.B)

Source from the content-addressed store, hash-verified

61}
62
63func BenchmarkPersistFDOperator2(b *testing.B) {
64 // benchmark
65 b.ReportAllocs()
66 b.SetParallelism(128)
67 b.ResetTimer()
68 opcache := newOperatorCache()
69 b.RunParallel(func(pb *testing.PB) {
70 for pb.Next() {
71 op := opcache.alloc()
72 opcache.freeable(op)
73 opcache.free()
74 }
75 })
76}

Callers

nothing calls this directly

Calls 5

newOperatorCacheFunction · 0.85
allocMethod · 0.80
freeableMethod · 0.80
freeMethod · 0.80
NextMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…