(b *testing.B)
| 11 | ) |
| 12 | |
| 13 | func BenchmarkAcquireAndRelease(b *testing.B) { |
| 14 | pool, err := pgxpool.New(context.Background(), os.Getenv("PGX_TEST_DATABASE")) |
| 15 | require.NoError(b, err) |
| 16 | defer pool.Close() |
| 17 | |
| 18 | for b.Loop() { |
| 19 | c, err := pool.Acquire(context.Background()) |
| 20 | if err != nil { |
| 21 | b.Fatal(err) |
| 22 | } |
| 23 | c.Release() |
| 24 | } |
| 25 | } |
| 26 | |
| 27 | func BenchmarkMinimalPreparedSelectBaseline(b *testing.B) { |
| 28 | config, err := pgxpool.ParseConfig(os.Getenv("PGX_TEST_DATABASE")) |