Skip to content

Commit e4bc3f6

Browse files
committed
improve BenchmarkReceiveMetadata
1 parent 6e944e1 commit e4bc3f6

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

benchmark_test.go

+2-3
Original file line numberDiff line numberDiff line change
@@ -490,14 +490,13 @@ func BenchmarkReceiveMetadata(b *testing.B) {
490490
valuePtrs[j] = &values[j]
491491
}
492492

493-
b.ReportAllocs()
494-
b.ResetTimer()
495-
496493
// Prepare a SELECT query to retrieve metadata
497494
stmt := tb.checkStmt(db.Prepare("SELECT * FROM large_integer_table LIMIT 1"))
498495
defer stmt.Close()
499496

500497
// Benchmark metadata retrieval
498+
b.ReportAllocs()
499+
b.ResetTimer()
501500
for range b.N {
502501
rows := tb.checkRows(stmt.Query())
503502

0 commit comments

Comments
 (0)