(testingB *testing.B, nLines int)
| 117 | } |
| 118 | |
| 119 | func benchCreateAndClose(testingB *testing.B, nLines int) { |
| 120 | rand.Seed(int64(nLines)) |
| 121 | |
| 122 | text := randomText(nLines) |
| 123 | |
| 124 | testingB.ResetTimer() |
| 125 | |
| 126 | for i := 0; i < testingB.N; i++ { |
| 127 | b := NewBufferFromString(text, "", BTDefault) |
| 128 | b.Close() |
| 129 | } |
| 130 | } |
| 131 | |
| 132 | func benchRead(testingB *testing.B, nLines int) { |
| 133 | rand.Seed(int64(nLines)) |
no test coverage detected