summaryrefslogtreecommitdiffstats
path: root/dependencies/pkg/mod/github.com/lib/pq@v1.10.7/buf_test.go
blob: df88d38b427d61ee1bc453443df98f2049f7e5f0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
package pq

import "testing"

func Benchmark_writeBuf_string(b *testing.B) {
	var buf writeBuf
	const s = "foo"

	b.ReportAllocs()
	b.ResetTimer()

	for i := 0; i < b.N; i++ {
		buf.string(s)
		buf.buf = buf.buf[:0]
	}
}