(b *testing.B, n int)
| 38 | } |
| 39 | |
| 40 | func benchmarkConn(b *testing.B, n int) { |
| 41 | unsafe2.SetMaxOffheapBytes(0) |
| 42 | for i := 0; i < b.N; i++ { |
| 43 | c := NewConn(&net.TCPConn{}, n, n) |
| 44 | c.Close() |
| 45 | } |
| 46 | } |
| 47 | |
| 48 | func benchmarkConnOffheap(b *testing.B, n int) { |
| 49 | unsafe2.SetMaxOffheapBytes(1024 * 1024 * 512) |
no test coverage detected