MCPcopy
hub / github.com/jmoiron/sqlx / BenchmarkRebind

Function BenchmarkRebind

sqlx_test.go:1831–1841  ·  view source on GitHub ↗
(b *testing.B)

Source from the content-addressed store, hash-verified

1829}
1830
1831func BenchmarkRebind(b *testing.B) {
1832 b.StopTimer()
1833 q1 := `INSERT INTO foo (a, b, c, d, e, f, g, h, i) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)`
1834 q2 := `INSERT INTO foo (a, b, c) VALUES (?, ?, "foo"), ("Hi", ?, ?)`
1835 b.StartTimer()
1836
1837 for i := 0; i < b.N; i++ {
1838 Rebind(DOLLAR, q1)
1839 Rebind(DOLLAR, q2)
1840 }
1841}
1842
1843func BenchmarkRebindBuffer(b *testing.B) {
1844 b.StopTimer()

Callers

nothing calls this directly

Calls 1

RebindFunction · 0.85

Tested by

no test coverage detected