File tree Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -216,14 +216,17 @@ func BenchmarkRoundtripBin(b *testing.B) {
216
216
217
217
func BenchmarkInterpolation (b * testing.B ) {
218
218
mc := & mysqlConn {
219
- cfg : & config {interpolateParams : true },
219
+ cfg : & config {
220
+ interpolateParams : true ,
221
+ loc : time .UTC ,
222
+ },
220
223
maxPacketAllowed : maxPacketSize ,
221
224
maxWriteSize : maxPacketSize - 1 ,
222
225
}
223
226
224
227
args := []driver.Value {
225
- 42424242 ,
226
- math .Pi ,
228
+ int64 ( 42424242 ) ,
229
+ float64 ( math .Pi ) ,
227
230
false ,
228
231
time .Unix (1423411542 , 807015000 ),
229
232
[]byte ("bytes containing special chars ' \" \a \x00 " ),
@@ -234,6 +237,9 @@ func BenchmarkInterpolation(b *testing.B) {
234
237
b .ReportAllocs ()
235
238
b .ResetTimer ()
236
239
for i := 0 ; i < b .N ; i ++ {
237
- mc .interpolateParams (q , args )
240
+ _ , err := mc .interpolateParams (q , args )
241
+ if err != nil {
242
+ b .Fatal (err )
243
+ }
238
244
}
239
245
}
You can’t perform that action at this time.
0 commit comments