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

Function BenchmarkLinkBufferPoolGet

nocopy_linkbuffer_test.go:906–922  ·  view source on GitHub ↗
(b *testing.B)

Source from the content-addressed store, hash-verified

904}
905
906func BenchmarkLinkBufferPoolGet(b *testing.B) {
907 var v *linkBufferNode
908 if false {
909 b.Logf("bs = %v", v)
910 }
911
912 // benchmark
913 b.ReportAllocs()
914 b.SetParallelism(100)
915 b.ResetTimer()
916 b.RunParallel(func(pb *testing.PB) {
917 for pb.Next() {
918 v = newLinkBufferNode(0)
919 v.Release()
920 }
921 })
922}
923
924func BenchmarkCopyString(b *testing.B) {
925 s := make([]byte, 128*1024)

Callers

nothing calls this directly

Calls 3

ReleaseMethod · 0.95
newLinkBufferNodeFunction · 0.85
NextMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…