mirror of
https://github.com/Syngnat/GoNavi.git
synced 2026-05-07 05:42:43 +08:00
- 引入 third_party/highgo-pq 作为 HighGo 专用驱动实现 - 调整驱动注册与连接入口,避免覆盖 postgres 驱动 - 保持 PG 数据源行为不变并补充接入文档
17 lines
221 B
Go
17 lines
221 B
Go
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]
|
|
}
|
|
}
|