(b *testing.B, n int)
| 88 | } |
| 89 | |
| 90 | func benchmarkEncode(b *testing.B, n int) { |
| 91 | multi := []*Resp{ |
| 92 | NewBulkBytes(make([]byte, n)), |
| 93 | } |
| 94 | e := newBenchmarkEncoder(n) |
| 95 | for i := 0; i < b.N; i++ { |
| 96 | assert.MustNoError(e.EncodeMultiBulk(multi, false)) |
| 97 | } |
| 98 | assert.MustNoError(e.Flush()) |
| 99 | } |
| 100 | |
| 101 | func BenchmarkEncode16B(b *testing.B) { benchmarkEncode(b, 16) } |
| 102 | func BenchmarkEncode64B(b *testing.B) { benchmarkEncode(b, 64) } |
no test coverage detected