Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,10 @@ These two values define which schema state is compared. They should point to two

This command is responsible for preparing the database completely. In most projects it starts containers, applies migrations, and optionally seeds data. It should exit with status `0` only when PostgreSQL is actually ready for benchmark queries.

`setup.command` is any shell command. For complex setup (materialized view refreshes, multiple steps with conditional logic, custom post-processing), point it to a script: `command: "./scripts/pgcompare-setup.sh"`.

`pgcompare` already runs `VACUUM (ANALYZE)` in `ReadinessCheck`, so post-seed `ANALYZE` in setup is usually unnecessary.

### `benchmark`

- `before_queries`: SQL file used for the `before` phase
Expand Down
4 changes: 4 additions & 0 deletions RU.md
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,10 @@ services:

Эта команда должна полностью подготовить базу. На практике обычно она поднимает контейнеры, накатывает миграции и при необходимости выполняет сидирование. Команда должна завершаться с `exit 0` только тогда, когда PostgreSQL уже готов к тестовым запросам.

`setup.command` — это любая shell-команда. Для сложного setup (обновление материализованных представлений, несколько шагов с условной логикой, нестандартная постобработка) вынесите её в скрипт: `command: "./scripts/pgcompare-setup.sh"`.

`pgcompare` уже выполняет `VACUUM (ANALYZE)` в `ReadinessCheck`, поэтому `ANALYZE` после сидирования в setup обычно не нужен.

### `benchmark`

- `before_queries`: SQL-файл для фазы `before`
Expand Down