(b *testing.B)
| 13 | ) |
| 14 | |
| 15 | func BenchmarkDatabase_FsyncOn(b *testing.B) { |
| 16 | ctx := context.Background() |
| 17 | WithDocker(ctx, b, true, func(b *testing.B, db *pgx.Conn, connstr string) { |
| 18 | b.ResetTimer() |
| 19 | defer b.StopTimer() |
| 20 | |
| 21 | for i := 0; i < b.N; i++ { |
| 22 | withDatabase(ctx, connstr, b, func(b *testing.B, db *pgx.Conn) { |
| 23 | _, err := db.Exec(ctx, DatabaseSchema) |
| 24 | if err != nil { |
| 25 | b.Fatal(err) |
| 26 | } |
| 27 | }) |
| 28 | } |
| 29 | }) |
| 30 | } |
| 31 | |
| 32 | func BenchmarkDatabase_FsyncOff(b *testing.B) { |
| 33 | ctx := context.Background() |
nothing calls this directly
no test coverage detected