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

Function BenchmarkPersistFDOperator1

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

Source from the content-addressed store, hash-verified

50}
51
52func BenchmarkPersistFDOperator1(b *testing.B) {
53 b.ReportAllocs()
54 b.ResetTimer()
55 opcache := newOperatorCache()
56 for i := 0; i < b.N; i++ {
57 op := opcache.alloc()
58 opcache.freeable(op)
59 opcache.free()
60 }
61}
62
63func BenchmarkPersistFDOperator2(b *testing.B) {
64 // benchmark

Callers

nothing calls this directly

Calls 4

newOperatorCacheFunction · 0.85
allocMethod · 0.80
freeableMethod · 0.80
freeMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…