Skip to content

Instantly share code, notes, and snippets.

@pjebs
Created June 25, 2020 03:53
Show Gist options
  • Save pjebs/6b7fd76f6559a433d927fa481da4c5b7 to your computer and use it in GitHub Desktop.
Save pjebs/6b7fd76f6559a433d927fa481da4c5b7 to your computer and use it in GitHub Desktop.
dbq benchmark
for i := 0; i < b.N; i++ {
q := fmt.Sprintf("SELECT id, name, email FROM tests ORDER BY id LIMIT %d", lim)
res, err := dbq.Qs(ctx, db, q, model{}, nil)
if err != nil {
b.Fatal(err)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment