diff --git a/AGENTS.md b/AGENTS.md index b91113a7..b5037881 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -638,14 +638,14 @@ config_example.toml, .env.example evidence/broker/ # change async-attachments: stand.md (driver.py broker-check), isolated.md (очередь временной базы) evidence/worker/ # change async-attachments: process.md (driver.py worker-process), logs.md (журнал задания) evidence/attachments/ # change async-attachments: defense.md (driver.py defense-scenario); change attachments: smoke.md, failover.md (driver.py attachment-failover stop и kill), storage.md (driver.py attachment-storage), slow-transfer.md (10 MiB через LB дольше 6 с); change upload-consistency: consistency.md (driver.py upload-consistency и журналы API и уборщика), cleaner-process.md (старт, отказ конфигурации, остановка, окно 0, рестарт хранилищ, отказ S3 во время прохода); по замечанию ревьюера: jpeg-structure.md (варианты JPEG — прежняя и новая проверка, Pillow, djpeg; регрессия на 301 JPEG; время; красный и зелёный прогоны test_undecodable_jpeg) -evidence/s3/ # change s3-storage: bootstrap.md (первый запуск, повтор, смена секрета, ошибка шага, до bootstrap), privacy.md (make s3_check, нарушение и исправление, порты, секреты по сервисам), grpc-admin.md (gRPC шлюза без токена), restart.md (restart.sh и SIGKILL S3), client.md (операции, pause/stop, неверный секрет, журнал), memory.md (20 × 10 MiB PUT); change upload-consistency: cleaner-key.md (пользователь уборщика в bootstrap, смена секрета, make s3_check с ключом уборщика, секреты по сервисам); change track2-reconciler: cleaner-list.md (bootstrap с политикой списка по префиксу, неверный префикс, make s3_check со строками списка уборщика, окружение s3-bootstrap) +evidence/s3/ # privacy.md — make s3_check на текущем коде; change s3-storage: bootstrap.md (первый запуск, повтор, смена секрета, ошибка шага, до bootstrap), privacy.md (make s3_check, нарушение и исправление, порты, секреты по сервисам), grpc-admin.md (gRPC шлюза без токена), restart.md (restart.sh и SIGKILL S3), client.md (операции, pause/stop, неверный секрет, журнал), memory.md (20 × 10 MiB PUT); change upload-consistency: cleaner-key.md (пользователь уборщика в bootstrap, смена секрета, make s3_check с ключом уборщика, секреты по сервисам); change track2-reconciler: cleaner-list.md (bootstrap с политикой списка по префиксу, неверный префикс, make s3_check со строками списка уборщика, окружение s3-bootstrap) evidence/reconcile/ # change track2-reconciler: cycle.md (driver.py reconcile-cycle), stress.md (driver.py reconcile-stress), service.md (Started cleaner с параметрами сверки, плановая сверка при старте, docker stop во время сверки при pause s3, код 1 разового прохода по сигналу — driver.py reconcile-signal, отказ старта на RECONCILER__*, коды 3 и 0; с change track2-reconcile-cost — остановка во время паузы предела скорости, driver.py reconcile-signal --pace) evidence/reconcile/<метка>/ # результаты make bench_reconcile (change track2-reconcile-cost): meta.json (раздел reconcile: план, этапы и модели, commit и образы «до», аргументы S3), passes.csv, windows.csv, summary.md (H1–H4 и S4), cost-by-n.svg, requests-by-n.svg, background-p95.svg, raw/ (записи уборщика по проходам, итог k6 блока H4) evidence/storage/ # отказы БД, пул, statement_timeout, рестарт, порты Postgres, свежий clone; connection-cost.md — цена нового соединения и пинга evidence/migrations/ # миграции с нуля и повторно, ошибка миграции; лаба 4: pending-index.md (ревизия 739b8f04d5fb с нуля, повтор, откат, EXPLAIN общего плана кандидатов уборщика на рабочей базе с откатом, rollout_quick), lost-at.md (ревизия 5c3e1f0a9b7d колонки lost_at: с нуля, повтор, откат, --sql с lock_timeout, make rolling_update с ревизией до и после) evidence/auth/ # passwords-and-tokens.md — driver.py auth-storage на стенде текущей лабы: Argon2id в users, SHA-256 токена в sessions, ни токена, ни пароля в pg_dump (исключения сверки покрытия) evidence/cache/ # hits.md — make test_isolated + driver.py cache-check на стенде текущей лабы: одно чтение chats на 50 через LB, TTL, ключи двух баз (исключения сверки покрытия) -evidence/tests/ # выводы make test_isolated (test-isolated.md), make student_test через LB (student-test-lb.md) и make failure_checks (failure-checks.md) для REPORT.md, secrets.md; файлы этих проверок лаб 3 и 4 — в их репозиториях +evidence/tests/ # change unit-of-work: service-tests.md (make service_test и service_test_db, таблица регрессий); выводы make test_isolated (test-isolated.md), make student_test через LB (student-test-lb.md) и make failure_checks (failure-checks.md) для REPORT.md, secrets.md; файлы этих проверок лаб 3 и 4 — в их репозиториях evidence/idempotency/ # повтор, 409, гонка, таблица ключей, X-Instance-Id evidence/replicas/ # стенд с LB: порты, лимиты и их цена для Argon2id, окружение, распределение, ответы LB (нет реплик, зависшая, без PostgreSQL), test-persistence, чистый clone на нестандартных портах evidence/failover/ # make test-failover для каждой реплики (stop и kill), отказы stop-one.sh; замер обнаружения, keep-alive, зависшая реплика и ключ; stop-at-start.md — docker stop стартующей реплики «до/после» раннего обработчика и ветка сбоя rolling-update.sh @@ -657,7 +657,9 @@ evidence/bench/scaling-*/ # серии трека 1 (a, b, pool, A/A scaling- evidence/plots/scaling/ # make bench_plots по сериям a и b: графики SVG и summary.md (R*, эффективность, точка насыщения, цена запроса, память) evidence/plots/scaling-db/ # make bench_plots по серии db: R* по лимитам PostgreSQL и раздел «Насыщение PostgreSQL» evidence/uploads/ # change upload-memory: <метка>/ — make bench_uploads (meta.json, runs.csv, summary.md, raw/), lb-timeouts.md — driver.py lb-upload-timeouts, rollout-upload.md — медленная загрузка во время make rolling_update -evidence/compare/ # таблицы make bench_compare: <до>__<после>.md +evidence/bench/unit-of-work-*/ # change unit-of-work, профиль quick с именной меткой (идёт в git): before и aa на b2fb88f, after на 6ba74b1 +evidence/rollout/unit-of-work*/ # change unit-of-work: unit-of-work (замена с Profile.rollout_from), unit-of-work-previous (--from b2fb88f: CPU на запрос старых и новых реплик) +evidence/compare/ # таблицы make bench_compare: <до>__<после>.md; unit-of-work-before__unit-of-work-after.md — цена шага .github/workflows/application.yml # свой CI job (CONTRIBUTING.md, «CI»; contracts.yml — skeleton): checkout commit прогона (адрес Gitea литералом: github.server_url — внутренний http://gitea:3000, из job не резолвится; по той же причине contracts.yml на этом раннере падает на actions/checkout), сборка и стенд под проектом mtusi-lab5-safronov-ci-, job подключается к сети стенда, готовность — обе реплики через LB, make check / test, аноним в S3 — 403, make validate, make student_test, test-persistence, test-failover stop и kill, уборка при любом исходе; без s3_check, test_isolated и failure_checks (порты хоста). Раннер Gitea (act_runner) запускает job в контейнере на том же Docker, что стенд .github/ci/compose.yml # override стенда в CI: конфиги — configs из переменных окружения вместо bind mount (файлов job нет на хосте раннера), без портов на хосте, образ API с тегом прогона .github/ci/stand-env.sh # «.» в шагах job: содержимое конфигов в CI_* для configs (с переводом строки в конце: без него HAProxy конфиг не принимает), wait_replicas — /health/ready 200 от API_REPLICAS разных реплик через LB за 60 с diff --git a/REPORT.md b/REPORT.md index 6ca50f01..8fbf2f56 100644 --- a/REPORT.md +++ b/REPORT.md @@ -3,7 +3,7 @@ - Автор, группа: Сафронов Роман Николаевич, БВТ2301 - Целевая оценка; выбранный трек 5: оценка 5, трек 1 «Очередь под перегрузкой» - Состояние отчёта: закрыты **уровень 3** (change `async-attachments`) и **уровень 4** (change `pipeline-reliability`). Раздел уровня 5 закрывает `track1-queue-overload` -- Commit/PR: измеренное состояние — `399da05` (ветка `feat/pipeline-reliability`); снятое на прежних `e2a6427` и `ff1a83b` названо в разделе доказательств; PR — TODO после публикации +- Commit/PR: измеренное состояние — `6ba74b1` (ветка `feat/unit-of-work`, перенос на единицу работы без изменения поведения); снятое на прежних `399da05`, `e2a6427` и `ff1a83b` названо в разделе доказательств; PR — TODO после публикации - Источники, библиотеки и помощь ИИ — последний раздел ## Запуск из чистого clone @@ -159,7 +159,33 @@ sequenceDiagram Быстрые тесты сервисов — каталог `service-tests/` вне образа и вне `student-tests/`: `make service_test` гоняет ветки всех сервисов на фейках без хранилищ и docker, `make service_test_db` на временной базе проверяет настоящую единицу работы, общий срок запроса и тот же набор условий repo, что и на фейке (`service-tests/repo_contract.py`). Блокировки и поведение под конкуренцией фейк не воспроизводит: это по-прежнему `make failure_checks`. -Цена шага — вторая выдача соединения на двухшаговой ручке, новых соединений нет. Её снижает проверка соединения при выдаче одним запросом `;` вместо трёх (`_ping_once`, опирается на внутренние имена адаптера, смену имён ловит `make service_test_db`). Таблица «до и после» с уровнем шума, команды, commit и пути к меткам: раздел добавляется снятием evidence на закоммиченном коде (`openspec/changes/unit-of-work/tasks.md`, группа 13). +Цена шага — вторая выдача соединения на двухшаговой ручке, новых соединений нет. Её снижает проверка соединения при выдаче одним запросом `;` вместо трёх (`_ping_once`, опирается на внутренние имена адаптера, смену имён ловит `make service_test_db`). Осталось то, что в таблицах ниже: цену приняли, готовые меры (чтение без транзакции, соединение Core вместо сессии) не применялись (`design.md`, решение 7). + +Обмены с PostgreSQL на запрос (журнал `log_statement = all`, проба до кода, `design.md`, Context; на commit не переснимались: выражения те же): + +| Ручка | До | На шаг без меры | С мерой (`_ping_once`) | +|---|---|---|---| +| `GET /users/me` | 6 | 6 | 4 | +| `GET …/messages` | 7 | 12 | 8 | +| `POST …/messages` | 8 | 13 | 9 | + +Потолок и CPU реплики до и после, закрытая модель, 1 реплика 1 CPU, один повтор на ячейку: `caffeinate -isu uv run python bench/run.py --profile quick --label unit-of-work-before` и `unit-of-work-aa` на `b2fb88f` (`src` как на `9efab79`, временный `git worktree`), `--label unit-of-work-after` на `6ba74b1`; `make bench_compare BEFORE=unit-of-work-before AFTER=unit-of-work-after AA=unit-of-work-aa`. Метки — `evidence/bench/unit-of-work-*/`, сравнение — `evidence/compare/unit-of-work-before__unit-of-work-after.md`. У всех трёх `git.dirty` false, `host_warnings` пусты, `swapouts_delta` 0; посторонние контейнеры на хосте — `domains-api-1`, `domains-bot-1`, `domains-postgres-1` (названы в паспортах). Первая съёмка `unit-of-work-before` дала предупреждение о выгрузке 27708 страниц в swap и переснята (`bench.md`): порядок меток — aa, after, rollout, затем before, в той же сессии хоста; отброшенная метка в git не идёт. + +| Сценарий | Шум A/A, наибольшее Δ RPS | Δ RPS по 9 ячейкам: медиана (мин…макс) | Вывод `bench_compare` | p50 при 1 клиенте, мс | +|---|---|---|---|---| +| история | 14,8 % (5k × 1) | −6,6 % (−18,8…−3,2) | эффект — 1k × 1 (−16,2 %) и 1k × 16 (−18,8 %), остальные в пределах шума | 1,86 → 2,22; 1,95 → 2,16; 1,85 → 2,22 | +| отправка | 34,8 % (5k × 16) | −4,3 % (−23,5…+37,5) | в пределах шума, кроме 5k × 16: +37,5 % — выброс ячейки «до» (383 RPS) | 2,05 → 2,40; 2,07 → 2,33; 1,89 → 2,41 | + +CPU реплики на запрос, мкс, история: 1646 → 1811, 1520 → 1606, 1434 → 1767 (1k × 1, 4, 16); отправка: 1860 → 2009, 1618 → 1682, 1687 → 1954. Остальные ячейки и p95 — там же в `evidence/compare/`. По сравнению с оценкой `design.md` (потолок −1…−22 %, p50 при 150/с +0,2…0,5 мс): медианы и почти все ячейки внутри, вне её одна ячейка отправки, 10k × 1, −23,5 % при шуме 34,8 %; p50 здесь при 1 клиенте закрытой модели, а не при 150/с, прирост +0,21…+0,52 мс. Шум меток большой (один повтор на ячейку), поэтому точное число — порядок, а не доказанная величина. + +CPU на успешный запрос при постоянных 200 запросах в секунду (100 записей, 100 чтений; две реплики разных версий в одном прогоне): `bench/run.py --profile rollout --from b2fb88f --label unit-of-work-previous` на `6ba74b1`, `evidence/rollout/unit-of-work-previous/summary.md`, `git.dirty` false, `host_warnings` пусты: + +| Компонент | До замены, мкс | После замены, мкс | +|---|---|---| +| API всего | 3066 | 3398 | +| PostgreSQL | 478 | 560 | + +Замена с `b2fb88f` на `6ba74b1`: 10,2 с, ошибок 0 / 0 / 0, 12001 сообщение = 12001 ключ. Удержание соединения на запрос по пробе `design.md` (Context) ниже на 20–36 %; на commit отдельно не измерялось. **Транзакционные границы.** Ключ эффекта — первичный ключ `attachment_variants (attachment_id, pipeline_version, variant)`, логическая работа — `UNIQUE (attachment_id, pipeline_version)` в `attachment_jobs`. Вызовов S3 и брокера внутри блоков единицы работы нет, кроме двух осознанных исключений с коротким сроком: публикация relay (2 с < срока блока 6 с < простоя транзакции 10 с: блокировка строки и есть признак «публикует другой relay») и DELETE уборщика под блокировкой строки. Намеренные особенности перенесены без изменения порядка: уборка зависшей загрузки — два блока (пометка, затем объект и строка), вход закрывает блок чтения до KDF, занятый ключ идемпотентности снимает блокировку фиксацией до ответа, а компенсация загрузки различает сбой выражения и сбой на самой фиксации флагом перед явным `commit()`: автокоммит при выходе этого бы не дал (`design.md`, решение 10). @@ -313,16 +339,17 @@ sequenceDiagram ## Доказательства критериев -В шапке каждого файла — команда, дата, commit и стенд. На `399da05` (правки по проверке: `_prepared`, тесты, драйвер) сняты `evidence/worker/memory.md`, `evidence/worker/process.md`, `evidence/relay/process.md`, `evidence/attachments/defense-faults.md`, `evidence/tests/failure-checks.md`. Остальные файлы уровня 4 и `evidence/tests/student-test-lb.md`, `evidence/tests/test-isolated.md` сняты на `e2a6427`: из кода приложения `399da05` меняет только `src/utils/image_variants.py`, одну ветку перевода в RGBA, поэтому `test_pixel_limit_png_modes` в этих прогонах набора ещё нет, его сценарий на `399da05` доказывает `evidence/worker/memory.md`. Остались снятыми на прежнем коде `ff1a83b` и названы так в шапках: метка `evidence/uploads/baseline/`, `evidence/rollout/async-attachments/`, `evidence/migrations/async-attachments.md`, `evidence/s3/worker-key.md`: это доказательства перехода уровня 3, их поведение уровень 4 не менял. +В шапке каждого файла — команда, дата, commit и стенд. На `6ba74b1` (единица работы, поведение то же) сняты `evidence/tests/student-test-lb.md`, `evidence/tests/test-isolated.md`, `evidence/tests/failure-checks.md`, `evidence/tests/service-tests.md`, `evidence/replicas/test-persistence.md`, `evidence/failover/test-failover.md`, `evidence/attachments/defense-faults.md`, `evidence/s3/privacy.md`, `evidence/worker/process.md`, `evidence/relay/process.md`. На `399da05` сняты `evidence/worker/memory.md` и таблица «Красные прогоны» в `failure-checks.md`. Остальные файлы уровня 4 сняты на `e2a6427`: из кода приложения `399da05` меняет только `src/utils/image_variants.py`, одну ветку перевода в RGBA, а `6ba74b1` поведения не меняет. Остались снятыми на прежнем коде `ff1a83b` и названы так в шапках: метка `evidence/uploads/baseline/`, `evidence/rollout/async-attachments/`, `evidence/migrations/async-attachments.md`, `evidence/s3/worker-key.md`: это доказательства перехода уровня 3, их поведение уровень 4 не менял. ### Уровень 3 | Критерий README | Команда/сценарий | Наблюдаемый результат | Файл доказательства | | --- | --- | --- | --- | | Публичный smoke | `make test` | `PASS: lab5 public API scenario` | `evidence/tests/test-isolated.md` | -| Минимум лаб 1–4 сохранён с переходом 201 → 202 | `make student_test` через LB | 218 passed, 1 failed (`test_exclusion_evidence_exists`: только файлы последнего шага прогона), реплики выполнены; сверка: 370 сценариев, 348 проверены, 22 исключения | `evidence/tests/student-test-lb.md` | -| Тот же набор на временной базе | `make test_isolated` | smoke PASS; 212 passed, 6 skipped (реплики), 1 failed — то же; уборка полная | `evidence/tests/test-isolated.md` | -| Отказы | `make failure_checks` (`399da05`) | 141 passed, pytest 2302 с, `crash markers 0` | `evidence/tests/failure-checks.md` | +| Минимум лаб 1–4 сохранён с переходом 201 → 202 | `make student_test` через LB | 223 passed, 1 failed (`test_exclusion_evidence_exists`: только файлы последнего шага прогона), реплики выполнены; сверка: 371 сценарий, 349 проверены, 22 исключения | `evidence/tests/student-test-lb.md` | +| Тот же набор на временной базе | `make test_isolated` | smoke PASS; 217 passed, 6 skipped (реплики), 1 failed — то же; уборка полная | `evidence/tests/test-isolated.md` | +| Отказы | `make failure_checks` (`6ba74b1`) | 141 passed, pytest 2449 с, `crash markers 0` | `evidence/tests/failure-checks.md` | +| Ветки сервисов и настоящая единица работы | `make service_test`, `make service_test_db` (`6ba74b1`) | 200 passed за 1,48 с без хранилищ; 71 passed за 21,51 с на временной базе; 13 регрессий дают названный красный | `evidence/tests/service-tests.md` | | 202 только после устойчивого приёма и сохранения задания | `test_durable_state_at_202`, `test_upload_with_broker_stopped`, `test_upload_with_broker_paused` | к 202 объект в staging, строка и намерение в одной транзакции; брокер остановлен или заморожен — по-прежнему 202, намерение ждёт (на уровне 3 было 503) | `evidence/tests/failure-checks.md` | | Остановка API после ответа не теряет работу | `test_api_killed_after_202` | реплика убита после 202, вложение становится `ready` | `evidence/tests/failure-checks.md` | | Отдельные broker и worker в общем compose | `driver.py broker-check`, `driver.py worker-process` | образ с тегом и digest, volume, AMQP только на loopback; PID 1 `python -m src.worker`, лимиты 1 CPU / 1 ГБ | `evidence/broker/stand.md`, `evidence/worker/process.md` | @@ -339,15 +366,15 @@ sequenceDiagram | Демонстрация: worker остановлен → … → `ready` | `driver.py --port 8080 defense-scenario` | все строки `expected` = `got`, `StartedAt` API и брокера новые, у relay прежний; thumbnail 256 × 160, crop 128 × 128, optimized 320 × 200 | `evidence/attachments/defense.md` | | Принятое задание переживает рестарт брокера с volume | `test_broker_restart_keeps_job`, `test_broker_kill_keeps_confirmed`, `test_broker_recreated` | сообщения на месте после `stop`, `KILL` и `up --force-recreate` | `evidence/tests/failure-checks.md` | | Очереди разных баз разделены | `make test_isolated KEEP_TEST_DB=1`, `broker-check --require-test-queue`, `make test_isolated` | очередь временной базы есть после первого и нет после второго | `evidence/broker/isolated.md` | -| Сохранность и hook | `make test-persistence ACTION_SCRIPT=scripts/restart.sh` | `PASS`; `api`, `haproxy`, `postgres`, `rabbitmq`, `s3`, `valkey` — те же ID и новый `StartedAt`, `relay`, `worker` и `cleaner` прежние | `evidence/replicas/test-persistence.md` | -| Отказ реплики | `make test-failover` `stop` и `kill` | `failed_attempts` 0, восстановление 1,07 и 0,87 с | `evidence/failover/test-failover.md` | +| Сохранность и hook | `make test-persistence ACTION_SCRIPT=scripts/restart.sh` | `PASS`; `api`, `haproxy`, `postgres`, `rabbitmq`, `s3`, `valkey` — те же контейнеры и новый `StartedAt`, `relay`, `worker` и `cleaner` прежние | `evidence/replicas/test-persistence.md` | +| Отказ реплики | `make test-failover` `stop` и `kill` | `failed_attempts` 0, восстановление 1,72 и 0,85 с | `evidence/failover/test-failover.md` | | Принявшая реплика остановлена | `driver.py attachment-failover --mode stop\|kill` | файл отдаёт другая реплика, SHA-256 тот же, постороннему 404 | `evidence/attachments/failover.md` | | Согласованность БД и S3 | `driver.py upload-consistency` | 503, строки `pending` не видны, уборщик убрал по ключу staging, объектов без строки 0 | `evidence/attachments/consistency.md` | | Приватность S3, права worker | `make s3_check` | `PASS: 90 checks`; worker: запись и чтение — да, удаление, список, админ — 403 | `evidence/s3/cleaner-staging.md` (и `evidence/s3/worker-key.md`, `ff1a83b`) | | Журнал worker | проба на стенде | общий `request_id` записей задания, `filename` 0 раз, сообщение не по схеме — `error` без содержимого | `evidence/worker/logs.md` | | Миграция только расширяет, откат без отката схемы | проба на временной базе, `make rolling_update COMMIT=cc33a03 MIGRATE=0` и возврат (`ff1a83b`) | CHECK `NOT VALID`, по `lock_timeout` — без изменений; прежний образ работает, чтение нового статуса — 500 | `evidence/migrations/async-attachments.md` | | Сроки LB пути загрузки | `driver.py lb-upload-timeouts` | 202 после 12 с молчания, 504 через 10 и 30 с, 400 в формате контракта | `evidence/uploads/lb-timeouts.md` | -| Замена реплик под нагрузкой | `make bench_rollout ROLLOUT_LABEL=async-attachments` (`ff1a83b`), `ROLLOUT_LABEL=pipeline-reliability` (`e2a6427`) | 8,52 и 8,67 с, ошибок 0, новые миграции, записей 12000 = ключей 12000 | `evidence/rollout/async-attachments/summary.md`, `evidence/rollout/pipeline-reliability/summary.md` | +| Замена реплик под нагрузкой | `make bench_rollout ROLLOUT_LABEL=async-attachments` (`ff1a83b`), `ROLLOUT_LABEL=pipeline-reliability` (`e2a6427`), `ROLLOUT_LABEL=unit-of-work` (`6ba74b1`) | 8,52, 8,67 и 8,68 с, ошибок 0, новые миграции, записей столько же, сколько ключей (12000 и 12001) | `evidence/rollout/async-attachments/summary.md`, `evidence/rollout/pipeline-reliability/summary.md`, `evidence/rollout/unit-of-work/summary.md` | | Память реплики при загрузках | `make bench_uploads` (`ff1a83b`) | «с лимитом» 10 MiB: пик 172,9 / 180,1 / 185,6 MiB при 10 / 20 / 40 клиентах, OOM 0, 5xx 0 | `evidence/uploads/baseline/summary.md` | | Секретов в доказательствах нет | поиск значений из `.env` по `evidence/` | 17 значений, 0 совпадений | `evidence/tests/secrets.md` | @@ -410,6 +437,17 @@ CPU API всего: 0,54 ядра до и 0,55 после, 0,78 во время. CPU API всего: 0,61 ядра до, 0,95 во время, 0,62 после. Гипотеза подтверждена. Сырые данные — `evidence/rollout/pipeline-reliability/`. +### Поочерёдная замена на единицу работы: метки `unit-of-work` и `unit-of-work-previous` + +Гипотеза: API, схема и настройки те же, поэтому замена на `6ba74b1` идёт без ошибок клиента и с версии до `pipeline-reliability`, и с предыдущего commit. Методика та же: `git.dirty` false, `swapouts_delta` 0, `host_warnings` пусты, питание от сети; посторонние контейнеры на хосте — `domains-api-1`, `domains-bot-1`, `domains-postgres-1` (названы в паспортах). + +| Метка, откуда | Замена | Сборка / миграция | Ревизия | Ошибки до / во время / после | Успешных в секунду | p95 до / макс. во время | Записи | +|---|---|---|---|---|---|---|---| +| `unit-of-work`, `7f38948` (`make bench_rollout ROLLOUT_LABEL=unit-of-work`) | 8,68 с | 0 / 2 с | `a1d4c7e90b23` → `d3f9a6b2c1e7` | 0 / 0 / 0 | 200 / мин. 200 | 6 / 161 мс | 12001 сообщение = 12001 ключ | +| `unit-of-work-previous`, `b2fb88f` (`bench/run.py --profile rollout --from b2fb88f`) | 10,2 с | 1 / 3 с | `d3f9a6b2c1e7` → `d3f9a6b2c1e7` | 0 / 0 / 0 | 200 / мин. 200 | 7 / 180 мс | 12001 сообщение = 12001 ключ | + +CPU API на запрос до и после замены у `unit-of-work`: 3089 и 3113 мкс, PostgreSQL 493 и 524 мкс; у `unit-of-work-previous` — раздел «Единица работы» выше. Гипотеза подтверждена. Сырые данные — `evidence/rollout/unit-of-work/`, `evidence/rollout/unit-of-work-previous/`. + ### Память реплики при загрузках: метка `baseline` Снята на `ff1a83b`, потому что на неё ссылаются исключения сверки лабы 4; с этой меткой новые не сравниваются (с уровня 4 профиль не запускает брокер). Методика — `make bench_uploads`: одна реплика 1 CPU / 512 МБ без swap, 72 прогона, 50 мин, медиана из 3 повторов; worker не запущен, задания ждут в очереди. Поправки к чтению — `evidence/uploads/README.md`. @@ -440,7 +478,7 @@ H1 (пик ограничен местами) и H4 (нет 503 по сроку | S3 недоступен при очистке staging | проход прерван, сообщения не ждут | так (`test_staging_cleanup_survives_outage`) | следующий проход повторяет | | PostgreSQL недоступен при обработке | задание ждёт, попытка не считается | так (`test_database_outage_during_processing`) | потерь нет | | Сообщение не по схеме | отброшено, `error` без содержимого | так (`test_malformed_message_dropped`, `logs.md`) | следующие задания идут | -| Реплика API остановлена или убита | запись через другую | `failed_attempts` 0 (`test-failover.md`) | 1,09 и 0,74 с, потерь нет | +| Реплика API остановлена или убита | запись через другую | `failed_attempts` 0 (`test-failover.md`) | 1,72 и 0,85 с, потерь нет | ## Ограничения и следующие шаги diff --git a/evidence/attachments/defense-faults.md b/evidence/attachments/defense-faults.md index 041a471a..0875d785 100644 --- a/evidence/attachments/defense-faults.md +++ b/evidence/attachments/defense-faults.md @@ -1,136 +1,105 @@ # Шаг 4 сценария защиты: окна отказа - Команда: `python3 .claude/skills/run-mtusi-messenger/driver.py --port 8080 defense-faults` -- Дата: 2026-10-31, 16:01:59–16:04:03 UTC; код выхода 0, итог `PASS` -- Commit: `399da05` (ветка `feat/pipeline-reliability`), рабочее дерево без правок кода (добавлены только файлы `evidence/`) +- Дата: 2026-10-31, 20:42:18–20:44:28 UTC; код выхода 0, итог `PASS` +- Commit: `6ba74b1` (ветка `feat/unit-of-work`), рабочее дерево без правок кода (добавлены только файлы `evidence/`) - Стенд: проект compose `mtusi-lab5`, собран `make run_docker` из `HEAD`: HAProxy, две реплики API, relay, worker, cleaner, PostgreSQL, Valkey, S3, RabbitMQ -- Спек: `student-tests`, «Шаг 4 на рабочем стенде»; решения 1, 3, 5, 14, 17 design change `pipeline-reliability`. Тем же порядком на стенде отказов — `test_defense_faults` (`evidence/tests/failure-checks.md`) -- Точек сбоя в коде нет: окна держат триггеры `driver_df_*` только на уникальный `filename` прогона, `docker kill` снаружи. Токенов и секретов в выводе нет, пользователи и чат синтетические -- Вывод сокращён: внутри окна строки скачивания вариантов свёрнуты в одну (каждый вариант проверен: 200, тип, размеры по байтам, SHA-256 = метаданным), итоговая таблица «проверка → ожидаемо → получено» без расхождений заменена её итогом +- Спек: `student-tests`, «Шаг 4 на рабочем стенде»; решения 1, 3, 5, 14, 17 design change `pipeline-reliability`. Особенности транзакций перенесены на единицу работы без изменения порядка (design change `unit-of-work`, решение 10) +- Точек сбоя в коде нет: окна держат триггеры `driver_df_*` только на уникальный `filename` прогона, `docker kill` снаружи. Токенов и секретов в выводе нет +- Вывод сокращён: оставлена итоговая таблица «ожидаемо → получено»; строки скачивания вариантов свёрнуты (в каждом окне и у каждого варианта: 200, тип, размеры по байтам, SHA-256 = метаданным: `thumbnail` 256×160 JPEG, `crop` 128×128 JPEG, `optimized` 320×200 WebP), значения SHA-256 и id сокращены до совпало. Все строки совпали, расхождений нет ```text window: after writing objects, before COMMIT - upload: 202 - attachment id 2cccff8d-6ce9-448f-9d58-7506b6e39aa1 - COMMIT of ready waits in the trigger: yes - action: docker kill worker - job state after kill: processing - attempt after kill: 1 - job id 181f8092-211d-482d-981b-c15e6e74e70a - thumbnail sha256 before the crash b8e59b0cad429b1c49c27c4a1c79e52bfc23e2fab7c7238d18d5addd4df4b546 - crop sha256 before the crash fae35500205a78065cf7d589f121cc909b017e2a4cde882177e24f5608fb4c1f - optimized sha256 before the crash 1090d84ed8411226010ae498b08e1b9e6d81c8eee02ee77143a0dc327b894beb - action: start worker, lease expires in 69 s - attachment status: ready + queue empty before the window expected 0 got 0 + upload expected 202 got 202 + COMMIT of ready waits in the trigger expected yes got yes + docker kill worker expected 0 got 0 + job state after kill expected processing got processing + attempt after kill expected 1 got 1 + thumbnail, crop, optimized object written expected yes got yes + docker start worker expected 0 got 0 ready 70 s after the kill - next attempt not before the lease expired: yes - variants in metadata: crop,optimized,thumbnail - downloads: thumbnail image/jpeg (256, 160); crop image/jpeg (128, 128); optimized image/webp (320, 200) - thumbnail same sha256 in S3 and metadata: b8e59b0cad429b1c49c27c4a1c79e52bfc23e2fab7c7238d18d5addd4df4b546 - crop same sha256 in S3 and metadata: fae35500205a78065cf7d589f121cc909b017e2a4cde882177e24f5608fb4c1f - optimized same sha256 in S3 and metadata: 1090d84ed8411226010ae498b08e1b9e6d81c8eee02ee77143a0dc327b894beb - attempt: 2 - job state: succeeded - queue empty: 0 + attachment status expected ready got ready + next attempt not before the lease expired expected yes got yes + variants in metadata expected crop,optimized,thumbnail got crop,optimized,thumbnail + variants: same sha256 in S3 and in metadata совпало у трёх + attempt expected 2 got 2 + job state expected succeeded got succeeded + queue empty expected 0 got 0 window: after COMMIT, before ack - upload: 202 - attachment id 63163c48-95f9-4e41-ae36-4746f241bad5 - COMMIT waits in the deferred trigger: yes - action: docker kill -s STOP worker - job state while frozen: succeeded - job id c14b31e6-2e3c-4453-8a55-76c8d4881b7c - action: docker kill worker - message returned to the queue (no ack): 1 - action: start worker - redelivered: 'Skipped job message', finished: yes - new attempts: 0 - queue empty: 0 - same updated_at: 2026-10-31T16:03:16.515863+00:00 - attempt: 1 - metadata unchanged: yes - downloads: thumbnail image/jpeg (256, 160); crop image/jpeg (128, 128); optimized image/webp (320, 200) + queue empty before the window expected 0 got 0 + upload expected 202 got 202 + COMMIT waits in the deferred trigger expected yes got yes + freeze worker expected 0 got 0 + job state while frozen expected succeeded got succeeded + docker kill worker expected 0 got 0 + message returned to the queue (no ack) expected 1 got 1 + docker start worker expected 0 got 0 + redelivered: 'Skipped job message', finished expected yes got yes + new attempts expected 0 got 0 + queue empty expected 0 got 0 + same updated_at совпало + attempt expected 1 got 1 + metadata unchanged expected yes got yes window: after COMMIT queued, before publish - action: docker kill relay - relay stays down: no - upload: 202 - attachment id 2776eb1b-9c3e-429e-9acc-bd2d010eee9c - job id a50fc32c-e511-4789-8973-29073584414d - job state: queued - published_at: None - messages in the queue: 0 - action: start relay - attachment status: ready - downloads: thumbnail image/jpeg (256, 160); crop image/jpeg (128, 128); optimized image/webp (320, 200) - attempt: 1 + queue empty before the window expected 0 got 0 + docker kill relay expected 0 got 0 + relay stays down expected no got no + upload expected 202 got 202 + job state expected queued got queued + published_at expected None got None + messages in the queue expected 0 got 0 + docker start relay expected 0 got 0 + attachment status expected ready got ready + attempt expected 1 got 1 window: after broker confirm, before the mark - action: docker compose stop worker - upload: 202 - attachment id ef8d3438-e3bd-4849-8375-79cccd92f29e - the mark waits in the trigger: yes - action: docker kill relay - message in the queue: 1 - job id 61c712cf-5a6e-4f5c-b9b7-c042bc7e9202 - published_at: None - action: start relay - two messages with the worker stopped: 2 - action: start worker - attachment status: ready - downloads: thumbnail image/jpeg (256, 160); crop image/jpeg (128, 128); optimized image/webp (320, 200) - queue empty: 0 - attempt: 1 + queue empty before the window expected 0 got 0 + upload expected 202 got 202 + the mark waits in the trigger expected yes got yes + docker kill relay expected 0 got 0 + message in the queue expected 1 got 1 + published_at expected None got None + docker start relay expected 0 got 0 + two messages with the worker stopped expected 2 got 2 + docker start worker expected 0 got 0 + attachment status expected ready got ready + queue empty expected 0 got 0 + attempt expected 1 got 1 window: replay of a failed job - action: docker compose stop worker - upload: 202 - attachment id 899a3ef4-f0d9-4d0c-8b75-49e0fe7ccf7d - action: staging object replaced with other bytes of the same size - action: start worker - attachment status: failed - error_code: processing_failed - job id 0ef49bb7-fda7-4555-a82a-9693e265820a - reason: source_corrupted - action: replay --error-code processing_failed (registry, dry-run) - registry: exit 0 - registry names the job: yes - registry changes nothing: state failed, attempt 1, attempt_base 0, last_error_code source_corrupted - action: original bytes returned to staging - action: replay --attachment-id 899a3ef4-f0d9-4d0c-8b75-49e0fe7ccf7d --apply - replay exit code: 0 - 'Replayed job' record: yes - attachment status: ready - downloads: thumbnail image/jpeg (256, 160); crop image/jpeg (128, 128); optimized image/webp (320, 200) - download original: 200 - original sha256 = uploaded: 99ea7533c441f79cd630d15ce4d58d1ec4e06f6f0efb3b77a5c088305cd1bd75 - same job: 0ef49bb7-fda7-4555-a82a-9693e265820a - attempt: 2 - attempt_base: 1 - audit: [{'operator': 'driver-defense-faults', 'error_code': 'processing_failed', 'reason': 'source_corrupted', 'attempt': 1}] + queue empty before the window expected 0 got 0 + upload expected 202 got 202 + put other bytes expected 0 got 0 + docker start worker expected 0 got 0 + attachment status expected failed got failed + error_code expected processing_failed got processing_failed + reason expected source_corrupted got source_corrupted + registry names the job expected yes got yes + registry changes nothing совпало + put original bytes expected 0 got 0 + replay exit code expected 0 got 0 + 'Replayed job' record expected yes got yes + attachment status expected ready got ready + download original expected 200 got 200 + original sha256 = uploaded совпало + same job совпало + attempt expected 2 got 2 + attempt_base expected 1 got 1 + audit совпало (operator driver-defense-faults, processing_failed, source_corrupted) window: replay of a ready job - upload: 202 - attachment id 5158f6e9-c59a-46f1-bfb9-d16cf502aa7c - attachment status: ready - job id f6eeaf22-4374-4880-99d1-c2b54ecb2bd3 - action: replay --attachment-id 5158f6e9-c59a-46f1-bfb9-d16cf502aa7c --apply - replay exit code: 3 - refusal: already_ready - metadata unchanged: yes - job unchanged: 2026-10-31T16:03:55.015651+00:00 - audit records: 0 - driver triggers left: 0 + upload expected 202 got 202 + attachment status expected ready got ready + replay exit code expected 3 got 3 + refusal expected already_ready got already_ready + metadata unchanged expected yes got yes + job unchanged совпало + audit records expected 0 got 0 -window -> action -> job id -> attempts started -> result - after writing objects, before COMMIT -> kill worker, wait for the lease -> 181f8092-211d-482d-981b-c15e6e74e70a -> 2 -> ready - after COMMIT, before ack -> freeze and kill worker after COMMIT -> c14b31e6-2e3c-4453-8a55-76c8d4881b7c -> 1 -> ready, no-op - after COMMIT queued, before publish -> kill relay, upload, start relay -> a50fc32c-e511-4789-8973-29073584414d -> 1 -> ready - after broker confirm, before the mark -> kill relay after confirm, duplicate -> 61c712cf-5a6e-4f5c-b9b7-c042bc7e9202 -> 1 -> ready - replay of a failed job -> failed, registry, replay -> 0ef49bb7-fda7-4555-a82a-9693e265820a -> 2 -> ready - replay of a ready job -> replay ready -> f6eeaf22-4374-4880-99d1-c2b54ecb2bd3 -> 1 -> refused, exit 3 - -all rows of the check table: expected = got +end: driver triggers left expected 0 got 0 PASS: every window finished with the same result, no duplicate effect worker and relay running at the end: yes ``` diff --git a/evidence/bench/unit-of-work-aa/explain-10k.txt b/evidence/bench/unit-of-work-aa/explain-10k.txt new file mode 100644 index 00000000..e1f49cc2 --- /dev/null +++ b/evidence/bench/unit-of-work-aa/explain-10k.txt @@ -0,0 +1,673 @@ +# План запроса истории: размер 10k + +Commit b2fb88f +Читаемый чат — 10000 сообщений; фоновые чаты: 2 × 1k, 10 × 100, 50 × 10. +Страница — `limit` профиля; «после» — сколько сообщений чата до +страницы. + +## Планы приложения + +auto_explain (ANALYZE, BUFFERS, TIMING): запрос, параметры и план, +с которыми его выполнило приложение (prepared statement asyncpg). + +### read 10k: first, после 0 + +duration: 0.184 ms plan: +Query Text: SELECT messages.id, messages.chat_id, messages.sender_id, messages.text, messages.created_at, array((SELECT message_attachments.attachment_id +FROM message_attachments +WHERE message_attachments.message_id = messages.id ORDER BY message_attachments.position)) AS attachment_ids +FROM messages +WHERE messages.chat_id = $1::UUID ORDER BY messages.created_at, messages.id + LIMIT $2::INTEGER +Query Parameters: $1 = 'e7f0a7ce-371e-41c8-8b8c-182d863d4eee', $2 = '51' +Limit (cost=0.29..9.59 rows=51 width=153) (actual time=0.042..0.140 rows=51.00 loops=1) + Buffers: shared hit=17 + -> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..1825.36 rows=10000 width=153) (actual time=0.040..0.135 rows=51.00 loops=1) + Index Cond: (chat_id = 'e7f0a7ce-371e-41c8-8b8c-182d863d4eee'::uuid) + Index Searches: 1 + Buffers: shared hit=17 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=51) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51) + Filter: (message_id = messages.id) + +### read 10k: middle, после 5000 + +duration: 0.146 ms plan: +Query Text: SELECT messages.id, messages.chat_id, messages.sender_id, messages.text, messages.created_at, array((SELECT message_attachments.attachment_id +FROM message_attachments +WHERE message_attachments.message_id = messages.id ORDER BY message_attachments.position)) AS attachment_ids +FROM messages +WHERE messages.chat_id = $1::UUID AND (messages.created_at, messages.id) > ($2::TIMESTAMP WITH TIME ZONE, $3::UUID) ORDER BY messages.created_at, messages.id + LIMIT $4::INTEGER +Query Parameters: $1 = 'e7f0a7ce-371e-41c8-8b8c-182d863d4eee', $2 = '2026-10-31 20:22:09.184908+00', $3 = 'e12757c1-c860-44ed-8d49-05bd9ef9ed8a', $4 = '51' +Limit (cost=0.29..21.79 rows=7 width=153) (actual time=0.032..0.107 rows=51.00 loops=1) + Buffers: shared hit=53 + -> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..218.45 rows=71 width=153) (actual time=0.030..0.103 rows=51.00 loops=1) + Index Cond: ((chat_id = $1) AND (ROW(created_at, id) > ROW($2, $3))) + Index Searches: 1 + Buffers: shared hit=53 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=51) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51) + Filter: (message_id = messages.id) + +### read 10k: last, после 9900 + +duration: 0.144 ms plan: +Query Text: SELECT messages.id, messages.chat_id, messages.sender_id, messages.text, messages.created_at, array((SELECT message_attachments.attachment_id +FROM message_attachments +WHERE message_attachments.message_id = messages.id ORDER BY message_attachments.position)) AS attachment_ids +FROM messages +WHERE messages.chat_id = $1::UUID AND (messages.created_at, messages.id) > ($2::TIMESTAMP WITH TIME ZONE, $3::UUID) ORDER BY messages.created_at, messages.id + LIMIT $4::INTEGER +Query Parameters: $1 = 'e7f0a7ce-371e-41c8-8b8c-182d863d4eee', $2 = '2026-10-31 20:22:20.445692+00', $3 = 'ff794cf6-13c4-4816-a97e-ef0fc4ef4326', $4 = '51' +Limit (cost=0.29..21.79 rows=7 width=153) (actual time=0.031..0.113 rows=51.00 loops=1) + Buffers: shared hit=54 + -> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..218.45 rows=71 width=153) (actual time=0.030..0.109 rows=51.00 loops=1) + Index Cond: ((chat_id = $1) AND (ROW(created_at, id) > ROW($2, $3))) + Index Searches: 1 + Buffers: shared hit=54 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=51) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51) + Filter: (message_id = messages.id) + +### bg 1k: first, после 0 + +duration: 0.150 ms plan: +Query Text: SELECT messages.id, messages.chat_id, messages.sender_id, messages.text, messages.created_at, array((SELECT message_attachments.attachment_id +FROM message_attachments +WHERE message_attachments.message_id = messages.id ORDER BY message_attachments.position)) AS attachment_ids +FROM messages +WHERE messages.chat_id = $1::UUID ORDER BY messages.created_at, messages.id + LIMIT $2::INTEGER +Query Parameters: $1 = '8b619ecf-de9e-4043-8b20-40346656f7ba', $2 = '51' +Limit (cost=0.29..54.04 rows=51 width=153) (actual time=0.033..0.117 rows=51.00 loops=1) + Buffers: shared hit=46 + -> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..1054.25 rows=1000 width=153) (actual time=0.033..0.114 rows=51.00 loops=1) + Index Cond: (chat_id = '8b619ecf-de9e-4043-8b20-40346656f7ba'::uuid) + Index Searches: 1 + Buffers: shared hit=46 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=51) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51) + Filter: (message_id = messages.id) + +### bg 1k: middle, после 500 + +duration: 0.185 ms plan: +Query Text: SELECT messages.id, messages.chat_id, messages.sender_id, messages.text, messages.created_at, array((SELECT message_attachments.attachment_id +FROM message_attachments +WHERE message_attachments.message_id = messages.id ORDER BY message_attachments.position)) AS attachment_ids +FROM messages +WHERE messages.chat_id = $1::UUID AND (messages.created_at, messages.id) > ($2::TIMESTAMP WITH TIME ZONE, $3::UUID) ORDER BY messages.created_at, messages.id + LIMIT $4::INTEGER +Query Parameters: $1 = '8b619ecf-de9e-4043-8b20-40346656f7ba', $2 = '2026-10-31 20:22:09.183192+00', $3 = '6c079c72-956b-4d22-902d-50525cd17715', $4 = '51' +Limit (cost=0.29..21.79 rows=7 width=153) (actual time=0.023..0.140 rows=51.00 loops=1) + Buffers: shared hit=52 + -> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..218.45 rows=71 width=153) (actual time=0.022..0.137 rows=51.00 loops=1) + Index Cond: ((chat_id = $1) AND (ROW(created_at, id) > ROW($2, $3))) + Index Searches: 1 + Buffers: shared hit=52 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=51) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51) + Filter: (message_id = messages.id) + +### bg 1k: last, после 900 + +duration: 0.126 ms plan: +Query Text: SELECT messages.id, messages.chat_id, messages.sender_id, messages.text, messages.created_at, array((SELECT message_attachments.attachment_id +FROM message_attachments +WHERE message_attachments.message_id = messages.id ORDER BY message_attachments.position)) AS attachment_ids +FROM messages +WHERE messages.chat_id = $1::UUID AND (messages.created_at, messages.id) > ($2::TIMESTAMP WITH TIME ZONE, $3::UUID) ORDER BY messages.created_at, messages.id + LIMIT $4::INTEGER +Query Parameters: $1 = '8b619ecf-de9e-4043-8b20-40346656f7ba', $2 = '2026-10-31 20:22:18.306084+00', $3 = '20861ffc-3d7f-413e-a417-26cec0b4dcb3', $4 = '51' +Limit (cost=0.29..21.79 rows=7 width=153) (actual time=0.016..0.096 rows=51.00 loops=1) + Buffers: shared hit=47 + -> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..218.45 rows=71 width=153) (actual time=0.016..0.093 rows=51.00 loops=1) + Index Cond: ((chat_id = $1) AND (ROW(created_at, id) > ROW($2, $3))) + Index Searches: 1 + Buffers: shared hit=47 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=51) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51) + Filter: (message_id = messages.id) + +### bg 100: first, после 0 + +duration: 0.165 ms plan: +Query Text: SELECT messages.id, messages.chat_id, messages.sender_id, messages.text, messages.created_at, array((SELECT message_attachments.attachment_id +FROM message_attachments +WHERE message_attachments.message_id = messages.id ORDER BY message_attachments.position)) AS attachment_ids +FROM messages +WHERE messages.chat_id = $1::UUID ORDER BY messages.created_at, messages.id + LIMIT $2::INTEGER +Query Parameters: $1 = '2c89c970-25a2-4db8-be56-14a7e9aa8283', $2 = '51' +Limit (cost=0.29..151.02 rows=51 width=153) (actual time=0.013..0.134 rows=51.00 loops=1) + Buffers: shared hit=48 + -> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..295.85 rows=100 width=153) (actual time=0.013..0.131 rows=51.00 loops=1) + Index Cond: (chat_id = '2c89c970-25a2-4db8-be56-14a7e9aa8283'::uuid) + Index Searches: 1 + Buffers: shared hit=48 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=51) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51) + Filter: (message_id = messages.id) + +### bg 10: first, после 0 + +duration: 0.073 ms plan: +Query Text: SELECT messages.id, messages.chat_id, messages.sender_id, messages.text, messages.created_at, array((SELECT message_attachments.attachment_id +FROM message_attachments +WHERE message_attachments.message_id = messages.id ORDER BY message_attachments.position)) AS attachment_ids +FROM messages +WHERE messages.chat_id = $1::UUID ORDER BY messages.created_at, messages.id + LIMIT $2::INTEGER +Query Parameters: $1 = 'd96f0cdc-62d0-4949-b4e8-9f94e470ece5', $2 = '51' +Limit (cost=0.29..38.25 rows=10 width=153) (actual time=0.028..0.065 rows=10.00 loops=1) + Buffers: shared hit=12 + -> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..38.25 rows=10 width=153) (actual time=0.027..0.064 rows=10.00 loops=1) + Index Cond: (chat_id = 'd96f0cdc-62d0-4949-b4e8-9f94e470ece5'::uuid) + Index Searches: 1 + Buffers: shared hit=12 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.002..0.002 rows=0.00 loops=10) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=10) + Filter: (message_id = messages.id) + +## Страницы сравнения в psql: варианты + +Тот же текст запроса и те же параметры, что у плана приложения этой +страницы, в одной транзакции, которая откатывается: индексы базы +после неё те же. Каждый вариант выполнен дважды, здесь — второе +выполнение. `psql` — индекс приложения, custom plan; `generic` — он +же с force_generic_plan; `or-cursor` — условие курсора через OR; +`no-index` — без индекса приложения; варианты индекса вместо него: +`chat_only` (chat_id), `covering` (chat_id, created_at, id) INCLUDE (sender_id, text). + +### read 10k: middle, после 5000 + +#### psql + +Limit (cost=0.29..14.64 rows=51 width=153) (actual time=0.006..0.057 rows=51.00 loops=1) + Buffers: shared hit=53 + -> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..1408.11 rows=5000 width=153) (actual time=0.005..0.053 rows=51.00 loops=1) + Index Cond: ((chat_id = 'e7f0a7ce-371e-41c8-8b8c-182d863d4eee'::uuid) AND (ROW(created_at, id) > ROW('2026-10-31 20:22:09.184908+00'::timestamp with time zone, 'e12757c1-c860-44ed-8d49-05bd9ef9ed8a'::uuid))) + Index Searches: 1 + Buffers: shared hit=53 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=51) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51) + Filter: (message_id = messages.id) +Planning: + Buffers: shared hit=3 +Planning Time: 0.044 ms +Execution Time: 0.065 ms + +#### generic + +Limit (cost=0.29..21.79 rows=7 width=153) (actual time=0.014..0.065 rows=51.00 loops=1) + Buffers: shared hit=53 + -> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..218.45 rows=71 width=153) (actual time=0.014..0.062 rows=51.00 loops=1) + Index Cond: ((chat_id = $1) AND (ROW(created_at, id) > ROW($2, $3))) + Index Searches: 1 + Buffers: shared hit=53 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=51) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51) + Filter: (message_id = messages.id) +Planning Time: 0.011 ms +Execution Time: 0.077 ms + +#### or-cursor + +Limit (cost=0.29..18.90 rows=51 width=153) (actual time=0.720..0.763 rows=51.00 loops=1) + Buffers: shared hit=5063 + -> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..1825.36 rows=5000 width=153) (actual time=0.720..0.760 rows=51.00 loops=1) + Index Cond: (chat_id = 'e7f0a7ce-371e-41c8-8b8c-182d863d4eee'::uuid) + Filter: ((created_at > '2026-10-31 20:22:09.184908+00'::timestamp with time zone) OR ((created_at = '2026-10-31 20:22:09.184908+00'::timestamp with time zone) AND (id > 'e12757c1-c860-44ed-8d49-05bd9ef9ed8a'::uuid))) + Rows Removed by Filter: 5000 + Index Searches: 1 + Buffers: shared hit=5063 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51) + Filter: (message_id = messages.id) +Planning: + Buffers: shared hit=3 +Planning Time: 0.061 ms +Execution Time: 0.779 ms + +#### no-index + +Limit (cost=771.06..771.19 rows=51 width=153) (actual time=3.982..3.986 rows=51.00 loops=1) + Buffers: shared hit=293 + -> Sort (cost=771.06..783.56 rows=5000 width=153) (actual time=3.982..3.984 rows=51.00 loops=1) + Sort Key: messages.created_at, messages.id + Sort Method: top-N heapsort Memory: 44kB + Buffers: shared hit=293 + -> Seq Scan on messages (cost=0.00..604.25 rows=5000 width=153) (actual time=0.224..3.444 rows=5000.00 loops=1) + Filter: ((chat_id = 'e7f0a7ce-371e-41c8-8b8c-182d863d4eee'::uuid) AND (ROW(created_at, id) > ROW('2026-10-31 20:22:09.184908+00'::timestamp with time zone, 'e12757c1-c860-44ed-8d49-05bd9ef9ed8a'::uuid))) + Rows Removed by Filter: 8500 + Buffers: shared hit=293 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=5000) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=5000) + Filter: (message_id = messages.id) +Planning: + Buffers: shared hit=3 +Planning Time: 0.069 ms +Execution Time: 3.995 ms + +#### chat_only + +Limit (cost=771.06..771.19 rows=51 width=153) (actual time=3.710..3.713 rows=51.00 loops=1) + Buffers: shared hit=293 + -> Sort (cost=771.06..783.56 rows=5000 width=153) (actual time=3.710..3.711 rows=51.00 loops=1) + Sort Key: messages.created_at, messages.id + Sort Method: top-N heapsort Memory: 44kB + Buffers: shared hit=293 + -> Seq Scan on messages (cost=0.00..604.25 rows=5000 width=153) (actual time=0.208..3.168 rows=5000.00 loops=1) + Filter: ((chat_id = 'e7f0a7ce-371e-41c8-8b8c-182d863d4eee'::uuid) AND (ROW(created_at, id) > ROW('2026-10-31 20:22:09.184908+00'::timestamp with time zone, 'e12757c1-c860-44ed-8d49-05bd9ef9ed8a'::uuid))) + Rows Removed by Filter: 8500 + Buffers: shared hit=293 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=5000) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=5000) + Filter: (message_id = messages.id) +Planning: + Buffers: shared hit=3 +Planning Time: 0.037 ms +Execution Time: 3.719 ms + +#### covering + +Limit (cost=0.41..6.19 rows=51 width=153) (actual time=0.007..0.044 rows=51.00 loops=1) + Buffers: shared hit=5 + -> Index Only Scan using bench_variant on messages (cost=0.41..567.41 rows=5000 width=153) (actual time=0.006..0.041 rows=51.00 loops=1) + Index Cond: ((chat_id = 'e7f0a7ce-371e-41c8-8b8c-182d863d4eee'::uuid) AND (ROW(created_at, id) > ROW('2026-10-31 20:22:09.184908+00'::timestamp with time zone, 'e12757c1-c860-44ed-8d49-05bd9ef9ed8a'::uuid))) + Heap Fetches: 0 + Index Searches: 1 + Buffers: shared hit=5 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51) + Filter: (message_id = messages.id) +Planning: + Buffers: shared hit=3 +Planning Time: 0.048 ms +Execution Time: 0.052 ms + +### bg 1k: middle, после 500 + +#### psql + +Limit (cost=0.29..95.89 rows=51 width=153) (actual time=0.006..0.049 rows=51.00 loops=1) + Buffers: shared hit=52 + -> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..937.55 rows=500 width=153) (actual time=0.006..0.046 rows=51.00 loops=1) + Index Cond: ((chat_id = '8b619ecf-de9e-4043-8b20-40346656f7ba'::uuid) AND (ROW(created_at, id) > ROW('2026-10-31 20:22:09.183192+00'::timestamp with time zone, '6c079c72-956b-4d22-902d-50525cd17715'::uuid))) + Index Searches: 1 + Buffers: shared hit=52 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51) + Filter: (message_id = messages.id) +Planning: + Buffers: shared hit=3 +Planning Time: 0.041 ms +Execution Time: 0.057 ms + +#### generic + +Limit (cost=0.29..21.79 rows=7 width=153) (actual time=0.012..0.061 rows=51.00 loops=1) + Buffers: shared hit=52 + -> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..218.45 rows=71 width=153) (actual time=0.011..0.058 rows=51.00 loops=1) + Index Cond: ((chat_id = $1) AND (ROW(created_at, id) > ROW($2, $3))) + Index Searches: 1 + Buffers: shared hit=52 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=51) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51) + Filter: (message_id = messages.id) +Planning Time: 0.009 ms +Execution Time: 0.072 ms + +#### or-cursor + +Limit (cost=0.29..107.79 rows=51 width=153) (actual time=0.083..0.121 rows=51.00 loops=1) + Buffers: shared hit=502 + -> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..1054.25 rows=500 width=153) (actual time=0.083..0.119 rows=51.00 loops=1) + Index Cond: (chat_id = '8b619ecf-de9e-4043-8b20-40346656f7ba'::uuid) + Filter: ((created_at > '2026-10-31 20:22:09.183192+00'::timestamp with time zone) OR ((created_at = '2026-10-31 20:22:09.183192+00'::timestamp with time zone) AND (id > '6c079c72-956b-4d22-902d-50525cd17715'::uuid))) + Rows Removed by Filter: 500 + Index Searches: 1 + Buffers: shared hit=502 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51) + Filter: (message_id = messages.id) +Planning: + Buffers: shared hit=3 +Planning Time: 0.076 ms +Execution Time: 0.129 ms + +#### no-index + +Limit (cost=553.43..553.56 rows=51 width=153) (actual time=0.666..0.669 rows=51.00 loops=1) + Buffers: shared hit=293 + -> Sort (cost=553.43..554.68 rows=500 width=153) (actual time=0.666..0.667 rows=51.00 loops=1) + Sort Key: messages.created_at, messages.id + Sort Method: top-N heapsort Memory: 39kB + Buffers: shared hit=293 + -> Seq Scan on messages (cost=0.00..536.75 rows=500 width=153) (actual time=0.192..0.613 rows=500.00 loops=1) + Filter: ((chat_id = '8b619ecf-de9e-4043-8b20-40346656f7ba'::uuid) AND (ROW(created_at, id) > ROW('2026-10-31 20:22:09.183192+00'::timestamp with time zone, '6c079c72-956b-4d22-902d-50525cd17715'::uuid))) + Rows Removed by Filter: 13000 + Buffers: shared hit=293 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=500) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=500) + Filter: (message_id = messages.id) +Planning: + Buffers: shared hit=3 +Planning Time: 0.066 ms +Execution Time: 0.676 ms + +#### chat_only + +Limit (cost=350.59..350.72 rows=51 width=153) (actual time=0.507..0.511 rows=51.00 loops=1) + Buffers: shared hit=281 + -> Sort (cost=350.59..351.84 rows=500 width=153) (actual time=0.507..0.509 rows=51.00 loops=1) + Sort Key: messages.created_at, messages.id + Sort Method: top-N heapsort Memory: 39kB + Buffers: shared hit=281 + -> Bitmap Heap Scan on messages (cost=15.91..333.91 rows=500 width=153) (actual time=0.094..0.442 rows=500.00 loops=1) + Recheck Cond: (chat_id = '8b619ecf-de9e-4043-8b20-40346656f7ba'::uuid) + Filter: (ROW(created_at, id) > ROW('2026-10-31 20:22:09.183192+00'::timestamp with time zone, '6c079c72-956b-4d22-902d-50525cd17715'::uuid)) + Rows Removed by Filter: 500 + Heap Blocks: exact=278 + Buffers: shared hit=281 + -> Bitmap Index Scan on bench_variant (cost=0.00..15.79 rows=1000 width=0) (actual time=0.022..0.022 rows=1000.00 loops=1) + Index Cond: (chat_id = '8b619ecf-de9e-4043-8b20-40346656f7ba'::uuid) + Index Searches: 1 + Buffers: shared hit=3 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=500) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=500) + Filter: (message_id = messages.id) +Planning: + Buffers: shared hit=3 +Planning Time: 0.042 ms +Execution Time: 0.517 ms + +#### covering + +Limit (cost=0.41..6.28 rows=51 width=153) (actual time=0.007..0.046 rows=51.00 loops=1) + Buffers: shared hit=5 + -> Index Only Scan using bench_variant on messages (cost=0.41..57.91 rows=500 width=153) (actual time=0.006..0.044 rows=51.00 loops=1) + Index Cond: ((chat_id = '8b619ecf-de9e-4043-8b20-40346656f7ba'::uuid) AND (ROW(created_at, id) > ROW('2026-10-31 20:22:09.183192+00'::timestamp with time zone, '6c079c72-956b-4d22-902d-50525cd17715'::uuid))) + Heap Fetches: 0 + Index Searches: 1 + Buffers: shared hit=5 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51) + Filter: (message_id = messages.id) +Planning: + Buffers: shared hit=3 +Planning Time: 0.063 ms +Execution Time: 0.054 ms + +### bg 100: first, после 0 + +#### psql + +Limit (cost=0.29..151.02 rows=51 width=153) (actual time=0.005..0.050 rows=51.00 loops=1) + Buffers: shared hit=48 + -> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..295.85 rows=100 width=153) (actual time=0.005..0.047 rows=51.00 loops=1) + Index Cond: (chat_id = '2c89c970-25a2-4db8-be56-14a7e9aa8283'::uuid) + Index Searches: 1 + Buffers: shared hit=48 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51) + Filter: (message_id = messages.id) +Planning: + Buffers: shared hit=3 +Planning Time: 0.044 ms +Execution Time: 0.055 ms + +#### generic + +Limit (cost=0.29..53.03 rows=21 width=153) (actual time=0.012..0.061 rows=51.00 loops=1) + Buffers: shared hit=48 + -> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..537.76 rows=214 width=153) (actual time=0.011..0.058 rows=51.00 loops=1) + Index Cond: (chat_id = $1) + Index Searches: 1 + Buffers: shared hit=48 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=51) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51) + Filter: (message_id = messages.id) +Planning Time: 0.005 ms +Execution Time: 0.069 ms + +#### no-index + +Limit (cost=466.57..466.70 rows=51 width=153) (actual time=0.394..0.397 rows=51.00 loops=1) + Buffers: shared hit=293 + -> Sort (cost=466.57..466.82 rows=100 width=153) (actual time=0.393..0.395 rows=51.00 loops=1) + Sort Key: messages.created_at, messages.id + Sort Method: quicksort Memory: 50kB + Buffers: shared hit=293 + -> Seq Scan on messages (cost=0.00..463.25 rows=100 width=153) (actual time=0.007..0.376 rows=100.00 loops=1) + Filter: (chat_id = '2c89c970-25a2-4db8-be56-14a7e9aa8283'::uuid) + Rows Removed by Filter: 13400 + Buffers: shared hit=293 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=100) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=100) + Filter: (message_id = messages.id) +Planning: + Buffers: shared hit=3 +Planning Time: 0.037 ms +Execution Time: 0.402 ms + +#### chat_only + +Limit (cost=215.36..215.48 rows=51 width=153) (actual time=0.110..0.114 rows=51.00 loops=1) + Buffers: shared hit=91 + -> Sort (cost=215.36..215.61 rows=100 width=153) (actual time=0.110..0.112 rows=51.00 loops=1) + Sort Key: messages.created_at, messages.id + Sort Method: quicksort Memory: 50kB + Buffers: shared hit=91 + -> Bitmap Heap Scan on messages (cost=5.06..212.03 rows=100 width=153) (actual time=0.011..0.097 rows=100.00 loops=1) + Recheck Cond: (chat_id = '2c89c970-25a2-4db8-be56-14a7e9aa8283'::uuid) + Heap Blocks: exact=89 + Buffers: shared hit=91 + -> Bitmap Index Scan on bench_variant (cost=0.00..5.04 rows=100 width=0) (actual time=0.004..0.004 rows=100.00 loops=1) + Index Cond: (chat_id = '2c89c970-25a2-4db8-be56-14a7e9aa8283'::uuid) + Index Searches: 1 + Buffers: shared hit=2 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=100) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=100) + Filter: (message_id = messages.id) +Planning: + Buffers: shared hit=3 +Planning Time: 0.036 ms +Execution Time: 0.120 ms + +#### covering + +Limit (cost=0.41..6.15 rows=51 width=153) (actual time=0.005..0.042 rows=51.00 loops=1) + Buffers: shared hit=5 + -> Index Only Scan using bench_variant on messages (cost=0.41..11.66 rows=100 width=153) (actual time=0.005..0.040 rows=51.00 loops=1) + Index Cond: (chat_id = '2c89c970-25a2-4db8-be56-14a7e9aa8283'::uuid) + Heap Fetches: 0 + Index Searches: 1 + Buffers: shared hit=5 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51) + Filter: (message_id = messages.id) +Planning: + Buffers: shared hit=3 +Planning Time: 0.038 ms +Execution Time: 0.049 ms + +### bg 10: first, после 0 + +#### psql + +Limit (cost=0.29..38.25 rows=10 width=153) (actual time=0.008..0.018 rows=10.00 loops=1) + Buffers: shared hit=12 + -> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..38.25 rows=10 width=153) (actual time=0.008..0.017 rows=10.00 loops=1) + Index Cond: (chat_id = 'd96f0cdc-62d0-4949-b4e8-9f94e470ece5'::uuid) + Index Searches: 1 + Buffers: shared hit=12 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=10) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=10) + Filter: (message_id = messages.id) +Planning: + Buffers: shared hit=3 +Planning Time: 0.061 ms +Execution Time: 0.026 ms + +#### generic + +Limit (cost=0.29..53.03 rows=21 width=153) (actual time=0.013..0.026 rows=10.00 loops=1) + Buffers: shared hit=12 + -> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..537.76 rows=214 width=153) (actual time=0.013..0.024 rows=10.00 loops=1) + Index Cond: (chat_id = $1) + Index Searches: 1 + Buffers: shared hit=12 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=10) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=10) + Filter: (message_id = messages.id) +Planning Time: 0.006 ms +Execution Time: 0.035 ms + +#### no-index + +Limit (cost=462.07..462.09 rows=10 width=153) (actual time=0.307..0.308 rows=10.00 loops=1) + Buffers: shared hit=293 + -> Sort (cost=462.07..462.09 rows=10 width=153) (actual time=0.307..0.307 rows=10.00 loops=1) + Sort Key: messages.created_at, messages.id + Sort Method: quicksort Memory: 27kB + Buffers: shared hit=293 + -> Seq Scan on messages (cost=0.00..461.90 rows=10 width=153) (actual time=0.017..0.294 rows=10.00 loops=1) + Filter: (chat_id = 'd96f0cdc-62d0-4949-b4e8-9f94e470ece5'::uuid) + Rows Removed by Filter: 13490 + Buffers: shared hit=293 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=10) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=10) + Filter: (message_id = messages.id) +Planning: + Buffers: shared hit=3 +Planning Time: 0.050 ms +Execution Time: 0.313 ms + +#### chat_only + +Limit (cost=33.48..33.50 rows=10 width=153) (actual time=0.019..0.021 rows=10.00 loops=1) + Buffers: shared hit=12 + -> Sort (cost=33.48..33.50 rows=10 width=153) (actual time=0.019..0.020 rows=10.00 loops=1) + Sort Key: messages.created_at, messages.id + Sort Method: quicksort Memory: 27kB + Buffers: shared hit=12 + -> Index Scan using bench_variant on messages (cost=0.29..33.31 rows=10 width=153) (actual time=0.006..0.017 rows=10.00 loops=1) + Index Cond: (chat_id = 'd96f0cdc-62d0-4949-b4e8-9f94e470ece5'::uuid) + Index Searches: 1 + Buffers: shared hit=12 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=10) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=10) + Filter: (message_id = messages.id) +Planning: + Buffers: shared hit=3 +Planning Time: 0.066 ms +Execution Time: 0.030 ms + +#### covering + +Limit (cost=0.41..4.74 rows=10 width=153) (actual time=0.005..0.012 rows=10.00 loops=1) + Buffers: shared hit=5 + -> Index Only Scan using bench_variant on messages (cost=0.41..4.74 rows=10 width=153) (actual time=0.005..0.012 rows=10.00 loops=1) + Index Cond: (chat_id = 'd96f0cdc-62d0-4949-b4e8-9f94e470ece5'::uuid) + Heap Fetches: 0 + Index Searches: 1 + Buffers: shared hit=5 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=10) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=10) + Filter: (message_id = messages.id) +Planning: + Buffers: shared hit=3 +Planning Time: 0.040 ms +Execution Time: 0.017 ms diff --git a/evidence/bench/unit-of-work-aa/explain-1k.txt b/evidence/bench/unit-of-work-aa/explain-1k.txt new file mode 100644 index 00000000..4a10b98c --- /dev/null +++ b/evidence/bench/unit-of-work-aa/explain-1k.txt @@ -0,0 +1,731 @@ +# План запроса истории: размер 1k + +Commit b2fb88f +Читаемый чат — 1000 сообщений; фоновые чаты: 2 × 1k, 10 × 100, 50 × 10. +Страница — `limit` профиля; «после» — сколько сообщений чата до +страницы. + +## Планы приложения + +auto_explain (ANALYZE, BUFFERS, TIMING): запрос, параметры и план, +с которыми его выполнило приложение (prepared statement asyncpg). + +### read 1k: first, после 0 + +duration: 0.147 ms plan: +Query Text: SELECT messages.id, messages.chat_id, messages.sender_id, messages.text, messages.created_at, array((SELECT message_attachments.attachment_id +FROM message_attachments +WHERE message_attachments.message_id = messages.id ORDER BY message_attachments.position)) AS attachment_ids +FROM messages +WHERE messages.chat_id = $1::UUID ORDER BY messages.created_at, messages.id + LIMIT $2::INTEGER +Query Parameters: $1 = 'e89c392b-46c2-4a1d-a798-2ca1f4787398', $2 = '51' +Limit (cost=0.28..24.74 rows=51 width=153) (actual time=0.040..0.113 rows=51.00 loops=1) + Buffers: shared hit=32 + -> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.28..479.84 rows=1000 width=153) (actual time=0.039..0.109 rows=51.00 loops=1) + Index Cond: (chat_id = 'e89c392b-46c2-4a1d-a798-2ca1f4787398'::uuid) + Index Searches: 1 + Buffers: shared hit=32 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=51) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51) + Filter: (message_id = messages.id) + +### read 1k: middle, после 500 + +duration: 0.121 ms plan: +Query Text: SELECT messages.id, messages.chat_id, messages.sender_id, messages.text, messages.created_at, array((SELECT message_attachments.attachment_id +FROM message_attachments +WHERE message_attachments.message_id = messages.id ORDER BY message_attachments.position)) AS attachment_ids +FROM messages +WHERE messages.chat_id = $1::UUID AND (messages.created_at, messages.id) > ($2::TIMESTAMP WITH TIME ZONE, $3::UUID) ORDER BY messages.created_at, messages.id + LIMIT $4::INTEGER +Query Parameters: $1 = 'e89c392b-46c2-4a1d-a798-2ca1f4787398', $2 = '2026-10-31 20:19:42.570021+00', $3 = 'cb5ad463-2531-42b3-8858-75d9f4d51aa0', $4 = '51' +Limit (cost=0.28..45.12 rows=51 width=153) (actual time=0.016..0.085 rows=51.00 loops=1) + Buffers: shared hit=51 + -> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.28..440.73 rows=501 width=153) (actual time=0.016..0.082 rows=51.00 loops=1) + Index Cond: ((chat_id = 'e89c392b-46c2-4a1d-a798-2ca1f4787398'::uuid) AND (ROW(created_at, id) > ROW('2026-10-31 20:19:42.570021+00'::timestamp with time zone, 'cb5ad463-2531-42b3-8858-75d9f4d51aa0'::uuid))) + Index Searches: 1 + Buffers: shared hit=51 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=51) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51) + Filter: (message_id = messages.id) + +### read 1k: last, после 900 + +duration: 0.240 ms plan: +Query Text: SELECT messages.id, messages.chat_id, messages.sender_id, messages.text, messages.created_at, array((SELECT message_attachments.attachment_id +FROM message_attachments +WHERE message_attachments.message_id = messages.id ORDER BY message_attachments.position)) AS attachment_ids +FROM messages +WHERE messages.chat_id = $1::UUID AND (messages.created_at, messages.id) > ($2::TIMESTAMP WITH TIME ZONE, $3::UUID) ORDER BY messages.created_at, messages.id + LIMIT $4::INTEGER +Query Parameters: $1 = 'e89c392b-46c2-4a1d-a798-2ca1f4787398', $2 = '2026-10-31 20:19:45.708241+00', $3 = '10ad2de8-b01a-4b52-a049-d90b26b5aa5b', $4 = '51' +Limit (cost=120.17..120.30 rows=51 width=153) (actual time=0.193..0.198 rows=51.00 loops=1) + Buffers: shared hit=28 + -> Sort (cost=120.17..120.42 rows=100 width=153) (actual time=0.193..0.195 rows=51.00 loops=1) + Sort Key: messages.created_at, messages.id + Sort Method: quicksort Memory: 50kB + Buffers: shared hit=28 + -> Bitmap Heap Scan on messages (cost=9.31..116.85 rows=100 width=153) (actual time=0.029..0.144 rows=100.00 loops=1) + Recheck Cond: ((chat_id = 'e89c392b-46c2-4a1d-a798-2ca1f4787398'::uuid) AND (ROW(created_at, id) > ROW('2026-10-31 20:19:45.708241+00'::timestamp with time zone, '10ad2de8-b01a-4b52-a049-d90b26b5aa5b'::uuid))) + Heap Blocks: exact=20 + Buffers: shared hit=22 + -> Bitmap Index Scan on ix_messages_chat_id_created_at_id (cost=0.00..9.28 rows=100 width=0) (actual time=0.010..0.010 rows=100.00 loops=1) + Index Cond: ((chat_id = 'e89c392b-46c2-4a1d-a798-2ca1f4787398'::uuid) AND (ROW(created_at, id) > ROW('2026-10-31 20:19:45.708241+00'::timestamp with time zone, '10ad2de8-b01a-4b52-a049-d90b26b5aa5b'::uuid))) + Index Searches: 1 + Buffers: shared hit=2 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=100) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=100) + Filter: (message_id = messages.id) + +### bg 1k: first, после 0 + +duration: 0.106 ms plan: +Query Text: SELECT messages.id, messages.chat_id, messages.sender_id, messages.text, messages.created_at, array((SELECT message_attachments.attachment_id +FROM message_attachments +WHERE message_attachments.message_id = messages.id ORDER BY message_attachments.position)) AS attachment_ids +FROM messages +WHERE messages.chat_id = $1::UUID ORDER BY messages.created_at, messages.id + LIMIT $2::INTEGER +Query Parameters: $1 = '1c02e8d5-8fbd-4500-9374-1e4e3f22f2e3', $2 = '51' +Limit (cost=0.28..24.74 rows=51 width=153) (actual time=0.010..0.078 rows=51.00 loops=1) + Buffers: shared hit=37 + -> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.28..479.84 rows=1000 width=153) (actual time=0.009..0.075 rows=51.00 loops=1) + Index Cond: (chat_id = '1c02e8d5-8fbd-4500-9374-1e4e3f22f2e3'::uuid) + Index Searches: 1 + Buffers: shared hit=37 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51) + Filter: (message_id = messages.id) + +### bg 1k: middle, после 500 + +duration: 0.105 ms plan: +Query Text: SELECT messages.id, messages.chat_id, messages.sender_id, messages.text, messages.created_at, array((SELECT message_attachments.attachment_id +FROM message_attachments +WHERE message_attachments.message_id = messages.id ORDER BY message_attachments.position)) AS attachment_ids +FROM messages +WHERE messages.chat_id = $1::UUID AND (messages.created_at, messages.id) > ($2::TIMESTAMP WITH TIME ZONE, $3::UUID) ORDER BY messages.created_at, messages.id + LIMIT $4::INTEGER +Query Parameters: $1 = '1c02e8d5-8fbd-4500-9374-1e4e3f22f2e3', $2 = '2026-10-31 20:19:42.593379+00', $3 = '41e10366-ac36-468e-965e-54b7bd0290ce', $4 = '51' +Limit (cost=0.28..45.38 rows=51 width=153) (actual time=0.012..0.075 rows=51.00 loops=1) + Buffers: shared hit=53 + -> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.28..440.63 rows=498 width=153) (actual time=0.011..0.072 rows=51.00 loops=1) + Index Cond: ((chat_id = '1c02e8d5-8fbd-4500-9374-1e4e3f22f2e3'::uuid) AND (ROW(created_at, id) > ROW('2026-10-31 20:19:42.593379+00'::timestamp with time zone, '41e10366-ac36-468e-965e-54b7bd0290ce'::uuid))) + Index Searches: 1 + Buffers: shared hit=53 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51) + Filter: (message_id = messages.id) + +### bg 1k: last, после 900 + +duration: 0.156 ms plan: +Query Text: SELECT messages.id, messages.chat_id, messages.sender_id, messages.text, messages.created_at, array((SELECT message_attachments.attachment_id +FROM message_attachments +WHERE message_attachments.message_id = messages.id ORDER BY message_attachments.position)) AS attachment_ids +FROM messages +WHERE messages.chat_id = $1::UUID AND (messages.created_at, messages.id) > ($2::TIMESTAMP WITH TIME ZONE, $3::UUID) ORDER BY messages.created_at, messages.id + LIMIT $4::INTEGER +Query Parameters: $1 = '1c02e8d5-8fbd-4500-9374-1e4e3f22f2e3', $2 = '2026-10-31 20:19:45.714312+00', $3 = '630019db-1266-44cc-b5d6-fcb3edda0b30', $4 = '51' +Limit (cost=120.09..120.21 rows=51 width=153) (actual time=0.125..0.130 rows=51.00 loops=1) + Buffers: shared hit=18 + -> Sort (cost=120.09..120.33 rows=99 width=153) (actual time=0.125..0.127 rows=51.00 loops=1) + Sort Key: messages.created_at, messages.id + Sort Method: quicksort Memory: 50kB + Buffers: shared hit=18 + -> Bitmap Heap Scan on messages (cost=9.30..116.81 rows=99 width=153) (actual time=0.019..0.104 rows=100.00 loops=1) + Recheck Cond: ((chat_id = '1c02e8d5-8fbd-4500-9374-1e4e3f22f2e3'::uuid) AND (ROW(created_at, id) > ROW('2026-10-31 20:19:45.714312+00'::timestamp with time zone, '630019db-1266-44cc-b5d6-fcb3edda0b30'::uuid))) + Heap Blocks: exact=16 + Buffers: shared hit=18 + -> Bitmap Index Scan on ix_messages_chat_id_created_at_id (cost=0.00..9.27 rows=99 width=0) (actual time=0.009..0.009 rows=100.00 loops=1) + Index Cond: ((chat_id = '1c02e8d5-8fbd-4500-9374-1e4e3f22f2e3'::uuid) AND (ROW(created_at, id) > ROW('2026-10-31 20:19:45.714312+00'::timestamp with time zone, '630019db-1266-44cc-b5d6-fcb3edda0b30'::uuid))) + Index Searches: 1 + Buffers: shared hit=2 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=100) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=100) + Filter: (message_id = messages.id) + +### bg 100: first, после 0 + +duration: 0.231 ms plan: +Query Text: SELECT messages.id, messages.chat_id, messages.sender_id, messages.text, messages.created_at, array((SELECT message_attachments.attachment_id +FROM message_attachments +WHERE message_attachments.message_id = messages.id ORDER BY message_attachments.position)) AS attachment_ids +FROM messages +WHERE messages.chat_id = $1::UUID ORDER BY messages.created_at, messages.id + LIMIT $2::INTEGER +Query Parameters: $1 = '3694cad0-8739-4553-ba44-604daaaa3382', $2 = '51' +Limit (cost=119.42..119.55 rows=51 width=153) (actual time=0.197..0.201 rows=51.00 loops=1) + Buffers: shared hit=64 + -> Sort (cost=119.42..119.67 rows=100 width=153) (actual time=0.197..0.199 rows=51.00 loops=1) + Sort Key: messages.created_at, messages.id + Sort Method: quicksort Memory: 50kB + Buffers: shared hit=64 + -> Bitmap Heap Scan on messages (cost=9.06..116.10 rows=100 width=153) (actual time=0.033..0.175 rows=100.00 loops=1) + Recheck Cond: (chat_id = '3694cad0-8739-4553-ba44-604daaaa3382'::uuid) + Heap Blocks: exact=62 + Buffers: shared hit=64 + -> Bitmap Index Scan on ix_messages_chat_id_created_at_id (cost=0.00..9.03 rows=100 width=0) (actual time=0.010..0.010 rows=100.00 loops=1) + Index Cond: (chat_id = '3694cad0-8739-4553-ba44-604daaaa3382'::uuid) + Index Searches: 1 + Buffers: shared hit=2 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=100) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=100) + Filter: (message_id = messages.id) + +### bg 10: first, после 0 + +duration: 0.041 ms plan: +Query Text: SELECT messages.id, messages.chat_id, messages.sender_id, messages.text, messages.created_at, array((SELECT message_attachments.attachment_id +FROM message_attachments +WHERE message_attachments.message_id = messages.id ORDER BY message_attachments.position)) AS attachment_ids +FROM messages +WHERE messages.chat_id = $1::UUID ORDER BY messages.created_at, messages.id + LIMIT $2::INTEGER +Query Parameters: $1 = '173df049-0e59-461f-afe3-8a15542fa0c5', $2 = '51' +Limit (cost=35.36..35.39 rows=10 width=153) (actual time=0.036..0.037 rows=10.00 loops=1) + Buffers: shared hit=12 + -> Sort (cost=35.36..35.39 rows=10 width=153) (actual time=0.036..0.036 rows=10.00 loops=1) + Sort Key: messages.created_at, messages.id + Sort Method: quicksort Memory: 27kB + Buffers: shared hit=12 + -> Bitmap Heap Scan on messages (cost=4.36..35.20 rows=10 width=153) (actual time=0.014..0.032 rows=10.00 loops=1) + Recheck Cond: (chat_id = '173df049-0e59-461f-afe3-8a15542fa0c5'::uuid) + Heap Blocks: exact=10 + Buffers: shared hit=12 + -> Bitmap Index Scan on ix_messages_chat_id_created_at_id (cost=0.00..4.36 rows=10 width=0) (actual time=0.005..0.005 rows=10.00 loops=1) + Index Cond: (chat_id = '173df049-0e59-461f-afe3-8a15542fa0c5'::uuid) + Index Searches: 1 + Buffers: shared hit=2 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=10) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=10) + Filter: (message_id = messages.id) + +## Страницы сравнения в psql: варианты + +Тот же текст запроса и те же параметры, что у плана приложения этой +страницы, в одной транзакции, которая откатывается: индексы базы +после неё те же. Каждый вариант выполнен дважды, здесь — второе +выполнение. `psql` — индекс приложения, custom plan; `generic` — он +же с force_generic_plan; `or-cursor` — условие курсора через OR; +`no-index` — без индекса приложения; варианты индекса вместо него: +`chat_only` (chat_id), `covering` (chat_id, created_at, id) INCLUDE (sender_id, text). + +### read 1k: middle, после 500 + +#### psql + +Limit (cost=0.28..45.12 rows=51 width=153) (actual time=0.009..0.057 rows=51.00 loops=1) + Buffers: shared hit=51 + -> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.28..440.73 rows=501 width=153) (actual time=0.009..0.054 rows=51.00 loops=1) + Index Cond: ((chat_id = 'e89c392b-46c2-4a1d-a798-2ca1f4787398'::uuid) AND (ROW(created_at, id) > ROW('2026-10-31 20:19:42.570021+00'::timestamp with time zone, 'cb5ad463-2531-42b3-8858-75d9f4d51aa0'::uuid))) + Index Searches: 1 + Buffers: shared hit=51 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=51) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51) + Filter: (message_id = messages.id) +Planning: + Buffers: shared hit=3 +Planning Time: 0.048 ms +Execution Time: 0.065 ms + +#### generic + +Limit (cost=0.28..7.93 rows=2 width=153) (actual time=0.009..0.064 rows=51.00 loops=1) + Buffers: shared hit=51 + -> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.28..92.02 rows=24 width=153) (actual time=0.009..0.061 rows=51.00 loops=1) + Index Cond: ((chat_id = $1) AND (ROW(created_at, id) > ROW($2, $3))) + Index Searches: 1 + Buffers: shared hit=51 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=51) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51) + Filter: (message_id = messages.id) +Planning Time: 0.006 ms +Execution Time: 0.072 ms + +#### or-cursor + +Limit (cost=0.28..49.10 rows=51 width=153) (actual time=0.085..0.131 rows=51.00 loops=1) + Buffers: shared hit=525 + -> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.28..479.86 rows=501 width=153) (actual time=0.085..0.128 rows=51.00 loops=1) + Index Cond: (chat_id = 'e89c392b-46c2-4a1d-a798-2ca1f4787398'::uuid) + Filter: ((created_at > '2026-10-31 20:19:42.570021+00'::timestamp with time zone) OR ((created_at = '2026-10-31 20:19:42.570021+00'::timestamp with time zone) AND (id > 'cb5ad463-2531-42b3-8858-75d9f4d51aa0'::uuid))) + Rows Removed by Filter: 500 + Index Searches: 1 + Buffers: shared hit=525 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51) + Filter: (message_id = messages.id) +Planning: + Buffers: shared hit=3 +Planning Time: 0.046 ms +Execution Time: 0.136 ms + +#### no-index + +Limit (cost=203.98..204.11 rows=51 width=153) (actual time=0.545..0.550 rows=51.00 loops=1) + Buffers: shared hit=101 + -> Sort (cost=203.98..205.23 rows=501 width=153) (actual time=0.545..0.547 rows=51.00 loops=1) + Sort Key: messages.created_at, messages.id + Sort Method: top-N heapsort Memory: 40kB + Buffers: shared hit=101 + -> Seq Scan on messages (cost=0.00..187.27 rows=501 width=153) (actual time=0.077..0.485 rows=500.00 loops=1) + Filter: ((chat_id = 'e89c392b-46c2-4a1d-a798-2ca1f4787398'::uuid) AND (ROW(created_at, id) > ROW('2026-10-31 20:19:42.570021+00'::timestamp with time zone, 'cb5ad463-2531-42b3-8858-75d9f4d51aa0'::uuid))) + Rows Removed by Filter: 4000 + Buffers: shared hit=101 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=500) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=500) + Filter: (message_id = messages.id) +Planning: + Buffers: shared hit=3 +Planning Time: 0.073 ms +Execution Time: 0.560 ms + +#### chat_only + +Limit (cost=158.64..158.76 rows=51 width=153) (actual time=0.507..0.512 rows=51.00 loops=1) + Buffers: shared hit=103 + -> Sort (cost=158.64..159.89 rows=501 width=153) (actual time=0.507..0.509 rows=51.00 loops=1) + Sort Key: messages.created_at, messages.id + Sort Method: top-N heapsort Memory: 40kB + Buffers: shared hit=103 + -> Bitmap Heap Scan on messages (cost=15.91..141.92 rows=501 width=153) (actual time=0.053..0.431 rows=500.00 loops=1) + Recheck Cond: (chat_id = 'e89c392b-46c2-4a1d-a798-2ca1f4787398'::uuid) + Filter: (ROW(created_at, id) > ROW('2026-10-31 20:19:42.570021+00'::timestamp with time zone, 'cb5ad463-2531-42b3-8858-75d9f4d51aa0'::uuid)) + Rows Removed by Filter: 500 + Heap Blocks: exact=101 + Buffers: shared hit=103 + -> Bitmap Index Scan on bench_variant (cost=0.00..15.78 rows=1000 width=0) (actual time=0.011..0.012 rows=1000.00 loops=1) + Index Cond: (chat_id = 'e89c392b-46c2-4a1d-a798-2ca1f4787398'::uuid) + Index Searches: 1 + Buffers: shared hit=2 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=500) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=500) + Filter: (message_id = messages.id) +Planning: + Buffers: shared hit=3 +Planning Time: 0.045 ms +Execution Time: 0.519 ms + +#### covering + +Limit (cost=0.28..6.14 rows=51 width=153) (actual time=0.006..0.048 rows=51.00 loops=1) + Buffers: shared hit=4 + -> Index Only Scan using bench_variant on messages (cost=0.28..57.82 rows=501 width=153) (actual time=0.006..0.045 rows=51.00 loops=1) + Index Cond: ((chat_id = 'e89c392b-46c2-4a1d-a798-2ca1f4787398'::uuid) AND (ROW(created_at, id) > ROW('2026-10-31 20:19:42.570021+00'::timestamp with time zone, 'cb5ad463-2531-42b3-8858-75d9f4d51aa0'::uuid))) + Heap Fetches: 0 + Index Searches: 1 + Buffers: shared hit=4 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=51) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51) + Filter: (message_id = messages.id) +Planning: + Buffers: shared hit=3 +Planning Time: 0.044 ms +Execution Time: 0.055 ms + +### bg 1k: middle, после 500 + +#### psql + +Limit (cost=0.28..45.38 rows=51 width=153) (actual time=0.011..0.072 rows=51.00 loops=1) + Buffers: shared hit=53 + -> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.28..440.63 rows=498 width=153) (actual time=0.010..0.070 rows=51.00 loops=1) + Index Cond: ((chat_id = '1c02e8d5-8fbd-4500-9374-1e4e3f22f2e3'::uuid) AND (ROW(created_at, id) > ROW('2026-10-31 20:19:42.593379+00'::timestamp with time zone, '41e10366-ac36-468e-965e-54b7bd0290ce'::uuid))) + Index Searches: 1 + Buffers: shared hit=53 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=51) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51) + Filter: (message_id = messages.id) +Planning: + Buffers: shared hit=3 +Planning Time: 0.067 ms +Execution Time: 0.084 ms + +#### generic + +Limit (cost=0.28..7.93 rows=2 width=153) (actual time=0.010..0.060 rows=51.00 loops=1) + Buffers: shared hit=53 + -> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.28..92.02 rows=24 width=153) (actual time=0.010..0.057 rows=51.00 loops=1) + Index Cond: ((chat_id = $1) AND (ROW(created_at, id) > ROW($2, $3))) + Index Searches: 1 + Buffers: shared hit=53 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=51) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51) + Filter: (message_id = messages.id) +Planning Time: 0.007 ms +Execution Time: 0.069 ms + +#### or-cursor + +Limit (cost=0.28..49.39 rows=51 width=153) (actual time=0.082..0.139 rows=51.00 loops=1) + Buffers: shared hit=528 + -> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.28..479.81 rows=498 width=153) (actual time=0.082..0.137 rows=51.00 loops=1) + Index Cond: (chat_id = '1c02e8d5-8fbd-4500-9374-1e4e3f22f2e3'::uuid) + Filter: ((created_at > '2026-10-31 20:19:42.593379+00'::timestamp with time zone) OR ((created_at = '2026-10-31 20:19:42.593379+00'::timestamp with time zone) AND (id > '41e10366-ac36-468e-965e-54b7bd0290ce'::uuid))) + Rows Removed by Filter: 500 + Index Searches: 1 + Buffers: shared hit=528 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=51) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51) + Filter: (message_id = messages.id) +Planning: + Buffers: shared hit=3 +Planning Time: 0.055 ms +Execution Time: 0.146 ms + +#### no-index + +Limit (cost=203.83..203.96 rows=51 width=153) (actual time=0.602..0.605 rows=51.00 loops=1) + Buffers: shared hit=101 + -> Sort (cost=203.83..205.08 rows=498 width=153) (actual time=0.602..0.603 rows=51.00 loops=1) + Sort Key: messages.created_at, messages.id + Sort Method: top-N heapsort Memory: 40kB + Buffers: shared hit=101 + -> Seq Scan on messages (cost=0.00..187.22 rows=498 width=153) (actual time=0.076..0.544 rows=500.00 loops=1) + Filter: ((chat_id = '1c02e8d5-8fbd-4500-9374-1e4e3f22f2e3'::uuid) AND (ROW(created_at, id) > ROW('2026-10-31 20:19:42.593379+00'::timestamp with time zone, '41e10366-ac36-468e-965e-54b7bd0290ce'::uuid))) + Rows Removed by Filter: 4000 + Buffers: shared hit=101 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=500) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=500) + Filter: (message_id = messages.id) +Planning: + Buffers: shared hit=3 +Planning Time: 0.050 ms +Execution Time: 0.612 ms + +#### chat_only + +Limit (cost=158.49..158.62 rows=51 width=153) (actual time=0.442..0.446 rows=51.00 loops=1) + Buffers: shared hit=101 + -> Sort (cost=158.49..159.74 rows=498 width=153) (actual time=0.442..0.443 rows=51.00 loops=1) + Sort Key: messages.created_at, messages.id + Sort Method: top-N heapsort Memory: 40kB + Buffers: shared hit=101 + -> Bitmap Heap Scan on messages (cost=15.91..141.88 rows=498 width=153) (actual time=0.053..0.390 rows=500.00 loops=1) + Recheck Cond: (chat_id = '1c02e8d5-8fbd-4500-9374-1e4e3f22f2e3'::uuid) + Filter: (ROW(created_at, id) > ROW('2026-10-31 20:19:42.593379+00'::timestamp with time zone, '41e10366-ac36-468e-965e-54b7bd0290ce'::uuid)) + Rows Removed by Filter: 500 + Heap Blocks: exact=99 + Buffers: shared hit=101 + -> Bitmap Index Scan on bench_variant (cost=0.00..15.78 rows=1000 width=0) (actual time=0.014..0.014 rows=1000.00 loops=1) + Index Cond: (chat_id = '1c02e8d5-8fbd-4500-9374-1e4e3f22f2e3'::uuid) + Index Searches: 1 + Buffers: shared hit=2 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=500) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=500) + Filter: (message_id = messages.id) +Planning: + Buffers: shared hit=3 +Planning Time: 0.037 ms +Execution Time: 0.453 ms + +#### covering + +Limit (cost=0.28..6.16 rows=51 width=153) (actual time=0.007..0.042 rows=51.00 loops=1) + Buffers: shared hit=4 + -> Index Only Scan using bench_variant on messages (cost=0.28..57.71 rows=498 width=153) (actual time=0.007..0.040 rows=51.00 loops=1) + Index Cond: ((chat_id = '1c02e8d5-8fbd-4500-9374-1e4e3f22f2e3'::uuid) AND (ROW(created_at, id) > ROW('2026-10-31 20:19:42.593379+00'::timestamp with time zone, '41e10366-ac36-468e-965e-54b7bd0290ce'::uuid))) + Heap Fetches: 0 + Index Searches: 1 + Buffers: shared hit=4 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51) + Filter: (message_id = messages.id) +Planning: + Buffers: shared hit=3 +Planning Time: 0.056 ms +Execution Time: 0.051 ms + +### bg 100: first, после 0 + +#### psql + +Limit (cost=119.42..119.55 rows=51 width=153) (actual time=0.106..0.110 rows=51.00 loops=1) + Buffers: shared hit=64 + -> Sort (cost=119.42..119.67 rows=100 width=153) (actual time=0.106..0.108 rows=51.00 loops=1) + Sort Key: messages.created_at, messages.id + Sort Method: quicksort Memory: 50kB + Buffers: shared hit=64 + -> Bitmap Heap Scan on messages (cost=9.06..116.10 rows=100 width=153) (actual time=0.014..0.093 rows=100.00 loops=1) + Recheck Cond: (chat_id = '3694cad0-8739-4553-ba44-604daaaa3382'::uuid) + Heap Blocks: exact=62 + Buffers: shared hit=64 + -> Bitmap Index Scan on ix_messages_chat_id_created_at_id (cost=0.00..9.03 rows=100 width=0) (actual time=0.007..0.007 rows=100.00 loops=1) + Index Cond: (chat_id = '3694cad0-8739-4553-ba44-604daaaa3382'::uuid) + Index Searches: 1 + Buffers: shared hit=2 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=100) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=100) + Filter: (message_id = messages.id) +Planning: + Buffers: shared hit=3 +Planning Time: 0.040 ms +Execution Time: 0.127 ms + +#### generic + +Limit (cost=0.28..21.54 rows=7 width=153) (actual time=0.008..0.058 rows=51.00 loops=1) + Buffers: shared hit=50 + -> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.28..215.88 rows=71 width=153) (actual time=0.008..0.055 rows=51.00 loops=1) + Index Cond: (chat_id = $1) + Index Searches: 1 + Buffers: shared hit=50 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=51) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51) + Filter: (message_id = messages.id) +Planning Time: 0.003 ms +Execution Time: 0.063 ms + +#### no-index + +Limit (cost=162.07..162.20 rows=51 width=153) (actual time=0.196..0.200 rows=51.00 loops=1) + Buffers: shared hit=101 + -> Sort (cost=162.07..162.32 rows=100 width=153) (actual time=0.196..0.197 rows=51.00 loops=1) + Sort Key: messages.created_at, messages.id + Sort Method: quicksort Memory: 50kB + Buffers: shared hit=101 + -> Seq Scan on messages (cost=0.00..158.75 rows=100 width=153) (actual time=0.005..0.182 rows=100.00 loops=1) + Filter: (chat_id = '3694cad0-8739-4553-ba44-604daaaa3382'::uuid) + Rows Removed by Filter: 4400 + Buffers: shared hit=101 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=100) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=100) + Filter: (message_id = messages.id) +Planning: + Buffers: shared hit=3 +Planning Time: 0.048 ms +Execution Time: 0.207 ms + +#### chat_only + +Limit (cost=115.42..115.55 rows=51 width=153) (actual time=0.116..0.120 rows=51.00 loops=1) + Buffers: shared hit=64 + -> Sort (cost=115.42..115.67 rows=100 width=153) (actual time=0.116..0.118 rows=51.00 loops=1) + Sort Key: messages.created_at, messages.id + Sort Method: quicksort Memory: 50kB + Buffers: shared hit=64 + -> Bitmap Heap Scan on messages (cost=5.06..112.10 rows=100 width=153) (actual time=0.010..0.103 rows=100.00 loops=1) + Recheck Cond: (chat_id = '3694cad0-8739-4553-ba44-604daaaa3382'::uuid) + Heap Blocks: exact=62 + Buffers: shared hit=64 + -> Bitmap Index Scan on bench_variant (cost=0.00..5.03 rows=100 width=0) (actual time=0.004..0.004 rows=100.00 loops=1) + Index Cond: (chat_id = '3694cad0-8739-4553-ba44-604daaaa3382'::uuid) + Index Searches: 1 + Buffers: shared hit=2 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=100) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=100) + Filter: (message_id = messages.id) +Planning: + Buffers: shared hit=3 +Planning Time: 0.038 ms +Execution Time: 0.127 ms + +#### covering + +Limit (cost=0.28..6.02 rows=51 width=153) (actual time=0.007..0.042 rows=51.00 loops=1) + Buffers: shared hit=4 + -> Index Only Scan using bench_variant on messages (cost=0.28..11.53 rows=100 width=153) (actual time=0.007..0.040 rows=51.00 loops=1) + Index Cond: (chat_id = '3694cad0-8739-4553-ba44-604daaaa3382'::uuid) + Heap Fetches: 0 + Index Searches: 1 + Buffers: shared hit=4 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51) + Filter: (message_id = messages.id) +Planning: + Buffers: shared hit=3 +Planning Time: 0.053 ms +Execution Time: 0.052 ms + +### bg 10: first, после 0 + +#### psql + +Limit (cost=35.36..35.39 rows=10 width=153) (actual time=0.022..0.024 rows=10.00 loops=1) + Buffers: shared hit=12 + -> Sort (cost=35.36..35.39 rows=10 width=153) (actual time=0.022..0.023 rows=10.00 loops=1) + Sort Key: messages.created_at, messages.id + Sort Method: quicksort Memory: 27kB + Buffers: shared hit=12 + -> Bitmap Heap Scan on messages (cost=4.36..35.20 rows=10 width=153) (actual time=0.009..0.020 rows=10.00 loops=1) + Recheck Cond: (chat_id = '173df049-0e59-461f-afe3-8a15542fa0c5'::uuid) + Heap Blocks: exact=10 + Buffers: shared hit=12 + -> Bitmap Index Scan on ix_messages_chat_id_created_at_id (cost=0.00..4.36 rows=10 width=0) (actual time=0.003..0.003 rows=10.00 loops=1) + Index Cond: (chat_id = '173df049-0e59-461f-afe3-8a15542fa0c5'::uuid) + Index Searches: 1 + Buffers: shared hit=2 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=10) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=10) + Filter: (message_id = messages.id) +Planning: + Buffers: shared hit=3 +Planning Time: 0.044 ms +Execution Time: 0.032 ms + +#### generic + +Limit (cost=0.28..21.54 rows=7 width=153) (actual time=0.007..0.017 rows=10.00 loops=1) + Buffers: shared hit=12 + -> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.28..215.88 rows=71 width=153) (actual time=0.007..0.016 rows=10.00 loops=1) + Index Cond: (chat_id = $1) + Index Searches: 1 + Buffers: shared hit=12 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=10) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=10) + Filter: (message_id = messages.id) +Planning Time: 0.003 ms +Execution Time: 0.023 ms + +#### no-index + +Limit (cost=157.57..157.59 rows=10 width=153) (actual time=0.121..0.123 rows=10.00 loops=1) + Buffers: shared hit=101 + -> Sort (cost=157.57..157.59 rows=10 width=153) (actual time=0.121..0.122 rows=10.00 loops=1) + Sort Key: messages.created_at, messages.id + Sort Method: quicksort Memory: 27kB + Buffers: shared hit=101 + -> Seq Scan on messages (cost=0.00..157.40 rows=10 width=153) (actual time=0.019..0.118 rows=10.00 loops=1) + Filter: (chat_id = '173df049-0e59-461f-afe3-8a15542fa0c5'::uuid) + Rows Removed by Filter: 4490 + Buffers: shared hit=101 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=10) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=10) + Filter: (message_id = messages.id) +Planning: + Buffers: shared hit=3 +Planning Time: 0.051 ms +Execution Time: 0.130 ms + +#### chat_only + +Limit (cost=35.36..35.39 rows=10 width=153) (actual time=0.020..0.021 rows=10.00 loops=1) + Buffers: shared hit=12 + -> Sort (cost=35.36..35.39 rows=10 width=153) (actual time=0.019..0.020 rows=10.00 loops=1) + Sort Key: messages.created_at, messages.id + Sort Method: quicksort Memory: 27kB + Buffers: shared hit=12 + -> Bitmap Heap Scan on messages (cost=4.36..35.20 rows=10 width=153) (actual time=0.008..0.018 rows=10.00 loops=1) + Recheck Cond: (chat_id = '173df049-0e59-461f-afe3-8a15542fa0c5'::uuid) + Heap Blocks: exact=10 + Buffers: shared hit=12 + -> Bitmap Index Scan on bench_variant (cost=0.00..4.36 rows=10 width=0) (actual time=0.003..0.003 rows=10.00 loops=1) + Index Cond: (chat_id = '173df049-0e59-461f-afe3-8a15542fa0c5'::uuid) + Index Searches: 1 + Buffers: shared hit=2 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=10) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=10) + Filter: (message_id = messages.id) +Planning: + Buffers: shared hit=3 +Planning Time: 0.036 ms +Execution Time: 0.026 ms + +#### covering + +Limit (cost=0.28..4.61 rows=10 width=153) (actual time=0.005..0.011 rows=10.00 loops=1) + Buffers: shared hit=3 + -> Index Only Scan using bench_variant on messages (cost=0.28..4.61 rows=10 width=153) (actual time=0.005..0.011 rows=10.00 loops=1) + Index Cond: (chat_id = '173df049-0e59-461f-afe3-8a15542fa0c5'::uuid) + Heap Fetches: 0 + Index Searches: 1 + Buffers: shared hit=3 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=10) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=10) + Filter: (message_id = messages.id) +Planning: + Buffers: shared hit=3 +Planning Time: 0.036 ms +Execution Time: 0.017 ms diff --git a/evidence/bench/unit-of-work-aa/explain-5k.txt b/evidence/bench/unit-of-work-aa/explain-5k.txt new file mode 100644 index 00000000..1bab6e65 --- /dev/null +++ b/evidence/bench/unit-of-work-aa/explain-5k.txt @@ -0,0 +1,693 @@ +# План запроса истории: размер 5k + +Commit b2fb88f +Читаемый чат — 5000 сообщений; фоновые чаты: 2 × 1k, 10 × 100, 50 × 10. +Страница — `limit` профиля; «после» — сколько сообщений чата до +страницы. + +## Планы приложения + +auto_explain (ANALYZE, BUFFERS, TIMING): запрос, параметры и план, +с которыми его выполнило приложение (prepared statement asyncpg). + +### read 5k: first, после 0 + +duration: 0.100 ms plan: +Query Text: SELECT messages.id, messages.chat_id, messages.sender_id, messages.text, messages.created_at, array((SELECT message_attachments.attachment_id +FROM message_attachments +WHERE message_attachments.message_id = messages.id ORDER BY message_attachments.position)) AS attachment_ids +FROM messages +WHERE messages.chat_id = $1::UUID ORDER BY messages.created_at, messages.id + LIMIT $2::INTEGER +Query Parameters: $1 = '80b7184b-2dce-467f-80f1-54ef9f806be7', $2 = '51' +Limit (cost=0.29..11.51 rows=51 width=153) (actual time=0.018..0.071 rows=51.00 loops=1) + Buffers: shared hit=25 + -> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..1100.82 rows=5000 width=153) (actual time=0.018..0.068 rows=51.00 loops=1) + Index Cond: (chat_id = '80b7184b-2dce-467f-80f1-54ef9f806be7'::uuid) + Index Searches: 1 + Buffers: shared hit=25 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=51) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51) + Filter: (message_id = messages.id) + +### read 5k: middle, после 2500 + +duration: 0.113 ms plan: +Query Text: SELECT messages.id, messages.chat_id, messages.sender_id, messages.text, messages.created_at, array((SELECT message_attachments.attachment_id +FROM message_attachments +WHERE message_attachments.message_id = messages.id ORDER BY message_attachments.position)) AS attachment_ids +FROM messages +WHERE messages.chat_id = $1::UUID AND (messages.created_at, messages.id) > ($2::TIMESTAMP WITH TIME ZONE, $3::UUID) ORDER BY messages.created_at, messages.id + LIMIT $4::INTEGER +Query Parameters: $1 = '80b7184b-2dce-467f-80f1-54ef9f806be7', $2 = '2026-10-31 20:20:52.094182+00', $3 = '451aa0da-83f8-4f73-ac9d-8a4efcc8ecd3', $4 = '51' +Limit (cost=0.29..14.23 rows=4 width=153) (actual time=0.022..0.080 rows=51.00 loops=1) + Buffers: shared hit=54 + -> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..157.19 rows=45 width=153) (actual time=0.021..0.076 rows=51.00 loops=1) + Index Cond: ((chat_id = $1) AND (ROW(created_at, id) > ROW($2, $3))) + Index Searches: 1 + Buffers: shared hit=54 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=51) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51) + Filter: (message_id = messages.id) + +### read 5k: last, после 4900 + +duration: 0.112 ms plan: +Query Text: SELECT messages.id, messages.chat_id, messages.sender_id, messages.text, messages.created_at, array((SELECT message_attachments.attachment_id +FROM message_attachments +WHERE message_attachments.message_id = messages.id ORDER BY message_attachments.position)) AS attachment_ids +FROM messages +WHERE messages.chat_id = $1::UUID AND (messages.created_at, messages.id) > ($2::TIMESTAMP WITH TIME ZONE, $3::UUID) ORDER BY messages.created_at, messages.id + LIMIT $4::INTEGER +Query Parameters: $1 = '80b7184b-2dce-467f-80f1-54ef9f806be7', $2 = '2026-10-31 20:20:59.127167+00', $3 = 'd29a2234-a752-4b15-97ca-bc3a5fe16f81', $4 = '51' +Limit (cost=0.29..14.23 rows=4 width=153) (actual time=0.022..0.079 rows=51.00 loops=1) + Buffers: shared hit=53 + -> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..157.19 rows=45 width=153) (actual time=0.021..0.075 rows=51.00 loops=1) + Index Cond: ((chat_id = $1) AND (ROW(created_at, id) > ROW($2, $3))) + Index Searches: 1 + Buffers: shared hit=53 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=51) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51) + Filter: (message_id = messages.id) + +### bg 1k: first, после 0 + +duration: 0.253 ms plan: +Query Text: SELECT messages.id, messages.chat_id, messages.sender_id, messages.text, messages.created_at, array((SELECT message_attachments.attachment_id +FROM message_attachments +WHERE message_attachments.message_id = messages.id ORDER BY message_attachments.position)) AS attachment_ids +FROM messages +WHERE messages.chat_id = $1::UUID ORDER BY messages.created_at, messages.id + LIMIT $2::INTEGER +Query Parameters: $1 = '6ae81a0d-d05a-4b3b-b7f6-2013260aa008', $2 = '51' +Limit (cost=0.29..39.63 rows=51 width=153) (actual time=0.033..0.158 rows=51.00 loops=1) + Buffers: shared hit=45 + -> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..771.85 rows=1000 width=153) (actual time=0.032..0.152 rows=51.00 loops=1) + Index Cond: (chat_id = '6ae81a0d-d05a-4b3b-b7f6-2013260aa008'::uuid) + Index Searches: 1 + Buffers: shared hit=45 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=51) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51) + Filter: (message_id = messages.id) + +### bg 1k: middle, после 500 + +duration: 0.109 ms plan: +Query Text: SELECT messages.id, messages.chat_id, messages.sender_id, messages.text, messages.created_at, array((SELECT message_attachments.attachment_id +FROM message_attachments +WHERE message_attachments.message_id = messages.id ORDER BY message_attachments.position)) AS attachment_ids +FROM messages +WHERE messages.chat_id = $1::UUID AND (messages.created_at, messages.id) > ($2::TIMESTAMP WITH TIME ZONE, $3::UUID) ORDER BY messages.created_at, messages.id + LIMIT $4::INTEGER +Query Parameters: $1 = '6ae81a0d-d05a-4b3b-b7f6-2013260aa008', $2 = '2026-10-31 20:20:52.084497+00', $3 = '9087eb30-8899-4c5d-8728-7327affbc2a1', $4 = '51' +Limit (cost=0.29..14.23 rows=4 width=153) (actual time=0.018..0.078 rows=51.00 loops=1) + Buffers: shared hit=52 + -> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..157.19 rows=45 width=153) (actual time=0.017..0.075 rows=51.00 loops=1) + Index Cond: ((chat_id = $1) AND (ROW(created_at, id) > ROW($2, $3))) + Index Searches: 1 + Buffers: shared hit=52 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=51) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51) + Filter: (message_id = messages.id) + +### bg 1k: last, после 900 + +duration: 0.114 ms plan: +Query Text: SELECT messages.id, messages.chat_id, messages.sender_id, messages.text, messages.created_at, array((SELECT message_attachments.attachment_id +FROM message_attachments +WHERE message_attachments.message_id = messages.id ORDER BY message_attachments.position)) AS attachment_ids +FROM messages +WHERE messages.chat_id = $1::UUID AND (messages.created_at, messages.id) > ($2::TIMESTAMP WITH TIME ZONE, $3::UUID) ORDER BY messages.created_at, messages.id + LIMIT $4::INTEGER +Query Parameters: $1 = '6ae81a0d-d05a-4b3b-b7f6-2013260aa008', $2 = '2026-10-31 20:20:57.953096+00', $3 = 'aa061a11-d99b-430e-8d57-8956f75927c3', $4 = '51' +Limit (cost=0.29..14.23 rows=4 width=153) (actual time=0.019..0.080 rows=51.00 loops=1) + Buffers: shared hit=51 + -> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..157.19 rows=45 width=153) (actual time=0.018..0.077 rows=51.00 loops=1) + Index Cond: ((chat_id = $1) AND (ROW(created_at, id) > ROW($2, $3))) + Index Searches: 1 + Buffers: shared hit=51 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=51) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51) + Filter: (message_id = messages.id) + +### bg 100: first, после 0 + +duration: 0.124 ms plan: +Query Text: SELECT messages.id, messages.chat_id, messages.sender_id, messages.text, messages.created_at, array((SELECT message_attachments.attachment_id +FROM message_attachments +WHERE message_attachments.message_id = messages.id ORDER BY message_attachments.position)) AS attachment_ids +FROM messages +WHERE messages.chat_id = $1::UUID ORDER BY messages.created_at, messages.id + LIMIT $2::INTEGER +Query Parameters: $1 = '6c3ce1eb-20ca-48e7-af3c-920956940be7', $2 = '51' +Limit (cost=0.29..154.66 rows=51 width=153) (actual time=0.012..0.077 rows=51.00 loops=1) + Buffers: shared hit=47 + -> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..302.99 rows=100 width=153) (actual time=0.012..0.074 rows=51.00 loops=1) + Index Cond: (chat_id = '6c3ce1eb-20ca-48e7-af3c-920956940be7'::uuid) + Index Searches: 1 + Buffers: shared hit=47 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51) + Filter: (message_id = messages.id) + +### bg 10: first, после 0 + +duration: 0.042 ms plan: +Query Text: SELECT messages.id, messages.chat_id, messages.sender_id, messages.text, messages.created_at, array((SELECT message_attachments.attachment_id +FROM message_attachments +WHERE message_attachments.message_id = messages.id ORDER BY message_attachments.position)) AS attachment_ids +FROM messages +WHERE messages.chat_id = $1::UUID ORDER BY messages.created_at, messages.id + LIMIT $2::INTEGER +Query Parameters: $1 = '90a36fb9-ae42-4016-a663-65307e1e1e19', $2 = '51' +Limit (cost=37.85..37.87 rows=10 width=153) (actual time=0.037..0.038 rows=10.00 loops=1) + Buffers: shared hit=12 + -> Sort (cost=37.85..37.87 rows=10 width=153) (actual time=0.036..0.037 rows=10.00 loops=1) + Sort Key: messages.created_at, messages.id + Sort Method: quicksort Memory: 27kB + Buffers: shared hit=12 + -> Bitmap Heap Scan on messages (cost=4.36..37.68 rows=10 width=153) (actual time=0.017..0.033 rows=10.00 loops=1) + Recheck Cond: (chat_id = '90a36fb9-ae42-4016-a663-65307e1e1e19'::uuid) + Heap Blocks: exact=10 + Buffers: shared hit=12 + -> Bitmap Index Scan on ix_messages_chat_id_created_at_id (cost=0.00..4.36 rows=10 width=0) (actual time=0.006..0.006 rows=10.00 loops=1) + Index Cond: (chat_id = '90a36fb9-ae42-4016-a663-65307e1e1e19'::uuid) + Index Searches: 1 + Buffers: shared hit=2 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=10) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=10) + Filter: (message_id = messages.id) + +## Страницы сравнения в psql: варианты + +Тот же текст запроса и те же параметры, что у плана приложения этой +страницы, в одной транзакции, которая откатывается: индексы базы +после неё те же. Каждый вариант выполнен дважды, здесь — второе +выполнение. `psql` — индекс приложения, custom plan; `generic` — он +же с force_generic_plan; `or-cursor` — условие курсора через OR; +`no-index` — без индекса приложения; варианты индекса вместо него: +`chat_only` (chat_id), `covering` (chat_id, created_at, id) INCLUDE (sender_id, text). + +### read 5k: middle, после 2500 + +#### psql + +Limit (cost=0.29..18.68 rows=51 width=153) (actual time=0.011..0.061 rows=51.00 loops=1) + Buffers: shared hit=54 + -> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..901.43 rows=2499 width=153) (actual time=0.011..0.058 rows=51.00 loops=1) + Index Cond: ((chat_id = '80b7184b-2dce-467f-80f1-54ef9f806be7'::uuid) AND (ROW(created_at, id) > ROW('2026-10-31 20:20:52.094182+00'::timestamp with time zone, '451aa0da-83f8-4f73-ac9d-8a4efcc8ecd3'::uuid))) + Index Searches: 1 + Buffers: shared hit=54 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=51) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51) + Filter: (message_id = messages.id) +Planning: + Buffers: shared hit=3 +Planning Time: 0.060 ms +Execution Time: 0.070 ms + +#### generic + +Limit (cost=0.29..14.23 rows=4 width=153) (actual time=0.014..0.070 rows=51.00 loops=1) + Buffers: shared hit=54 + -> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..157.19 rows=45 width=153) (actual time=0.013..0.064 rows=51.00 loops=1) + Index Cond: ((chat_id = $1) AND (ROW(created_at, id) > ROW($2, $3))) + Index Searches: 1 + Buffers: shared hit=54 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=51) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51) + Filter: (message_id = messages.id) +Planning Time: 0.011 ms +Execution Time: 0.081 ms + +#### or-cursor + +Limit (cost=0.29..22.74 rows=51 width=153) (actual time=0.376..0.420 rows=51.00 loops=1) + Buffers: shared hit=2541 + -> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..1100.80 rows=2499 width=153) (actual time=0.376..0.417 rows=51.00 loops=1) + Index Cond: (chat_id = '80b7184b-2dce-467f-80f1-54ef9f806be7'::uuid) + Filter: ((created_at > '2026-10-31 20:20:52.094182+00'::timestamp with time zone) OR ((created_at = '2026-10-31 20:20:52.094182+00'::timestamp with time zone) AND (id > '451aa0da-83f8-4f73-ac9d-8a4efcc8ecd3'::uuid))) + Rows Removed by Filter: 2500 + Index Searches: 1 + Buffers: shared hit=2541 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51) + Filter: (message_id = messages.id) +Planning: + Buffers: shared hit=3 +Planning Time: 0.083 ms +Execution Time: 0.431 ms + +#### no-index + +Limit (cost=455.61..455.73 rows=51 width=153) (actual time=2.173..2.177 rows=51.00 loops=1) + Buffers: shared hit=186 + -> Sort (cost=455.61..461.85 rows=2499 width=153) (actual time=2.173..2.175 rows=51.00 loops=1) + Sort Key: messages.created_at, messages.id + Sort Method: top-N heapsort Memory: 43kB + Buffers: shared hit=186 + -> Seq Scan on messages (cost=0.00..372.24 rows=2499 width=153) (actual time=0.165..1.896 rows=2500.00 loops=1) + Filter: ((chat_id = '80b7184b-2dce-467f-80f1-54ef9f806be7'::uuid) AND (ROW(created_at, id) > ROW('2026-10-31 20:20:52.094182+00'::timestamp with time zone, '451aa0da-83f8-4f73-ac9d-8a4efcc8ecd3'::uuid))) + Rows Removed by Filter: 6000 + Buffers: shared hit=186 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=2500) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=2500) + Filter: (message_id = messages.id) +Planning: + Buffers: shared hit=3 +Planning Time: 0.061 ms +Execution Time: 2.186 ms + +#### chat_only + +Limit (cost=455.61..455.73 rows=51 width=153) (actual time=2.048..2.052 rows=51.00 loops=1) + Buffers: shared hit=186 + -> Sort (cost=455.61..461.85 rows=2499 width=153) (actual time=2.047..2.049 rows=51.00 loops=1) + Sort Key: messages.created_at, messages.id + Sort Method: top-N heapsort Memory: 43kB + Buffers: shared hit=186 + -> Seq Scan on messages (cost=0.00..372.24 rows=2499 width=153) (actual time=0.140..1.778 rows=2500.00 loops=1) + Filter: ((chat_id = '80b7184b-2dce-467f-80f1-54ef9f806be7'::uuid) AND (ROW(created_at, id) > ROW('2026-10-31 20:20:52.094182+00'::timestamp with time zone, '451aa0da-83f8-4f73-ac9d-8a4efcc8ecd3'::uuid))) + Rows Removed by Filter: 6000 + Buffers: shared hit=186 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=2500) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=2500) + Filter: (message_id = messages.id) +Planning: + Buffers: shared hit=3 +Planning Time: 0.037 ms +Execution Time: 2.057 ms + +#### covering + +Limit (cost=0.41..6.28 rows=51 width=153) (actual time=0.009..0.097 rows=51.00 loops=1) + Buffers: shared hit=5 + -> Index Only Scan using bench_variant on messages (cost=0.41..287.88 rows=2499 width=153) (actual time=0.009..0.093 rows=51.00 loops=1) + Index Cond: ((chat_id = '80b7184b-2dce-467f-80f1-54ef9f806be7'::uuid) AND (ROW(created_at, id) > ROW('2026-10-31 20:20:52.094182+00'::timestamp with time zone, '451aa0da-83f8-4f73-ac9d-8a4efcc8ecd3'::uuid))) + Heap Fetches: 0 + Index Searches: 1 + Buffers: shared hit=5 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=51) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51) + Filter: (message_id = messages.id) +Planning: + Buffers: shared hit=3 +Planning Time: 0.086 ms +Execution Time: 0.108 ms + +### bg 1k: middle, после 500 + +#### psql + +Limit (cost=0.29..74.92 rows=51 width=153) (actual time=0.009..0.069 rows=51.00 loops=1) + Buffers: shared hit=52 + -> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..731.98 rows=500 width=153) (actual time=0.008..0.066 rows=51.00 loops=1) + Index Cond: ((chat_id = '6ae81a0d-d05a-4b3b-b7f6-2013260aa008'::uuid) AND (ROW(created_at, id) > ROW('2026-10-31 20:20:52.084497+00'::timestamp with time zone, '9087eb30-8899-4c5d-8728-7327affbc2a1'::uuid))) + Index Searches: 1 + Buffers: shared hit=52 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=51) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51) + Filter: (message_id = messages.id) +Planning: + Buffers: shared hit=3 +Planning Time: 0.050 ms +Execution Time: 0.076 ms + +#### generic + +Limit (cost=0.29..14.23 rows=4 width=153) (actual time=0.010..0.066 rows=51.00 loops=1) + Buffers: shared hit=52 + -> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..157.19 rows=45 width=153) (actual time=0.009..0.064 rows=51.00 loops=1) + Index Cond: ((chat_id = $1) AND (ROW(created_at, id) > ROW($2, $3))) + Index Searches: 1 + Buffers: shared hit=52 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=51) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51) + Filter: (message_id = messages.id) +Planning Time: 0.007 ms +Execution Time: 0.076 ms + +#### or-cursor + +Limit (cost=0.29..78.98 rows=51 width=153) (actual time=0.100..0.138 rows=51.00 loops=1) + Buffers: shared hit=530 + -> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..771.85 rows=500 width=153) (actual time=0.100..0.136 rows=51.00 loops=1) + Index Cond: (chat_id = '6ae81a0d-d05a-4b3b-b7f6-2013260aa008'::uuid) + Filter: ((created_at > '2026-10-31 20:20:52.084497+00'::timestamp with time zone) OR ((created_at = '2026-10-31 20:20:52.084497+00'::timestamp with time zone) AND (id > '9087eb30-8899-4c5d-8728-7327affbc2a1'::uuid))) + Rows Removed by Filter: 500 + Index Searches: 1 + Buffers: shared hit=530 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51) + Filter: (message_id = messages.id) +Planning: + Buffers: shared hit=3 +Planning Time: 0.048 ms +Execution Time: 0.143 ms + +#### no-index + +Limit (cost=358.93..359.06 rows=51 width=153) (actual time=0.633..0.637 rows=51.00 loops=1) + Buffers: shared hit=186 + -> Sort (cost=358.93..360.18 rows=500 width=153) (actual time=0.633..0.635 rows=51.00 loops=1) + Sort Key: messages.created_at, messages.id + Sort Method: top-N heapsort Memory: 40kB + Buffers: shared hit=186 + -> Seq Scan on messages (cost=0.00..342.25 rows=500 width=153) (actual time=0.143..0.576 rows=500.00 loops=1) + Filter: ((chat_id = '6ae81a0d-d05a-4b3b-b7f6-2013260aa008'::uuid) AND (ROW(created_at, id) > ROW('2026-10-31 20:20:52.084497+00'::timestamp with time zone, '9087eb30-8899-4c5d-8728-7327affbc2a1'::uuid))) + Rows Removed by Filter: 8000 + Buffers: shared hit=186 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=500) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=500) + Filter: (message_id = messages.id) +Planning: + Buffers: shared hit=3 +Planning Time: 0.041 ms +Execution Time: 0.643 ms + +#### chat_only + +Limit (cost=243.59..243.72 rows=51 width=153) (actual time=0.472..0.476 rows=51.00 loops=1) + Buffers: shared hit=186 + -> Sort (cost=243.59..244.84 rows=500 width=153) (actual time=0.472..0.474 rows=51.00 loops=1) + Sort Key: messages.created_at, messages.id + Sort Method: top-N heapsort Memory: 40kB + Buffers: shared hit=186 + -> Bitmap Heap Scan on messages (cost=15.91..226.91 rows=500 width=153) (actual time=0.092..0.416 rows=500.00 loops=1) + Recheck Cond: (chat_id = '6ae81a0d-d05a-4b3b-b7f6-2013260aa008'::uuid) + Filter: (ROW(created_at, id) > ROW('2026-10-31 20:20:52.084497+00'::timestamp with time zone, '9087eb30-8899-4c5d-8728-7327affbc2a1'::uuid)) + Rows Removed by Filter: 500 + Heap Blocks: exact=183 + Buffers: shared hit=186 + -> Bitmap Index Scan on bench_variant (cost=0.00..15.79 rows=1000 width=0) (actual time=0.019..0.019 rows=1000.00 loops=1) + Index Cond: (chat_id = '6ae81a0d-d05a-4b3b-b7f6-2013260aa008'::uuid) + Index Searches: 1 + Buffers: shared hit=3 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=500) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=500) + Filter: (message_id = messages.id) +Planning: + Buffers: shared hit=3 +Planning Time: 0.044 ms +Execution Time: 0.483 ms + +#### covering + +Limit (cost=0.41..6.28 rows=51 width=153) (actual time=0.004..0.052 rows=51.00 loops=1) + Buffers: shared hit=5 + -> Index Only Scan using bench_variant on messages (cost=0.41..57.91 rows=500 width=153) (actual time=0.004..0.050 rows=51.00 loops=1) + Index Cond: ((chat_id = '6ae81a0d-d05a-4b3b-b7f6-2013260aa008'::uuid) AND (ROW(created_at, id) > ROW('2026-10-31 20:20:52.084497+00'::timestamp with time zone, '9087eb30-8899-4c5d-8728-7327affbc2a1'::uuid))) + Heap Fetches: 0 + Index Searches: 1 + Buffers: shared hit=5 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=51) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51) + Filter: (message_id = messages.id) +Planning: + Buffers: shared hit=3 +Planning Time: 0.028 ms +Execution Time: 0.058 ms + +### bg 100: first, после 0 + +#### psql + +Limit (cost=0.29..154.66 rows=51 width=153) (actual time=0.007..0.064 rows=51.00 loops=1) + Buffers: shared hit=47 + -> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..302.99 rows=100 width=153) (actual time=0.007..0.062 rows=51.00 loops=1) + Index Cond: (chat_id = '6c3ce1eb-20ca-48e7-af3c-920956940be7'::uuid) + Index Searches: 1 + Buffers: shared hit=47 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51) + Filter: (message_id = messages.id) +Planning: + Buffers: shared hit=3 +Planning Time: 0.037 ms +Execution Time: 0.072 ms + +#### generic + +Limit (cost=0.29..39.82 rows=14 width=153) (actual time=0.009..0.062 rows=51.00 loops=1) + Buffers: shared hit=47 + -> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..381.47 rows=135 width=153) (actual time=0.009..0.059 rows=51.00 loops=1) + Index Cond: (chat_id = $1) + Index Searches: 1 + Buffers: shared hit=47 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51) + Filter: (message_id = messages.id) +Planning Time: 0.003 ms +Execution Time: 0.067 ms + +#### no-index + +Limit (cost=297.07..297.20 rows=51 width=153) (actual time=0.281..0.284 rows=51.00 loops=1) + Buffers: shared hit=186 + -> Sort (cost=297.07..297.32 rows=100 width=153) (actual time=0.281..0.282 rows=51.00 loops=1) + Sort Key: messages.created_at, messages.id + Sort Method: quicksort Memory: 50kB + Buffers: shared hit=186 + -> Seq Scan on messages (cost=0.00..293.75 rows=100 width=153) (actual time=0.010..0.266 rows=100.00 loops=1) + Filter: (chat_id = '6c3ce1eb-20ca-48e7-af3c-920956940be7'::uuid) + Rows Removed by Filter: 8400 + Buffers: shared hit=186 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=100) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=100) + Filter: (message_id = messages.id) +Planning: + Buffers: shared hit=3 +Planning Time: 0.035 ms +Execution Time: 0.290 ms + +#### chat_only + +Limit (cost=172.68..172.80 rows=51 width=153) (actual time=0.133..0.136 rows=51.00 loops=1) + Buffers: shared hit=79 + -> Sort (cost=172.68..172.93 rows=100 width=153) (actual time=0.133..0.134 rows=51.00 loops=1) + Sort Key: messages.created_at, messages.id + Sort Method: quicksort Memory: 50kB + Buffers: shared hit=79 + -> Bitmap Heap Scan on messages (cost=5.06..169.35 rows=100 width=153) (actual time=0.013..0.120 rows=100.00 loops=1) + Recheck Cond: (chat_id = '6c3ce1eb-20ca-48e7-af3c-920956940be7'::uuid) + Heap Blocks: exact=77 + Buffers: shared hit=79 + -> Bitmap Index Scan on bench_variant (cost=0.00..5.04 rows=100 width=0) (actual time=0.004..0.004 rows=100.00 loops=1) + Index Cond: (chat_id = '6c3ce1eb-20ca-48e7-af3c-920956940be7'::uuid) + Index Searches: 1 + Buffers: shared hit=2 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=100) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=100) + Filter: (message_id = messages.id) +Planning: + Buffers: shared hit=3 +Planning Time: 0.040 ms +Execution Time: 0.143 ms + +#### covering + +Limit (cost=0.41..6.15 rows=51 width=153) (actual time=0.005..0.055 rows=51.00 loops=1) + Buffers: shared hit=5 + -> Index Only Scan using bench_variant on messages (cost=0.41..11.66 rows=100 width=153) (actual time=0.005..0.052 rows=51.00 loops=1) + Index Cond: (chat_id = '6c3ce1eb-20ca-48e7-af3c-920956940be7'::uuid) + Heap Fetches: 0 + Index Searches: 1 + Buffers: shared hit=5 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51) + Filter: (message_id = messages.id) +Planning: + Buffers: shared hit=3 +Planning Time: 0.035 ms +Execution Time: 0.062 ms + +### bg 10: first, после 0 + +#### psql + +Limit (cost=37.85..37.87 rows=10 width=153) (actual time=0.026..0.027 rows=10.00 loops=1) + Buffers: shared hit=12 + -> Sort (cost=37.85..37.87 rows=10 width=153) (actual time=0.026..0.026 rows=10.00 loops=1) + Sort Key: messages.created_at, messages.id + Sort Method: quicksort Memory: 27kB + Buffers: shared hit=12 + -> Bitmap Heap Scan on messages (cost=4.36..37.68 rows=10 width=153) (actual time=0.013..0.023 rows=10.00 loops=1) + Recheck Cond: (chat_id = '90a36fb9-ae42-4016-a663-65307e1e1e19'::uuid) + Heap Blocks: exact=10 + Buffers: shared hit=12 + -> Bitmap Index Scan on ix_messages_chat_id_created_at_id (cost=0.00..4.36 rows=10 width=0) (actual time=0.005..0.005 rows=10.00 loops=1) + Index Cond: (chat_id = '90a36fb9-ae42-4016-a663-65307e1e1e19'::uuid) + Index Searches: 1 + Buffers: shared hit=2 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=10) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=10) + Filter: (message_id = messages.id) +Planning: + Buffers: shared hit=3 +Planning Time: 0.039 ms +Execution Time: 0.040 ms + +#### generic + +Limit (cost=0.29..39.82 rows=14 width=153) (actual time=0.011..0.023 rows=10.00 loops=1) + Buffers: shared hit=12 + -> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..381.47 rows=135 width=153) (actual time=0.011..0.022 rows=10.00 loops=1) + Index Cond: (chat_id = $1) + Index Searches: 1 + Buffers: shared hit=12 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=10) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=10) + Filter: (message_id = messages.id) +Planning Time: 0.005 ms +Execution Time: 0.032 ms + +#### no-index + +Limit (cost=292.57..292.59 rows=10 width=153) (actual time=0.214..0.215 rows=10.00 loops=1) + Buffers: shared hit=186 + -> Sort (cost=292.57..292.59 rows=10 width=153) (actual time=0.214..0.214 rows=10.00 loops=1) + Sort Key: messages.created_at, messages.id + Sort Method: quicksort Memory: 27kB + Buffers: shared hit=186 + -> Seq Scan on messages (cost=0.00..292.40 rows=10 width=153) (actual time=0.016..0.212 rows=10.00 loops=1) + Filter: (chat_id = '90a36fb9-ae42-4016-a663-65307e1e1e19'::uuid) + Rows Removed by Filter: 8490 + Buffers: shared hit=186 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=10) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=10) + Filter: (message_id = messages.id) +Planning: + Buffers: shared hit=3 +Planning Time: 0.032 ms +Execution Time: 0.220 ms + +#### chat_only + +Limit (cost=37.85..37.87 rows=10 width=153) (actual time=0.023..0.025 rows=10.00 loops=1) + Buffers: shared hit=12 + -> Sort (cost=37.85..37.87 rows=10 width=153) (actual time=0.023..0.024 rows=10.00 loops=1) + Sort Key: messages.created_at, messages.id + Sort Method: quicksort Memory: 27kB + Buffers: shared hit=12 + -> Bitmap Heap Scan on messages (cost=4.36..37.68 rows=10 width=153) (actual time=0.009..0.020 rows=10.00 loops=1) + Recheck Cond: (chat_id = '90a36fb9-ae42-4016-a663-65307e1e1e19'::uuid) + Heap Blocks: exact=10 + Buffers: shared hit=12 + -> Bitmap Index Scan on bench_variant (cost=0.00..4.36 rows=10 width=0) (actual time=0.003..0.003 rows=10.00 loops=1) + Index Cond: (chat_id = '90a36fb9-ae42-4016-a663-65307e1e1e19'::uuid) + Index Searches: 1 + Buffers: shared hit=2 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=10) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=10) + Filter: (message_id = messages.id) +Planning: + Buffers: shared hit=3 +Planning Time: 0.052 ms +Execution Time: 0.033 ms + +#### covering + +Limit (cost=0.41..4.74 rows=10 width=153) (actual time=0.006..0.015 rows=10.00 loops=1) + Buffers: shared hit=4 + -> Index Only Scan using bench_variant on messages (cost=0.41..4.74 rows=10 width=153) (actual time=0.006..0.014 rows=10.00 loops=1) + Index Cond: (chat_id = '90a36fb9-ae42-4016-a663-65307e1e1e19'::uuid) + Heap Fetches: 0 + Index Searches: 1 + Buffers: shared hit=4 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=10) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=10) + Filter: (message_id = messages.id) +Planning: + Buffers: shared hit=3 +Planning Time: 0.038 ms +Execution Time: 0.021 ms diff --git a/evidence/bench/unit-of-work-aa/meta.json b/evidence/bench/unit-of-work-aa/meta.json new file mode 100644 index 00000000..64975629 --- /dev/null +++ b/evidence/bench/unit-of-work-aa/meta.json @@ -0,0 +1,1888 @@ +{ + "label": "unit-of-work-aa", + "status": "complete", + "started_at": "2026-10-31T20:19:23+00:00", + "command": "uv run python bench/run.py --profile quick --label unit-of-work-aa", + "git": { + "commit": "b2fb88f", + "dirty": false + }, + "overrides": {}, + "host_state": { + "start": { + "swap_used_mib": 7703.62, + "swap_total_mib": 8192.0, + "swapouts": 7156652, + "memory_free_percent": 47, + "power": "AC Power", + "battery_percent": 80 + }, + "end": { + "swap_used_mib": 7631.62, + "swap_total_mib": 8192.0, + "swapouts": 7156652, + "memory_free_percent": 48, + "power": "AC Power", + "battery_percent": 80 + }, + "swapouts_delta": 0, + "slept_seconds": 0 + }, + "host_warnings": [], + "other_containers": [ + "domains-api-1", + "domains-bot-1", + "domains-postgres-1" + ], + "app_image": { + "tag": "mtusi-messenger:bench", + "id": "sha256:cdc9549d0dc2b2c68bfe096f3a4f4a18c022f6d7fda953903382a62986d03cbb", + "versions": { + "python": "3.12.14", + "fastapi": "0.141.1", + "starlette": "1.7.0", + "pydantic": "2.13.5", + "uvicorn": "0.54.0", + "sqlalchemy": "2.1.1", + "asyncpg": "0.31.0", + "redis": "8.1.0" + } + }, + "generator": { + "image": "grafana/k6:2.3.0@sha256:9c2dee7f8ed74d317e4027c06a10f169b625638189de8d4555d0b3486a5aeb34", + "version": "k6 v2.3.0 (commit/e088784614, go1.27.1, linux/arm64)" + }, + "docker": { + "server": "29.9.2", + "vm_os": "Docker Desktop", + "kernel": "7.0.14-linuxkit", + "vm_cpus": 12, + "vm_memory_gib": 7.7, + "cgroup": "2", + "logging_driver": "local" + }, + "host": { + "os": "macOS 26.7.1", + "machine": "Apple M3 Pro", + "memory_gib": 18.0, + "performance_cores": 6, + "efficiency_cores": 6 + }, + "profile": { + "name": "quick", + "sizes": [ + 1000, + 5000, + 10000 + ], + "concurrency": [ + 1, + 4, + 16 + ], + "repeats": 1, + "read_warmup_s": 2, + "read_measure_s": 5, + "write_warmup": 100, + "write_measure": 1000, + "prefill_chunk": 25000, + "prefill_vus": 32, + "text_length": 64, + "page_limit": 50, + "walk_limit": 100, + "cursor_pool": 1000, + "members": 10, + "seed": 20260930, + "warmup_seed_shift": 1000003, + "generator_cpu_limit": 4.0, + "cpus": "1", + "memory": "2g", + "db_cpus": "4", + "db_memory": "3g", + "cache_cpus": "2", + "cache_memory": "512m", + "session_ttl_seconds": 21600, + "background": [ + [ + 2, + 1000 + ], + [ + 10, + 100 + ], + [ + 50, + 10 + ] + ], + "index_variants": [ + [ + "chat_only", + "(chat_id)" + ], + [ + "covering", + "(chat_id, created_at, id) INCLUDE (sender_id, text)" + ] + ], + "write_probe_rows": 5000, + "write_probe_repeats": 3, + "restore": false, + "restore_jobs": 4, + "restore_write_load": 5000, + "restore_write_vus": 10, + "replicas": 1, + "lb_cpus": "1", + "lb_memory": "256m", + "failover_modes": [], + "failover_write_rate": 0, + "failover_read_rate": 0, + "failover_before_s": 0, + "failover_down_s": 0, + "failover_after_s": 0, + "failover_success": 0.99, + "failover_pre_vus": 600, + "failover_max_vus": 1500, + "rollout_from": "", + "rollout_before_s": 0, + "rollout_budget_s": 0, + "rollout_after_s": 0, + "sample_resources": false, + "uploads_variants": [], + "uploads_before": "", + "uploads_success_codes": [ + [ + "before", + 201 + ], + [ + "unlimited", + 202 + ], + [ + "limited", + 202 + ] + ], + "uploads_sizes": [], + "uploads_clients": [], + "uploads_ramp_s": 3, + "uploads_window_s": 20, + "uploads_unlimited_env": [ + [ + "UPLOADS__MAX_CONCURRENT", + "1000" + ], + [ + "UPLOADS__MAX_WAITING", + "0" + ] + ], + "uploads_sample_interval_s": 0.2, + "s3_cpus": "1", + "s3_memory": "512m", + "broker_cpus": "1", + "broker_memory": "512m", + "relay_cpus": "0.25", + "relay_memory": "256m", + "worker_cpus": "1", + "worker_memory": "1g", + "cleaner_cpus": "0.25", + "cleaner_memory": "256m", + "reconcile_stages": [], + "reconcile_before": "", + "reconcile_s4_clean": 0, + "reconcile_s4_candidates": [], + "reconcile_s4_max_changes": 100, + "reconcile_grace_s": 30, + "reconcile_fresh_wait_s": 2, + "reconcile_fast_cpus": "1", + "reconcile_default_rate": 2000, + "reconcile_background": [ + [ + "download", + 300 + ], + [ + "write", + 50 + ], + [ + "read", + 50 + ] + ], + "reconcile_downloads": 5000, + "reconcile_bg_max_vus": 600, + "reconcile_quiet_s": 30, + "reconcile_fill_processes": 3, + "reconcile_fill_threads": 24, + "reconcile_sample_interval_s": 0.5, + "reconcile_metrics_port": 9327, + "reconcile_h1_stages": [], + "reconcile_h2_stages": [], + "reconcile_h3_stages": [], + "reconcile_s4_base": "", + "db_max_connections": 100, + "series": "", + "configs": [], + "write_chats": 1, + "mix": [], + "fixed_rps": [], + "ladder_base": 100, + "step_factor": 1.25, + "start_rps_per_replica": 300, + "bisect_steps": 2, + "max_steps": 12, + "first_warmup_s": 15, + "step_warmup_s": 5, + "step_measure_s": 20, + "cooldown_s": 10, + "slo_p95_ms": 200, + "slo_error_ratio": 0.01, + "abort_error_ratio": 0.5, + "abort_p95_ms": 2000, + "request_timeout_s": 15, + "prevus_per_rps": 0.05, + "vus_per_rps": 0.2, + "generator_cpus": "", + "generator_memory": "", + "sampler_cpus": "0.25", + "sampler_memory": "128m", + "sample_interval_s": 1.0, + "order_seed": 20261011 + }, + "sizes": [ + { + "size": 1000, + "messages_total": 4500, + "rss_before_mib": 121.0, + "rss_after_mib": 125.0, + "bytes_per_message": 928, + "prefill_seconds": 7.8, + "prefill_rate": 577, + "cursors": 9, + "maintenance_seconds": 0.1, + "messages_rows": 4500, + "messages_table_bytes": 868352, + "messages_indexes_bytes": 622592, + "db_bytes_per_message": 331, + "plans": [ + { + "chat": "read 1k", + "chat_size": 1000, + "page": "first", + "after": 0, + "source": "app", + "node": "Index Scan using ix_messages_chat_id_created_at_id on messages", + "shared_hit": 32, + "shared_read": 0, + "rows": 51.0, + "time_ms": 0.147, + "kind": "custom" + }, + { + "chat": "read 1k", + "chat_size": 1000, + "page": "middle", + "after": 500, + "source": "app", + "node": "Index Scan using ix_messages_chat_id_created_at_id on messages", + "shared_hit": 51, + "shared_read": 0, + "rows": 51.0, + "time_ms": 0.121, + "kind": "custom" + }, + { + "chat": "read 1k", + "chat_size": 1000, + "page": "middle", + "after": 500, + "source": "psql", + "node": "Index Scan using ix_messages_chat_id_created_at_id on messages", + "shared_hit": 51, + "shared_read": 0, + "rows": 51.0, + "time_ms": 0.065, + "kind": "custom" + }, + { + "chat": "read 1k", + "chat_size": 1000, + "page": "middle", + "after": 500, + "source": "generic", + "node": "Index Scan using ix_messages_chat_id_created_at_id on messages", + "shared_hit": 51, + "shared_read": 0, + "rows": 51.0, + "time_ms": 0.072, + "kind": "generic" + }, + { + "chat": "read 1k", + "chat_size": 1000, + "page": "middle", + "after": 500, + "source": "or-cursor", + "node": "Index Scan using ix_messages_chat_id_created_at_id on messages", + "shared_hit": 525, + "shared_read": 0, + "rows": 51.0, + "time_ms": 0.136, + "kind": "custom" + }, + { + "chat": "read 1k", + "chat_size": 1000, + "page": "middle", + "after": 500, + "source": "no-index", + "node": "Seq Scan on messages", + "shared_hit": 101, + "shared_read": 0, + "rows": 51.0, + "time_ms": 0.56, + "kind": "custom" + }, + { + "chat": "read 1k", + "chat_size": 1000, + "page": "middle", + "after": 500, + "source": "chat_only", + "node": "Bitmap Heap Scan on messages", + "shared_hit": 103, + "shared_read": 0, + "rows": 51.0, + "time_ms": 0.519, + "kind": "custom" + }, + { + "chat": "read 1k", + "chat_size": 1000, + "page": "middle", + "after": 500, + "source": "covering", + "node": "Index Only Scan using bench_variant on messages", + "shared_hit": 4, + "shared_read": 0, + "rows": 51.0, + "time_ms": 0.055, + "kind": "custom" + }, + { + "chat": "read 1k", + "chat_size": 1000, + "page": "last", + "after": 900, + "source": "app", + "node": "Bitmap Heap Scan on messages", + "shared_hit": 28, + "shared_read": 0, + "rows": 51.0, + "time_ms": 0.24, + "kind": "custom" + }, + { + "chat": "bg 1k", + "chat_size": 1000, + "page": "first", + "after": 0, + "source": "app", + "node": "Index Scan using ix_messages_chat_id_created_at_id on messages", + "shared_hit": 37, + "shared_read": 0, + "rows": 51.0, + "time_ms": 0.106, + "kind": "custom" + }, + { + "chat": "bg 1k", + "chat_size": 1000, + "page": "middle", + "after": 500, + "source": "app", + "node": "Index Scan using ix_messages_chat_id_created_at_id on messages", + "shared_hit": 53, + "shared_read": 0, + "rows": 51.0, + "time_ms": 0.105, + "kind": "custom" + }, + { + "chat": "bg 1k", + "chat_size": 1000, + "page": "middle", + "after": 500, + "source": "psql", + "node": "Index Scan using ix_messages_chat_id_created_at_id on messages", + "shared_hit": 53, + "shared_read": 0, + "rows": 51.0, + "time_ms": 0.084, + "kind": "custom" + }, + { + "chat": "bg 1k", + "chat_size": 1000, + "page": "middle", + "after": 500, + "source": "generic", + "node": "Index Scan using ix_messages_chat_id_created_at_id on messages", + "shared_hit": 53, + "shared_read": 0, + "rows": 51.0, + "time_ms": 0.069, + "kind": "generic" + }, + { + "chat": "bg 1k", + "chat_size": 1000, + "page": "middle", + "after": 500, + "source": "or-cursor", + "node": "Index Scan using ix_messages_chat_id_created_at_id on messages", + "shared_hit": 528, + "shared_read": 0, + "rows": 51.0, + "time_ms": 0.146, + "kind": "custom" + }, + { + "chat": "bg 1k", + "chat_size": 1000, + "page": "middle", + "after": 500, + "source": "no-index", + "node": "Seq Scan on messages", + "shared_hit": 101, + "shared_read": 0, + "rows": 51.0, + "time_ms": 0.612, + "kind": "custom" + }, + { + "chat": "bg 1k", + "chat_size": 1000, + "page": "middle", + "after": 500, + "source": "chat_only", + "node": "Bitmap Heap Scan on messages", + "shared_hit": 101, + "shared_read": 0, + "rows": 51.0, + "time_ms": 0.453, + "kind": "custom" + }, + { + "chat": "bg 1k", + "chat_size": 1000, + "page": "middle", + "after": 500, + "source": "covering", + "node": "Index Only Scan using bench_variant on messages", + "shared_hit": 4, + "shared_read": 0, + "rows": 51.0, + "time_ms": 0.051, + "kind": "custom" + }, + { + "chat": "bg 1k", + "chat_size": 1000, + "page": "last", + "after": 900, + "source": "app", + "node": "Bitmap Heap Scan on messages", + "shared_hit": 18, + "shared_read": 0, + "rows": 51.0, + "time_ms": 0.156, + "kind": "custom" + }, + { + "chat": "bg 100", + "chat_size": 100, + "page": "first", + "after": 0, + "source": "app", + "node": "Bitmap Heap Scan on messages", + "shared_hit": 64, + "shared_read": 0, + "rows": 51.0, + "time_ms": 0.231, + "kind": "custom" + }, + { + "chat": "bg 100", + "chat_size": 100, + "page": "first", + "after": 0, + "source": "psql", + "node": "Bitmap Heap Scan on messages", + "shared_hit": 64, + "shared_read": 0, + "rows": 51.0, + "time_ms": 0.127, + "kind": "custom" + }, + { + "chat": "bg 100", + "chat_size": 100, + "page": "first", + "after": 0, + "source": "generic", + "node": "Index Scan using ix_messages_chat_id_created_at_id on messages", + "shared_hit": 50, + "shared_read": 0, + "rows": 51.0, + "time_ms": 0.063, + "kind": "generic" + }, + { + "chat": "bg 100", + "chat_size": 100, + "page": "first", + "after": 0, + "source": "no-index", + "node": "Seq Scan on messages", + "shared_hit": 101, + "shared_read": 0, + "rows": 51.0, + "time_ms": 0.207, + "kind": "custom" + }, + { + "chat": "bg 100", + "chat_size": 100, + "page": "first", + "after": 0, + "source": "chat_only", + "node": "Bitmap Heap Scan on messages", + "shared_hit": 64, + "shared_read": 0, + "rows": 51.0, + "time_ms": 0.127, + "kind": "custom" + }, + { + "chat": "bg 100", + "chat_size": 100, + "page": "first", + "after": 0, + "source": "covering", + "node": "Index Only Scan using bench_variant on messages", + "shared_hit": 4, + "shared_read": 0, + "rows": 51.0, + "time_ms": 0.052, + "kind": "custom" + }, + { + "chat": "bg 10", + "chat_size": 10, + "page": "first", + "after": 0, + "source": "app", + "node": "Bitmap Heap Scan on messages", + "shared_hit": 12, + "shared_read": 0, + "rows": 10.0, + "time_ms": 0.041, + "kind": "custom" + }, + { + "chat": "bg 10", + "chat_size": 10, + "page": "first", + "after": 0, + "source": "psql", + "node": "Bitmap Heap Scan on messages", + "shared_hit": 12, + "shared_read": 0, + "rows": 10.0, + "time_ms": 0.032, + "kind": "custom" + }, + { + "chat": "bg 10", + "chat_size": 10, + "page": "first", + "after": 0, + "source": "generic", + "node": "Index Scan using ix_messages_chat_id_created_at_id on messages", + "shared_hit": 12, + "shared_read": 0, + "rows": 10.0, + "time_ms": 0.023, + "kind": "generic" + }, + { + "chat": "bg 10", + "chat_size": 10, + "page": "first", + "after": 0, + "source": "no-index", + "node": "Seq Scan on messages", + "shared_hit": 101, + "shared_read": 0, + "rows": 10.0, + "time_ms": 0.13, + "kind": "custom" + }, + { + "chat": "bg 10", + "chat_size": 10, + "page": "first", + "after": 0, + "source": "chat_only", + "node": "Bitmap Heap Scan on messages", + "shared_hit": 12, + "shared_read": 0, + "rows": 10.0, + "time_ms": 0.026, + "kind": "custom" + }, + { + "chat": "bg 10", + "chat_size": 10, + "page": "first", + "after": 0, + "source": "covering", + "node": "Index Only Scan using bench_variant on messages", + "shared_hit": 3, + "shared_read": 0, + "rows": 10.0, + "time_ms": 0.017, + "kind": "custom" + } + ], + "rss_peak_mib": 184.6, + "write_cost": [ + { + "variant": "app", + "columns": "(chat_id, created_at, id)", + "rows": 5000, + "messages": 7800, + "index_bytes": 475136, + "index_bytes_per_message": 60.9, + "insert_us_per_message": [ + 6.19, + 5.24, + 5.07 + ], + "wal_bytes_per_message": [ + 501.3, + 487.9, + 487.9 + ], + "fpi_per_1000": [ + 12.0, + 20.8, + 20.8 + ], + "long_text": "ok" + }, + { + "variant": "chat_only", + "columns": "(chat_id)", + "rows": 5000, + "messages": 7800, + "index_bytes": 73728, + "index_bytes_per_message": 9.5, + "insert_us_per_message": [ + 4.91, + 4.97, + 4.97 + ], + "wal_bytes_per_message": [ + 399.3, + 398.2, + 398.2 + ], + "fpi_per_1000": [ + 18.2, + 18.2, + 18.2 + ], + "long_text": "ok" + }, + { + "variant": "covering", + "columns": "(chat_id, created_at, id) INCLUDE (sender_id, text)", + "rows": 5000, + "messages": 7800, + "index_bytes": 1245184, + "index_bytes_per_message": 159.6, + "insert_us_per_message": [ + 5.46, + 6.67, + 5.71 + ], + "wal_bytes_per_message": [ + 689.1, + 689.1, + 689.1 + ], + "fpi_per_1000": [ + 24.2, + 24.2, + 24.2 + ], + "long_text": "index row requires 12072 bytes, maximum size is 8191" + }, + { + "variant": "none", + "columns": null, + "rows": 5000, + "messages": 7800, + "index_bytes": 0, + "index_bytes_per_message": 0.0, + "insert_us_per_message": [ + 4.62, + 6.41, + 4.47 + ], + "wal_bytes_per_message": [ + 311.2, + 311.2, + 311.2 + ], + "fpi_per_1000": [ + 16.8, + 16.8, + 16.8 + ], + "long_text": "ok" + } + ] + }, + { + "size": 5000, + "messages_total": 8500, + "rss_before_mib": 121.0, + "rss_after_mib": 125.2, + "bytes_per_message": 511, + "prefill_seconds": 14.7, + "prefill_rate": 580, + "cursors": 49, + "maintenance_seconds": 0.1, + "messages_rows": 8500, + "messages_table_bytes": 1564672, + "messages_indexes_bytes": 1171456, + "db_bytes_per_message": 322, + "plans": [ + { + "chat": "read 5k", + "chat_size": 5000, + "page": "first", + "after": 0, + "source": "app", + "node": "Index Scan using ix_messages_chat_id_created_at_id on messages", + "shared_hit": 25, + "shared_read": 0, + "rows": 51.0, + "time_ms": 0.1, + "kind": "custom" + }, + { + "chat": "read 5k", + "chat_size": 5000, + "page": "middle", + "after": 2500, + "source": "app", + "node": "Index Scan using ix_messages_chat_id_created_at_id on messages", + "shared_hit": 54, + "shared_read": 0, + "rows": 51.0, + "time_ms": 0.113, + "kind": "generic" + }, + { + "chat": "read 5k", + "chat_size": 5000, + "page": "middle", + "after": 2500, + "source": "psql", + "node": "Index Scan using ix_messages_chat_id_created_at_id on messages", + "shared_hit": 54, + "shared_read": 0, + "rows": 51.0, + "time_ms": 0.07, + "kind": "custom" + }, + { + "chat": "read 5k", + "chat_size": 5000, + "page": "middle", + "after": 2500, + "source": "generic", + "node": "Index Scan using ix_messages_chat_id_created_at_id on messages", + "shared_hit": 54, + "shared_read": 0, + "rows": 51.0, + "time_ms": 0.081, + "kind": "generic" + }, + { + "chat": "read 5k", + "chat_size": 5000, + "page": "middle", + "after": 2500, + "source": "or-cursor", + "node": "Index Scan using ix_messages_chat_id_created_at_id on messages", + "shared_hit": 2541, + "shared_read": 0, + "rows": 51.0, + "time_ms": 0.431, + "kind": "custom" + }, + { + "chat": "read 5k", + "chat_size": 5000, + "page": "middle", + "after": 2500, + "source": "no-index", + "node": "Seq Scan on messages", + "shared_hit": 186, + "shared_read": 0, + "rows": 51.0, + "time_ms": 2.186, + "kind": "custom" + }, + { + "chat": "read 5k", + "chat_size": 5000, + "page": "middle", + "after": 2500, + "source": "chat_only", + "node": "Seq Scan on messages", + "shared_hit": 186, + "shared_read": 0, + "rows": 51.0, + "time_ms": 2.057, + "kind": "custom" + }, + { + "chat": "read 5k", + "chat_size": 5000, + "page": "middle", + "after": 2500, + "source": "covering", + "node": "Index Only Scan using bench_variant on messages", + "shared_hit": 5, + "shared_read": 0, + "rows": 51.0, + "time_ms": 0.108, + "kind": "custom" + }, + { + "chat": "read 5k", + "chat_size": 5000, + "page": "last", + "after": 4900, + "source": "app", + "node": "Index Scan using ix_messages_chat_id_created_at_id on messages", + "shared_hit": 53, + "shared_read": 0, + "rows": 51.0, + "time_ms": 0.112, + "kind": "generic" + }, + { + "chat": "bg 1k", + "chat_size": 1000, + "page": "first", + "after": 0, + "source": "app", + "node": "Index Scan using ix_messages_chat_id_created_at_id on messages", + "shared_hit": 45, + "shared_read": 0, + "rows": 51.0, + "time_ms": 0.253, + "kind": "custom" + }, + { + "chat": "bg 1k", + "chat_size": 1000, + "page": "middle", + "after": 500, + "source": "app", + "node": "Index Scan using ix_messages_chat_id_created_at_id on messages", + "shared_hit": 52, + "shared_read": 0, + "rows": 51.0, + "time_ms": 0.109, + "kind": "generic" + }, + { + "chat": "bg 1k", + "chat_size": 1000, + "page": "middle", + "after": 500, + "source": "psql", + "node": "Index Scan using ix_messages_chat_id_created_at_id on messages", + "shared_hit": 52, + "shared_read": 0, + "rows": 51.0, + "time_ms": 0.076, + "kind": "custom" + }, + { + "chat": "bg 1k", + "chat_size": 1000, + "page": "middle", + "after": 500, + "source": "generic", + "node": "Index Scan using ix_messages_chat_id_created_at_id on messages", + "shared_hit": 52, + "shared_read": 0, + "rows": 51.0, + "time_ms": 0.076, + "kind": "generic" + }, + { + "chat": "bg 1k", + "chat_size": 1000, + "page": "middle", + "after": 500, + "source": "or-cursor", + "node": "Index Scan using ix_messages_chat_id_created_at_id on messages", + "shared_hit": 530, + "shared_read": 0, + "rows": 51.0, + "time_ms": 0.143, + "kind": "custom" + }, + { + "chat": "bg 1k", + "chat_size": 1000, + "page": "middle", + "after": 500, + "source": "no-index", + "node": "Seq Scan on messages", + "shared_hit": 186, + "shared_read": 0, + "rows": 51.0, + "time_ms": 0.643, + "kind": "custom" + }, + { + "chat": "bg 1k", + "chat_size": 1000, + "page": "middle", + "after": 500, + "source": "chat_only", + "node": "Bitmap Heap Scan on messages", + "shared_hit": 186, + "shared_read": 0, + "rows": 51.0, + "time_ms": 0.483, + "kind": "custom" + }, + { + "chat": "bg 1k", + "chat_size": 1000, + "page": "middle", + "after": 500, + "source": "covering", + "node": "Index Only Scan using bench_variant on messages", + "shared_hit": 5, + "shared_read": 0, + "rows": 51.0, + "time_ms": 0.058, + "kind": "custom" + }, + { + "chat": "bg 1k", + "chat_size": 1000, + "page": "last", + "after": 900, + "source": "app", + "node": "Index Scan using ix_messages_chat_id_created_at_id on messages", + "shared_hit": 51, + "shared_read": 0, + "rows": 51.0, + "time_ms": 0.114, + "kind": "generic" + }, + { + "chat": "bg 100", + "chat_size": 100, + "page": "first", + "after": 0, + "source": "app", + "node": "Index Scan using ix_messages_chat_id_created_at_id on messages", + "shared_hit": 47, + "shared_read": 0, + "rows": 51.0, + "time_ms": 0.124, + "kind": "custom" + }, + { + "chat": "bg 100", + "chat_size": 100, + "page": "first", + "after": 0, + "source": "psql", + "node": "Index Scan using ix_messages_chat_id_created_at_id on messages", + "shared_hit": 47, + "shared_read": 0, + "rows": 51.0, + "time_ms": 0.072, + "kind": "custom" + }, + { + "chat": "bg 100", + "chat_size": 100, + "page": "first", + "after": 0, + "source": "generic", + "node": "Index Scan using ix_messages_chat_id_created_at_id on messages", + "shared_hit": 47, + "shared_read": 0, + "rows": 51.0, + "time_ms": 0.067, + "kind": "generic" + }, + { + "chat": "bg 100", + "chat_size": 100, + "page": "first", + "after": 0, + "source": "no-index", + "node": "Seq Scan on messages", + "shared_hit": 186, + "shared_read": 0, + "rows": 51.0, + "time_ms": 0.29, + "kind": "custom" + }, + { + "chat": "bg 100", + "chat_size": 100, + "page": "first", + "after": 0, + "source": "chat_only", + "node": "Bitmap Heap Scan on messages", + "shared_hit": 79, + "shared_read": 0, + "rows": 51.0, + "time_ms": 0.143, + "kind": "custom" + }, + { + "chat": "bg 100", + "chat_size": 100, + "page": "first", + "after": 0, + "source": "covering", + "node": "Index Only Scan using bench_variant on messages", + "shared_hit": 5, + "shared_read": 0, + "rows": 51.0, + "time_ms": 0.062, + "kind": "custom" + }, + { + "chat": "bg 10", + "chat_size": 10, + "page": "first", + "after": 0, + "source": "app", + "node": "Bitmap Heap Scan on messages", + "shared_hit": 12, + "shared_read": 0, + "rows": 10.0, + "time_ms": 0.042, + "kind": "custom" + }, + { + "chat": "bg 10", + "chat_size": 10, + "page": "first", + "after": 0, + "source": "psql", + "node": "Bitmap Heap Scan on messages", + "shared_hit": 12, + "shared_read": 0, + "rows": 10.0, + "time_ms": 0.04, + "kind": "custom" + }, + { + "chat": "bg 10", + "chat_size": 10, + "page": "first", + "after": 0, + "source": "generic", + "node": "Index Scan using ix_messages_chat_id_created_at_id on messages", + "shared_hit": 12, + "shared_read": 0, + "rows": 10.0, + "time_ms": 0.032, + "kind": "generic" + }, + { + "chat": "bg 10", + "chat_size": 10, + "page": "first", + "after": 0, + "source": "no-index", + "node": "Seq Scan on messages", + "shared_hit": 186, + "shared_read": 0, + "rows": 10.0, + "time_ms": 0.22, + "kind": "custom" + }, + { + "chat": "bg 10", + "chat_size": 10, + "page": "first", + "after": 0, + "source": "chat_only", + "node": "Bitmap Heap Scan on messages", + "shared_hit": 12, + "shared_read": 0, + "rows": 10.0, + "time_ms": 0.033, + "kind": "custom" + }, + { + "chat": "bg 10", + "chat_size": 10, + "page": "first", + "after": 0, + "source": "covering", + "node": "Index Only Scan using bench_variant on messages", + "shared_hit": 4, + "shared_read": 0, + "rows": 10.0, + "time_ms": 0.021, + "kind": "custom" + } + ], + "rss_peak_mib": 184.7, + "write_cost": [ + { + "variant": "app", + "columns": "(chat_id, created_at, id)", + "rows": 5000, + "messages": 11800, + "index_bytes": 712704, + "index_bytes_per_message": 60.4, + "insert_us_per_message": [ + 5.34, + 5.2, + 5.04 + ], + "wal_bytes_per_message": [ + 510.4, + 512.4, + 512.4 + ], + "fpi_per_1000": [ + 17.2, + 22.8, + 22.8 + ], + "long_text": "ok" + }, + { + "variant": "chat_only", + "columns": "(chat_id)", + "rows": 5000, + "messages": 11800, + "index_bytes": 106496, + "index_bytes_per_message": 9.0, + "insert_us_per_message": [ + 4.92, + 4.77, + 5.05 + ], + "wal_bytes_per_message": [ + 424.9, + 423.8, + 425.0 + ], + "fpi_per_1000": [ + 19.8, + 20.2, + 20.6 + ], + "long_text": "ok" + }, + { + "variant": "covering", + "columns": "(chat_id, created_at, id) INCLUDE (sender_id, text)", + "rows": 5000, + "messages": 11800, + "index_bytes": 1892352, + "index_bytes_per_message": 160.4, + "insert_us_per_message": [ + 5.73, + 5.7, + 8.37 + ], + "wal_bytes_per_message": [ + 718.8, + 718.8, + 717.6 + ], + "fpi_per_1000": [ + 26.2, + 26.6, + 26.6 + ], + "long_text": "index row requires 12072 bytes, maximum size is 8191" + }, + { + "variant": "none", + "columns": null, + "rows": 5000, + "messages": 11800, + "index_bytes": 0, + "index_bytes_per_message": 0.0, + "insert_us_per_message": [ + 4.39, + 4.28, + 4.39 + ], + "wal_bytes_per_message": [ + 336.7, + 335.6, + 335.6 + ], + "fpi_per_1000": [ + 18.4, + 18.6, + 18.6 + ], + "long_text": "ok" + } + ] + }, + { + "size": 10000, + "messages_total": 13500, + "rss_before_mib": 121.1, + "rss_after_mib": 125.1, + "bytes_per_message": 317, + "prefill_seconds": 23.0, + "prefill_rate": 586, + "cursors": 99, + "maintenance_seconds": 0.2, + "messages_rows": 13500, + "messages_table_bytes": 2441216, + "messages_indexes_bytes": 1982464, + "db_bytes_per_message": 328, + "plans": [ + { + "chat": "read 10k", + "chat_size": 10000, + "page": "first", + "after": 0, + "source": "app", + "node": "Index Scan using ix_messages_chat_id_created_at_id on messages", + "shared_hit": 17, + "shared_read": 0, + "rows": 51.0, + "time_ms": 0.184, + "kind": "custom" + }, + { + "chat": "read 10k", + "chat_size": 10000, + "page": "middle", + "after": 5000, + "source": "app", + "node": "Index Scan using ix_messages_chat_id_created_at_id on messages", + "shared_hit": 53, + "shared_read": 0, + "rows": 51.0, + "time_ms": 0.146, + "kind": "generic" + }, + { + "chat": "read 10k", + "chat_size": 10000, + "page": "middle", + "after": 5000, + "source": "psql", + "node": "Index Scan using ix_messages_chat_id_created_at_id on messages", + "shared_hit": 53, + "shared_read": 0, + "rows": 51.0, + "time_ms": 0.065, + "kind": "custom" + }, + { + "chat": "read 10k", + "chat_size": 10000, + "page": "middle", + "after": 5000, + "source": "generic", + "node": "Index Scan using ix_messages_chat_id_created_at_id on messages", + "shared_hit": 53, + "shared_read": 0, + "rows": 51.0, + "time_ms": 0.077, + "kind": "generic" + }, + { + "chat": "read 10k", + "chat_size": 10000, + "page": "middle", + "after": 5000, + "source": "or-cursor", + "node": "Index Scan using ix_messages_chat_id_created_at_id on messages", + "shared_hit": 5063, + "shared_read": 0, + "rows": 51.0, + "time_ms": 0.779, + "kind": "custom" + }, + { + "chat": "read 10k", + "chat_size": 10000, + "page": "middle", + "after": 5000, + "source": "no-index", + "node": "Seq Scan on messages", + "shared_hit": 293, + "shared_read": 0, + "rows": 51.0, + "time_ms": 3.995, + "kind": "custom" + }, + { + "chat": "read 10k", + "chat_size": 10000, + "page": "middle", + "after": 5000, + "source": "chat_only", + "node": "Seq Scan on messages", + "shared_hit": 293, + "shared_read": 0, + "rows": 51.0, + "time_ms": 3.719, + "kind": "custom" + }, + { + "chat": "read 10k", + "chat_size": 10000, + "page": "middle", + "after": 5000, + "source": "covering", + "node": "Index Only Scan using bench_variant on messages", + "shared_hit": 5, + "shared_read": 0, + "rows": 51.0, + "time_ms": 0.052, + "kind": "custom" + }, + { + "chat": "read 10k", + "chat_size": 10000, + "page": "last", + "after": 9900, + "source": "app", + "node": "Index Scan using ix_messages_chat_id_created_at_id on messages", + "shared_hit": 54, + "shared_read": 0, + "rows": 51.0, + "time_ms": 0.144, + "kind": "generic" + }, + { + "chat": "bg 1k", + "chat_size": 1000, + "page": "first", + "after": 0, + "source": "app", + "node": "Index Scan using ix_messages_chat_id_created_at_id on messages", + "shared_hit": 46, + "shared_read": 0, + "rows": 51.0, + "time_ms": 0.15, + "kind": "custom" + }, + { + "chat": "bg 1k", + "chat_size": 1000, + "page": "middle", + "after": 500, + "source": "app", + "node": "Index Scan using ix_messages_chat_id_created_at_id on messages", + "shared_hit": 52, + "shared_read": 0, + "rows": 51.0, + "time_ms": 0.185, + "kind": "generic" + }, + { + "chat": "bg 1k", + "chat_size": 1000, + "page": "middle", + "after": 500, + "source": "psql", + "node": "Index Scan using ix_messages_chat_id_created_at_id on messages", + "shared_hit": 52, + "shared_read": 0, + "rows": 51.0, + "time_ms": 0.057, + "kind": "custom" + }, + { + "chat": "bg 1k", + "chat_size": 1000, + "page": "middle", + "after": 500, + "source": "generic", + "node": "Index Scan using ix_messages_chat_id_created_at_id on messages", + "shared_hit": 52, + "shared_read": 0, + "rows": 51.0, + "time_ms": 0.072, + "kind": "generic" + }, + { + "chat": "bg 1k", + "chat_size": 1000, + "page": "middle", + "after": 500, + "source": "or-cursor", + "node": "Index Scan using ix_messages_chat_id_created_at_id on messages", + "shared_hit": 502, + "shared_read": 0, + "rows": 51.0, + "time_ms": 0.129, + "kind": "custom" + }, + { + "chat": "bg 1k", + "chat_size": 1000, + "page": "middle", + "after": 500, + "source": "no-index", + "node": "Seq Scan on messages", + "shared_hit": 293, + "shared_read": 0, + "rows": 51.0, + "time_ms": 0.676, + "kind": "custom" + }, + { + "chat": "bg 1k", + "chat_size": 1000, + "page": "middle", + "after": 500, + "source": "chat_only", + "node": "Bitmap Heap Scan on messages", + "shared_hit": 281, + "shared_read": 0, + "rows": 51.0, + "time_ms": 0.517, + "kind": "custom" + }, + { + "chat": "bg 1k", + "chat_size": 1000, + "page": "middle", + "after": 500, + "source": "covering", + "node": "Index Only Scan using bench_variant on messages", + "shared_hit": 5, + "shared_read": 0, + "rows": 51.0, + "time_ms": 0.054, + "kind": "custom" + }, + { + "chat": "bg 1k", + "chat_size": 1000, + "page": "last", + "after": 900, + "source": "app", + "node": "Index Scan using ix_messages_chat_id_created_at_id on messages", + "shared_hit": 47, + "shared_read": 0, + "rows": 51.0, + "time_ms": 0.126, + "kind": "generic" + }, + { + "chat": "bg 100", + "chat_size": 100, + "page": "first", + "after": 0, + "source": "app", + "node": "Index Scan using ix_messages_chat_id_created_at_id on messages", + "shared_hit": 48, + "shared_read": 0, + "rows": 51.0, + "time_ms": 0.165, + "kind": "custom" + }, + { + "chat": "bg 100", + "chat_size": 100, + "page": "first", + "after": 0, + "source": "psql", + "node": "Index Scan using ix_messages_chat_id_created_at_id on messages", + "shared_hit": 48, + "shared_read": 0, + "rows": 51.0, + "time_ms": 0.055, + "kind": "custom" + }, + { + "chat": "bg 100", + "chat_size": 100, + "page": "first", + "after": 0, + "source": "generic", + "node": "Index Scan using ix_messages_chat_id_created_at_id on messages", + "shared_hit": 48, + "shared_read": 0, + "rows": 51.0, + "time_ms": 0.069, + "kind": "generic" + }, + { + "chat": "bg 100", + "chat_size": 100, + "page": "first", + "after": 0, + "source": "no-index", + "node": "Seq Scan on messages", + "shared_hit": 293, + "shared_read": 0, + "rows": 51.0, + "time_ms": 0.402, + "kind": "custom" + }, + { + "chat": "bg 100", + "chat_size": 100, + "page": "first", + "after": 0, + "source": "chat_only", + "node": "Bitmap Heap Scan on messages", + "shared_hit": 91, + "shared_read": 0, + "rows": 51.0, + "time_ms": 0.12, + "kind": "custom" + }, + { + "chat": "bg 100", + "chat_size": 100, + "page": "first", + "after": 0, + "source": "covering", + "node": "Index Only Scan using bench_variant on messages", + "shared_hit": 5, + "shared_read": 0, + "rows": 51.0, + "time_ms": 0.049, + "kind": "custom" + }, + { + "chat": "bg 10", + "chat_size": 10, + "page": "first", + "after": 0, + "source": "app", + "node": "Index Scan using ix_messages_chat_id_created_at_id on messages", + "shared_hit": 12, + "shared_read": 0, + "rows": 10.0, + "time_ms": 0.073, + "kind": "custom" + }, + { + "chat": "bg 10", + "chat_size": 10, + "page": "first", + "after": 0, + "source": "psql", + "node": "Index Scan using ix_messages_chat_id_created_at_id on messages", + "shared_hit": 12, + "shared_read": 0, + "rows": 10.0, + "time_ms": 0.026, + "kind": "custom" + }, + { + "chat": "bg 10", + "chat_size": 10, + "page": "first", + "after": 0, + "source": "generic", + "node": "Index Scan using ix_messages_chat_id_created_at_id on messages", + "shared_hit": 12, + "shared_read": 0, + "rows": 10.0, + "time_ms": 0.035, + "kind": "generic" + }, + { + "chat": "bg 10", + "chat_size": 10, + "page": "first", + "after": 0, + "source": "no-index", + "node": "Seq Scan on messages", + "shared_hit": 293, + "shared_read": 0, + "rows": 10.0, + "time_ms": 0.313, + "kind": "custom" + }, + { + "chat": "bg 10", + "chat_size": 10, + "page": "first", + "after": 0, + "source": "chat_only", + "node": "Index Scan using bench_variant on messages", + "shared_hit": 12, + "shared_read": 0, + "rows": 10.0, + "time_ms": 0.03, + "kind": "custom" + }, + { + "chat": "bg 10", + "chat_size": 10, + "page": "first", + "after": 0, + "source": "covering", + "node": "Index Only Scan using bench_variant on messages", + "shared_hit": 5, + "shared_read": 0, + "rows": 10.0, + "time_ms": 0.017, + "kind": "custom" + } + ], + "rss_peak_mib": 184.7, + "write_cost": [ + { + "variant": "app", + "columns": "(chat_id, created_at, id)", + "rows": 5000, + "messages": 16800, + "index_bytes": 999424, + "index_bytes_per_message": 59.5, + "insert_us_per_message": [ + 5.58, + 5.14, + 5.16 + ], + "wal_bytes_per_message": [ + 549.6, + 536.3, + 536.4 + ], + "fpi_per_1000": [ + 19.2, + 30.2, + 30.6 + ], + "long_text": "ok" + }, + { + "variant": "chat_only", + "columns": "(chat_id)", + "rows": 5000, + "messages": 16800, + "index_bytes": 139264, + "index_bytes_per_message": 8.3, + "insert_us_per_message": [ + 4.93, + 4.96, + 4.83 + ], + "wal_bytes_per_message": [ + 452.1, + 450.1, + 448.1 + ], + "fpi_per_1000": [ + 26.2, + 28.0, + 28.6 + ], + "long_text": "ok" + }, + { + "variant": "covering", + "columns": "(chat_id, created_at, id) INCLUDE (sender_id, text)", + "rows": 5000, + "messages": 16800, + "index_bytes": 2695168, + "index_bytes_per_message": 160.4, + "insert_us_per_message": [ + 5.63, + 5.56, + 8.6 + ], + "wal_bytes_per_message": [ + 748.8, + 746.8, + 748.2 + ], + "fpi_per_1000": [ + 33.2, + 34.2, + 34.4 + ], + "long_text": "index row requires 12072 bytes, maximum size is 8191" + }, + { + "variant": "none", + "columns": null, + "rows": 5000, + "messages": 16800, + "index_bytes": 0, + "index_bytes_per_message": 0.0, + "insert_us_per_message": [ + 4.59, + 4.36, + 4.39 + ], + "wal_bytes_per_message": [ + 365.2, + 363.2, + 364.6 + ], + "fpi_per_1000": [ + 26.2, + 26.8, + 27.2 + ], + "long_text": "ok" + } + ] + } + ], + "limits": { + "api": { + "nano_cpus": 1000000000, + "memory": 2147483648, + "memory_swap": 2147483648, + "published_ports": {}, + "healthcheck": [ + "NONE" + ], + "log_driver": "local" + }, + "postgres": { + "nano_cpus": 4000000000, + "memory": 3221225472, + "memory_swap": 3221225472, + "published_ports": {}, + "healthcheck": [ + "CMD-SHELL", + "pg_isready -h 127.0.0.1 -U \"$POSTGRES_USER\" -d \"$POSTGRES_DB\"" + ], + "log_driver": "local" + }, + "valkey": { + "nano_cpus": 2000000000, + "memory": 536870912, + "memory_swap": 536870912, + "published_ports": {}, + "healthcheck": [ + "CMD-SHELL", + "test \"$(valkey-cli -p \"$VALKEY_PORT\" ping)\" = PONG" + ], + "log_driver": "local" + }, + "haproxy": { + "nano_cpus": 1000000000, + "memory": 268435456, + "memory_swap": 268435456, + "published_ports": {}, + "healthcheck": [ + "CMD", + "bash", + "-c", + "exec 3<>/dev/tcp/127.0.0.1/8404 && printf 'GET /lb/ready HTTP/1.0\\r\\n\\r\\n' >&3 && head -n 1 <&3 | grep -q ' 200 '" + ], + "log_driver": "local" + }, + "k6": { + "nano_cpus": 0, + "memory": 0, + "memory_swap": 0, + "published_ports": {}, + "healthcheck": null, + "log_driver": "local" + }, + "api_replicas": 1, + "max_connections": 100 + }, + "stand": { + "api_tcp_rmem": "4096 131072 524288", + "postgres": { + "image": "postgres:18.6-trixie@sha256:5a5a84b19854a9ffaa54082c166ff4ec27473a361e496e5ea167f298f2da9722", + "id": "sha256:f4fcd2b983483177b15d72d94fb3614736211554f7cac5c2cc54a05c75110b90", + "version": "18.6 (Debian 18.6-1.pgdg13+2)", + "settings": { + "autovacuum": "on", + "checkpoint_timeout": "5min", + "effective_cache_size": "4GB", + "fsync": "on", + "jit": "on", + "maintenance_work_mem": "64MB", + "max_connections": "100", + "max_wal_size": "1GB", + "plan_cache_mode": "auto", + "random_page_cost": "4", + "shared_buffers": "128MB", + "shared_preload_libraries": "auto_explain", + "synchronous_commit": "on", + "wal_level": "replica", + "work_mem": "4MB" + } + }, + "valkey": { + "image": "valkey/valkey:9.1.2-trixie@sha256:418652cfb58ef879d4978c33553735d7147016032d5aefaa14c828e611eb9dfd", + "id": "sha256:5a6ac3cceea0d4cebe48911dfa5f393f49feea86a2c55c5ac6b0ba733a1713b6", + "version": "9.1.2", + "maxmemory": "67108864", + "maxmemory-clients": "0", + "maxmemory-eviction-tenacity": "10", + "maxmemory-policy": "allkeys-lru", + "maxmemory-samples": "5" + }, + "haproxy": { + "image": "haproxy:3.4.6-trixie@sha256:e273915691a8eab3f105bf3e39fd4c29a4ecf334e33421903b5589d25e14db26", + "id": "sha256:a92cbb5d7b4ba27898706659bde5039cc86e4ebee44f243d410f268200f7406f", + "version": "HAProxy version 3.4.6-56332c5 2026/09/28 - https://haproxy.org/" + }, + "app_env": { + "APP__PORT": "8080", + "APP__RUN_MODE": "docker", + "AUTH__SESSION_TTL_SECONDS": "21600", + "CACHE__HOST": "valkey", + "CACHE__PORT": "6379", + "DATABASE__HOST": "postgres", + "DATABASE__NAME": "bench", + "DATABASE__PORT": "5432", + "DATABASE__USER": "bench", + "S3__BUCKET": "bench", + "S3__HOST": "s3", + "S3__PORT": "8333" + } + }, + "finished_at": "2026-10-31T20:23:06+00:00" +} diff --git a/evidence/bench/unit-of-work-aa/prefill.csv b/evidence/bench/unit-of-work-aa/prefill.csv new file mode 100644 index 00000000..f0cf3203 --- /dev/null +++ b/evidence/bench/unit-of-work-aa/prefill.csv @@ -0,0 +1,4 @@ +size,chunk,messages_before,messages_after,duration_s,requests_ok,requests_failed,rps,error_ratio,p50_ms,p95_ms,p99_ms,max_ms,app_cpu_cores,rss_end_mib,mem_cgroup_end_mib,generator_cpu_cores,flags,db_cpu_cores,cell,attempt +1000,1,0,4500,7.804,4500,0,576.6,0.0,51.614,108.971,151.826,222.608,0.999,125.0,116.1,0.119,,0.203,, +5000,1,0,8500,14.658,8500,0,579.9,0.0,51.796,112.909,148.343,224.403,0.999,125.2,115.5,0.11,,0.2,, +10000,1,0,13500,23.029,13500,0,586.2,0.0,51.517,104.946,144.711,250.139,0.999,125.1,118.1,0.109,,0.202,, diff --git a/evidence/bench/unit-of-work-aa/progress.json b/evidence/bench/unit-of-work-aa/progress.json new file mode 100644 index 00000000..3aa212ab --- /dev/null +++ b/evidence/bench/unit-of-work-aa/progress.json @@ -0,0 +1,12 @@ +{ + "label": "unit-of-work-aa", + "profile": "quick", + "stage": "done", + "size": 10000, + "runs_done": 18, + "runs_total": 18, + "elapsed_s": 224, + "eta_s": 0, + "warnings": [], + "updated_at": "2026-10-31T20:23:06+00:00" +} diff --git a/evidence/bench/unit-of-work-aa/raw/prefill-10k-01.json b/evidence/bench/unit-of-work-aa/raw/prefill-10k-01.json new file mode 100644 index 00000000..9b022404 --- /dev/null +++ b/evidence/bench/unit-of-work-aa/raw/prefill-10k-01.json @@ -0,0 +1 @@ +{"metrics":{"checks":{"contains":"default","values":{"passes":13500,"fails":0,"rate":1},"type":"rate"},"iteration_duration":{"type":"trend","contains":"time","values":{"p(99)":144.76235140999998,"max":250.22325,"avg":54.54204372888884,"min":11.426459,"med":51.578166499999995,"p(50)":51.578166499999995,"p(95)":104.99915444999999}},"http_req_duration":{"contains":"time","values":{"p(50)":51.517271,"p(95)":104.94581249999997,"p(99)":144.71090033,"max":250.138834,"avg":54.476573535036856,"min":11.378083,"med":51.517271},"type":"trend"},"http_req_tls_handshaking":{"type":"trend","contains":"time","values":{"med":0,"p(50)":0,"p(95)":0,"p(99)":0,"max":0,"avg":0,"min":0}},"http_req_connecting":{"type":"trend","contains":"time","values":{"med":0,"p(50)":0,"p(95)":0,"p(99)":0,"max":0.339042,"avg":0.0004472439999999999,"min":0}},"data_received":{"type":"counter","contains":"data","values":{"count":6615000,"rate":287252.68865780847}},"iterations":{"type":"counter","contains":"default","values":{"count":13500,"rate":586.2299768526703}},"vus_max":{"contains":"default","values":{"max":32,"value":32,"min":32},"type":"gauge"},"http_req_sending":{"values":{"max":0.49325,"avg":0.005056908518518449,"min":0.001958,"med":0.003792,"p(50)":0.003792,"p(95)":0.010083,"p(99)":0.020041009999999998},"type":"trend","contains":"time"},"http_reqs":{"contains":"default","values":{"count":13500,"rate":586.2299768526703},"type":"counter"},"http_req_receiving":{"type":"trend","contains":"time","values":{"avg":0.016185549777777898,"min":0.004666,"med":0.013917,"p(50)":0.013917,"p(95)":0.03204404999999998,"p(99)":0.051001249999999984,"max":0.396084}},"data_sent":{"type":"counter","contains":"data","values":{"rate":220422.47129660405,"count":5076000}},"http_req_blocked":{"type":"trend","contains":"time","values":{"min":0.000458,"med":0.001,"p(50)":0.001,"p(95)":0.002083,"p(99)":0.003708,"max":1.04975,"avg":0.002860772888888782}},"vus":{"type":"gauge","contains":"default","values":{"value":30,"min":30,"max":32}},"http_req_duration{expected_response:true}":{"type":"trend","contains":"time","values":{"min":11.378083,"med":51.517271,"p(50)":51.517271,"p(95)":104.94581249999997,"p(99)":144.71090033,"max":250.138834,"avg":54.476573535036856},"thresholds":{"max>=0":{"ok":true}}},"http_req_waiting":{"type":"trend","contains":"time","values":{"p(50)":51.493958,"p(95)":104.92815829999999,"p(99)":144.69301542,"max":250.105042,"avg":54.45533107674069,"min":11.361542,"med":51.493958}},"http_req_failed":{"contains":"default","values":{"rate":0,"passes":0,"fails":13500},"type":"rate"}},"root_group":{"groups":[],"checks":[{"name":"message 201","path":"::message 201","id":"6445aff337e1ade0bc10402fbac79882","passes":13500,"fails":0}],"name":"","path":"","id":"d41d8cd98f00b204e9800998ecf8427e"},"options":{"summaryTrendStats":["avg","min","med","p(50)","p(95)","p(99)","max"],"summaryTimeUnit":"","noColor":true},"state":{"isStdOutTTY":false,"isStdErrTTY":false,"testRunDurationMs":23028.50508}} \ No newline at end of file diff --git a/evidence/bench/unit-of-work-aa/raw/prefill-1k-01.json b/evidence/bench/unit-of-work-aa/raw/prefill-1k-01.json new file mode 100644 index 00000000..7058e5fe --- /dev/null +++ b/evidence/bench/unit-of-work-aa/raw/prefill-1k-01.json @@ -0,0 +1 @@ +{"root_group":{"path":"","id":"d41d8cd98f00b204e9800998ecf8427e","groups":[],"checks":[{"name":"message 201","path":"::message 201","id":"6445aff337e1ade0bc10402fbac79882","passes":4500,"fails":0}],"name":""},"options":{"summaryTrendStats":["avg","min","med","p(50)","p(95)","p(99)","max"],"summaryTimeUnit":"","noColor":true},"state":{"isStdOutTTY":false,"isStdErrTTY":false,"testRunDurationMs":7804.259545},"metrics":{"checks":{"type":"rate","contains":"default","values":{"rate":1,"passes":4500,"fails":0}},"http_req_duration":{"contains":"time","values":{"min":11.5215,"med":51.614146,"p(50)":51.614146,"p(95)":108.97147644999998,"p(99)":151.82628041,"max":222.607834,"avg":55.30293323288895},"type":"trend"},"http_req_failed":{"type":"rate","contains":"default","values":{"rate":0,"passes":0,"fails":4500}},"http_req_connecting":{"type":"trend","contains":"time","values":{"avg":0.0006185642222222222,"min":0,"med":0,"p(50)":0,"p(95)":0,"p(99)":0,"max":0.276958}},"http_req_receiving":{"contains":"time","values":{"p(50)":0.014166,"p(95)":0.03429404999999999,"p(99)":0.05739041999999994,"max":0.412167,"avg":0.016828069555555564,"min":0.004625,"med":0.014166},"type":"trend"},"vus":{"type":"gauge","contains":"default","values":{"max":32,"value":32,"min":32}},"vus_max":{"contains":"default","values":{"min":32,"max":32,"value":32},"type":"gauge"},"http_req_blocked":{"type":"trend","contains":"time","values":{"med":0.000959,"p(50)":0.000959,"p(95)":0.002125,"p(99)":0.007750419999999998,"max":0.906167,"avg":0.0033415228888889355,"min":0.0005}},"http_req_tls_handshaking":{"type":"trend","contains":"time","values":{"min":0,"med":0,"p(50)":0,"p(95)":0,"p(99)":0,"max":0,"avg":0}},"data_received":{"type":"counter","contains":"data","values":{"count":2205000,"rate":282538.0149501422}},"http_req_sending":{"values":{"p(95)":0.010459,"p(99)":0.01895801,"max":0.2155,"avg":0.005030362666666664,"min":0.002125,"med":0.003958,"p(50)":0.003958},"type":"trend","contains":"time"},"iterations":{"type":"counter","contains":"default","values":{"rate":576.6081937758004,"count":4500}},"iteration_duration":{"contains":"time","values":{"p(99)":151.91362333,"max":222.664875,"avg":55.37190353111107,"min":11.580458,"med":51.66479150000001,"p(50)":51.66479150000001,"p(95)":109.01507884999998},"type":"trend"},"http_req_duration{expected_response:true}":{"type":"trend","contains":"time","values":{"min":11.5215,"med":51.614146,"p(50)":51.614146,"p(95)":108.97147644999998,"p(99)":151.82628041,"max":222.607834,"avg":55.30293323288895},"thresholds":{"max>=0":{"ok":true}}},"http_reqs":{"values":{"count":4500,"rate":576.6081937758004},"type":"counter","contains":"default"},"data_sent":{"contains":"data","values":{"count":1692000,"rate":216804.68085970095},"type":"counter"},"http_req_waiting":{"type":"trend","contains":"time","values":{"med":51.5932295,"p(50)":51.5932295,"p(95)":108.95620064999999,"p(99)":151.80782051,"max":222.588416,"avg":55.2810748006667,"min":11.507208}}}} \ No newline at end of file diff --git a/evidence/bench/unit-of-work-aa/raw/prefill-5k-01.json b/evidence/bench/unit-of-work-aa/raw/prefill-5k-01.json new file mode 100644 index 00000000..07c45749 --- /dev/null +++ b/evidence/bench/unit-of-work-aa/raw/prefill-5k-01.json @@ -0,0 +1 @@ +{"root_group":{"name":"","path":"","id":"d41d8cd98f00b204e9800998ecf8427e","groups":[],"checks":[{"name":"message 201","path":"::message 201","id":"6445aff337e1ade0bc10402fbac79882","passes":8500,"fails":0}]},"options":{"summaryTrendStats":["avg","min","med","p(50)","p(95)","p(99)","max"],"summaryTimeUnit":"","noColor":true},"state":{"testRunDurationMs":14657.63784,"isStdOutTTY":false,"isStdErrTTY":false},"metrics":{"data_received":{"type":"counter","contains":"data","values":{"count":4165000,"rate":284152.1973365935}},"http_req_receiving":{"type":"trend","contains":"time","values":{"p(95)":0.032960099999999985,"p(99)":0.05421175999999997,"max":0.301458,"avg":0.016481440823529543,"min":0.004417,"med":0.014,"p(50)":0.014}},"http_req_failed":{"type":"rate","contains":"default","values":{"rate":0,"passes":0,"fails":8500}},"http_req_waiting":{"values":{"p(50)":51.780333,"p(95)":112.89164854999999,"p(99)":148.32381375,"max":224.371292,"avg":55.03091433164729,"min":10.888125,"med":51.780333},"type":"trend","contains":"time"},"vus":{"type":"gauge","contains":"default","values":{"max":32,"value":32,"min":32}},"vus_max":{"contains":"default","values":{"value":32,"min":32,"max":32},"type":"gauge"},"http_reqs":{"values":{"count":8500,"rate":579.9024435440683},"type":"counter","contains":"default"},"http_req_tls_handshaking":{"contains":"time","values":{"min":0,"med":0,"p(50)":0,"p(95)":0,"p(99)":0,"max":0,"avg":0},"type":"trend"},"iteration_duration":{"contains":"time","values":{"med":51.8613955,"p(50)":51.8613955,"p(95)":112.95544794999998,"p(99)":148.40809108,"max":224.47075,"avg":55.11979060494095,"min":10.95575},"type":"trend"},"http_req_sending":{"type":"trend","contains":"time","values":{"p(50)":0.003792,"p(95)":0.010084,"p(99)":0.018791419999999996,"max":0.267417,"avg":0.004890888588235243,"min":0.001791,"med":0.003792}},"checks":{"contains":"default","values":{"rate":1,"passes":8500,"fails":0},"type":"rate"},"http_req_duration{expected_response:true}":{"contains":"time","values":{"avg":55.052286661058716,"min":10.902833,"med":51.795646000000005,"p(50)":51.795646000000005,"p(95)":112.90908569999999,"p(99)":148.34328125999997,"max":224.402542},"thresholds":{"max>=0":{"ok":true}},"type":"trend"},"http_req_duration":{"values":{"avg":55.052286661058716,"min":10.902833,"med":51.795646000000005,"p(50)":51.795646000000005,"p(95)":112.90908569999999,"p(99)":148.34328125999997,"max":224.402542},"type":"trend","contains":"time"},"http_req_blocked":{"type":"trend","contains":"time","values":{"max":1.013542,"avg":0.004023293411764744,"min":0.000458,"med":0.001,"p(50)":0.001,"p(95)":0.002083,"p(99)":0.0046254099999999965}},"http_req_connecting":{"values":{"avg":0.0007623968235294118,"min":0,"med":0,"p(50)":0,"p(95)":0,"p(99)":0,"max":0.350917},"type":"trend","contains":"time"},"data_sent":{"type":"counter","contains":"data","values":{"count":3196000,"rate":218043.3187725697}},"iterations":{"type":"counter","contains":"default","values":{"count":8500,"rate":579.9024435440683}}}} \ No newline at end of file diff --git a/evidence/bench/unit-of-work-aa/raw/read-10k-c1-r1.json b/evidence/bench/unit-of-work-aa/raw/read-10k-c1-r1.json new file mode 100644 index 00000000..bfefe980 --- /dev/null +++ b/evidence/bench/unit-of-work-aa/raw/read-10k-c1-r1.json @@ -0,0 +1 @@ +{"metrics":{"http_req_receiving":{"contains":"time","values":{"med":0.020792,"p(50)":0.020792,"p(95)":0.053574599999999986,"p(99)":0.08314983999999999,"max":0.184625,"avg":0.02564272890338361,"min":0.012291},"type":"trend"},"checks":{"contains":"default","values":{"rate":1,"passes":4906,"fails":0},"type":"rate"},"data_sent":{"type":"counter","contains":"data","values":{"count":1025354,"rate":204990.90979468572}},"iteration_duration":{"type":"trend","contains":"time","values":{"p(99)":3.6188283599999997,"max":85.096792,"avg":2.0356424728903417,"min":1.551791,"med":1.895666,"p(50)":1.895666,"p(95)":2.7046919999999997}},"http_req_waiting":{"type":"trend","contains":"time","values":{"avg":1.9329760978393826,"min":1.486833,"med":1.807208,"p(50)":1.807208,"p(95)":2.504284,"p(99)":3.4146998399999995,"max":84.908542}},"vus_max":{"type":"gauge","contains":"default","values":{"value":1,"min":1,"max":1}},"http_req_duration":{"type":"trend","contains":"time","values":{"max":84.977166,"avg":1.962735408887078,"min":1.50225,"med":1.83075,"p(50)":1.83075,"p(95)":2.5664751999999993,"p(99)":3.4802585199999996}},"http_req_tls_handshaking":{"type":"trend","contains":"time","values":{"p(95)":0,"p(99)":0,"max":0,"avg":0,"min":0,"med":0,"p(50)":0}},"http_req_sending":{"type":"trend","contains":"time","values":{"p(50)":0.003,"p(95)":0.008766399999999995,"p(99)":0.017405319999999988,"max":0.155417,"avg":0.004116582144313109,"min":0.001666,"med":0.003}},"iterations":{"values":{"count":2453,"rate":490.4088751069036},"type":"counter","contains":"default"},"vus":{"type":"gauge","contains":"default","values":{"min":1,"max":1,"value":1}},"http_req_duration{expected_response:true}":{"type":"trend","contains":"time","values":{"p(99)":3.4802585199999996,"max":84.977166,"avg":1.962735408887078,"min":1.50225,"med":1.83075,"p(50)":1.83075,"p(95)":2.5664751999999993},"thresholds":{"max>=0":{"ok":true}}},"http_reqs":{"values":{"count":2453,"rate":490.4088751069036},"type":"counter","contains":"default"},"http_req_connecting":{"contains":"time","values":{"avg":0.00004835915205870362,"min":0,"med":0,"p(50)":0,"p(95)":0,"p(99)":0,"max":0.118625},"type":"trend"},"http_req_blocked":{"type":"trend","contains":"time","values":{"min":0.000542,"med":0.001041,"p(50)":0.001041,"p(95)":0.002333,"p(99)":0.0034148399999999984,"max":0.486958,"avg":0.0014451271911944483}},"http_req_failed":{"type":"rate","contains":"default","values":{"rate":0,"passes":0,"fails":2453}},"data_received":{"values":{"count":35713227,"rate":7139862.8126814095},"type":"counter","contains":"data"}},"root_group":{"id":"d41d8cd98f00b204e9800998ecf8427e","groups":[],"checks":[{"fails":0,"name":"status 200","path":"::status 200","id":"fad9fa412b86fcb03bee97c80dcd61f1","passes":2453},{"name":"full page","path":"::full page","id":"736a4affc4111c8285c374c0b4d25aed","passes":2453,"fails":0}],"name":"","path":""},"options":{"summaryTrendStats":["avg","min","med","p(50)","p(95)","p(99)","max"],"summaryTimeUnit":"","noColor":true},"state":{"isStdOutTTY":false,"isStdErrTTY":false,"testRunDurationMs":5001.948628}} \ No newline at end of file diff --git a/evidence/bench/unit-of-work-aa/raw/read-10k-c16-r1.json b/evidence/bench/unit-of-work-aa/raw/read-10k-c16-r1.json new file mode 100644 index 00000000..983a2172 --- /dev/null +++ b/evidence/bench/unit-of-work-aa/raw/read-10k-c16-r1.json @@ -0,0 +1 @@ +{"options":{"summaryTrendStats":["avg","min","med","p(50)","p(95)","p(99)","max"],"summaryTimeUnit":"","noColor":true},"state":{"testRunDurationMs":5019.671711,"isStdOutTTY":false,"isStdErrTTY":false},"metrics":{"data_received":{"values":{"count":47243955,"rate":9411761.907949204},"type":"counter","contains":"data"},"vus_max":{"type":"gauge","contains":"default","values":{"value":16,"min":16,"max":16}},"http_req_receiving":{"values":{"avg":0.024742592295839763,"min":0.008459,"med":0.019292,"p(50)":0.019292,"p(95)":0.05186679999999999,"p(99)":0.10284651999999997,"max":0.438125},"type":"trend","contains":"time"},"http_reqs":{"type":"counter","contains":"default","values":{"rate":646.4566184455803,"count":3245}},"http_req_tls_handshaking":{"type":"trend","contains":"time","values":{"avg":0,"min":0,"med":0,"p(50)":0,"p(95)":0,"p(99)":0,"max":0}},"http_req_waiting":{"type":"trend","contains":"time","values":{"p(95)":46.18396639999993,"p(99)":71.60269499999998,"max":114.556125,"avg":24.59960431093986,"min":8.968417,"med":21.929209,"p(50)":21.929209}},"http_req_sending":{"values":{"min":0.001792,"med":0.003,"p(50)":0.003,"p(95)":0.008458,"p(99)":0.018902999999999996,"max":0.130666,"avg":0.0039610767334360975},"type":"trend","contains":"time"},"iterations":{"type":"counter","contains":"default","values":{"count":3245,"rate":646.4566184455803}},"http_req_blocked":{"contains":"time","values":{"avg":0.003439970724191103,"min":0.0005,"med":0.000917,"p(50)":0.000917,"p(95)":0.002167,"p(99)":0.0061485199999999985,"max":0.585125},"type":"trend"},"checks":{"type":"rate","contains":"default","values":{"rate":1,"passes":6490,"fails":0}},"vus":{"type":"gauge","contains":"default","values":{"value":16,"min":16,"max":16}},"iteration_duration":{"type":"trend","contains":"time","values":{"max":114.636042,"avg":24.702842439753418,"min":9.031625,"med":22.034792,"p(50)":22.034792,"p(95)":46.357516799999914,"p(99)":71.70724799999998}},"http_req_failed":{"type":"rate","contains":"default","values":{"passes":0,"fails":3245,"rate":0}},"http_req_duration{expected_response:true}":{"contains":"time","values":{"min":8.984208,"med":21.958834,"p(50)":21.958834,"p(95)":46.24320819999993,"p(99)":71.63251995999998,"max":114.57775,"avg":24.628307979969204},"thresholds":{"max>=0":{"ok":true}},"type":"trend"},"http_req_duration":{"type":"trend","contains":"time","values":{"p(99)":71.63251995999998,"max":114.57775,"avg":24.628307979969204,"min":8.984208,"med":21.958834,"p(50)":21.958834,"p(95)":46.24320819999993}},"data_sent":{"values":{"count":1356410,"rate":270218.8665102525},"type":"counter","contains":"data"},"http_req_connecting":{"type":"trend","contains":"time","values":{"min":0,"med":0,"p(50)":0,"p(95)":0,"p(99)":0,"max":0.1645,"avg":0.000370775654853621}}},"root_group":{"name":"","path":"","id":"d41d8cd98f00b204e9800998ecf8427e","groups":[],"checks":[{"name":"status 200","path":"::status 200","id":"fad9fa412b86fcb03bee97c80dcd61f1","passes":3245,"fails":0},{"fails":0,"name":"full page","path":"::full page","id":"736a4affc4111c8285c374c0b4d25aed","passes":3245}]}} \ No newline at end of file diff --git a/evidence/bench/unit-of-work-aa/raw/read-10k-c4-r1.json b/evidence/bench/unit-of-work-aa/raw/read-10k-c4-r1.json new file mode 100644 index 00000000..5fbd94e5 --- /dev/null +++ b/evidence/bench/unit-of-work-aa/raw/read-10k-c4-r1.json @@ -0,0 +1 @@ +{"options":{"summaryTrendStats":["avg","min","med","p(50)","p(95)","p(99)","max"],"summaryTimeUnit":"","noColor":true},"state":{"isStdOutTTY":false,"isStdErrTTY":false,"testRunDurationMs":5011.529779},"metrics":{"http_req_tls_handshaking":{"type":"trend","contains":"time","values":{"max":0,"avg":0,"min":0,"med":0,"p(50)":0,"p(95)":0,"p(99)":0}},"http_req_duration{expected_response:true}":{"type":"trend","contains":"time","values":{"max":45.538875,"avg":5.689445096292062,"min":3.606375,"med":5.338625,"p(50)":5.338625,"p(95)":7.03525,"p(99)":9.824547999999993},"thresholds":{"max>=0":{"ok":true}}},"http_req_failed":{"type":"rate","contains":"default","values":{"fails":3479,"rate":0,"passes":0}},"data_sent":{"type":"counter","contains":"data","values":{"count":1454222,"rate":290175.26865622564}},"data_received":{"type":"counter","contains":"data","values":{"count":50650761,"rate":10106846.259248776}},"iteration_duration":{"type":"trend","contains":"time","values":{"p(50)":5.399542,"p(95)":7.147579499999998,"p(99)":9.941798519999988,"max":45.592625,"avg":5.756671475998839,"min":3.661667,"med":5.399542}},"http_req_sending":{"type":"trend","contains":"time","values":{"med":0.002792,"p(50)":0.002792,"p(95)":0.00675,"p(99)":0.017477259999999998,"max":0.241125,"avg":0.003896505605058975,"min":0.001666}},"vus":{"type":"gauge","contains":"default","values":{"max":4,"value":4,"min":4}},"iterations":{"type":"counter","contains":"default","values":{"count":3479,"rate":694.1992073115446}},"http_req_receiving":{"type":"trend","contains":"time","values":{"p(99)":0.0865657599999999,"max":0.3295,"avg":0.022590152917505008,"min":0.007375,"med":0.018333,"p(50)":0.018333,"p(95)":0.04400409999999999}},"http_req_duration":{"type":"trend","contains":"time","values":{"avg":5.689445096292062,"min":3.606375,"med":5.338625,"p(50)":5.338625,"p(95)":7.03525,"p(99)":9.824547999999993,"max":45.538875}},"vus_max":{"values":{"value":4,"min":4,"max":4},"type":"gauge","contains":"default"},"http_req_blocked":{"type":"trend","contains":"time","values":{"p(95)":0.001916,"p(99)":0.0031340199999999986,"max":0.700708,"avg":0.001768398102903145,"min":0.000541,"med":0.000875,"p(50)":0.000875}},"http_req_waiting":{"type":"trend","contains":"time","values":{"avg":5.662958437769487,"min":3.582459,"med":5.316708,"p(50)":5.316708,"p(95)":6.996358,"p(99)":9.792100979999994,"max":45.517916}},"http_req_connecting":{"contains":"time","values":{"p(50)":0,"p(95)":0,"p(99)":0,"max":0.190542,"avg":0.00017812848519689565,"min":0,"med":0},"type":"trend"},"http_reqs":{"type":"counter","contains":"default","values":{"count":3479,"rate":694.1992073115446}},"checks":{"contains":"default","values":{"rate":1,"passes":6958,"fails":0},"type":"rate"}},"root_group":{"groups":[],"checks":[{"path":"::status 200","id":"fad9fa412b86fcb03bee97c80dcd61f1","passes":3479,"fails":0,"name":"status 200"},{"path":"::full page","id":"736a4affc4111c8285c374c0b4d25aed","passes":3479,"fails":0,"name":"full page"}],"name":"","path":"","id":"d41d8cd98f00b204e9800998ecf8427e"}} \ No newline at end of file diff --git a/evidence/bench/unit-of-work-aa/raw/read-1k-c1-r1.json b/evidence/bench/unit-of-work-aa/raw/read-1k-c1-r1.json new file mode 100644 index 00000000..90e0d322 --- /dev/null +++ b/evidence/bench/unit-of-work-aa/raw/read-1k-c1-r1.json @@ -0,0 +1 @@ +{"metrics":{"http_req_failed":{"type":"rate","contains":"default","values":{"fails":2644,"rate":0,"passes":0}},"http_reqs":{"values":{"count":2644,"rate":528.76398207808},"type":"counter","contains":"default"},"http_req_connecting":{"type":"trend","contains":"time","values":{"min":0,"med":0,"p(50)":0,"p(95)":0,"p(99)":0,"max":0.113167,"avg":0.000042801437216338884}},"http_req_blocked":{"type":"trend","contains":"time","values":{"min":0.000541,"med":0.000958,"p(50)":0.000958,"p(95)":0.001875,"p(99)":0.0028153699999999993,"max":0.481166,"avg":0.0012639568835098244}},"http_req_tls_handshaking":{"contains":"time","values":{"avg":0,"min":0,"med":0,"p(50)":0,"p(95)":0,"p(99)":0,"max":0},"type":"trend"},"vus":{"type":"gauge","contains":"default","values":{"min":1,"max":1,"value":1}},"http_req_waiting":{"type":"trend","contains":"time","values":{"p(95)":2.1086411999999997,"p(99)":2.48973644,"max":5.192542,"avg":1.7930774803328309,"min":1.51975,"med":1.757021,"p(50)":1.757021}},"data_sent":{"type":"counter","contains":"data","values":{"count":1105192,"rate":221023.34450863744}},"http_req_duration":{"type":"trend","contains":"time","values":{"p(95)":2.156706249999999,"p(99)":2.54961031,"max":5.288125,"avg":1.820558904689867,"min":1.551166,"med":1.7807705,"p(50)":1.7807705}},"http_req_sending":{"values":{"avg":0.0038285355521936824,"min":0.001708,"med":0.002792,"p(50)":0.002792,"p(95)":0.006660699999999995,"p(99)":0.018350939999999986,"max":0.41575},"type":"trend","contains":"time"},"checks":{"type":"rate","contains":"default","values":{"passes":5288,"fails":0,"rate":1}},"iteration_duration":{"values":{"p(95)":2.24451065,"p(99)":2.6700183699999998,"max":5.453458,"avg":1.8878566168683786,"min":1.600708,"med":1.8409165,"p(50)":1.8409165},"type":"trend","contains":"time"},"vus_max":{"type":"gauge","contains":"default","values":{"value":1,"min":1,"max":1}},"http_req_receiving":{"type":"trend","contains":"time","values":{"p(99)":0.06927338,"max":0.384875,"avg":0.02365288880484111,"min":0.010208,"med":0.019333,"p(50)":0.019333,"p(95)":0.046493849999999996}},"data_received":{"type":"counter","contains":"data","values":{"count":38493996,"rate":7698274.815074766}},"iterations":{"type":"counter","contains":"default","values":{"count":2644,"rate":528.76398207808}},"http_req_duration{expected_response:true}":{"type":"trend","contains":"time","values":{"med":1.7807705,"p(50)":1.7807705,"p(95)":2.156706249999999,"p(99)":2.54961031,"max":5.288125,"avg":1.820558904689867,"min":1.551166},"thresholds":{"max>=0":{"ok":true}}}},"root_group":{"name":"","path":"","id":"d41d8cd98f00b204e9800998ecf8427e","groups":[],"checks":[{"name":"status 200","path":"::status 200","id":"fad9fa412b86fcb03bee97c80dcd61f1","passes":2644,"fails":0},{"name":"full page","path":"::full page","id":"736a4affc4111c8285c374c0b4d25aed","passes":2644,"fails":0}]},"options":{"summaryTrendStats":["avg","min","med","p(50)","p(95)","p(99)","max"],"summaryTimeUnit":"","noColor":true},"state":{"isStdErrTTY":false,"testRunDurationMs":5000.340586,"isStdOutTTY":false}} \ No newline at end of file diff --git a/evidence/bench/unit-of-work-aa/raw/read-1k-c16-r1.json b/evidence/bench/unit-of-work-aa/raw/read-1k-c16-r1.json new file mode 100644 index 00000000..95159319 --- /dev/null +++ b/evidence/bench/unit-of-work-aa/raw/read-1k-c16-r1.json @@ -0,0 +1 @@ +{"options":{"summaryTrendStats":["avg","min","med","p(50)","p(95)","p(99)","max"],"summaryTimeUnit":"","noColor":true},"state":{"isStdOutTTY":false,"isStdErrTTY":false,"testRunDurationMs":5048.659086},"metrics":{"vus":{"type":"gauge","contains":"default","values":{"value":16,"min":16,"max":16}},"iterations":{"values":{"count":3344,"rate":662.3540910640921},"type":"counter","contains":"default"},"http_req_sending":{"values":{"p(99)":0.024581619999999967,"max":1.013667,"avg":0.004336318480861308,"min":0.001792,"med":0.003,"p(50)":0.003,"p(95)":0.00795885},"type":"trend","contains":"time"},"checks":{"type":"rate","contains":"default","values":{"passes":6688,"fails":0,"rate":1}},"http_req_failed":{"type":"rate","contains":"default","values":{"rate":0,"passes":0,"fails":3344}},"http_req_receiving":{"type":"trend","contains":"time","values":{"p(50)":0.019208,"p(95)":0.048071399999999986,"p(99)":0.08819443999999996,"max":0.42,"avg":0.02350889324162677,"min":0.007875,"med":0.019208}},"vus_max":{"type":"gauge","contains":"default","values":{"value":16,"min":16,"max":16}},"http_req_connecting":{"type":"trend","contains":"time","values":{"p(95)":0,"p(99)":0,"max":0.280458,"avg":0.000769337619617225,"min":0,"med":0,"p(50)":0}},"http_req_waiting":{"type":"trend","contains":"time","values":{"min":8.014208,"med":22.0177085,"p(50)":22.0177085,"p(95)":42.995177749999975,"p(99)":63.08671443999999,"max":81.39475,"avg":24.016956552631573}},"http_reqs":{"type":"counter","contains":"default","values":{"count":3344,"rate":662.3540910640921}},"iteration_duration":{"type":"trend","contains":"time","values":{"avg":24.116835040669816,"min":8.11925,"med":22.106292,"p(50)":22.106292,"p(95)":43.11353919999997,"p(99)":63.17906324999999,"max":81.4895}},"http_req_duration":{"type":"trend","contains":"time","values":{"avg":24.04480176435406,"min":8.041584,"med":22.049291500000002,"p(50)":22.049291500000002,"p(95)":43.02531069999998,"p(99)":63.11551587999999,"max":81.416208}},"http_req_blocked":{"type":"trend","contains":"time","values":{"avg":0.0037237036483254104,"min":0.0005,"med":0.000916,"p(50)":0.000916,"p(95)":0.002041,"p(99)":0.0065775599999999945,"max":0.65575}},"http_req_tls_handshaking":{"contains":"time","values":{"med":0,"p(50)":0,"p(95)":0,"p(99)":0,"max":0,"avg":0,"min":0},"type":"trend"},"data_received":{"type":"counter","contains":"data","values":{"count":48685296,"rate":9643213.211802118}},"http_req_duration{expected_response:true}":{"thresholds":{"max>=0":{"ok":true}},"type":"trend","contains":"time","values":{"avg":24.04480176435406,"min":8.041584,"med":22.049291500000002,"p(50)":22.049291500000002,"p(95)":43.02531069999998,"p(99)":63.11551587999999,"max":81.416208}},"data_sent":{"type":"counter","contains":"data","values":{"count":1397792,"rate":276864.0100647905}}},"root_group":{"path":"","id":"d41d8cd98f00b204e9800998ecf8427e","groups":[],"checks":[{"fails":0,"name":"status 200","path":"::status 200","id":"fad9fa412b86fcb03bee97c80dcd61f1","passes":3344},{"name":"full page","path":"::full page","id":"736a4affc4111c8285c374c0b4d25aed","passes":3344,"fails":0}],"name":""}} \ No newline at end of file diff --git a/evidence/bench/unit-of-work-aa/raw/read-1k-c4-r1.json b/evidence/bench/unit-of-work-aa/raw/read-1k-c4-r1.json new file mode 100644 index 00000000..eaecf021 --- /dev/null +++ b/evidence/bench/unit-of-work-aa/raw/read-1k-c4-r1.json @@ -0,0 +1 @@ +{"metrics":{"data_received":{"type":"counter","contains":"data","values":{"count":51291357,"rate":10248825.252492458}},"http_reqs":{"type":"counter","contains":"default","values":{"count":3523,"rate":703.9511815710184}},"http_req_sending":{"values":{"max":0.157125,"avg":0.003812594379789994,"min":0.0015,"med":0.002792,"p(50)":0.002792,"p(95)":0.0074957999999999934,"p(99)":0.02257901999999999},"type":"trend","contains":"time"},"http_req_tls_handshaking":{"contains":"time","values":{"max":0,"avg":0,"min":0,"med":0,"p(50)":0,"p(95)":0,"p(99)":0},"type":"trend"},"iteration_duration":{"contains":"time","values":{"avg":5.676752529946061,"min":3.619625,"med":5.395125,"p(50)":5.395125,"p(95)":6.776379799999997,"p(99)":8.692119999999996,"max":48.706125},"type":"trend"},"vus_max":{"type":"gauge","contains":"default","values":{"value":4,"min":4,"max":4}},"http_req_connecting":{"values":{"p(95)":0,"p(99)":0,"max":0.165125,"avg":0.00014973034345728073,"min":0,"med":0,"p(50)":0},"type":"trend","contains":"time"},"iterations":{"type":"counter","contains":"default","values":{"count":3523,"rate":703.9511815710184}},"http_req_blocked":{"values":{"avg":0.002050076923076931,"min":0.0005,"med":0.000875,"p(50)":0.000875,"p(95)":0.001917,"p(99)":0.0034869999999999923,"max":0.758208},"type":"trend","contains":"time"},"http_req_failed":{"type":"rate","contains":"default","values":{"rate":0,"passes":0,"fails":3523}},"data_sent":{"contains":"data","values":{"count":1472614,"rate":294251.5938966857},"type":"counter"},"http_req_duration{expected_response:true}":{"type":"trend","contains":"time","values":{"avg":5.610329624183942,"min":3.567292,"med":5.331666,"p(50)":5.331666,"p(95)":6.672999999999999,"p(99)":8.570651519999997,"max":48.642916},"thresholds":{"max>=0":{"ok":true}}},"http_req_receiving":{"type":"trend","contains":"time","values":{"max":0.375833,"avg":0.02323795061027531,"min":0.008334,"med":0.018667,"p(50)":0.018667,"p(95)":0.0461669,"p(99)":0.08783427999999999}},"vus":{"type":"gauge","contains":"default","values":{"value":4,"min":4,"max":4}},"checks":{"type":"rate","contains":"default","values":{"rate":1,"passes":7046,"fails":0}},"http_req_waiting":{"type":"trend","contains":"time","values":{"min":3.545,"med":5.30575,"p(50)":5.30575,"p(95)":6.6194956000000005,"p(99)":8.493257499999999,"max":48.619125,"avg":5.583279079193863}},"http_req_duration":{"contains":"time","values":{"p(99)":8.570651519999997,"max":48.642916,"avg":5.610329624183942,"min":3.567292,"med":5.331666,"p(50)":5.331666,"p(95)":6.672999999999999},"type":"trend"}},"root_group":{"id":"d41d8cd98f00b204e9800998ecf8427e","groups":[],"checks":[{"name":"status 200","path":"::status 200","id":"fad9fa412b86fcb03bee97c80dcd61f1","passes":3523,"fails":0},{"name":"full page","path":"::full page","id":"736a4affc4111c8285c374c0b4d25aed","passes":3523,"fails":0}],"name":"","path":""},"options":{"summaryTimeUnit":"","noColor":true,"summaryTrendStats":["avg","min","med","p(50)","p(95)","p(99)","max"]},"state":{"isStdOutTTY":false,"isStdErrTTY":false,"testRunDurationMs":5004.608405}} \ No newline at end of file diff --git a/evidence/bench/unit-of-work-aa/raw/read-5k-c1-r1.json b/evidence/bench/unit-of-work-aa/raw/read-5k-c1-r1.json new file mode 100644 index 00000000..e532e415 --- /dev/null +++ b/evidence/bench/unit-of-work-aa/raw/read-5k-c1-r1.json @@ -0,0 +1 @@ +{"root_group":{"name":"","path":"","id":"d41d8cd98f00b204e9800998ecf8427e","groups":[],"checks":[{"fails":0,"name":"status 200","path":"::status 200","id":"fad9fa412b86fcb03bee97c80dcd61f1","passes":2614},{"name":"full page","path":"::full page","id":"736a4affc4111c8285c374c0b4d25aed","passes":2614,"fails":0}]},"options":{"summaryTrendStats":["avg","min","med","p(50)","p(95)","p(99)","max"],"summaryTimeUnit":"","noColor":true},"state":{"testRunDurationMs":5000.092127,"isStdOutTTY":false,"isStdErrTTY":false},"metrics":{"data_sent":{"contains":"data","values":{"count":1092652,"rate":218526.37356415653},"type":"counter"},"iterations":{"type":"counter","contains":"default","values":{"count":2614,"rate":522.7903673783649}},"http_req_duration":{"type":"trend","contains":"time","values":{"p(99)":2.7415035399999996,"max":5.22225,"avg":1.8430075065034452,"min":1.563875,"med":1.789688,"p(50)":1.789688,"p(95)":2.23730175}},"http_req_sending":{"type":"trend","contains":"time","values":{"avg":0.003416129686304529,"min":0.001541,"med":0.002709,"p(50)":0.002709,"p(95)":0.006431699999999995,"p(99)":0.012875,"max":0.059167}},"checks":{"type":"rate","contains":"default","values":{"rate":1,"passes":5228,"fails":0}},"http_req_tls_handshaking":{"values":{"p(50)":0,"p(95)":0,"p(99)":0,"max":0,"avg":0,"min":0,"med":0},"type":"trend","contains":"time"},"http_req_receiving":{"type":"trend","contains":"time","values":{"avg":0.023220708110175934,"min":0.01175,"med":0.019292,"p(50)":0.019292,"p(95)":0.044362049999999986,"p(99)":0.06488078999999998,"max":0.240833}},"http_req_waiting":{"type":"trend","contains":"time","values":{"avg":1.8163706687069614,"min":1.530416,"med":1.766729,"p(50)":1.766729,"p(95)":2.1934084499999993,"p(99)":2.67899904,"max":4.935333}},"vus":{"type":"gauge","contains":"default","values":{"value":1,"min":1,"max":1}},"http_req_connecting":{"type":"trend","contains":"time","values":{"med":0,"p(50)":0,"p(95)":0,"p(99)":0,"max":0.124125,"avg":0.00004748469778117827,"min":0}},"http_req_duration{expected_response:true}":{"type":"trend","contains":"time","values":{"p(95)":2.23730175,"p(99)":2.7415035399999996,"max":5.22225,"avg":1.8430075065034452,"min":1.563875,"med":1.789688,"p(50)":1.789688},"thresholds":{"max>=0":{"ok":true}}},"vus_max":{"type":"gauge","contains":"default","values":{"value":1,"min":1,"max":1}},"http_req_blocked":{"type":"trend","contains":"time","values":{"p(50)":0.001,"p(95)":0.0019583499999999998,"p(99)":0.003203539999999999,"max":0.54375,"avg":0.001391233741392495,"min":0.000541,"med":0.001}},"http_reqs":{"type":"counter","contains":"default","values":{"rate":522.7903673783649,"count":2614}},"iteration_duration":{"type":"trend","contains":"time","values":{"avg":1.9095807157612832,"min":1.615583,"med":1.850167,"p(50)":1.850167,"p(95)":2.3316375999999996,"p(99)":2.8422507899999996,"max":6.042708}},"http_req_failed":{"type":"rate","contains":"default","values":{"rate":0,"passes":0,"fails":2614}},"data_received":{"values":{"count":38057226,"rate":7611304.958661614},"type":"counter","contains":"data"}}} \ No newline at end of file diff --git a/evidence/bench/unit-of-work-aa/raw/read-5k-c16-r1.json b/evidence/bench/unit-of-work-aa/raw/read-5k-c16-r1.json new file mode 100644 index 00000000..b7f3dbda --- /dev/null +++ b/evidence/bench/unit-of-work-aa/raw/read-5k-c16-r1.json @@ -0,0 +1 @@ +{"state":{"isStdErrTTY":false,"testRunDurationMs":5014.521253,"isStdOutTTY":false},"metrics":{"http_req_sending":{"type":"trend","contains":"time","values":{"p(99)":0.02380628,"max":0.219875,"avg":0.004594586503473429,"min":0.001584,"med":0.003333,"p(50)":0.003333,"p(95)":0.009916900000000001}},"iteration_duration":{"type":"trend","contains":"time","values":{"avg":26.500153423089635,"min":7.866458,"med":23.110541,"p(50)":23.110541,"p(95)":54.84152049999996,"p(99)":88.09617749999998,"max":120.399417}},"http_req_waiting":{"type":"trend","contains":"time","values":{"max":120.224667,"avg":26.387985808799147,"min":7.779291,"med":23.019416,"p(50)":23.019416,"p(95)":54.72934559999996,"p(99)":87.95581326}},"http_req_blocked":{"type":"trend","contains":"time","values":{"max":0.96975,"avg":0.005644528283162502,"min":0.0005,"med":0.001042,"p(50)":0.001042,"p(95)":0.002375,"p(99)":0.007509739999999991}},"http_req_connecting":{"contains":"time","values":{"p(99)":0,"max":0.323459,"avg":0.001172897122064175,"min":0,"med":0,"p(50)":0,"p(95)":0},"type":"trend"},"data_received":{"type":"counter","contains":"data","values":{"count":44011857,"rate":8776881.137689736}},"data_sent":{"contains":"data","values":{"rate":251990.9551174057,"count":1263614},"type":"counter"},"iterations":{"contains":"default","values":{"count":3023,"rate":602.8491749220233},"type":"counter"},"http_req_duration{expected_response:true}":{"contains":"time","values":{"max":120.281458,"avg":26.419748478994347,"min":7.805542,"med":23.041,"p(50)":23.041,"p(95)":54.76722919999996,"p(99)":88.00283373999999},"thresholds":{"max>=0":{"ok":true}},"type":"trend"},"http_reqs":{"type":"counter","contains":"default","values":{"count":3023,"rate":602.8491749220233}},"http_req_failed":{"type":"rate","contains":"default","values":{"rate":0,"passes":0,"fails":3023}},"vus_max":{"values":{"value":16,"min":16,"max":16},"type":"gauge","contains":"default"},"checks":{"values":{"rate":1,"passes":6046,"fails":0},"type":"rate","contains":"default"},"vus":{"type":"gauge","contains":"default","values":{"value":16,"min":16,"max":16}},"http_req_receiving":{"type":"trend","contains":"time","values":{"p(95)":0.05807469999999999,"p(99)":0.11203276,"max":0.827417,"avg":0.027168083691697036,"min":0.007375,"med":0.0205,"p(50)":0.0205}},"http_req_duration":{"contains":"time","values":{"p(50)":23.041,"p(95)":54.76722919999996,"p(99)":88.00283373999999,"max":120.281458,"avg":26.419748478994347,"min":7.805542,"med":23.041},"type":"trend"},"http_req_tls_handshaking":{"type":"trend","contains":"time","values":{"med":0,"p(50)":0,"p(95)":0,"p(99)":0,"max":0,"avg":0,"min":0}}},"root_group":{"groups":[],"checks":[{"fails":0,"name":"status 200","path":"::status 200","id":"fad9fa412b86fcb03bee97c80dcd61f1","passes":3023},{"path":"::full page","id":"736a4affc4111c8285c374c0b4d25aed","passes":3023,"fails":0,"name":"full page"}],"name":"","path":"","id":"d41d8cd98f00b204e9800998ecf8427e"},"options":{"noColor":true,"summaryTrendStats":["avg","min","med","p(50)","p(95)","p(99)","max"],"summaryTimeUnit":""}} \ No newline at end of file diff --git a/evidence/bench/unit-of-work-aa/raw/read-5k-c4-r1.json b/evidence/bench/unit-of-work-aa/raw/read-5k-c4-r1.json new file mode 100644 index 00000000..f9dbb5e1 --- /dev/null +++ b/evidence/bench/unit-of-work-aa/raw/read-5k-c4-r1.json @@ -0,0 +1 @@ +{"options":{"summaryTrendStats":["avg","min","med","p(50)","p(95)","p(99)","max"],"summaryTimeUnit":"","noColor":true},"state":{"isStdErrTTY":false,"testRunDurationMs":5003.234544,"isStdOutTTY":false},"metrics":{"data_sent":{"type":"counter","contains":"data","values":{"count":1487244,"rate":297256.5021529001}},"http_req_waiting":{"type":"trend","contains":"time","values":{"max":47.142292,"avg":5.52966184710512,"min":3.569583,"med":5.294499999999999,"p(50)":5.294499999999999,"p(95)":6.43459815,"p(99)":8.00445143}},"http_req_sending":{"type":"trend","contains":"time","values":{"p(50)":0.002667,"p(95)":0.006125,"p(99)":0.01716069,"max":0.191708,"avg":0.003529186059584083,"min":0.001625,"med":0.002667}},"http_req_blocked":{"type":"trend","contains":"time","values":{"med":0.000875,"p(50)":0.000875,"p(95)":0.00175,"p(99)":0.00375,"max":0.691958,"avg":0.0017067211916807312,"min":0.0005}},"http_req_tls_handshaking":{"type":"trend","contains":"time","values":{"avg":0,"min":0,"med":0,"p(50)":0,"p(95)":0,"p(99)":0,"max":0}},"http_req_duration{expected_response:true}":{"type":"trend","contains":"time","values":{"avg":5.5551518057897535,"min":3.591375,"med":5.31875,"p(50)":5.31875,"p(95)":6.47629555,"p(99)":8.04724588,"max":47.174583},"thresholds":{"max>=0":{"ok":true}}},"http_req_duration":{"type":"trend","contains":"time","values":{"p(95)":6.47629555,"p(99)":8.04724588,"max":47.174583,"avg":5.5551518057897535,"min":3.591375,"med":5.31875,"p(50)":5.31875}},"vus_max":{"contains":"default","values":{"value":4,"min":4,"max":4},"type":"gauge"},"http_reqs":{"type":"counter","contains":"default","values":{"count":3558,"rate":711.1399573035887}},"vus":{"type":"gauge","contains":"default","values":{"value":4,"min":4,"max":4}},"http_req_connecting":{"contains":"time","values":{"p(99)":0,"max":0.148709,"avg":0.00013642973580663294,"min":0,"med":0,"p(50)":0,"p(95)":0},"type":"trend"},"http_req_receiving":{"type":"trend","contains":"time","values":{"avg":0.021960772625070294,"min":0.008708,"med":0.018125,"p(50)":0.018125,"p(95)":0.04152504999999997,"p(99)":0.08883999999999997,"max":0.253625}},"http_req_failed":{"type":"rate","contains":"default","values":{"rate":0,"passes":0,"fails":3558}},"checks":{"type":"rate","contains":"default","values":{"rate":1,"passes":7116,"fails":0}},"data_received":{"type":"counter","contains":"data","values":{"count":51800922,"rate":10353486.638382949}},"iteration_duration":{"values":{"p(99)":8.12663325,"max":47.25275,"avg":5.619875662169743,"min":3.641292,"med":5.377583,"p(50)":5.377583,"p(95)":6.563735799999999},"type":"trend","contains":"time"},"iterations":{"type":"counter","contains":"default","values":{"count":3558,"rate":711.1399573035887}}},"root_group":{"name":"","path":"","id":"d41d8cd98f00b204e9800998ecf8427e","groups":[],"checks":[{"id":"fad9fa412b86fcb03bee97c80dcd61f1","passes":3558,"fails":0,"name":"status 200","path":"::status 200"},{"passes":3558,"fails":0,"name":"full page","path":"::full page","id":"736a4affc4111c8285c374c0b4d25aed"}]}} \ No newline at end of file diff --git a/evidence/bench/unit-of-work-aa/raw/write-10k-c1-r1.json b/evidence/bench/unit-of-work-aa/raw/write-10k-c1-r1.json new file mode 100644 index 00000000..07be2ca9 --- /dev/null +++ b/evidence/bench/unit-of-work-aa/raw/write-10k-c1-r1.json @@ -0,0 +1 @@ +{"metrics":{"http_reqs":{"type":"counter","contains":"default","values":{"count":1000,"rate":433.00895844180155}},"http_req_sending":{"type":"trend","contains":"time","values":{"med":0.0040625,"p(50)":0.0040625,"p(95)":0.011920199999999995,"p(99)":0.023254589999999995,"max":0.455875,"avg":0.005743883999999999,"min":0.00225}},"http_req_waiting":{"type":"trend","contains":"time","values":{"p(99)":5.3019307399999995,"max":15.476708,"avg":2.2201656080000007,"min":1.780708,"med":2.0443119999999997,"p(50)":2.0443119999999997,"p(95)":3.1018523999999994}},"iterations":{"type":"counter","contains":"default","values":{"count":1000,"rate":433.00895844180155}},"checks":{"type":"rate","contains":"default","values":{"rate":1,"passes":1000,"fails":0}},"http_req_blocked":{"values":{"p(95)":0.002416,"p(99)":0.004516659999999985,"max":0.473958,"avg":0.0019196249999999927,"min":0.000584,"med":0.001083,"p(50)":0.001083},"type":"trend","contains":"time"},"vus_max":{"type":"gauge","contains":"default","values":{"value":1,"min":1,"max":1}},"iteration_duration":{"type":"trend","contains":"time","values":{"p(50)":2.12425,"p(95)":3.2528919499999995,"p(99)":5.5812415799999995,"max":15.692167,"avg":2.3058623410000023,"min":1.833125,"med":2.12425}},"http_req_connecting":{"type":"trend","contains":"time","values":{"med":0,"p(50)":0,"p(95)":0,"p(99)":0,"max":0.112209,"avg":0.00011220900000000001,"min":0}},"vus":{"type":"gauge","contains":"default","values":{"value":1,"min":1,"max":1}},"data_sent":{"type":"counter","contains":"data","values":{"count":376000,"rate":162811.3683741174}},"http_req_duration{expected_response:true}":{"type":"trend","contains":"time","values":{"avg":2.243771140999998,"min":1.794375,"med":2.0628745,"p(50)":2.0628745,"p(95)":3.1475441,"p(99)":5.442005829999999,"max":15.536875},"thresholds":{"max>=0":{"ok":true}}},"http_req_failed":{"type":"rate","contains":"default","values":{"passes":0,"fails":1000,"rate":0}},"data_received":{"type":"counter","contains":"data","values":{"count":490000,"rate":212174.38963648275}},"http_req_tls_handshaking":{"type":"trend","contains":"time","values":{"p(50)":0,"p(95)":0,"p(99)":0,"max":0,"avg":0,"min":0,"med":0}},"http_req_duration":{"values":{"p(95)":3.1475441,"p(99)":5.442005829999999,"max":15.536875,"avg":2.243771140999998,"min":1.794375,"med":2.0628745,"p(50)":2.0628745},"type":"trend","contains":"time"},"http_req_receiving":{"type":"trend","contains":"time","values":{"med":0.014375,"p(50)":0.014375,"p(95)":0.037335099999999996,"p(99)":0.06266208999999996,"max":0.161583,"avg":0.017861648999999973,"min":0.009583}}},"root_group":{"id":"d41d8cd98f00b204e9800998ecf8427e","groups":[],"checks":[{"passes":1000,"fails":0,"name":"message 201","path":"::message 201","id":"6445aff337e1ade0bc10402fbac79882"}],"name":"","path":""},"options":{"summaryTrendStats":["avg","min","med","p(50)","p(95)","p(99)","max"],"summaryTimeUnit":"","noColor":true},"state":{"isStdOutTTY":false,"isStdErrTTY":false,"testRunDurationMs":2309.421042}} \ No newline at end of file diff --git a/evidence/bench/unit-of-work-aa/raw/write-10k-c16-r1.json b/evidence/bench/unit-of-work-aa/raw/write-10k-c16-r1.json new file mode 100644 index 00000000..48116f29 --- /dev/null +++ b/evidence/bench/unit-of-work-aa/raw/write-10k-c16-r1.json @@ -0,0 +1 @@ +{"options":{"noColor":true,"summaryTrendStats":["avg","min","med","p(50)","p(95)","p(99)","max"],"summaryTimeUnit":""},"state":{"isStdOutTTY":false,"isStdErrTTY":false,"testRunDurationMs":1641.939751},"metrics":{"http_req_tls_handshaking":{"type":"trend","contains":"time","values":{"p(50)":0,"p(95)":0,"p(99)":0,"max":0,"avg":0,"min":0,"med":0}},"http_req_connecting":{"type":"trend","contains":"time","values":{"p(50)":0,"p(95)":0,"p(99)":0.0777412499999999,"max":0.71725,"avg":0.0036357499999999992,"min":0,"med":0}},"iterations":{"type":"counter","contains":"default","values":{"rate":609.0357453073198,"count":1000}},"http_req_waiting":{"type":"trend","contains":"time","values":{"avg":26.056186335000017,"min":11.624417,"med":24.996354500000002,"p(50)":24.996354500000002,"p(95)":37.32970655,"p(99)":68.02312758,"max":78.769333}},"data_sent":{"type":"counter","contains":"data","values":{"rate":228997.44023555223,"count":376000}},"data_received":{"type":"counter","contains":"data","values":{"count":490000,"rate":298427.5152005867}},"iteration_duration":{"values":{"avg":26.15557987400002,"min":11.70125,"med":25.074292,"p(50)":25.074292,"p(95)":37.47407325,"p(99)":68.08472457999999,"max":78.8375},"type":"trend","contains":"time"},"http_req_duration{expected_response:true}":{"type":"trend","contains":"time","values":{"avg":26.08076150099999,"min":11.64675,"med":25.024167,"p(50)":25.024167,"p(95)":37.351916349999996,"p(99)":68.03714858000001,"max":78.784208},"thresholds":{"max>=0":{"ok":true}}},"http_req_failed":{"type":"rate","contains":"default","values":{"rate":0,"passes":0,"fails":1000}},"http_reqs":{"values":{"count":1000,"rate":609.0357453073198},"type":"counter","contains":"default"},"http_req_receiving":{"type":"trend","contains":"time","values":{"max":0.109958,"avg":0.01590642599999998,"min":0.00475,"med":0.0137915,"p(50)":0.0137915,"p(95)":0.030137499999999987,"p(99)":0.04887792}},"http_req_sending":{"values":{"avg":0.008668740000000003,"min":0.002375,"med":0.003875,"p(50)":0.003875,"p(95)":0.009877049999999998,"p(99)":0.1565754999999997,"max":0.739583},"type":"trend","contains":"time"},"vus":{"type":"gauge","contains":"default","values":{"value":16,"min":16,"max":16}},"http_req_duration":{"contains":"time","values":{"p(99)":68.03714858000001,"max":78.784208,"avg":26.08076150099999,"min":11.64675,"med":25.024167,"p(50)":25.024167,"p(95)":37.351916349999996},"type":"trend"},"vus_max":{"type":"gauge","contains":"default","values":{"value":16,"min":16,"max":16}},"http_req_blocked":{"type":"trend","contains":"time","values":{"avg":0.013573354000000048,"min":0.000458,"med":0.000959,"p(50)":0.000959,"p(95)":0.002,"p(99)":0.6113774199999998,"max":1.501709}},"checks":{"type":"rate","contains":"default","values":{"rate":1,"passes":1000,"fails":0}}},"root_group":{"name":"","path":"","id":"d41d8cd98f00b204e9800998ecf8427e","groups":[],"checks":[{"name":"message 201","path":"::message 201","id":"6445aff337e1ade0bc10402fbac79882","passes":1000,"fails":0}]}} \ No newline at end of file diff --git a/evidence/bench/unit-of-work-aa/raw/write-10k-c4-r1.json b/evidence/bench/unit-of-work-aa/raw/write-10k-c4-r1.json new file mode 100644 index 00000000..030461a2 --- /dev/null +++ b/evidence/bench/unit-of-work-aa/raw/write-10k-c4-r1.json @@ -0,0 +1 @@ +{"root_group":{"name":"","path":"","id":"d41d8cd98f00b204e9800998ecf8427e","groups":[],"checks":[{"fails":0,"name":"message 201","path":"::message 201","id":"6445aff337e1ade0bc10402fbac79882","passes":1000}]},"options":{"summaryTrendStats":["avg","min","med","p(50)","p(95)","p(99)","max"],"summaryTimeUnit":"","noColor":true},"state":{"isStdOutTTY":false,"isStdErrTTY":false,"testRunDurationMs":1619.940084},"metrics":{"vus":{"type":"gauge","contains":"default","values":{"value":4,"min":4,"max":4}},"http_reqs":{"contains":"default","values":{"count":1000,"rate":617.3067818229257},"type":"counter"},"http_req_receiving":{"type":"trend","contains":"time","values":{"avg":0.015791837999999985,"min":0.004833,"med":0.012833,"p(50)":0.012833,"p(95)":0.033309749999999985,"p(99)":0.05079532999999999,"max":0.246583}},"vus_max":{"type":"gauge","contains":"default","values":{"value":4,"min":4,"max":4}},"http_req_blocked":{"type":"trend","contains":"time","values":{"p(95)":0.0021690499999999983,"p(99)":0.004086069999999998,"max":1.045334,"avg":0.005220708000000031,"min":0.0005,"med":0.001,"p(50)":0.001}},"http_req_duration{expected_response:true}":{"type":"trend","contains":"time","values":{"max":56.553375,"avg":6.405489956000002,"min":3.001041,"med":5.936813,"p(50)":5.936813,"p(95)":8.140912499999999,"p(99)":11.29438774999999},"thresholds":{"max>=0":{"ok":true}}},"data_sent":{"contains":"data","values":{"count":376000,"rate":232107.3499654201},"type":"counter"},"iterations":{"type":"counter","contains":"default","values":{"rate":617.3067818229257,"count":1000}},"http_req_tls_handshaking":{"type":"trend","contains":"time","values":{"p(95)":0,"p(99)":0,"max":0,"avg":0,"min":0,"med":0,"p(50)":0}},"http_req_waiting":{"contains":"time","values":{"avg":6.384549774999999,"min":2.987291,"med":5.919207999999999,"p(50)":5.919207999999999,"p(95)":8.063758349999999,"p(99)":11.255386579999989,"max":56.530417},"type":"trend"},"checks":{"contains":"default","values":{"rate":1,"passes":1000,"fails":0},"type":"rate"},"data_received":{"type":"counter","contains":"data","values":{"count":490000,"rate":302480.32309323363}},"http_req_duration":{"type":"trend","contains":"time","values":{"max":56.553375,"avg":6.405489956000002,"min":3.001041,"med":5.936813,"p(50)":5.936813,"p(95)":8.140912499999999,"p(99)":11.29438774999999}},"http_req_connecting":{"type":"trend","contains":"time","values":{"avg":0.000983918,"min":0,"med":0,"p(50)":0,"p(95)":0,"p(99)":0,"max":0.25525}},"http_req_sending":{"type":"trend","contains":"time","values":{"min":0.001916,"med":0.00375,"p(50)":0.00375,"p(95)":0.010711049999999998,"p(99)":0.02201041999999999,"max":0.190375,"avg":0.005148342999999997}},"iteration_duration":{"type":"trend","contains":"time","values":{"min":3.041292,"med":5.990083,"p(50)":5.990083,"p(95)":8.2630048,"p(99)":11.43236907999999,"max":56.638166,"avg":6.469330499999993}},"http_req_failed":{"values":{"rate":0,"passes":0,"fails":1000},"type":"rate","contains":"default"}}} \ No newline at end of file diff --git a/evidence/bench/unit-of-work-aa/raw/write-1k-c1-r1.json b/evidence/bench/unit-of-work-aa/raw/write-1k-c1-r1.json new file mode 100644 index 00000000..52f1fa4f --- /dev/null +++ b/evidence/bench/unit-of-work-aa/raw/write-1k-c1-r1.json @@ -0,0 +1 @@ +{"root_group":{"name":"","path":"","id":"d41d8cd98f00b204e9800998ecf8427e","groups":[],"checks":[{"passes":1000,"fails":0,"name":"message 201","path":"::message 201","id":"6445aff337e1ade0bc10402fbac79882"}]},"options":{"summaryTrendStats":["avg","min","med","p(50)","p(95)","p(99)","max"],"summaryTimeUnit":"","noColor":true},"state":{"isStdOutTTY":false,"isStdErrTTY":false,"testRunDurationMs":2163.683751},"metrics":{"vus":{"type":"gauge","contains":"default","values":{"max":1,"value":1,"min":1}},"checks":{"type":"rate","contains":"default","values":{"rate":1,"passes":1000,"fails":0}},"data_sent":{"values":{"count":376000,"rate":173777.70657390307},"type":"counter","contains":"data"},"iterations":{"type":"counter","contains":"default","values":{"count":1000,"rate":462.17475152633796}},"http_req_duration{expected_response:true}":{"type":"trend","contains":"time","values":{"min":1.705,"med":2.0068539999999997,"p(50)":2.0068539999999997,"p(95)":2.6988586499999996,"p(99)":3.51352959,"max":5.30425,"avg":2.101649129999998},"thresholds":{"max>=0":{"ok":true}}},"http_reqs":{"type":"counter","contains":"default","values":{"count":1000,"rate":462.17475152633796}},"http_req_failed":{"type":"rate","contains":"default","values":{"rate":0,"passes":0,"fails":1000}},"data_received":{"type":"counter","contains":"data","values":{"count":490000,"rate":226465.6282479056}},"http_req_tls_handshaking":{"type":"trend","contains":"time","values":{"min":0,"med":0,"p(50)":0,"p(95)":0,"p(99)":0,"max":0,"avg":0}},"http_req_waiting":{"type":"trend","contains":"time","values":{"avg":2.0797107400000012,"min":1.690209,"med":1.9869585,"p(50)":1.9869585,"p(95)":2.6669768,"p(99)":3.46678375,"max":5.193375}},"vus_max":{"values":{"value":1,"min":1,"max":1},"type":"gauge","contains":"default"},"http_req_duration":{"type":"trend","contains":"time","values":{"med":2.0068539999999997,"p(50)":2.0068539999999997,"p(95)":2.6988586499999996,"p(99)":3.51352959,"max":5.30425,"avg":2.101649129999998,"min":1.705}},"iteration_duration":{"type":"trend","contains":"time","values":{"p(95)":2.7850895499999995,"p(99)":3.5957780899999996,"max":5.510958,"avg":2.160288035000002,"min":1.751625,"med":2.054042,"p(50)":2.054042}},"http_req_blocked":{"type":"trend","contains":"time","values":{"p(50)":0.001,"p(95)":0.002044049999999998,"p(99)":0.003,"max":0.429042,"avg":0.0015876289999999917,"min":0.000542,"med":0.001}},"http_req_sending":{"type":"trend","contains":"time","values":{"p(50)":0.003875,"p(95)":0.009462199999999995,"p(99)":0.020298239999999995,"max":0.105958,"avg":0.004893426999999993,"min":0.002084,"med":0.003875}},"http_req_connecting":{"type":"trend","contains":"time","values":{"p(99)":0,"max":0.099833,"avg":0.000099833,"min":0,"med":0,"p(50)":0,"p(95)":0}},"http_req_receiving":{"type":"trend","contains":"time","values":{"p(99)":0.04704184,"max":0.113375,"avg":0.017044963,"min":0.009333,"med":0.014437499999999999,"p(50)":0.014437499999999999,"p(95)":0.031713099999999994}}}} \ No newline at end of file diff --git a/evidence/bench/unit-of-work-aa/raw/write-1k-c16-r1.json b/evidence/bench/unit-of-work-aa/raw/write-1k-c16-r1.json new file mode 100644 index 00000000..60eabb01 --- /dev/null +++ b/evidence/bench/unit-of-work-aa/raw/write-1k-c16-r1.json @@ -0,0 +1 @@ +{"root_group":{"name":"","path":"","id":"d41d8cd98f00b204e9800998ecf8427e","groups":[],"checks":[{"name":"message 201","path":"::message 201","id":"6445aff337e1ade0bc10402fbac79882","passes":1000,"fails":0}]},"options":{"summaryTrendStats":["avg","min","med","p(50)","p(95)","p(99)","max"],"summaryTimeUnit":"","noColor":true},"state":{"isStdErrTTY":false,"testRunDurationMs":1640.780209,"isStdOutTTY":false},"metrics":{"data_received":{"type":"counter","contains":"data","values":{"count":490000,"rate":298638.41440325417}},"checks":{"type":"rate","contains":"default","values":{"rate":1,"passes":1000,"fails":0}},"http_req_receiving":{"contains":"time","values":{"max":0.142792,"avg":0.016537924999999988,"min":0.004708,"med":0.0141875,"p(50)":0.0141875,"p(95)":0.03200205,"p(99)":0.05542558999999999},"type":"trend"},"iteration_duration":{"type":"trend","contains":"time","values":{"p(95)":40.06294794999998,"p(99)":69.202682,"max":78.869084,"avg":26.132035742,"min":11.154875,"med":25.0128125,"p(50)":25.0128125}},"http_req_waiting":{"type":"trend","contains":"time","values":{"avg":26.03107947000002,"min":11.043875,"med":24.907958999999998,"p(50)":24.907958999999998,"p(95)":40.00222464999998,"p(99)":69.10328408,"max":78.803375}},"http_req_duration{expected_response:true}":{"values":{"avg":26.05335018599999,"min":11.061334,"med":24.9315625,"p(50)":24.9315625,"p(95)":40.01309999999998,"p(99)":69.13171032999999,"max":78.820375},"thresholds":{"max>=0":{"ok":true}},"type":"trend","contains":"time"},"data_sent":{"type":"counter","contains":"data","values":{"count":376000,"rate":229159.2730931093}},"http_req_blocked":{"type":"trend","contains":"time","values":{"p(95)":0.002043099999999998,"p(99)":0.6220609199999997,"max":1.177708,"avg":0.01313667800000005,"min":0.0005,"med":0.000958,"p(50)":0.000958}},"http_req_sending":{"type":"trend","contains":"time","values":{"p(99)":0.04519907999999997,"max":0.123667,"avg":0.005732790999999992,"min":0.002083,"med":0.003958,"p(50)":0.003958,"p(95)":0.011083}},"http_req_failed":{"type":"rate","contains":"default","values":{"rate":0,"passes":0,"fails":1000}},"vus_max":{"type":"gauge","contains":"default","values":{"max":16,"value":16,"min":16}},"http_req_duration":{"type":"trend","contains":"time","values":{"p(99)":69.13171032999999,"max":78.820375,"avg":26.05335018599999,"min":11.061334,"med":24.9315625,"p(50)":24.9315625,"p(95)":40.01309999999998}},"http_reqs":{"type":"counter","contains":"default","values":{"rate":609.4661518433759,"count":1000}},"vus":{"values":{"value":16,"min":16,"max":16},"type":"gauge","contains":"default"},"http_req_connecting":{"values":{"med":0,"p(50)":0,"p(95)":0,"p(99)":0.12758323999999996,"max":0.255375,"avg":0.0023912500000000006,"min":0},"type":"trend","contains":"time"},"http_req_tls_handshaking":{"type":"trend","contains":"time","values":{"p(99)":0,"max":0,"avg":0,"min":0,"med":0,"p(50)":0,"p(95)":0}},"iterations":{"contains":"default","values":{"count":1000,"rate":609.4661518433759},"type":"counter"}}} \ No newline at end of file diff --git a/evidence/bench/unit-of-work-aa/raw/write-1k-c4-r1.json b/evidence/bench/unit-of-work-aa/raw/write-1k-c4-r1.json new file mode 100644 index 00000000..18df263a --- /dev/null +++ b/evidence/bench/unit-of-work-aa/raw/write-1k-c4-r1.json @@ -0,0 +1 @@ +{"root_group":{"name":"","path":"","id":"d41d8cd98f00b204e9800998ecf8427e","groups":[],"checks":[{"path":"::message 201","id":"6445aff337e1ade0bc10402fbac79882","passes":1000,"fails":0,"name":"message 201"}]},"options":{"summaryTrendStats":["avg","min","med","p(50)","p(95)","p(99)","max"],"summaryTimeUnit":"","noColor":true},"state":{"isStdOutTTY":false,"isStdErrTTY":false,"testRunDurationMs":1672.543709},"metrics":{"http_req_duration":{"type":"trend","contains":"time","values":{"p(50)":5.9296665,"p(95)":9.039264249999997,"p(99)":20.011489579999996,"max":59.028666,"avg":6.612037893000003,"min":4.708042,"med":5.9296665}},"http_req_failed":{"type":"rate","contains":"default","values":{"fails":1000,"rate":0,"passes":0}},"http_req_duration{expected_response:true}":{"type":"trend","contains":"time","values":{"avg":6.612037893000003,"min":4.708042,"med":5.9296665,"p(50)":5.9296665,"p(95)":9.039264249999997,"p(99)":20.011489579999996,"max":59.028666},"thresholds":{"max>=0":{"ok":true}}},"data_sent":{"type":"counter","contains":"data","values":{"count":376000,"rate":224807.27886316783}},"vus":{"type":"gauge","contains":"default","values":{"min":4,"max":4,"value":4}},"http_req_tls_handshaking":{"values":{"max":0,"avg":0,"min":0,"med":0,"p(50)":0,"p(95)":0,"p(99)":0},"type":"trend","contains":"time"},"http_reqs":{"type":"counter","contains":"default","values":{"count":1000,"rate":597.8916991041698}},"iteration_duration":{"values":{"min":4.757791,"med":5.984916500000001,"p(50)":5.984916500000001,"p(95)":9.186197899999994,"p(99)":20.17459816,"max":59.110667,"avg":6.680733336999996},"type":"trend","contains":"time"},"iterations":{"type":"counter","contains":"default","values":{"count":1000,"rate":597.8916991041698}},"checks":{"type":"rate","contains":"default","values":{"fails":0,"rate":1,"passes":1000}},"data_received":{"contains":"data","values":{"count":490000,"rate":292966.9325610432},"type":"counter"},"http_req_sending":{"values":{"p(95)":0.013849699999999986,"p(99)":0.026933249999999985,"max":0.178125,"avg":0.005683878999999994,"min":0.002083,"med":0.003959,"p(50)":0.003959},"type":"trend","contains":"time"},"vus_max":{"contains":"default","values":{"value":4,"min":4,"max":4},"type":"gauge"},"http_req_waiting":{"type":"trend","contains":"time","values":{"p(99)":19.933702169999997,"max":59.005083,"avg":6.588747367000007,"min":4.691125,"med":5.9102705,"p(50)":5.9102705,"p(95)":8.996960749999996}},"http_req_blocked":{"values":{"max":0.612292,"avg":0.003701035999999989,"min":0.000583,"med":0.000959,"p(50)":0.000959,"p(95)":0.0025440499999999982,"p(99)":0.006561159999999983},"type":"trend","contains":"time"},"http_req_connecting":{"type":"trend","contains":"time","values":{"p(99)":0,"max":0.154291,"avg":0.0005304580000000001,"min":0,"med":0,"p(50)":0,"p(95)":0}},"http_req_receiving":{"type":"trend","contains":"time","values":{"avg":0.017606646999999996,"min":0.005208,"med":0.01275,"p(50)":0.01275,"p(95)":0.0412941,"p(99)":0.09343823999999998,"max":0.25175}}}} \ No newline at end of file diff --git a/evidence/bench/unit-of-work-aa/raw/write-5k-c1-r1.json b/evidence/bench/unit-of-work-aa/raw/write-5k-c1-r1.json new file mode 100644 index 00000000..57a96d40 --- /dev/null +++ b/evidence/bench/unit-of-work-aa/raw/write-5k-c1-r1.json @@ -0,0 +1 @@ +{"root_group":{"name":"","path":"","id":"d41d8cd98f00b204e9800998ecf8427e","groups":[],"checks":[{"path":"::message 201","id":"6445aff337e1ade0bc10402fbac79882","passes":1000,"fails":0,"name":"message 201"}]},"options":{"summaryTrendStats":["avg","min","med","p(50)","p(95)","p(99)","max"],"summaryTimeUnit":"","noColor":true},"state":{"isStdOutTTY":false,"isStdErrTTY":false,"testRunDurationMs":2327.550376},"metrics":{"http_req_connecting":{"values":{"p(99)":0,"max":0.109417,"avg":0.000109417,"min":0,"med":0,"p(50)":0,"p(95)":0},"type":"trend","contains":"time"},"http_req_sending":{"values":{"p(95)":0.013216349999999991,"p(99)":0.024268749999999985,"max":0.209459,"avg":0.005603398000000001,"min":0.002292,"med":0.003958,"p(50)":0.003958},"type":"trend","contains":"time"},"checks":{"type":"rate","contains":"default","values":{"rate":1,"passes":1000,"fails":0}},"vus":{"type":"gauge","contains":"default","values":{"value":1,"min":1,"max":1}},"iteration_duration":{"type":"trend","contains":"time","values":{"avg":2.3239004549999986,"min":1.764875,"med":2.11125,"p(50)":2.11125,"p(95)":3.3807003,"p(99)":5.19731083,"max":19.04}},"http_req_duration":{"contains":"time","values":{"max":18.280416,"avg":2.259913190999999,"min":1.728292,"med":2.0561455,"p(50)":2.0561455,"p(95)":3.27103335,"p(99)":4.831108829999998},"type":"trend"},"http_req_waiting":{"type":"trend","contains":"time","values":{"avg":2.235650339000002,"min":1.714916,"med":2.0361875,"p(50)":2.0361875,"p(95)":3.223722599999999,"p(99)":4.774236249999999,"max":18.209875}},"http_req_receiving":{"type":"trend","contains":"time","values":{"max":0.218208,"avg":0.01865945399999998,"min":0.009458,"med":0.0145205,"p(50)":0.0145205,"p(95)":0.039417,"p(99)":0.07346241999999996}},"data_received":{"type":"counter","contains":"data","values":{"count":490000,"rate":210521.75929359993}},"http_req_tls_handshaking":{"contains":"time","values":{"min":0,"med":0,"p(50)":0,"p(95)":0,"p(99)":0,"max":0,"avg":0},"type":"trend"},"http_req_failed":{"type":"rate","contains":"default","values":{"rate":0,"passes":0,"fails":1000}},"vus_max":{"type":"gauge","contains":"default","values":{"min":1,"max":1,"value":1}},"http_req_duration{expected_response:true}":{"type":"trend","contains":"time","values":{"max":18.280416,"avg":2.259913190999999,"min":1.728292,"med":2.0561455,"p(50)":2.0561455,"p(95)":3.27103335,"p(99)":4.831108829999998},"thresholds":{"max>=0":{"ok":true}}},"http_reqs":{"type":"counter","contains":"default","values":{"rate":429.6362434563264,"count":1000}},"data_sent":{"type":"counter","contains":"data","values":{"rate":161543.22753957871,"count":376000}},"iterations":{"type":"counter","contains":"default","values":{"count":1000,"rate":429.6362434563264}},"http_req_blocked":{"type":"trend","contains":"time","values":{"max":0.466042,"avg":0.0018335679999999929,"min":0.000625,"med":0.001125,"p(50)":0.001125,"p(95)":0.002377049999999998,"p(99)":0.004589249999999994}}}} \ No newline at end of file diff --git a/evidence/bench/unit-of-work-aa/raw/write-5k-c16-r1.json b/evidence/bench/unit-of-work-aa/raw/write-5k-c16-r1.json new file mode 100644 index 00000000..46ff050f --- /dev/null +++ b/evidence/bench/unit-of-work-aa/raw/write-5k-c16-r1.json @@ -0,0 +1 @@ +{"state":{"isStdOutTTY":false,"isStdErrTTY":false,"testRunDurationMs":1699.896126},"metrics":{"checks":{"type":"rate","contains":"default","values":{"rate":1,"passes":1000,"fails":0}},"vus_max":{"type":"gauge","contains":"default","values":{"value":16,"min":16,"max":16}},"http_req_tls_handshaking":{"type":"trend","contains":"time","values":{"p(95)":0,"p(99)":0,"max":0,"avg":0,"min":0,"med":0,"p(50)":0}},"http_req_duration{expected_response:true}":{"type":"trend","contains":"time","values":{"avg":27.017318861000003,"min":12.295583,"med":25.5844795,"p(50)":25.5844795,"p(95)":40.35386454999999,"p(99)":73.69158466999998,"max":90.147},"thresholds":{"max>=0":{"ok":true}}},"http_req_duration":{"type":"trend","contains":"time","values":{"p(95)":40.35386454999999,"p(99)":73.69158466999998,"max":90.147,"avg":27.017318861000003,"min":12.295583,"med":25.5844795,"p(50)":25.5844795}},"vus":{"type":"gauge","contains":"default","values":{"value":16,"min":16,"max":16}},"http_req_receiving":{"contains":"time","values":{"med":0.014417,"p(50)":0.014417,"p(95)":0.036181549999999986,"p(99)":0.06034383999999999,"max":0.096625,"avg":0.016866206999999998,"min":0.004667},"type":"trend"},"data_sent":{"type":"counter","contains":"data","values":{"rate":221189.98581681572,"count":376000}},"http_req_failed":{"type":"rate","contains":"default","values":{"rate":0,"passes":0,"fails":1000}},"http_req_waiting":{"type":"trend","contains":"time","values":{"avg":26.994032220000012,"min":12.28325,"med":25.568834000000003,"p(50)":25.568834000000003,"p(95)":40.336578499999995,"p(99)":73.67144041999998,"max":90.0965}},"iteration_duration":{"type":"trend","contains":"time","values":{"p(50)":25.6364585,"p(95)":40.40026729999999,"p(99)":73.74738834,"max":90.233458,"avg":27.095294938000006,"min":12.344084,"med":25.6364585}},"http_req_sending":{"values":{"p(95)":0.011679499999999989,"p(99)":0.055858919999999604,"max":0.253875,"avg":0.006420433999999992,"min":0.001875,"med":0.003875,"p(50)":0.003875},"type":"trend","contains":"time"},"iterations":{"type":"counter","contains":"default","values":{"count":1000,"rate":588.2712388745099}},"http_reqs":{"type":"counter","contains":"default","values":{"count":1000,"rate":588.2712388745099}},"data_received":{"type":"counter","contains":"data","values":{"count":490000,"rate":288252.90704850986}},"http_req_blocked":{"contains":"time","values":{"avg":0.013805569000000044,"min":0.000458,"med":0.000959,"p(50)":0.000959,"p(95)":0.002377099999999998,"p(99)":0.6511208399999993,"max":1.073667},"type":"trend"},"http_req_connecting":{"type":"trend","contains":"time","values":{"p(50)":0,"p(95)":0,"p(99)":0.1504150799999998,"max":0.428084,"avg":0.003984211,"min":0,"med":0}}},"root_group":{"path":"","id":"d41d8cd98f00b204e9800998ecf8427e","groups":[],"checks":[{"name":"message 201","path":"::message 201","id":"6445aff337e1ade0bc10402fbac79882","passes":1000,"fails":0}],"name":""},"options":{"summaryTimeUnit":"","noColor":true,"summaryTrendStats":["avg","min","med","p(50)","p(95)","p(99)","max"]}} \ No newline at end of file diff --git a/evidence/bench/unit-of-work-aa/raw/write-5k-c4-r1.json b/evidence/bench/unit-of-work-aa/raw/write-5k-c4-r1.json new file mode 100644 index 00000000..fbe36432 --- /dev/null +++ b/evidence/bench/unit-of-work-aa/raw/write-5k-c4-r1.json @@ -0,0 +1 @@ +{"options":{"summaryTrendStats":["avg","min","med","p(50)","p(95)","p(99)","max"],"summaryTimeUnit":"","noColor":true},"state":{"isStdOutTTY":false,"isStdErrTTY":false,"testRunDurationMs":1494.866334},"metrics":{"http_req_blocked":{"values":{"avg":0.003952613999999986,"min":0.000541,"med":0.000875,"p(50)":0.000875,"p(95)":0.001875,"p(99)":0.003880409999999995,"max":0.781375},"type":"trend","contains":"time"},"http_req_receiving":{"type":"trend","contains":"time","values":{"avg":0.014153164999999987,"min":0.005333,"med":0.0118545,"p(50)":0.0118545,"p(95)":0.029768749999999983,"p(99)":0.04425624999999999,"max":0.1545}},"iteration_duration":{"type":"trend","contains":"time","values":{"med":5.846854,"p(50)":5.846854,"p(95)":7.029823549999999,"p(99)":8.48984851,"max":10.031167,"avg":5.9711622539999984,"min":4.399042}},"http_req_sending":{"type":"trend","contains":"time","values":{"med":0.003333,"p(50)":0.003333,"p(95)":0.008462199999999996,"p(99)":0.027675829999999957,"max":0.134125,"avg":0.0044882939999999994,"min":0.002}},"data_sent":{"type":"counter","contains":"data","values":{"count":376000,"rate":251527.50546859263}},"http_reqs":{"type":"counter","contains":"default","values":{"count":1000,"rate":668.9561315654059}},"checks":{"contains":"default","values":{"passes":1000,"fails":0,"rate":1},"type":"rate"},"http_req_duration":{"type":"trend","contains":"time","values":{"med":5.796041499999999,"p(50)":5.796041499999999,"p(95)":6.9658181,"p(99)":8.44333217,"max":9.192083,"avg":5.913922664000003,"min":4.358916}},"http_req_connecting":{"type":"trend","contains":"time","values":{"p(95)":0,"p(99)":0,"max":0.199125,"avg":0.000645541,"min":0,"med":0,"p(50)":0}},"http_req_waiting":{"type":"trend","contains":"time","values":{"p(95)":6.940322899999999,"p(99)":8.42800324,"max":9.14775,"avg":5.895281205000001,"min":4.342583,"med":5.778063,"p(50)":5.778063}},"data_received":{"type":"counter","contains":"data","values":{"count":490000,"rate":327788.5044670489}},"http_req_tls_handshaking":{"type":"trend","contains":"time","values":{"avg":0,"min":0,"med":0,"p(50)":0,"p(95)":0,"p(99)":0,"max":0}},"http_req_failed":{"values":{"rate":0,"passes":0,"fails":1000},"type":"rate","contains":"default"},"iterations":{"values":{"count":1000,"rate":668.9561315654059},"type":"counter","contains":"default"},"vus_max":{"contains":"default","values":{"value":4,"min":4,"max":4},"type":"gauge"},"http_req_duration{expected_response:true}":{"type":"trend","contains":"time","values":{"max":9.192083,"avg":5.913922664000003,"min":4.358916,"med":5.796041499999999,"p(50)":5.796041499999999,"p(95)":6.9658181,"p(99)":8.44333217},"thresholds":{"max>=0":{"ok":true}}},"vus":{"values":{"max":4,"value":4,"min":4},"type":"gauge","contains":"default"}},"root_group":{"name":"","path":"","id":"d41d8cd98f00b204e9800998ecf8427e","groups":[],"checks":[{"passes":1000,"fails":0,"name":"message 201","path":"::message 201","id":"6445aff337e1ade0bc10402fbac79882"}]}} \ No newline at end of file diff --git a/evidence/bench/unit-of-work-aa/runs.csv b/evidence/bench/unit-of-work-aa/runs.csv new file mode 100644 index 00000000..3e50fbf2 --- /dev/null +++ b/evidence/bench/unit-of-work-aa/runs.csv @@ -0,0 +1,19 @@ +run,scenario,size,concurrency,repeat,duration_s,requests_ok,requests_failed,rps,error_ratio,p50_ms,p95_ms,p99_ms,max_ms,app_cpu_cores,rss_start_mib,rss_end_mib,rss_max_mib,mem_cgroup_end_mib,store_messages_start,store_messages_end,generator_cpu_cores,flags,check_failed,db_cpu_cores,series,cell,attempt,config,replicas,replica_cpus,replica_memory,db_max_connections,step,step_kind,target_rps,sent,missing,dropped_iterations,slo_error_ratio,slo_pass,fail_reason,read_p95_ms,write_p95_ms,me_p95_ms,read_errors,write_errors,me_errors,short_pages,vus_max,generator_throttled_ratio,generator_mem_peak_mib,app_cpu_replica_max,app_cpu_second_max,app_throttled_ratio,app_throttled_ms,app_mem_peak_mib,app_us_per_request,db_throttled_ratio,db_mem_peak_mib,db_us_per_request,lb_cpu_cores,lb_throttled_ratio,cache_cpu_cores,vm_busy_cores,vm_cpu_pressure,db_commits_per_s,db_rollbacks_per_s,db_wal_mib_per_s,db_wal_fsyncs_per_s,db_sessions_new,db_conn_max,db_conn_replica_max,db_aas_cpu,db_aas_wal,db_aas_lock,db_aas_lwlock,db_aas_io,db_aas_other,db_idle_in_tx_mean,pool_busy_share,db_too_many_clients,lb_qtime_ms,lb_ctime_ms,lb_rtime_ms,lb_ttime_ms,lb_scur_max,lb_qcur_max,lb_retries,lb_redispatches,lb_econ,lb_eresp,lb_chkdown,lb_5xx,instances,instance_share_min,instance_share_max,host_swapouts,signs,error_codes,level +1,read,1000,1,1,5.0,2644,0,528.8,0.0,1.781,2.157,2.55,5.288,0.817,125.0,125.0,125.0,118.0,4500,4500,0.118,,0,0.138,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +2,read,1000,4,1,5.005,3523,0,704.0,0.0,5.332,6.673,8.571,48.643,1.005,125.0,125.0,125.0,114.0,4500,4500,0.151,,0,0.181,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +3,read,1000,16,1,5.049,3344,0,662.4,0.0,22.049,43.025,63.116,81.416,1.005,125.0,125.0,125.1,115.8,4500,4500,0.151,,0,0.181,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +4,write,1000,1,1,2.164,1000,0,462.2,0.0,2.007,2.699,3.514,5.304,0.775,125.0,125.0,125.0,115.9,4600,5600,0.102,,0,0.131,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +5,write,1000,4,1,1.673,1000,0,597.9,0.0,5.93,9.039,20.011,59.029,0.99,125.0,125.1,125.1,114.0,5700,6700,0.142,,0,0.209,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +6,write,1000,16,1,1.641,1000,0,609.5,0.0,24.932,40.013,69.132,78.82,1.008,125.1,125.3,125.3,114.5,6800,7800,0.142,,0,0.223,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +7,read,5000,1,1,5.0,2614,0,522.8,0.0,1.79,2.237,2.742,5.222,0.819,125.2,125.2,125.2,117.9,8500,8500,0.115,,0,0.138,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +8,read,5000,4,1,5.003,3558,0,711.1,0.0,5.319,6.476,8.047,47.175,1.004,125.2,125.2,125.2,116.4,8500,8500,0.149,,0,0.178,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +9,read,5000,16,1,5.015,3023,0,602.8,0.0,23.041,54.767,88.003,120.281,1.0,125.2,125.2,125.3,116.5,8500,8500,0.152,,0,0.18,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +10,write,5000,1,1,2.328,1000,0,429.6,0.0,2.056,3.271,4.831,18.28,0.765,125.2,125.2,125.2,114.4,8600,9600,0.102,,0,0.145,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +11,write,5000,4,1,1.495,1000,0,669.0,0.0,5.796,6.966,8.443,9.192,0.998,125.2,125.2,125.2,115.8,9700,10700,0.138,,0,0.187,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +12,write,5000,16,1,1.7,1000,0,588.3,0.0,25.584,40.354,73.692,90.147,1.008,125.4,125.4,125.5,117.7,10800,11800,0.147,,0,0.206,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +13,read,10000,1,1,5.002,2453,0,490.4,0.0,1.831,2.566,3.48,84.977,0.821,125.2,125.2,125.2,115.8,13500,13500,0.118,,0,0.137,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +14,read,10000,4,1,5.012,3479,0,694.2,0.0,5.339,7.035,9.825,45.539,1.004,125.2,125.2,125.2,115.6,13500,13500,0.152,,0,0.178,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +15,read,10000,16,1,5.02,3245,0,646.5,0.0,21.959,46.243,71.633,114.578,1.005,125.2,125.2,125.3,114.4,13500,13500,0.154,,0,0.182,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +16,write,10000,1,1,2.309,1000,0,433.0,0.0,2.063,3.148,5.442,15.537,0.764,125.2,125.2,125.2,113.7,13600,14600,0.1,,0,0.132,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +17,write,10000,4,1,1.62,1000,0,617.3,0.0,5.937,8.141,11.294,56.553,0.996,125.2,125.3,125.3,115.6,14700,15700,0.13,,0,0.209,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +18,write,10000,16,1,1.642,1000,0,609.0,0.0,25.024,37.352,68.037,78.784,1.008,125.3,125.4,125.4,116.3,15800,16800,0.143,,0,0.212,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, diff --git a/evidence/bench/unit-of-work-aa/summary.md b/evidence/bench/unit-of-work-aa/summary.md new file mode 100644 index 00000000..942acaa2 --- /dev/null +++ b/evidence/bench/unit-of-work-aa/summary.md @@ -0,0 +1,167 @@ +# Нагрузочный замер: метка `unit-of-work-aa` + +- Статус: **complete** +- Commit: `b2fb88f` +- Профиль `quick`: размеры 1k, 5k, 10k; клиенты 1, 4, 16; повторов 1; чтение 5 с после 2 с прогрева; запись 1000 после 100 +- Лимиты без swap: API 1 CPU / 2g × 1 реплик за HAProxy 1 CPU / 256m, PostgreSQL 4 CPU / 3g, Valkey 2 CPU / 512m; CPU и RSS API — сумма по репликам; значения — медиана (min–max) по повторам +- Посторонние контейнеры в VM во время замера: domains-api-1, domains-bot-1, domains-postgres-1 + +## Сценарий `read` + +| Размер | Клиенты | RPS | p50, мс | p95, мс | p99, мс | max, мс | CPU API, ядер | CPU БД, ядер | RSS конец, МиБ | Сообщений в начале | Пометки | +|---|---|---|---|---|---|---|---|---|---|---|---| +| 1k | 1 | 529 | 1.78 | 2.16 | 2.55 | 5.3 | 0.82 | 0.14 | 125.0 | 4500 | — | +| 1k | 4 | 704 | 5.33 | 6.67 | 8.57 | 48.6 | 1.00 | 0.18 | 125.0 | 4500 | — | +| 1k | 16 | 662 | 22.05 | 43.02 | 63.12 | 81.4 | 1.00 | 0.18 | 125.0 | 4500 | — | +| 5k | 1 | 523 | 1.79 | 2.24 | 2.74 | 5.2 | 0.82 | 0.14 | 125.2 | 8500 | — | +| 5k | 4 | 711 | 5.32 | 6.48 | 8.05 | 47.2 | 1.00 | 0.18 | 125.2 | 8500 | — | +| 5k | 16 | 603 | 23.04 | 54.77 | 88.00 | 120.3 | 1.00 | 0.18 | 125.2 | 8500 | — | +| 10k | 1 | 490 | 1.83 | 2.57 | 3.48 | 85.0 | 0.82 | 0.14 | 125.2 | 13500 | — | +| 10k | 4 | 694 | 5.34 | 7.04 | 9.82 | 45.5 | 1.00 | 0.18 | 125.2 | 13500 | — | +| 10k | 16 | 646 | 21.96 | 46.24 | 71.63 | 114.6 | 1.00 | 0.18 | 125.2 | 13500 | — | + +## Сценарий `write` + +| Размер | Клиенты | RPS | p50, мс | p95, мс | p99, мс | max, мс | CPU API, ядер | CPU БД, ядер | RSS конец, МиБ | Сообщений в начале | Пометки | +|---|---|---|---|---|---|---|---|---|---|---|---| +| 1k | 1 | 462 | 2.01 | 2.70 | 3.51 | 5.3 | 0.78 | 0.13 | 125.0 | 4600 | — | +| 1k | 4 | 598 | 5.93 | 9.04 | 20.01 | 59.0 | 0.99 | 0.21 | 125.1 | 5700 | — | +| 1k | 16 | 610 | 24.93 | 40.01 | 69.13 | 78.8 | 1.01 | 0.22 | 125.3 | 6800 | — | +| 5k | 1 | 430 | 2.06 | 3.27 | 4.83 | 18.3 | 0.77 | 0.14 | 125.2 | 8600 | — | +| 5k | 4 | 669 | 5.80 | 6.97 | 8.44 | 9.2 | 1.00 | 0.19 | 125.2 | 9700 | — | +| 5k | 16 | 588 | 25.58 | 40.35 | 73.69 | 90.1 | 1.01 | 0.21 | 125.4 | 10800 | — | +| 10k | 1 | 433 | 2.06 | 3.15 | 5.44 | 15.5 | 0.76 | 0.13 | 125.2 | 13600 | — | +| 10k | 4 | 617 | 5.94 | 8.14 | 11.29 | 56.6 | 1.00 | 0.21 | 125.3 | 14700 | — | +| 10k | 16 | 609 | 25.02 | 37.35 | 68.04 | 78.8 | 1.01 | 0.21 | 125.4 | 15800 | — | + +## Память и наполнение по размерам + +Объём `messages` — после `VACUUM (ANALYZE)`, до прогонов: в таблице N сообщений читаемого чата и сообщения фоновых чатов (`Сообщений`). + +| Размер | Сообщений | RSS API до, МиБ | RSS API после, МиБ | Байт RSS на сообщение | Таблица, МиБ | Индексы, МиБ | Байт в БД на сообщение | Наполнение, сообщ/с | Курсоров в пуле | Пик RSS за размер, МиБ | +|---|---|---|---|---|---|---|---|---|---|---| +| 1k | 4500 | 121.0 | 125.0 | 928 | 0.8 | 0.6 | 331 | 577 | 9 | 184.6 | +| 5k | 8500 | 121.0 | 125.2 | 511 | 1.5 | 1.1 | 322 | 580 | 49 | 184.7 | +| 10k | 13500 | 121.1 | 125.1 | 317 | 2.3 | 1.9 | 328 | 586 | 99 | 184.7 | + +## Планы запроса истории + +Страница (`limit` профиля) читаемого чата и первого чата каждого фонового уровня. `app` — план запроса приложения (auto_explain). Остальное — тот же запрос с теми же параметрами в psql, в откатываемой транзакции: `psql` — индекс приложения, `generic` — он же с generic plan, `or-cursor` — условие курсора через OR, `no-index` — без индекса, дальше — варианты индекса профиля. Буферы — верхнего узла плана, файлы — `explain-<размер>.txt`. + +| Размер | Чат | Страница | После сообщений | Вариант | Узел | shared hit | read | Строк | Время, мс | План | +|---|---|---|---|---|---|---|---|---|---|---| +| 1k | read 1k | first | 0 | app | Index Scan using ix_messages_chat_id_created_at_id on messages | 32 | 0 | 51 | 0.147 | custom | +| 1k | read 1k | middle | 500 | app | Index Scan using ix_messages_chat_id_created_at_id on messages | 51 | 0 | 51 | 0.121 | custom | +| 1k | read 1k | middle | 500 | psql | Index Scan using ix_messages_chat_id_created_at_id on messages | 51 | 0 | 51 | 0.065 | custom | +| 1k | read 1k | middle | 500 | generic | Index Scan using ix_messages_chat_id_created_at_id on messages | 51 | 0 | 51 | 0.072 | generic | +| 1k | read 1k | middle | 500 | or-cursor | Index Scan using ix_messages_chat_id_created_at_id on messages | 525 | 0 | 51 | 0.136 | custom | +| 1k | read 1k | middle | 500 | no-index | Seq Scan on messages | 101 | 0 | 51 | 0.560 | custom | +| 1k | read 1k | middle | 500 | chat_only | Bitmap Heap Scan on messages | 103 | 0 | 51 | 0.519 | custom | +| 1k | read 1k | middle | 500 | covering | Index Only Scan using bench_variant on messages | 4 | 0 | 51 | 0.055 | custom | +| 1k | read 1k | last | 900 | app | Bitmap Heap Scan on messages | 28 | 0 | 51 | 0.240 | custom | +| 1k | bg 1k | first | 0 | app | Index Scan using ix_messages_chat_id_created_at_id on messages | 37 | 0 | 51 | 0.106 | custom | +| 1k | bg 1k | middle | 500 | app | Index Scan using ix_messages_chat_id_created_at_id on messages | 53 | 0 | 51 | 0.105 | custom | +| 1k | bg 1k | middle | 500 | psql | Index Scan using ix_messages_chat_id_created_at_id on messages | 53 | 0 | 51 | 0.084 | custom | +| 1k | bg 1k | middle | 500 | generic | Index Scan using ix_messages_chat_id_created_at_id on messages | 53 | 0 | 51 | 0.069 | generic | +| 1k | bg 1k | middle | 500 | or-cursor | Index Scan using ix_messages_chat_id_created_at_id on messages | 528 | 0 | 51 | 0.146 | custom | +| 1k | bg 1k | middle | 500 | no-index | Seq Scan on messages | 101 | 0 | 51 | 0.612 | custom | +| 1k | bg 1k | middle | 500 | chat_only | Bitmap Heap Scan on messages | 101 | 0 | 51 | 0.453 | custom | +| 1k | bg 1k | middle | 500 | covering | Index Only Scan using bench_variant on messages | 4 | 0 | 51 | 0.051 | custom | +| 1k | bg 1k | last | 900 | app | Bitmap Heap Scan on messages | 18 | 0 | 51 | 0.156 | custom | +| 1k | bg 100 | first | 0 | app | Bitmap Heap Scan on messages | 64 | 0 | 51 | 0.231 | custom | +| 1k | bg 100 | first | 0 | psql | Bitmap Heap Scan on messages | 64 | 0 | 51 | 0.127 | custom | +| 1k | bg 100 | first | 0 | generic | Index Scan using ix_messages_chat_id_created_at_id on messages | 50 | 0 | 51 | 0.063 | generic | +| 1k | bg 100 | first | 0 | no-index | Seq Scan on messages | 101 | 0 | 51 | 0.207 | custom | +| 1k | bg 100 | first | 0 | chat_only | Bitmap Heap Scan on messages | 64 | 0 | 51 | 0.127 | custom | +| 1k | bg 100 | first | 0 | covering | Index Only Scan using bench_variant on messages | 4 | 0 | 51 | 0.052 | custom | +| 1k | bg 10 | first | 0 | app | Bitmap Heap Scan on messages | 12 | 0 | 10 | 0.041 | custom | +| 1k | bg 10 | first | 0 | psql | Bitmap Heap Scan on messages | 12 | 0 | 10 | 0.032 | custom | +| 1k | bg 10 | first | 0 | generic | Index Scan using ix_messages_chat_id_created_at_id on messages | 12 | 0 | 10 | 0.023 | generic | +| 1k | bg 10 | first | 0 | no-index | Seq Scan on messages | 101 | 0 | 10 | 0.130 | custom | +| 1k | bg 10 | first | 0 | chat_only | Bitmap Heap Scan on messages | 12 | 0 | 10 | 0.026 | custom | +| 1k | bg 10 | first | 0 | covering | Index Only Scan using bench_variant on messages | 3 | 0 | 10 | 0.017 | custom | +| 5k | read 5k | first | 0 | app | Index Scan using ix_messages_chat_id_created_at_id on messages | 25 | 0 | 51 | 0.100 | custom | +| 5k | read 5k | middle | 2500 | app | Index Scan using ix_messages_chat_id_created_at_id on messages | 54 | 0 | 51 | 0.113 | generic | +| 5k | read 5k | middle | 2500 | psql | Index Scan using ix_messages_chat_id_created_at_id on messages | 54 | 0 | 51 | 0.070 | custom | +| 5k | read 5k | middle | 2500 | generic | Index Scan using ix_messages_chat_id_created_at_id on messages | 54 | 0 | 51 | 0.081 | generic | +| 5k | read 5k | middle | 2500 | or-cursor | Index Scan using ix_messages_chat_id_created_at_id on messages | 2541 | 0 | 51 | 0.431 | custom | +| 5k | read 5k | middle | 2500 | no-index | Seq Scan on messages | 186 | 0 | 51 | 2.186 | custom | +| 5k | read 5k | middle | 2500 | chat_only | Seq Scan on messages | 186 | 0 | 51 | 2.057 | custom | +| 5k | read 5k | middle | 2500 | covering | Index Only Scan using bench_variant on messages | 5 | 0 | 51 | 0.108 | custom | +| 5k | read 5k | last | 4900 | app | Index Scan using ix_messages_chat_id_created_at_id on messages | 53 | 0 | 51 | 0.112 | generic | +| 5k | bg 1k | first | 0 | app | Index Scan using ix_messages_chat_id_created_at_id on messages | 45 | 0 | 51 | 0.253 | custom | +| 5k | bg 1k | middle | 500 | app | Index Scan using ix_messages_chat_id_created_at_id on messages | 52 | 0 | 51 | 0.109 | generic | +| 5k | bg 1k | middle | 500 | psql | Index Scan using ix_messages_chat_id_created_at_id on messages | 52 | 0 | 51 | 0.076 | custom | +| 5k | bg 1k | middle | 500 | generic | Index Scan using ix_messages_chat_id_created_at_id on messages | 52 | 0 | 51 | 0.076 | generic | +| 5k | bg 1k | middle | 500 | or-cursor | Index Scan using ix_messages_chat_id_created_at_id on messages | 530 | 0 | 51 | 0.143 | custom | +| 5k | bg 1k | middle | 500 | no-index | Seq Scan on messages | 186 | 0 | 51 | 0.643 | custom | +| 5k | bg 1k | middle | 500 | chat_only | Bitmap Heap Scan on messages | 186 | 0 | 51 | 0.483 | custom | +| 5k | bg 1k | middle | 500 | covering | Index Only Scan using bench_variant on messages | 5 | 0 | 51 | 0.058 | custom | +| 5k | bg 1k | last | 900 | app | Index Scan using ix_messages_chat_id_created_at_id on messages | 51 | 0 | 51 | 0.114 | generic | +| 5k | bg 100 | first | 0 | app | Index Scan using ix_messages_chat_id_created_at_id on messages | 47 | 0 | 51 | 0.124 | custom | +| 5k | bg 100 | first | 0 | psql | Index Scan using ix_messages_chat_id_created_at_id on messages | 47 | 0 | 51 | 0.072 | custom | +| 5k | bg 100 | first | 0 | generic | Index Scan using ix_messages_chat_id_created_at_id on messages | 47 | 0 | 51 | 0.067 | generic | +| 5k | bg 100 | first | 0 | no-index | Seq Scan on messages | 186 | 0 | 51 | 0.290 | custom | +| 5k | bg 100 | first | 0 | chat_only | Bitmap Heap Scan on messages | 79 | 0 | 51 | 0.143 | custom | +| 5k | bg 100 | first | 0 | covering | Index Only Scan using bench_variant on messages | 5 | 0 | 51 | 0.062 | custom | +| 5k | bg 10 | first | 0 | app | Bitmap Heap Scan on messages | 12 | 0 | 10 | 0.042 | custom | +| 5k | bg 10 | first | 0 | psql | Bitmap Heap Scan on messages | 12 | 0 | 10 | 0.040 | custom | +| 5k | bg 10 | first | 0 | generic | Index Scan using ix_messages_chat_id_created_at_id on messages | 12 | 0 | 10 | 0.032 | generic | +| 5k | bg 10 | first | 0 | no-index | Seq Scan on messages | 186 | 0 | 10 | 0.220 | custom | +| 5k | bg 10 | first | 0 | chat_only | Bitmap Heap Scan on messages | 12 | 0 | 10 | 0.033 | custom | +| 5k | bg 10 | first | 0 | covering | Index Only Scan using bench_variant on messages | 4 | 0 | 10 | 0.021 | custom | +| 10k | read 10k | first | 0 | app | Index Scan using ix_messages_chat_id_created_at_id on messages | 17 | 0 | 51 | 0.184 | custom | +| 10k | read 10k | middle | 5000 | app | Index Scan using ix_messages_chat_id_created_at_id on messages | 53 | 0 | 51 | 0.146 | generic | +| 10k | read 10k | middle | 5000 | psql | Index Scan using ix_messages_chat_id_created_at_id on messages | 53 | 0 | 51 | 0.065 | custom | +| 10k | read 10k | middle | 5000 | generic | Index Scan using ix_messages_chat_id_created_at_id on messages | 53 | 0 | 51 | 0.077 | generic | +| 10k | read 10k | middle | 5000 | or-cursor | Index Scan using ix_messages_chat_id_created_at_id on messages | 5063 | 0 | 51 | 0.779 | custom | +| 10k | read 10k | middle | 5000 | no-index | Seq Scan on messages | 293 | 0 | 51 | 3.995 | custom | +| 10k | read 10k | middle | 5000 | chat_only | Seq Scan on messages | 293 | 0 | 51 | 3.719 | custom | +| 10k | read 10k | middle | 5000 | covering | Index Only Scan using bench_variant on messages | 5 | 0 | 51 | 0.052 | custom | +| 10k | read 10k | last | 9900 | app | Index Scan using ix_messages_chat_id_created_at_id on messages | 54 | 0 | 51 | 0.144 | generic | +| 10k | bg 1k | first | 0 | app | Index Scan using ix_messages_chat_id_created_at_id on messages | 46 | 0 | 51 | 0.150 | custom | +| 10k | bg 1k | middle | 500 | app | Index Scan using ix_messages_chat_id_created_at_id on messages | 52 | 0 | 51 | 0.185 | generic | +| 10k | bg 1k | middle | 500 | psql | Index Scan using ix_messages_chat_id_created_at_id on messages | 52 | 0 | 51 | 0.057 | custom | +| 10k | bg 1k | middle | 500 | generic | Index Scan using ix_messages_chat_id_created_at_id on messages | 52 | 0 | 51 | 0.072 | generic | +| 10k | bg 1k | middle | 500 | or-cursor | Index Scan using ix_messages_chat_id_created_at_id on messages | 502 | 0 | 51 | 0.129 | custom | +| 10k | bg 1k | middle | 500 | no-index | Seq Scan on messages | 293 | 0 | 51 | 0.676 | custom | +| 10k | bg 1k | middle | 500 | chat_only | Bitmap Heap Scan on messages | 281 | 0 | 51 | 0.517 | custom | +| 10k | bg 1k | middle | 500 | covering | Index Only Scan using bench_variant on messages | 5 | 0 | 51 | 0.054 | custom | +| 10k | bg 1k | last | 900 | app | Index Scan using ix_messages_chat_id_created_at_id on messages | 47 | 0 | 51 | 0.126 | generic | +| 10k | bg 100 | first | 0 | app | Index Scan using ix_messages_chat_id_created_at_id on messages | 48 | 0 | 51 | 0.165 | custom | +| 10k | bg 100 | first | 0 | psql | Index Scan using ix_messages_chat_id_created_at_id on messages | 48 | 0 | 51 | 0.055 | custom | +| 10k | bg 100 | first | 0 | generic | Index Scan using ix_messages_chat_id_created_at_id on messages | 48 | 0 | 51 | 0.069 | generic | +| 10k | bg 100 | first | 0 | no-index | Seq Scan on messages | 293 | 0 | 51 | 0.402 | custom | +| 10k | bg 100 | first | 0 | chat_only | Bitmap Heap Scan on messages | 91 | 0 | 51 | 0.120 | custom | +| 10k | bg 100 | first | 0 | covering | Index Only Scan using bench_variant on messages | 5 | 0 | 51 | 0.049 | custom | +| 10k | bg 10 | first | 0 | app | Index Scan using ix_messages_chat_id_created_at_id on messages | 12 | 0 | 10 | 0.073 | custom | +| 10k | bg 10 | first | 0 | psql | Index Scan using ix_messages_chat_id_created_at_id on messages | 12 | 0 | 10 | 0.026 | custom | +| 10k | bg 10 | first | 0 | generic | Index Scan using ix_messages_chat_id_created_at_id on messages | 12 | 0 | 10 | 0.035 | generic | +| 10k | bg 10 | first | 0 | no-index | Seq Scan on messages | 293 | 0 | 10 | 0.313 | custom | +| 10k | bg 10 | first | 0 | chat_only | Index Scan using bench_variant on messages | 12 | 0 | 10 | 0.030 | custom | +| 10k | bg 10 | first | 0 | covering | Index Only Scan using bench_variant on messages | 5 | 0 | 10 | 0.017 | custom | + +## Стоимость записи по вариантам индекса + +Вставка порции сообщений во все чаты в пропорции наполнения одной командой, в транзакции, которая откатывается; индекс истории построен заново, перед вставкой `CHECKPOINT`. Значения — медиана (min–max) повторов. «4000 символов» — вставка сообщения максимальной длины из несжимаемого текста. + +| Размер | Вариант | Строк вставки | Индекс, МиБ | Байт индекса на сообщение | мкс на сообщение | WAL байт на сообщение | FPI на 1000 | 4000 символов | +|---|---|---|---|---|---|---|---|---| +| 1k | app | 5000 | 0.5 | 60.9 | 5.24 (5.07–6.19) | 488 (488–501) | 20.8 (12.0–20.8) | ok | +| 1k | chat_only | 5000 | 0.1 | 9.5 | 4.97 (4.91–4.97) | 398 (398–399) | 18.2 (18.2–18.2) | ok | +| 1k | covering | 5000 | 1.2 | 159.6 | 5.71 (5.46–6.67) | 689 (689–689) | 24.2 (24.2–24.2) | index row requires 12072 bytes, maximum size is 8191 | +| 1k | none | 5000 | 0.0 | 0.0 | 4.62 (4.47–6.41) | 311 (311–311) | 16.8 (16.8–16.8) | ok | +| 5k | app | 5000 | 0.7 | 60.4 | 5.20 (5.04–5.34) | 512 (510–512) | 22.8 (17.2–22.8) | ok | +| 5k | chat_only | 5000 | 0.1 | 9.0 | 4.92 (4.77–5.05) | 425 (424–425) | 20.2 (19.8–20.6) | ok | +| 5k | covering | 5000 | 1.8 | 160.4 | 5.73 (5.70–8.37) | 719 (718–719) | 26.6 (26.2–26.6) | index row requires 12072 bytes, maximum size is 8191 | +| 5k | none | 5000 | 0.0 | 0.0 | 4.39 (4.28–4.39) | 336 (336–337) | 18.6 (18.4–18.6) | ok | +| 10k | app | 5000 | 1.0 | 59.5 | 5.16 (5.14–5.58) | 536 (536–550) | 30.2 (19.2–30.6) | ok | +| 10k | chat_only | 5000 | 0.1 | 8.3 | 4.93 (4.83–4.96) | 450 (448–452) | 28.0 (26.2–28.6) | ok | +| 10k | covering | 5000 | 2.6 | 160.4 | 5.63 (5.56–8.60) | 748 (747–749) | 34.2 (33.2–34.4) | index row requires 12072 bytes, maximum size is 8191 | +| 10k | none | 5000 | 0.0 | 0.0 | 4.39 (4.36–4.59) | 365 (363–365) | 26.8 (26.2–27.2) | ok | + +## Кривая наполнения 10k: запись при росте хранилища, 32 клиента + +| Порция | Сообщений после | RPS | p50, мс | p95, мс | p99, мс | max, мс | CPU API, ядер | CPU БД, ядер | RSS, МиБ | Пометки | +|---|---|---|---|---|---|---|---|---|---|---| +| 1 | 13500 | 586 | 51.517 | 104.946 | 144.711 | 250.139 | 0.999 | 0.202 | 125.1 | — | diff --git a/evidence/bench/unit-of-work-after/explain-10k.txt b/evidence/bench/unit-of-work-after/explain-10k.txt new file mode 100644 index 00000000..65fc4796 --- /dev/null +++ b/evidence/bench/unit-of-work-after/explain-10k.txt @@ -0,0 +1,673 @@ +# План запроса истории: размер 10k + +Commit 6ba74b1 +Читаемый чат — 10000 сообщений; фоновые чаты: 2 × 1k, 10 × 100, 50 × 10. +Страница — `limit` профиля; «после» — сколько сообщений чата до +страницы. + +## Планы приложения + +auto_explain (ANALYZE, BUFFERS, TIMING): запрос, параметры и план, +с которыми его выполнило приложение (prepared statement asyncpg). + +### read 10k: first, после 0 + +duration: 0.183 ms plan: +Query Text: SELECT messages.id, messages.chat_id, messages.sender_id, messages.text, messages.created_at, array((SELECT message_attachments.attachment_id +FROM message_attachments +WHERE message_attachments.message_id = messages.id ORDER BY message_attachments.position)) AS attachment_ids +FROM messages +WHERE messages.chat_id = $1::UUID ORDER BY messages.created_at, messages.id + LIMIT $2::INTEGER +Query Parameters: $1 = '99ea412a-276b-4e62-817a-131787be68f4', $2 = '51' +Limit (cost=0.29..9.61 rows=51 width=153) (actual time=0.066..0.141 rows=51.00 loops=1) + Buffers: shared hit=10 + -> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..1828.70 rows=10000 width=153) (actual time=0.065..0.137 rows=51.00 loops=1) + Index Cond: (chat_id = '99ea412a-276b-4e62-817a-131787be68f4'::uuid) + Index Searches: 1 + Buffers: shared hit=10 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=51) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51) + Filter: (message_id = messages.id) + +### read 10k: middle, после 5000 + +duration: 0.173 ms plan: +Query Text: SELECT messages.id, messages.chat_id, messages.sender_id, messages.text, messages.created_at, array((SELECT message_attachments.attachment_id +FROM message_attachments +WHERE message_attachments.message_id = messages.id ORDER BY message_attachments.position)) AS attachment_ids +FROM messages +WHERE messages.chat_id = $1::UUID AND (messages.created_at, messages.id) > ($2::TIMESTAMP WITH TIME ZONE, $3::UUID) ORDER BY messages.created_at, messages.id + LIMIT $4::INTEGER +Query Parameters: $1 = '99ea412a-276b-4e62-817a-131787be68f4', $2 = '2026-10-31 20:25:58.972716+00', $3 = 'a8013679-c33e-427a-bd32-ce55583660ec', $4 = '51' +Limit (cost=0.29..21.80 rows=7 width=153) (actual time=0.033..0.139 rows=51.00 loops=1) + Buffers: shared hit=50 + -> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..218.46 rows=71 width=153) (actual time=0.032..0.135 rows=51.00 loops=1) + Index Cond: ((chat_id = $1) AND (ROW(created_at, id) > ROW($2, $3))) + Index Searches: 1 + Buffers: shared hit=50 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=51) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51) + Filter: (message_id = messages.id) + +### read 10k: last, после 9900 + +duration: 0.165 ms plan: +Query Text: SELECT messages.id, messages.chat_id, messages.sender_id, messages.text, messages.created_at, array((SELECT message_attachments.attachment_id +FROM message_attachments +WHERE message_attachments.message_id = messages.id ORDER BY message_attachments.position)) AS attachment_ids +FROM messages +WHERE messages.chat_id = $1::UUID AND (messages.created_at, messages.id) > ($2::TIMESTAMP WITH TIME ZONE, $3::UUID) ORDER BY messages.created_at, messages.id + LIMIT $4::INTEGER +Query Parameters: $1 = '99ea412a-276b-4e62-817a-131787be68f4', $2 = '2026-10-31 20:26:12.424471+00', $3 = '1181b092-52d6-4ca4-be5f-638e84c56409', $4 = '51' +Limit (cost=0.29..21.80 rows=7 width=153) (actual time=0.033..0.129 rows=51.00 loops=1) + Buffers: shared hit=48 + -> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..218.46 rows=71 width=153) (actual time=0.032..0.125 rows=51.00 loops=1) + Index Cond: ((chat_id = $1) AND (ROW(created_at, id) > ROW($2, $3))) + Index Searches: 1 + Buffers: shared hit=48 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=51) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51) + Filter: (message_id = messages.id) + +### bg 1k: first, после 0 + +duration: 0.150 ms plan: +Query Text: SELECT messages.id, messages.chat_id, messages.sender_id, messages.text, messages.created_at, array((SELECT message_attachments.attachment_id +FROM message_attachments +WHERE message_attachments.message_id = messages.id ORDER BY message_attachments.position)) AS attachment_ids +FROM messages +WHERE messages.chat_id = $1::UUID ORDER BY messages.created_at, messages.id + LIMIT $2::INTEGER +Query Parameters: $1 = '46b04d36-1a11-4041-9b6f-9851466b16d5', $2 = '51' +Limit (cost=0.29..54.21 rows=51 width=153) (actual time=0.026..0.114 rows=51.00 loops=1) + Buffers: shared hit=48 + -> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..1057.60 rows=1000 width=153) (actual time=0.025..0.111 rows=51.00 loops=1) + Index Cond: (chat_id = '46b04d36-1a11-4041-9b6f-9851466b16d5'::uuid) + Index Searches: 1 + Buffers: shared hit=48 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=51) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51) + Filter: (message_id = messages.id) + +### bg 1k: middle, после 500 + +duration: 0.174 ms plan: +Query Text: SELECT messages.id, messages.chat_id, messages.sender_id, messages.text, messages.created_at, array((SELECT message_attachments.attachment_id +FROM message_attachments +WHERE message_attachments.message_id = messages.id ORDER BY message_attachments.position)) AS attachment_ids +FROM messages +WHERE messages.chat_id = $1::UUID AND (messages.created_at, messages.id) > ($2::TIMESTAMP WITH TIME ZONE, $3::UUID) ORDER BY messages.created_at, messages.id + LIMIT $4::INTEGER +Query Parameters: $1 = '46b04d36-1a11-4041-9b6f-9851466b16d5', $2 = '2026-10-31 20:25:58.952532+00', $3 = '76134beb-2514-483c-9e57-35cca348654e', $4 = '51' +Limit (cost=0.29..21.80 rows=7 width=153) (actual time=0.034..0.135 rows=51.00 loops=1) + Buffers: shared hit=47 + -> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..218.46 rows=71 width=153) (actual time=0.033..0.131 rows=51.00 loops=1) + Index Cond: ((chat_id = $1) AND (ROW(created_at, id) > ROW($2, $3))) + Index Searches: 1 + Buffers: shared hit=47 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=51) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51) + Filter: (message_id = messages.id) + +### bg 1k: last, после 900 + +duration: 0.136 ms plan: +Query Text: SELECT messages.id, messages.chat_id, messages.sender_id, messages.text, messages.created_at, array((SELECT message_attachments.attachment_id +FROM message_attachments +WHERE message_attachments.message_id = messages.id ORDER BY message_attachments.position)) AS attachment_ids +FROM messages +WHERE messages.chat_id = $1::UUID AND (messages.created_at, messages.id) > ($2::TIMESTAMP WITH TIME ZONE, $3::UUID) ORDER BY messages.created_at, messages.id + LIMIT $4::INTEGER +Query Parameters: $1 = '46b04d36-1a11-4041-9b6f-9851466b16d5', $2 = '2026-10-31 20:26:10.027592+00', $3 = 'd40867ec-a74c-405c-a995-63fd352c51eb', $4 = '51' +Limit (cost=0.29..21.80 rows=7 width=153) (actual time=0.032..0.108 rows=51.00 loops=1) + Buffers: shared hit=48 + -> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..218.46 rows=71 width=153) (actual time=0.031..0.105 rows=51.00 loops=1) + Index Cond: ((chat_id = $1) AND (ROW(created_at, id) > ROW($2, $3))) + Index Searches: 1 + Buffers: shared hit=48 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=51) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51) + Filter: (message_id = messages.id) + +### bg 100: first, после 0 + +duration: 0.182 ms plan: +Query Text: SELECT messages.id, messages.chat_id, messages.sender_id, messages.text, messages.created_at, array((SELECT message_attachments.attachment_id +FROM message_attachments +WHERE message_attachments.message_id = messages.id ORDER BY message_attachments.position)) AS attachment_ids +FROM messages +WHERE messages.chat_id = $1::UUID ORDER BY messages.created_at, messages.id + LIMIT $2::INTEGER +Query Parameters: $1 = '569aadba-e8bf-42b0-badc-792ce65b3d18', $2 = '51' +Limit (cost=0.29..151.03 rows=51 width=153) (actual time=0.015..0.151 rows=51.00 loops=1) + Buffers: shared hit=43 + -> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..295.87 rows=100 width=153) (actual time=0.015..0.149 rows=51.00 loops=1) + Index Cond: (chat_id = '569aadba-e8bf-42b0-badc-792ce65b3d18'::uuid) + Index Searches: 1 + Buffers: shared hit=43 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=51) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51) + Filter: (message_id = messages.id) + +### bg 10: first, после 0 + +duration: 0.086 ms plan: +Query Text: SELECT messages.id, messages.chat_id, messages.sender_id, messages.text, messages.created_at, array((SELECT message_attachments.attachment_id +FROM message_attachments +WHERE message_attachments.message_id = messages.id ORDER BY message_attachments.position)) AS attachment_ids +FROM messages +WHERE messages.chat_id = $1::UUID ORDER BY messages.created_at, messages.id + LIMIT $2::INTEGER +Query Parameters: $1 = 'af5d41fb-ffe2-459e-b929-6a4ab3569116', $2 = '51' +Limit (cost=0.29..38.26 rows=10 width=153) (actual time=0.010..0.081 rows=10.00 loops=1) + Buffers: shared hit=12 + -> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..38.26 rows=10 width=153) (actual time=0.010..0.080 rows=10.00 loops=1) + Index Cond: (chat_id = 'af5d41fb-ffe2-459e-b929-6a4ab3569116'::uuid) + Index Searches: 1 + Buffers: shared hit=12 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.002..0.002 rows=0.00 loops=10) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=10) + Filter: (message_id = messages.id) + +## Страницы сравнения в psql: варианты + +Тот же текст запроса и те же параметры, что у плана приложения этой +страницы, в одной транзакции, которая откатывается: индексы базы +после неё те же. Каждый вариант выполнен дважды, здесь — второе +выполнение. `psql` — индекс приложения, custom plan; `generic` — он +же с force_generic_plan; `or-cursor` — условие курсора через OR; +`no-index` — без индекса приложения; варианты индекса вместо него: +`chat_only` (chat_id), `covering` (chat_id, created_at, id) INCLUDE (sender_id, text). + +### read 10k: middle, после 5000 + +#### psql + +Limit (cost=0.29..14.68 rows=51 width=153) (actual time=0.007..0.054 rows=51.00 loops=1) + Buffers: shared hit=50 + -> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..1411.46 rows=5000 width=153) (actual time=0.007..0.051 rows=51.00 loops=1) + Index Cond: ((chat_id = '99ea412a-276b-4e62-817a-131787be68f4'::uuid) AND (ROW(created_at, id) > ROW('2026-10-31 20:25:58.972716+00'::timestamp with time zone, 'a8013679-c33e-427a-bd32-ce55583660ec'::uuid))) + Index Searches: 1 + Buffers: shared hit=50 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51) + Filter: (message_id = messages.id) +Planning: + Buffers: shared hit=3 +Planning Time: 0.052 ms +Execution Time: 0.063 ms + +#### generic + +Limit (cost=0.29..21.80 rows=7 width=153) (actual time=0.006..0.057 rows=51.00 loops=1) + Buffers: shared hit=50 + -> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..218.46 rows=71 width=153) (actual time=0.006..0.054 rows=51.00 loops=1) + Index Cond: ((chat_id = $1) AND (ROW(created_at, id) > ROW($2, $3))) + Index Searches: 1 + Buffers: shared hit=50 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=51) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51) + Filter: (message_id = messages.id) +Planning Time: 0.006 ms +Execution Time: 0.065 ms + +#### or-cursor + +Limit (cost=0.29..18.93 rows=51 width=153) (actual time=0.682..0.725 rows=51.00 loops=1) + Buffers: shared hit=4713 + -> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..1828.70 rows=5000 width=153) (actual time=0.682..0.723 rows=51.00 loops=1) + Index Cond: (chat_id = '99ea412a-276b-4e62-817a-131787be68f4'::uuid) + Filter: ((created_at > '2026-10-31 20:25:58.972716+00'::timestamp with time zone) OR ((created_at = '2026-10-31 20:25:58.972716+00'::timestamp with time zone) AND (id > 'a8013679-c33e-427a-bd32-ce55583660ec'::uuid))) + Rows Removed by Filter: 5000 + Index Searches: 1 + Buffers: shared hit=4713 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51) + Filter: (message_id = messages.id) +Planning: + Buffers: shared hit=3 +Planning Time: 0.051 ms +Execution Time: 0.732 ms + +#### no-index + +Limit (cost=772.06..772.19 rows=51 width=153) (actual time=3.998..4.002 rows=51.00 loops=1) + Buffers: shared hit=294 + -> Sort (cost=772.06..784.56 rows=5000 width=153) (actual time=3.998..4.000 rows=51.00 loops=1) + Sort Key: messages.created_at, messages.id + Sort Method: top-N heapsort Memory: 43kB + Buffers: shared hit=294 + -> Seq Scan on messages (cost=0.00..605.25 rows=5000 width=153) (actual time=0.232..3.473 rows=5000.00 loops=1) + Filter: ((chat_id = '99ea412a-276b-4e62-817a-131787be68f4'::uuid) AND (ROW(created_at, id) > ROW('2026-10-31 20:25:58.972716+00'::timestamp with time zone, 'a8013679-c33e-427a-bd32-ce55583660ec'::uuid))) + Rows Removed by Filter: 8500 + Buffers: shared hit=294 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=5000) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=5000) + Filter: (message_id = messages.id) +Planning: + Buffers: shared hit=3 +Planning Time: 0.052 ms +Execution Time: 4.012 ms + +#### chat_only + +Limit (cost=772.06..772.19 rows=51 width=153) (actual time=3.749..3.754 rows=51.00 loops=1) + Buffers: shared hit=294 + -> Sort (cost=772.06..784.56 rows=5000 width=153) (actual time=3.749..3.751 rows=51.00 loops=1) + Sort Key: messages.created_at, messages.id + Sort Method: top-N heapsort Memory: 43kB + Buffers: shared hit=294 + -> Seq Scan on messages (cost=0.00..605.25 rows=5000 width=153) (actual time=0.228..3.243 rows=5000.00 loops=1) + Filter: ((chat_id = '99ea412a-276b-4e62-817a-131787be68f4'::uuid) AND (ROW(created_at, id) > ROW('2026-10-31 20:25:58.972716+00'::timestamp with time zone, 'a8013679-c33e-427a-bd32-ce55583660ec'::uuid))) + Rows Removed by Filter: 8500 + Buffers: shared hit=294 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=5000) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=5000) + Filter: (message_id = messages.id) +Planning: + Buffers: shared hit=3 +Planning Time: 0.061 ms +Execution Time: 3.763 ms + +#### covering + +Limit (cost=0.41..6.19 rows=51 width=153) (actual time=0.006..0.045 rows=51.00 loops=1) + Buffers: shared hit=5 + -> Index Only Scan using bench_variant on messages (cost=0.41..567.41 rows=5000 width=153) (actual time=0.006..0.043 rows=51.00 loops=1) + Index Cond: ((chat_id = '99ea412a-276b-4e62-817a-131787be68f4'::uuid) AND (ROW(created_at, id) > ROW('2026-10-31 20:25:58.972716+00'::timestamp with time zone, 'a8013679-c33e-427a-bd32-ce55583660ec'::uuid))) + Heap Fetches: 0 + Index Searches: 1 + Buffers: shared hit=5 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51) + Filter: (message_id = messages.id) +Planning: + Buffers: shared hit=3 +Planning Time: 0.045 ms +Execution Time: 0.051 ms + +### bg 1k: middle, после 500 + +#### psql + +Limit (cost=0.29..96.04 rows=51 width=153) (actual time=0.007..0.048 rows=51.00 loops=1) + Buffers: shared hit=47 + -> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..940.94 rows=501 width=153) (actual time=0.006..0.046 rows=51.00 loops=1) + Index Cond: ((chat_id = '46b04d36-1a11-4041-9b6f-9851466b16d5'::uuid) AND (ROW(created_at, id) > ROW('2026-10-31 20:25:58.952532+00'::timestamp with time zone, '76134beb-2514-483c-9e57-35cca348654e'::uuid))) + Index Searches: 1 + Buffers: shared hit=47 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51) + Filter: (message_id = messages.id) +Planning: + Buffers: shared hit=3 +Planning Time: 0.045 ms +Execution Time: 0.056 ms + +#### generic + +Limit (cost=0.29..21.80 rows=7 width=153) (actual time=0.007..0.054 rows=51.00 loops=1) + Buffers: shared hit=47 + -> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..218.46 rows=71 width=153) (actual time=0.007..0.051 rows=51.00 loops=1) + Index Cond: ((chat_id = $1) AND (ROW(created_at, id) > ROW($2, $3))) + Index Searches: 1 + Buffers: shared hit=47 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=51) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51) + Filter: (message_id = messages.id) +Planning Time: 0.005 ms +Execution Time: 0.061 ms + +#### or-cursor + +Limit (cost=0.29..107.92 rows=51 width=153) (actual time=0.080..0.117 rows=51.00 loops=1) + Buffers: shared hit=514 + -> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..1057.62 rows=501 width=153) (actual time=0.080..0.115 rows=51.00 loops=1) + Index Cond: (chat_id = '46b04d36-1a11-4041-9b6f-9851466b16d5'::uuid) + Filter: ((created_at > '2026-10-31 20:25:58.952532+00'::timestamp with time zone) OR ((created_at = '2026-10-31 20:25:58.952532+00'::timestamp with time zone) AND (id > '76134beb-2514-483c-9e57-35cca348654e'::uuid))) + Rows Removed by Filter: 500 + Index Searches: 1 + Buffers: shared hit=514 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51) + Filter: (message_id = messages.id) +Planning: + Buffers: shared hit=3 +Planning Time: 0.073 ms +Execution Time: 0.125 ms + +#### no-index + +Limit (cost=554.48..554.61 rows=51 width=153) (actual time=0.698..0.702 rows=51.00 loops=1) + Buffers: shared hit=294 + -> Sort (cost=554.48..555.73 rows=501 width=153) (actual time=0.698..0.699 rows=51.00 loops=1) + Sort Key: messages.created_at, messages.id + Sort Method: top-N heapsort Memory: 39kB + Buffers: shared hit=294 + -> Seq Scan on messages (cost=0.00..537.76 rows=501 width=153) (actual time=0.171..0.639 rows=500.00 loops=1) + Filter: ((chat_id = '46b04d36-1a11-4041-9b6f-9851466b16d5'::uuid) AND (ROW(created_at, id) > ROW('2026-10-31 20:25:58.952532+00'::timestamp with time zone, '76134beb-2514-483c-9e57-35cca348654e'::uuid))) + Rows Removed by Filter: 13000 + Buffers: shared hit=294 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=500) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=500) + Filter: (message_id = messages.id) +Planning: + Buffers: shared hit=3 +Planning Time: 0.053 ms +Execution Time: 0.708 ms + +#### chat_only + +Limit (cost=351.64..351.77 rows=51 width=153) (actual time=0.473..0.476 rows=51.00 loops=1) + Buffers: shared hit=285 + -> Sort (cost=351.64..352.89 rows=501 width=153) (actual time=0.473..0.474 rows=51.00 loops=1) + Sort Key: messages.created_at, messages.id + Sort Method: top-N heapsort Memory: 39kB + Buffers: shared hit=285 + -> Bitmap Heap Scan on messages (cost=15.91..334.93 rows=501 width=153) (actual time=0.098..0.423 rows=500.00 loops=1) + Recheck Cond: (chat_id = '46b04d36-1a11-4041-9b6f-9851466b16d5'::uuid) + Filter: (ROW(created_at, id) > ROW('2026-10-31 20:25:58.952532+00'::timestamp with time zone, '76134beb-2514-483c-9e57-35cca348654e'::uuid)) + Rows Removed by Filter: 500 + Heap Blocks: exact=283 + Buffers: shared hit=285 + -> Bitmap Index Scan on bench_variant (cost=0.00..15.79 rows=1000 width=0) (actual time=0.022..0.022 rows=1000.00 loops=1) + Index Cond: (chat_id = '46b04d36-1a11-4041-9b6f-9851466b16d5'::uuid) + Index Searches: 1 + Buffers: shared hit=2 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=500) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=500) + Filter: (message_id = messages.id) +Planning: + Buffers: shared hit=3 +Planning Time: 0.041 ms +Execution Time: 0.484 ms + +#### covering + +Limit (cost=0.41..6.27 rows=51 width=153) (actual time=0.008..0.047 rows=51.00 loops=1) + Buffers: shared hit=5 + -> Index Only Scan using bench_variant on messages (cost=0.41..57.94 rows=501 width=153) (actual time=0.008..0.044 rows=51.00 loops=1) + Index Cond: ((chat_id = '46b04d36-1a11-4041-9b6f-9851466b16d5'::uuid) AND (ROW(created_at, id) > ROW('2026-10-31 20:25:58.952532+00'::timestamp with time zone, '76134beb-2514-483c-9e57-35cca348654e'::uuid))) + Heap Fetches: 0 + Index Searches: 1 + Buffers: shared hit=5 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51) + Filter: (message_id = messages.id) +Planning: + Buffers: shared hit=3 +Planning Time: 0.053 ms +Execution Time: 0.055 ms + +### bg 100: first, после 0 + +#### psql + +Limit (cost=0.29..151.03 rows=51 width=153) (actual time=0.014..0.058 rows=51.00 loops=1) + Buffers: shared hit=43 + -> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..295.87 rows=100 width=153) (actual time=0.014..0.056 rows=51.00 loops=1) + Index Cond: (chat_id = '569aadba-e8bf-42b0-badc-792ce65b3d18'::uuid) + Index Searches: 1 + Buffers: shared hit=43 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=51) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51) + Filter: (message_id = messages.id) +Planning: + Buffers: shared hit=3 +Planning Time: 0.043 ms +Execution Time: 0.063 ms + +#### generic + +Limit (cost=0.29..53.03 rows=21 width=153) (actual time=0.009..0.057 rows=51.00 loops=1) + Buffers: shared hit=43 + -> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..537.79 rows=214 width=153) (actual time=0.009..0.054 rows=51.00 loops=1) + Index Cond: (chat_id = $1) + Index Searches: 1 + Buffers: shared hit=43 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51) + Filter: (message_id = messages.id) +Planning Time: 0.003 ms +Execution Time: 0.064 ms + +#### no-index + +Limit (cost=467.57..467.70 rows=51 width=153) (actual time=0.392..0.395 rows=51.00 loops=1) + Buffers: shared hit=294 + -> Sort (cost=467.57..467.82 rows=100 width=153) (actual time=0.392..0.393 rows=51.00 loops=1) + Sort Key: messages.created_at, messages.id + Sort Method: quicksort Memory: 50kB + Buffers: shared hit=294 + -> Seq Scan on messages (cost=0.00..464.25 rows=100 width=153) (actual time=0.012..0.377 rows=100.00 loops=1) + Filter: (chat_id = '569aadba-e8bf-42b0-badc-792ce65b3d18'::uuid) + Rows Removed by Filter: 13400 + Buffers: shared hit=294 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=100) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=100) + Filter: (message_id = messages.id) +Planning: + Buffers: shared hit=3 +Planning Time: 0.050 ms +Execution Time: 0.403 ms + +#### chat_only + +Limit (cost=215.59..215.72 rows=51 width=153) (actual time=0.118..0.122 rows=51.00 loops=1) + Buffers: shared hit=85 + -> Sort (cost=215.59..215.84 rows=100 width=153) (actual time=0.118..0.120 rows=51.00 loops=1) + Sort Key: messages.created_at, messages.id + Sort Method: quicksort Memory: 50kB + Buffers: shared hit=85 + -> Bitmap Heap Scan on messages (cost=5.06..212.27 rows=100 width=153) (actual time=0.015..0.104 rows=100.00 loops=1) + Recheck Cond: (chat_id = '569aadba-e8bf-42b0-badc-792ce65b3d18'::uuid) + Heap Blocks: exact=83 + Buffers: shared hit=85 + -> Bitmap Index Scan on bench_variant (cost=0.00..5.04 rows=100 width=0) (actual time=0.005..0.005 rows=100.00 loops=1) + Index Cond: (chat_id = '569aadba-e8bf-42b0-badc-792ce65b3d18'::uuid) + Index Searches: 1 + Buffers: shared hit=2 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=100) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=100) + Filter: (message_id = messages.id) +Planning: + Buffers: shared hit=3 +Planning Time: 0.038 ms +Execution Time: 0.129 ms + +#### covering + +Limit (cost=0.41..6.15 rows=51 width=153) (actual time=0.006..0.048 rows=51.00 loops=1) + Buffers: shared hit=5 + -> Index Only Scan using bench_variant on messages (cost=0.41..11.66 rows=100 width=153) (actual time=0.006..0.045 rows=51.00 loops=1) + Index Cond: (chat_id = '569aadba-e8bf-42b0-badc-792ce65b3d18'::uuid) + Heap Fetches: 0 + Index Searches: 1 + Buffers: shared hit=5 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=51) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51) + Filter: (message_id = messages.id) +Planning: + Buffers: shared hit=3 +Planning Time: 0.045 ms +Execution Time: 0.055 ms + +### bg 10: first, после 0 + +#### psql + +Limit (cost=0.29..38.26 rows=10 width=153) (actual time=0.009..0.021 rows=10.00 loops=1) + Buffers: shared hit=12 + -> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..38.26 rows=10 width=153) (actual time=0.009..0.020 rows=10.00 loops=1) + Index Cond: (chat_id = 'af5d41fb-ffe2-459e-b929-6a4ab3569116'::uuid) + Index Searches: 1 + Buffers: shared hit=12 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=10) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=10) + Filter: (message_id = messages.id) +Planning: + Buffers: shared hit=3 +Planning Time: 0.056 ms +Execution Time: 0.028 ms + +#### generic + +Limit (cost=0.29..53.03 rows=21 width=153) (actual time=0.009..0.018 rows=10.00 loops=1) + Buffers: shared hit=12 + -> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..537.79 rows=214 width=153) (actual time=0.008..0.017 rows=10.00 loops=1) + Index Cond: (chat_id = $1) + Index Searches: 1 + Buffers: shared hit=12 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=10) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=10) + Filter: (message_id = messages.id) +Planning Time: 0.004 ms +Execution Time: 0.024 ms + +#### no-index + +Limit (cost=463.07..463.09 rows=10 width=153) (actual time=0.324..0.325 rows=10.00 loops=1) + Buffers: shared hit=294 + -> Sort (cost=463.07..463.09 rows=10 width=153) (actual time=0.324..0.324 rows=10.00 loops=1) + Sort Key: messages.created_at, messages.id + Sort Method: quicksort Memory: 27kB + Buffers: shared hit=294 + -> Seq Scan on messages (cost=0.00..462.90 rows=10 width=153) (actual time=0.022..0.322 rows=10.00 loops=1) + Filter: (chat_id = 'af5d41fb-ffe2-459e-b929-6a4ab3569116'::uuid) + Rows Removed by Filter: 13490 + Buffers: shared hit=294 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=10) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=10) + Filter: (message_id = messages.id) +Planning: + Buffers: shared hit=3 +Planning Time: 0.033 ms +Execution Time: 0.329 ms + +#### chat_only + +Limit (cost=33.48..33.50 rows=10 width=153) (actual time=0.019..0.020 rows=10.00 loops=1) + Buffers: shared hit=12 + -> Sort (cost=33.48..33.50 rows=10 width=153) (actual time=0.018..0.019 rows=10.00 loops=1) + Sort Key: messages.created_at, messages.id + Sort Method: quicksort Memory: 27kB + Buffers: shared hit=12 + -> Index Scan using bench_variant on messages (cost=0.29..33.31 rows=10 width=153) (actual time=0.005..0.016 rows=10.00 loops=1) + Index Cond: (chat_id = 'af5d41fb-ffe2-459e-b929-6a4ab3569116'::uuid) + Index Searches: 1 + Buffers: shared hit=12 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=10) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=10) + Filter: (message_id = messages.id) +Planning: + Buffers: shared hit=3 +Planning Time: 0.051 ms +Execution Time: 0.027 ms + +#### covering + +Limit (cost=0.41..4.74 rows=10 width=153) (actual time=0.006..0.013 rows=10.00 loops=1) + Buffers: shared hit=4 + -> Index Only Scan using bench_variant on messages (cost=0.41..4.74 rows=10 width=153) (actual time=0.006..0.012 rows=10.00 loops=1) + Index Cond: (chat_id = 'af5d41fb-ffe2-459e-b929-6a4ab3569116'::uuid) + Heap Fetches: 0 + Index Searches: 1 + Buffers: shared hit=4 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=10) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=10) + Filter: (message_id = messages.id) +Planning: + Buffers: shared hit=3 +Planning Time: 0.052 ms +Execution Time: 0.019 ms diff --git a/evidence/bench/unit-of-work-after/explain-1k.txt b/evidence/bench/unit-of-work-after/explain-1k.txt new file mode 100644 index 00000000..06b9bc4f --- /dev/null +++ b/evidence/bench/unit-of-work-after/explain-1k.txt @@ -0,0 +1,731 @@ +# План запроса истории: размер 1k + +Commit 6ba74b1 +Читаемый чат — 1000 сообщений; фоновые чаты: 2 × 1k, 10 × 100, 50 × 10. +Страница — `limit` профиля; «после» — сколько сообщений чата до +страницы. + +## Планы приложения + +auto_explain (ANALYZE, BUFFERS, TIMING): запрос, параметры и план, +с которыми его выполнило приложение (prepared statement asyncpg). + +### read 1k: first, после 0 + +duration: 0.156 ms plan: +Query Text: SELECT messages.id, messages.chat_id, messages.sender_id, messages.text, messages.created_at, array((SELECT message_attachments.attachment_id +FROM message_attachments +WHERE message_attachments.message_id = messages.id ORDER BY message_attachments.position)) AS attachment_ids +FROM messages +WHERE messages.chat_id = $1::UUID ORDER BY messages.created_at, messages.id + LIMIT $2::INTEGER +Query Parameters: $1 = '46854c14-676a-4932-9061-086bf0a80bf2', $2 = '51' +Limit (cost=0.28..24.73 rows=51 width=153) (actual time=0.045..0.125 rows=51.00 loops=1) + Buffers: shared hit=27 + -> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.28..479.69 rows=1000 width=153) (actual time=0.044..0.122 rows=51.00 loops=1) + Index Cond: (chat_id = '46854c14-676a-4932-9061-086bf0a80bf2'::uuid) + Index Searches: 1 + Buffers: shared hit=27 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=51) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51) + Filter: (message_id = messages.id) + +### read 1k: middle, после 500 + +duration: 0.160 ms plan: +Query Text: SELECT messages.id, messages.chat_id, messages.sender_id, messages.text, messages.created_at, array((SELECT message_attachments.attachment_id +FROM message_attachments +WHERE message_attachments.message_id = messages.id ORDER BY message_attachments.position)) AS attachment_ids +FROM messages +WHERE messages.chat_id = $1::UUID AND (messages.created_at, messages.id) > ($2::TIMESTAMP WITH TIME ZONE, $3::UUID) ORDER BY messages.created_at, messages.id + LIMIT $4::INTEGER +Query Parameters: $1 = '46854c14-676a-4932-9061-086bf0a80bf2', $2 = '2026-10-31 20:23:26.500819+00', $3 = '5576746d-8c9e-4881-84fd-1a794cd17f1d', $4 = '51' +Limit (cost=0.28..45.28 rows=51 width=153) (actual time=0.036..0.125 rows=51.00 loops=1) + Buffers: shared hit=47 + -> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.28..440.51 rows=499 width=153) (actual time=0.035..0.122 rows=51.00 loops=1) + Index Cond: ((chat_id = '46854c14-676a-4932-9061-086bf0a80bf2'::uuid) AND (ROW(created_at, id) > ROW('2026-10-31 20:23:26.500819+00'::timestamp with time zone, '5576746d-8c9e-4881-84fd-1a794cd17f1d'::uuid))) + Index Searches: 1 + Buffers: shared hit=47 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=51) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51) + Filter: (message_id = messages.id) + +### read 1k: last, после 900 + +duration: 0.279 ms plan: +Query Text: SELECT messages.id, messages.chat_id, messages.sender_id, messages.text, messages.created_at, array((SELECT message_attachments.attachment_id +FROM message_attachments +WHERE message_attachments.message_id = messages.id ORDER BY message_attachments.position)) AS attachment_ids +FROM messages +WHERE messages.chat_id = $1::UUID AND (messages.created_at, messages.id) > ($2::TIMESTAMP WITH TIME ZONE, $3::UUID) ORDER BY messages.created_at, messages.id + LIMIT $4::INTEGER +Query Parameters: $1 = '46854c14-676a-4932-9061-086bf0a80bf2', $2 = '2026-10-31 20:23:30.080533+00', $3 = '29d6bdf7-735d-47a4-bb3c-aa907842be2e', $4 = '51' +Limit (cost=120.17..120.30 rows=51 width=153) (actual time=0.239..0.244 rows=51.00 loops=1) + Buffers: shared hit=22 + -> Sort (cost=120.17..120.42 rows=100 width=153) (actual time=0.239..0.241 rows=51.00 loops=1) + Sort Key: messages.created_at, messages.id + Sort Method: quicksort Memory: 50kB + Buffers: shared hit=22 + -> Bitmap Heap Scan on messages (cost=9.31..116.85 rows=100 width=153) (actual time=0.040..0.199 rows=100.00 loops=1) + Recheck Cond: ((chat_id = '46854c14-676a-4932-9061-086bf0a80bf2'::uuid) AND (ROW(created_at, id) > ROW('2026-10-31 20:23:30.080533+00'::timestamp with time zone, '29d6bdf7-735d-47a4-bb3c-aa907842be2e'::uuid))) + Heap Blocks: exact=19 + Buffers: shared hit=22 + -> Bitmap Index Scan on ix_messages_chat_id_created_at_id (cost=0.00..9.28 rows=100 width=0) (actual time=0.017..0.017 rows=100.00 loops=1) + Index Cond: ((chat_id = '46854c14-676a-4932-9061-086bf0a80bf2'::uuid) AND (ROW(created_at, id) > ROW('2026-10-31 20:23:30.080533+00'::timestamp with time zone, '29d6bdf7-735d-47a4-bb3c-aa907842be2e'::uuid))) + Index Searches: 1 + Buffers: shared hit=3 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=100) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=100) + Filter: (message_id = messages.id) + +### bg 1k: first, после 0 + +duration: 0.135 ms plan: +Query Text: SELECT messages.id, messages.chat_id, messages.sender_id, messages.text, messages.created_at, array((SELECT message_attachments.attachment_id +FROM message_attachments +WHERE message_attachments.message_id = messages.id ORDER BY message_attachments.position)) AS attachment_ids +FROM messages +WHERE messages.chat_id = $1::UUID ORDER BY messages.created_at, messages.id + LIMIT $2::INTEGER +Query Parameters: $1 = '62be041f-7108-4a7a-becb-28edcdfc01aa', $2 = '51' +Limit (cost=0.28..24.73 rows=51 width=153) (actual time=0.027..0.101 rows=51.00 loops=1) + Buffers: shared hit=32 + -> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.28..479.69 rows=1000 width=153) (actual time=0.027..0.098 rows=51.00 loops=1) + Index Cond: (chat_id = '62be041f-7108-4a7a-becb-28edcdfc01aa'::uuid) + Index Searches: 1 + Buffers: shared hit=32 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=51) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51) + Filter: (message_id = messages.id) + +### bg 1k: middle, после 500 + +duration: 0.108 ms plan: +Query Text: SELECT messages.id, messages.chat_id, messages.sender_id, messages.text, messages.created_at, array((SELECT message_attachments.attachment_id +FROM message_attachments +WHERE message_attachments.message_id = messages.id ORDER BY message_attachments.position)) AS attachment_ids +FROM messages +WHERE messages.chat_id = $1::UUID AND (messages.created_at, messages.id) > ($2::TIMESTAMP WITH TIME ZONE, $3::UUID) ORDER BY messages.created_at, messages.id + LIMIT $4::INTEGER +Query Parameters: $1 = '62be041f-7108-4a7a-becb-28edcdfc01aa', $2 = '2026-10-31 20:23:26.481237+00', $3 = 'd44546d3-6718-4522-9e30-1bb8271f1d93', $4 = '51' +Limit (cost=0.28..45.51 rows=51 width=153) (actual time=0.019..0.079 rows=51.00 loops=1) + Buffers: shared hit=49 + -> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.28..444.58 rows=501 width=153) (actual time=0.018..0.076 rows=51.00 loops=1) + Index Cond: ((chat_id = '62be041f-7108-4a7a-becb-28edcdfc01aa'::uuid) AND (ROW(created_at, id) > ROW('2026-10-31 20:23:26.481237+00'::timestamp with time zone, 'd44546d3-6718-4522-9e30-1bb8271f1d93'::uuid))) + Index Searches: 1 + Buffers: shared hit=49 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=51) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51) + Filter: (message_id = messages.id) + +### bg 1k: last, после 900 + +duration: 0.154 ms plan: +Query Text: SELECT messages.id, messages.chat_id, messages.sender_id, messages.text, messages.created_at, array((SELECT message_attachments.attachment_id +FROM message_attachments +WHERE message_attachments.message_id = messages.id ORDER BY message_attachments.position)) AS attachment_ids +FROM messages +WHERE messages.chat_id = $1::UUID AND (messages.created_at, messages.id) > ($2::TIMESTAMP WITH TIME ZONE, $3::UUID) ORDER BY messages.created_at, messages.id + LIMIT $4::INTEGER +Query Parameters: $1 = '62be041f-7108-4a7a-becb-28edcdfc01aa', $2 = '2026-10-31 20:23:30.078364+00', $3 = 'd0076703-57f1-4448-86f4-e1b7e93ee8d7', $4 = '51' +Limit (cost=120.17..120.30 rows=51 width=153) (actual time=0.129..0.132 rows=51.00 loops=1) + Buffers: shared hit=19 + -> Sort (cost=120.17..120.42 rows=100 width=153) (actual time=0.128..0.130 rows=51.00 loops=1) + Sort Key: messages.created_at, messages.id + Sort Method: quicksort Memory: 50kB + Buffers: shared hit=19 + -> Bitmap Heap Scan on messages (cost=9.31..116.85 rows=100 width=153) (actual time=0.026..0.104 rows=100.00 loops=1) + Recheck Cond: ((chat_id = '62be041f-7108-4a7a-becb-28edcdfc01aa'::uuid) AND (ROW(created_at, id) > ROW('2026-10-31 20:23:30.078364+00'::timestamp with time zone, 'd0076703-57f1-4448-86f4-e1b7e93ee8d7'::uuid))) + Heap Blocks: exact=17 + Buffers: shared hit=19 + -> Bitmap Index Scan on ix_messages_chat_id_created_at_id (cost=0.00..9.28 rows=100 width=0) (actual time=0.011..0.011 rows=100.00 loops=1) + Index Cond: ((chat_id = '62be041f-7108-4a7a-becb-28edcdfc01aa'::uuid) AND (ROW(created_at, id) > ROW('2026-10-31 20:23:30.078364+00'::timestamp with time zone, 'd0076703-57f1-4448-86f4-e1b7e93ee8d7'::uuid))) + Index Searches: 1 + Buffers: shared hit=2 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=100) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=100) + Filter: (message_id = messages.id) + +### bg 100: first, после 0 + +duration: 0.314 ms plan: +Query Text: SELECT messages.id, messages.chat_id, messages.sender_id, messages.text, messages.created_at, array((SELECT message_attachments.attachment_id +FROM message_attachments +WHERE message_attachments.message_id = messages.id ORDER BY message_attachments.position)) AS attachment_ids +FROM messages +WHERE messages.chat_id = $1::UUID ORDER BY messages.created_at, messages.id + LIMIT $2::INTEGER +Query Parameters: $1 = 'c29b11ae-9145-41f5-ad26-73f1c05430d8', $2 = '51' +Limit (cost=119.42..119.55 rows=51 width=153) (actual time=0.284..0.288 rows=51.00 loops=1) + Buffers: shared hit=65 + -> Sort (cost=119.42..119.67 rows=100 width=153) (actual time=0.283..0.285 rows=51.00 loops=1) + Sort Key: messages.created_at, messages.id + Sort Method: quicksort Memory: 50kB + Buffers: shared hit=65 + -> Bitmap Heap Scan on messages (cost=9.06..116.10 rows=100 width=153) (actual time=0.033..0.257 rows=100.00 loops=1) + Recheck Cond: (chat_id = 'c29b11ae-9145-41f5-ad26-73f1c05430d8'::uuid) + Heap Blocks: exact=63 + Buffers: shared hit=65 + -> Bitmap Index Scan on ix_messages_chat_id_created_at_id (cost=0.00..9.03 rows=100 width=0) (actual time=0.009..0.009 rows=100.00 loops=1) + Index Cond: (chat_id = 'c29b11ae-9145-41f5-ad26-73f1c05430d8'::uuid) + Index Searches: 1 + Buffers: shared hit=2 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=100) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=100) + Filter: (message_id = messages.id) + +### bg 10: first, после 0 + +duration: 0.043 ms plan: +Query Text: SELECT messages.id, messages.chat_id, messages.sender_id, messages.text, messages.created_at, array((SELECT message_attachments.attachment_id +FROM message_attachments +WHERE message_attachments.message_id = messages.id ORDER BY message_attachments.position)) AS attachment_ids +FROM messages +WHERE messages.chat_id = $1::UUID ORDER BY messages.created_at, messages.id + LIMIT $2::INTEGER +Query Parameters: $1 = '6f3adfe6-1e3e-4065-a369-d2cd6e625865', $2 = '51' +Limit (cost=35.36..35.39 rows=10 width=153) (actual time=0.039..0.040 rows=10.00 loops=1) + Buffers: shared hit=12 + -> Sort (cost=35.36..35.39 rows=10 width=153) (actual time=0.039..0.039 rows=10.00 loops=1) + Sort Key: messages.created_at, messages.id + Sort Method: quicksort Memory: 27kB + Buffers: shared hit=12 + -> Bitmap Heap Scan on messages (cost=4.36..35.20 rows=10 width=153) (actual time=0.015..0.030 rows=10.00 loops=1) + Recheck Cond: (chat_id = '6f3adfe6-1e3e-4065-a369-d2cd6e625865'::uuid) + Heap Blocks: exact=10 + Buffers: shared hit=12 + -> Bitmap Index Scan on ix_messages_chat_id_created_at_id (cost=0.00..4.36 rows=10 width=0) (actual time=0.007..0.007 rows=10.00 loops=1) + Index Cond: (chat_id = '6f3adfe6-1e3e-4065-a369-d2cd6e625865'::uuid) + Index Searches: 1 + Buffers: shared hit=2 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=10) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=10) + Filter: (message_id = messages.id) + +## Страницы сравнения в psql: варианты + +Тот же текст запроса и те же параметры, что у плана приложения этой +страницы, в одной транзакции, которая откатывается: индексы базы +после неё те же. Каждый вариант выполнен дважды, здесь — второе +выполнение. `psql` — индекс приложения, custom plan; `generic` — он +же с force_generic_plan; `or-cursor` — условие курсора через OR; +`no-index` — без индекса приложения; варианты индекса вместо него: +`chat_only` (chat_id), `covering` (chat_id, created_at, id) INCLUDE (sender_id, text). + +### read 1k: middle, после 500 + +#### psql + +Limit (cost=0.28..45.28 rows=51 width=153) (actual time=0.006..0.063 rows=51.00 loops=1) + Buffers: shared hit=47 + -> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.28..440.51 rows=499 width=153) (actual time=0.006..0.060 rows=51.00 loops=1) + Index Cond: ((chat_id = '46854c14-676a-4932-9061-086bf0a80bf2'::uuid) AND (ROW(created_at, id) > ROW('2026-10-31 20:23:26.500819+00'::timestamp with time zone, '5576746d-8c9e-4881-84fd-1a794cd17f1d'::uuid))) + Index Searches: 1 + Buffers: shared hit=47 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=51) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51) + Filter: (message_id = messages.id) +Planning: + Buffers: shared hit=3 +Planning Time: 0.047 ms +Execution Time: 0.070 ms + +#### generic + +Limit (cost=0.28..7.92 rows=2 width=153) (actual time=0.011..0.061 rows=51.00 loops=1) + Buffers: shared hit=47 + -> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.28..91.99 rows=24 width=153) (actual time=0.011..0.058 rows=51.00 loops=1) + Index Cond: ((chat_id = $1) AND (ROW(created_at, id) > ROW($2, $3))) + Index Searches: 1 + Buffers: shared hit=47 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=51) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51) + Filter: (message_id = messages.id) +Planning Time: 0.006 ms +Execution Time: 0.069 ms + +#### or-cursor + +Limit (cost=0.28..49.28 rows=51 width=153) (actual time=0.077..0.122 rows=51.00 loops=1) + Buffers: shared hit=496 + -> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.28..479.68 rows=499 width=153) (actual time=0.077..0.120 rows=51.00 loops=1) + Index Cond: (chat_id = '46854c14-676a-4932-9061-086bf0a80bf2'::uuid) + Filter: ((created_at > '2026-10-31 20:23:26.500819+00'::timestamp with time zone) OR ((created_at = '2026-10-31 20:23:26.500819+00'::timestamp with time zone) AND (id > '5576746d-8c9e-4881-84fd-1a794cd17f1d'::uuid))) + Rows Removed by Filter: 500 + Index Searches: 1 + Buffers: shared hit=496 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51) + Filter: (message_id = messages.id) +Planning: + Buffers: shared hit=3 +Planning Time: 0.047 ms +Execution Time: 0.128 ms + +#### no-index + +Limit (cost=203.88..204.01 rows=51 width=153) (actual time=0.566..0.571 rows=51.00 loops=1) + Buffers: shared hit=101 + -> Sort (cost=203.88..205.13 rows=499 width=153) (actual time=0.566..0.568 rows=51.00 loops=1) + Sort Key: messages.created_at, messages.id + Sort Method: top-N heapsort Memory: 41kB + Buffers: shared hit=101 + -> Seq Scan on messages (cost=0.00..187.24 rows=499 width=153) (actual time=0.092..0.507 rows=500.00 loops=1) + Filter: ((chat_id = '46854c14-676a-4932-9061-086bf0a80bf2'::uuid) AND (ROW(created_at, id) > ROW('2026-10-31 20:23:26.500819+00'::timestamp with time zone, '5576746d-8c9e-4881-84fd-1a794cd17f1d'::uuid))) + Rows Removed by Filter: 4000 + Buffers: shared hit=101 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=500) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=500) + Filter: (message_id = messages.id) +Planning: + Buffers: shared hit=3 +Planning Time: 0.054 ms +Execution Time: 0.578 ms + +#### chat_only + +Limit (cost=158.54..158.67 rows=51 width=153) (actual time=0.455..0.459 rows=51.00 loops=1) + Buffers: shared hit=103 + -> Sort (cost=158.54..159.79 rows=499 width=153) (actual time=0.455..0.457 rows=51.00 loops=1) + Sort Key: messages.created_at, messages.id + Sort Method: top-N heapsort Memory: 41kB + Buffers: shared hit=103 + -> Bitmap Heap Scan on messages (cost=15.91..141.89 rows=499 width=153) (actual time=0.046..0.401 rows=500.00 loops=1) + Recheck Cond: (chat_id = '46854c14-676a-4932-9061-086bf0a80bf2'::uuid) + Filter: (ROW(created_at, id) > ROW('2026-10-31 20:23:26.500819+00'::timestamp with time zone, '5576746d-8c9e-4881-84fd-1a794cd17f1d'::uuid)) + Rows Removed by Filter: 500 + Heap Blocks: exact=101 + Buffers: shared hit=103 + -> Bitmap Index Scan on bench_variant (cost=0.00..15.78 rows=1000 width=0) (actual time=0.011..0.011 rows=1000.00 loops=1) + Index Cond: (chat_id = '46854c14-676a-4932-9061-086bf0a80bf2'::uuid) + Index Searches: 1 + Buffers: shared hit=2 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=500) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=500) + Filter: (message_id = messages.id) +Planning: + Buffers: shared hit=3 +Planning Time: 0.046 ms +Execution Time: 0.466 ms + +#### covering + +Limit (cost=0.28..6.16 rows=51 width=153) (actual time=0.005..0.050 rows=51.00 loops=1) + Buffers: shared hit=4 + -> Index Only Scan using bench_variant on messages (cost=0.28..57.75 rows=499 width=153) (actual time=0.005..0.048 rows=51.00 loops=1) + Index Cond: ((chat_id = '46854c14-676a-4932-9061-086bf0a80bf2'::uuid) AND (ROW(created_at, id) > ROW('2026-10-31 20:23:26.500819+00'::timestamp with time zone, '5576746d-8c9e-4881-84fd-1a794cd17f1d'::uuid))) + Heap Fetches: 0 + Index Searches: 1 + Buffers: shared hit=4 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=51) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51) + Filter: (message_id = messages.id) +Planning: + Buffers: shared hit=3 +Planning Time: 0.051 ms +Execution Time: 0.057 ms + +### bg 1k: middle, после 500 + +#### psql + +Limit (cost=0.28..45.51 rows=51 width=153) (actual time=0.014..0.059 rows=51.00 loops=1) + Buffers: shared hit=49 + -> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.28..444.58 rows=501 width=153) (actual time=0.014..0.056 rows=51.00 loops=1) + Index Cond: ((chat_id = '62be041f-7108-4a7a-becb-28edcdfc01aa'::uuid) AND (ROW(created_at, id) > ROW('2026-10-31 20:23:26.481237+00'::timestamp with time zone, 'd44546d3-6718-4522-9e30-1bb8271f1d93'::uuid))) + Index Searches: 1 + Buffers: shared hit=49 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=51) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51) + Filter: (message_id = messages.id) +Planning: + Buffers: shared hit=3 +Planning Time: 0.074 ms +Execution Time: 0.068 ms + +#### generic + +Limit (cost=0.28..7.92 rows=2 width=153) (actual time=0.011..0.058 rows=51.00 loops=1) + Buffers: shared hit=49 + -> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.28..91.99 rows=24 width=153) (actual time=0.011..0.054 rows=51.00 loops=1) + Index Cond: ((chat_id = $1) AND (ROW(created_at, id) > ROW($2, $3))) + Index Searches: 1 + Buffers: shared hit=49 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=51) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51) + Filter: (message_id = messages.id) +Planning Time: 0.009 ms +Execution Time: 0.069 ms + +#### or-cursor + +Limit (cost=0.28..49.09 rows=51 width=153) (actual time=0.082..0.117 rows=51.00 loops=1) + Buffers: shared hit=487 + -> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.28..479.71 rows=501 width=153) (actual time=0.081..0.115 rows=51.00 loops=1) + Index Cond: (chat_id = '62be041f-7108-4a7a-becb-28edcdfc01aa'::uuid) + Filter: ((created_at > '2026-10-31 20:23:26.481237+00'::timestamp with time zone) OR ((created_at = '2026-10-31 20:23:26.481237+00'::timestamp with time zone) AND (id > 'd44546d3-6718-4522-9e30-1bb8271f1d93'::uuid))) + Rows Removed by Filter: 500 + Index Searches: 1 + Buffers: shared hit=487 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51) + Filter: (message_id = messages.id) +Planning: + Buffers: shared hit=3 +Planning Time: 0.073 ms +Execution Time: 0.125 ms + +#### no-index + +Limit (cost=203.98..204.11 rows=51 width=153) (actual time=0.480..0.484 rows=51.00 loops=1) + Buffers: shared hit=101 + -> Sort (cost=203.98..205.23 rows=501 width=153) (actual time=0.480..0.482 rows=51.00 loops=1) + Sort Key: messages.created_at, messages.id + Sort Method: top-N heapsort Memory: 40kB + Buffers: shared hit=101 + -> Seq Scan on messages (cost=0.00..187.27 rows=501 width=153) (actual time=0.069..0.430 rows=500.00 loops=1) + Filter: ((chat_id = '62be041f-7108-4a7a-becb-28edcdfc01aa'::uuid) AND (ROW(created_at, id) > ROW('2026-10-31 20:23:26.481237+00'::timestamp with time zone, 'd44546d3-6718-4522-9e30-1bb8271f1d93'::uuid))) + Rows Removed by Filter: 4000 + Buffers: shared hit=101 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=500) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=500) + Filter: (message_id = messages.id) +Planning: + Buffers: shared hit=3 +Planning Time: 0.038 ms +Execution Time: 0.489 ms + +#### chat_only + +Limit (cost=158.64..158.76 rows=51 width=153) (actual time=0.418..0.421 rows=51.00 loops=1) + Buffers: shared hit=101 + -> Sort (cost=158.64..159.89 rows=501 width=153) (actual time=0.417..0.419 rows=51.00 loops=1) + Sort Key: messages.created_at, messages.id + Sort Method: top-N heapsort Memory: 40kB + Buffers: shared hit=101 + -> Bitmap Heap Scan on messages (cost=15.91..141.92 rows=501 width=153) (actual time=0.062..0.369 rows=500.00 loops=1) + Recheck Cond: (chat_id = '62be041f-7108-4a7a-becb-28edcdfc01aa'::uuid) + Filter: (ROW(created_at, id) > ROW('2026-10-31 20:23:26.481237+00'::timestamp with time zone, 'd44546d3-6718-4522-9e30-1bb8271f1d93'::uuid)) + Rows Removed by Filter: 500 + Heap Blocks: exact=99 + Buffers: shared hit=101 + -> Bitmap Index Scan on bench_variant (cost=0.00..15.78 rows=1000 width=0) (actual time=0.015..0.015 rows=1000.00 loops=1) + Index Cond: (chat_id = '62be041f-7108-4a7a-becb-28edcdfc01aa'::uuid) + Index Searches: 1 + Buffers: shared hit=2 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=500) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=500) + Filter: (message_id = messages.id) +Planning: + Buffers: shared hit=3 +Planning Time: 0.068 ms +Execution Time: 0.431 ms + +#### covering + +Limit (cost=0.28..6.14 rows=51 width=153) (actual time=0.005..0.049 rows=51.00 loops=1) + Buffers: shared hit=4 + -> Index Only Scan using bench_variant on messages (cost=0.28..57.82 rows=501 width=153) (actual time=0.005..0.047 rows=51.00 loops=1) + Index Cond: ((chat_id = '62be041f-7108-4a7a-becb-28edcdfc01aa'::uuid) AND (ROW(created_at, id) > ROW('2026-10-31 20:23:26.481237+00'::timestamp with time zone, 'd44546d3-6718-4522-9e30-1bb8271f1d93'::uuid))) + Heap Fetches: 0 + Index Searches: 1 + Buffers: shared hit=4 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=51) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51) + Filter: (message_id = messages.id) +Planning: + Buffers: shared hit=3 +Planning Time: 0.045 ms +Execution Time: 0.055 ms + +### bg 100: first, после 0 + +#### psql + +Limit (cost=119.42..119.55 rows=51 width=153) (actual time=0.122..0.126 rows=51.00 loops=1) + Buffers: shared hit=65 + -> Sort (cost=119.42..119.67 rows=100 width=153) (actual time=0.121..0.123 rows=51.00 loops=1) + Sort Key: messages.created_at, messages.id + Sort Method: quicksort Memory: 50kB + Buffers: shared hit=65 + -> Bitmap Heap Scan on messages (cost=9.06..116.10 rows=100 width=153) (actual time=0.017..0.108 rows=100.00 loops=1) + Recheck Cond: (chat_id = 'c29b11ae-9145-41f5-ad26-73f1c05430d8'::uuid) + Heap Blocks: exact=63 + Buffers: shared hit=65 + -> Bitmap Index Scan on ix_messages_chat_id_created_at_id (cost=0.00..9.03 rows=100 width=0) (actual time=0.007..0.007 rows=100.00 loops=1) + Index Cond: (chat_id = 'c29b11ae-9145-41f5-ad26-73f1c05430d8'::uuid) + Index Searches: 1 + Buffers: shared hit=2 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=100) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=100) + Filter: (message_id = messages.id) +Planning: + Buffers: shared hit=3 +Planning Time: 0.042 ms +Execution Time: 0.138 ms + +#### generic + +Limit (cost=0.28..21.53 rows=7 width=153) (actual time=0.016..0.059 rows=51.00 loops=1) + Buffers: shared hit=45 + -> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.28..215.80 rows=71 width=153) (actual time=0.015..0.057 rows=51.00 loops=1) + Index Cond: (chat_id = $1) + Index Searches: 1 + Buffers: shared hit=45 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=51) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51) + Filter: (message_id = messages.id) +Planning Time: 0.003 ms +Execution Time: 0.065 ms + +#### no-index + +Limit (cost=162.07..162.20 rows=51 width=153) (actual time=0.187..0.191 rows=51.00 loops=1) + Buffers: shared hit=101 + -> Sort (cost=162.07..162.32 rows=100 width=153) (actual time=0.187..0.188 rows=51.00 loops=1) + Sort Key: messages.created_at, messages.id + Sort Method: quicksort Memory: 50kB + Buffers: shared hit=101 + -> Seq Scan on messages (cost=0.00..158.75 rows=100 width=153) (actual time=0.005..0.172 rows=100.00 loops=1) + Filter: (chat_id = 'c29b11ae-9145-41f5-ad26-73f1c05430d8'::uuid) + Rows Removed by Filter: 4400 + Buffers: shared hit=101 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=100) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=100) + Filter: (message_id = messages.id) +Planning: + Buffers: shared hit=3 +Planning Time: 0.053 ms +Execution Time: 0.198 ms + +#### chat_only + +Limit (cost=115.42..115.55 rows=51 width=153) (actual time=0.113..0.118 rows=51.00 loops=1) + Buffers: shared hit=65 + -> Sort (cost=115.42..115.67 rows=100 width=153) (actual time=0.113..0.115 rows=51.00 loops=1) + Sort Key: messages.created_at, messages.id + Sort Method: quicksort Memory: 50kB + Buffers: shared hit=65 + -> Bitmap Heap Scan on messages (cost=5.06..112.10 rows=100 width=153) (actual time=0.009..0.096 rows=100.00 loops=1) + Recheck Cond: (chat_id = 'c29b11ae-9145-41f5-ad26-73f1c05430d8'::uuid) + Heap Blocks: exact=63 + Buffers: shared hit=65 + -> Bitmap Index Scan on bench_variant (cost=0.00..5.03 rows=100 width=0) (actual time=0.004..0.004 rows=100.00 loops=1) + Index Cond: (chat_id = 'c29b11ae-9145-41f5-ad26-73f1c05430d8'::uuid) + Index Searches: 1 + Buffers: shared hit=2 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=100) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=100) + Filter: (message_id = messages.id) +Planning: + Buffers: shared hit=3 +Planning Time: 0.036 ms +Execution Time: 0.125 ms + +#### covering + +Limit (cost=0.28..6.02 rows=51 width=153) (actual time=0.006..0.042 rows=51.00 loops=1) + Buffers: shared hit=4 + -> Index Only Scan using bench_variant on messages (cost=0.28..11.53 rows=100 width=153) (actual time=0.006..0.040 rows=51.00 loops=1) + Index Cond: (chat_id = 'c29b11ae-9145-41f5-ad26-73f1c05430d8'::uuid) + Heap Fetches: 0 + Index Searches: 1 + Buffers: shared hit=4 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51) + Filter: (message_id = messages.id) +Planning: + Buffers: shared hit=3 +Planning Time: 0.040 ms +Execution Time: 0.049 ms + +### bg 10: first, после 0 + +#### psql + +Limit (cost=35.36..35.39 rows=10 width=153) (actual time=0.032..0.033 rows=10.00 loops=1) + Buffers: shared hit=12 + -> Sort (cost=35.36..35.39 rows=10 width=153) (actual time=0.032..0.033 rows=10.00 loops=1) + Sort Key: messages.created_at, messages.id + Sort Method: quicksort Memory: 27kB + Buffers: shared hit=12 + -> Bitmap Heap Scan on messages (cost=4.36..35.20 rows=10 width=153) (actual time=0.020..0.030 rows=10.00 loops=1) + Recheck Cond: (chat_id = '6f3adfe6-1e3e-4065-a369-d2cd6e625865'::uuid) + Heap Blocks: exact=10 + Buffers: shared hit=12 + -> Bitmap Index Scan on ix_messages_chat_id_created_at_id (cost=0.00..4.36 rows=10 width=0) (actual time=0.004..0.004 rows=10.00 loops=1) + Index Cond: (chat_id = '6f3adfe6-1e3e-4065-a369-d2cd6e625865'::uuid) + Index Searches: 1 + Buffers: shared hit=2 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=10) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=10) + Filter: (message_id = messages.id) +Planning: + Buffers: shared hit=3 +Planning Time: 0.044 ms +Execution Time: 0.047 ms + +#### generic + +Limit (cost=0.28..21.53 rows=7 width=153) (actual time=0.013..0.023 rows=10.00 loops=1) + Buffers: shared hit=12 + -> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.28..215.80 rows=71 width=153) (actual time=0.012..0.022 rows=10.00 loops=1) + Index Cond: (chat_id = $1) + Index Searches: 1 + Buffers: shared hit=12 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=10) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=10) + Filter: (message_id = messages.id) +Planning Time: 0.003 ms +Execution Time: 0.029 ms + +#### no-index + +Limit (cost=157.57..157.59 rows=10 width=153) (actual time=0.139..0.140 rows=10.00 loops=1) + Buffers: shared hit=101 + -> Sort (cost=157.57..157.59 rows=10 width=153) (actual time=0.138..0.139 rows=10.00 loops=1) + Sort Key: messages.created_at, messages.id + Sort Method: quicksort Memory: 27kB + Buffers: shared hit=101 + -> Seq Scan on messages (cost=0.00..157.40 rows=10 width=153) (actual time=0.012..0.135 rows=10.00 loops=1) + Filter: (chat_id = '6f3adfe6-1e3e-4065-a369-d2cd6e625865'::uuid) + Rows Removed by Filter: 4490 + Buffers: shared hit=101 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=10) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=10) + Filter: (message_id = messages.id) +Planning: + Buffers: shared hit=3 +Planning Time: 0.050 ms +Execution Time: 0.146 ms + +#### chat_only + +Limit (cost=35.36..35.39 rows=10 width=153) (actual time=0.022..0.024 rows=10.00 loops=1) + Buffers: shared hit=12 + -> Sort (cost=35.36..35.39 rows=10 width=153) (actual time=0.022..0.023 rows=10.00 loops=1) + Sort Key: messages.created_at, messages.id + Sort Method: quicksort Memory: 27kB + Buffers: shared hit=12 + -> Bitmap Heap Scan on messages (cost=4.36..35.20 rows=10 width=153) (actual time=0.008..0.020 rows=10.00 loops=1) + Recheck Cond: (chat_id = '6f3adfe6-1e3e-4065-a369-d2cd6e625865'::uuid) + Heap Blocks: exact=10 + Buffers: shared hit=12 + -> Bitmap Index Scan on bench_variant (cost=0.00..4.36 rows=10 width=0) (actual time=0.003..0.003 rows=10.00 loops=1) + Index Cond: (chat_id = '6f3adfe6-1e3e-4065-a369-d2cd6e625865'::uuid) + Index Searches: 1 + Buffers: shared hit=2 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=10) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=10) + Filter: (message_id = messages.id) +Planning: + Buffers: shared hit=3 +Planning Time: 0.057 ms +Execution Time: 0.033 ms + +#### covering + +Limit (cost=0.28..4.61 rows=10 width=153) (actual time=0.004..0.010 rows=10.00 loops=1) + Buffers: shared hit=3 + -> Index Only Scan using bench_variant on messages (cost=0.28..4.61 rows=10 width=153) (actual time=0.004..0.010 rows=10.00 loops=1) + Index Cond: (chat_id = '6f3adfe6-1e3e-4065-a369-d2cd6e625865'::uuid) + Heap Fetches: 0 + Index Searches: 1 + Buffers: shared hit=3 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=10) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=10) + Filter: (message_id = messages.id) +Planning: + Buffers: shared hit=3 +Planning Time: 0.038 ms +Execution Time: 0.015 ms diff --git a/evidence/bench/unit-of-work-after/explain-5k.txt b/evidence/bench/unit-of-work-after/explain-5k.txt new file mode 100644 index 00000000..5715b028 --- /dev/null +++ b/evidence/bench/unit-of-work-after/explain-5k.txt @@ -0,0 +1,693 @@ +# План запроса истории: размер 5k + +Commit 6ba74b1 +Читаемый чат — 5000 сообщений; фоновые чаты: 2 × 1k, 10 × 100, 50 × 10. +Страница — `limit` профиля; «после» — сколько сообщений чата до +страницы. + +## Планы приложения + +auto_explain (ANALYZE, BUFFERS, TIMING): запрос, параметры и план, +с которыми его выполнило приложение (prepared statement asyncpg). + +### read 5k: first, после 0 + +duration: 0.156 ms plan: +Query Text: SELECT messages.id, messages.chat_id, messages.sender_id, messages.text, messages.created_at, array((SELECT message_attachments.attachment_id +FROM message_attachments +WHERE message_attachments.message_id = messages.id ORDER BY message_attachments.position)) AS attachment_ids +FROM messages +WHERE messages.chat_id = $1::UUID ORDER BY messages.created_at, messages.id + LIMIT $2::INTEGER +Query Parameters: $1 = 'e12c9819-0da8-4ba6-83cf-a8f7e1be48b6', $2 = '51' +Limit (cost=0.29..11.48 rows=51 width=153) (actual time=0.045..0.114 rows=51.00 loops=1) + Buffers: shared hit=25 + -> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..1097.45 rows=5000 width=153) (actual time=0.045..0.111 rows=51.00 loops=1) + Index Cond: (chat_id = 'e12c9819-0da8-4ba6-83cf-a8f7e1be48b6'::uuid) + Index Searches: 1 + Buffers: shared hit=25 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=51) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51) + Filter: (message_id = messages.id) + +### read 5k: middle, после 2500 + +duration: 0.178 ms plan: +Query Text: SELECT messages.id, messages.chat_id, messages.sender_id, messages.text, messages.created_at, array((SELECT message_attachments.attachment_id +FROM message_attachments +WHERE message_attachments.message_id = messages.id ORDER BY message_attachments.position)) AS attachment_ids +FROM messages +WHERE messages.chat_id = $1::UUID AND (messages.created_at, messages.id) > ($2::TIMESTAMP WITH TIME ZONE, $3::UUID) ORDER BY messages.created_at, messages.id + LIMIT $4::INTEGER +Query Parameters: $1 = 'e12c9819-0da8-4ba6-83cf-a8f7e1be48b6', $2 = '2026-10-31 20:24:38.589912+00', $3 = '53146b82-aceb-4178-811a-86a646e422ce', $4 = '51' +Limit (cost=0.29..14.23 rows=4 width=153) (actual time=0.036..0.138 rows=51.00 loops=1) + Buffers: shared hit=53 + -> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..157.21 rows=45 width=153) (actual time=0.034..0.134 rows=51.00 loops=1) + Index Cond: ((chat_id = $1) AND (ROW(created_at, id) > ROW($2, $3))) + Index Searches: 1 + Buffers: shared hit=53 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=51) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51) + Filter: (message_id = messages.id) + +### read 5k: last, после 4900 + +duration: 0.159 ms plan: +Query Text: SELECT messages.id, messages.chat_id, messages.sender_id, messages.text, messages.created_at, array((SELECT message_attachments.attachment_id +FROM message_attachments +WHERE message_attachments.message_id = messages.id ORDER BY message_attachments.position)) AS attachment_ids +FROM messages +WHERE messages.chat_id = $1::UUID AND (messages.created_at, messages.id) > ($2::TIMESTAMP WITH TIME ZONE, $3::UUID) ORDER BY messages.created_at, messages.id + LIMIT $4::INTEGER +Query Parameters: $1 = 'e12c9819-0da8-4ba6-83cf-a8f7e1be48b6', $2 = '2026-10-31 20:24:46.567187+00', $3 = '7bd2d45d-95d6-4adb-baaa-00598e6d08bc', $4 = '51' +Limit (cost=0.29..14.23 rows=4 width=153) (actual time=0.030..0.122 rows=51.00 loops=1) + Buffers: shared hit=50 + -> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..157.21 rows=45 width=153) (actual time=0.029..0.119 rows=51.00 loops=1) + Index Cond: ((chat_id = $1) AND (ROW(created_at, id) > ROW($2, $3))) + Index Searches: 1 + Buffers: shared hit=50 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=51) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51) + Filter: (message_id = messages.id) + +### bg 1k: first, после 0 + +duration: 0.113 ms plan: +Query Text: SELECT messages.id, messages.chat_id, messages.sender_id, messages.text, messages.created_at, array((SELECT message_attachments.attachment_id +FROM message_attachments +WHERE message_attachments.message_id = messages.id ORDER BY message_attachments.position)) AS attachment_ids +FROM messages +WHERE messages.chat_id = $1::UUID ORDER BY messages.created_at, messages.id + LIMIT $2::INTEGER +Query Parameters: $1 = '296f4cbe-97a0-4dfe-a14b-2c3b1a4440a3', $2 = '51' +Limit (cost=0.29..39.26 rows=51 width=153) (actual time=0.021..0.082 rows=51.00 loops=1) + Buffers: shared hit=42 + -> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..764.58 rows=1000 width=153) (actual time=0.020..0.079 rows=51.00 loops=1) + Index Cond: (chat_id = '296f4cbe-97a0-4dfe-a14b-2c3b1a4440a3'::uuid) + Index Searches: 1 + Buffers: shared hit=42 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=51) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51) + Filter: (message_id = messages.id) + +### bg 1k: middle, после 500 + +duration: 0.128 ms plan: +Query Text: SELECT messages.id, messages.chat_id, messages.sender_id, messages.text, messages.created_at, array((SELECT message_attachments.attachment_id +FROM message_attachments +WHERE message_attachments.message_id = messages.id ORDER BY message_attachments.position)) AS attachment_ids +FROM messages +WHERE messages.chat_id = $1::UUID AND (messages.created_at, messages.id) > ($2::TIMESTAMP WITH TIME ZONE, $3::UUID) ORDER BY messages.created_at, messages.id + LIMIT $4::INTEGER +Query Parameters: $1 = '296f4cbe-97a0-4dfe-a14b-2c3b1a4440a3', $2 = '2026-10-31 20:24:38.568925+00', $3 = 'f4606134-1824-43bd-a240-3ea3b55a63ec', $4 = '51' +Limit (cost=0.29..14.23 rows=4 width=153) (actual time=0.017..0.095 rows=51.00 loops=1) + Buffers: shared hit=46 + -> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..157.21 rows=45 width=153) (actual time=0.016..0.092 rows=51.00 loops=1) + Index Cond: ((chat_id = $1) AND (ROW(created_at, id) > ROW($2, $3))) + Index Searches: 1 + Buffers: shared hit=46 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=51) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51) + Filter: (message_id = messages.id) + +### bg 1k: last, после 900 + +duration: 0.108 ms plan: +Query Text: SELECT messages.id, messages.chat_id, messages.sender_id, messages.text, messages.created_at, array((SELECT message_attachments.attachment_id +FROM message_attachments +WHERE message_attachments.message_id = messages.id ORDER BY message_attachments.position)) AS attachment_ids +FROM messages +WHERE messages.chat_id = $1::UUID AND (messages.created_at, messages.id) > ($2::TIMESTAMP WITH TIME ZONE, $3::UUID) ORDER BY messages.created_at, messages.id + LIMIT $4::INTEGER +Query Parameters: $1 = '296f4cbe-97a0-4dfe-a14b-2c3b1a4440a3', $2 = '2026-10-31 20:24:45.262628+00', $3 = '9f773982-da33-47e1-834f-64b654a77314', $4 = '51' +Limit (cost=0.29..14.23 rows=4 width=153) (actual time=0.013..0.085 rows=51.00 loops=1) + Buffers: shared hit=50 + -> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..157.21 rows=45 width=153) (actual time=0.012..0.081 rows=51.00 loops=1) + Index Cond: ((chat_id = $1) AND (ROW(created_at, id) > ROW($2, $3))) + Index Searches: 1 + Buffers: shared hit=50 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=51) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51) + Filter: (message_id = messages.id) + +### bg 100: first, после 0 + +duration: 0.172 ms plan: +Query Text: SELECT messages.id, messages.chat_id, messages.sender_id, messages.text, messages.created_at, array((SELECT message_attachments.attachment_id +FROM message_attachments +WHERE message_attachments.message_id = messages.id ORDER BY message_attachments.position)) AS attachment_ids +FROM messages +WHERE messages.chat_id = $1::UUID ORDER BY messages.created_at, messages.id + LIMIT $2::INTEGER +Query Parameters: $1 = 'fb160065-34cc-4298-8362-ba055cc9499f', $2 = '51' +Limit (cost=0.29..154.68 rows=51 width=153) (actual time=0.022..0.143 rows=51.00 loops=1) + Buffers: shared hit=51 + -> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..303.03 rows=100 width=153) (actual time=0.021..0.140 rows=51.00 loops=1) + Index Cond: (chat_id = 'fb160065-34cc-4298-8362-ba055cc9499f'::uuid) + Index Searches: 1 + Buffers: shared hit=51 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=51) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51) + Filter: (message_id = messages.id) + +### bg 10: first, после 0 + +duration: 0.052 ms plan: +Query Text: SELECT messages.id, messages.chat_id, messages.sender_id, messages.text, messages.created_at, array((SELECT message_attachments.attachment_id +FROM message_attachments +WHERE message_attachments.message_id = messages.id ORDER BY message_attachments.position)) AS attachment_ids +FROM messages +WHERE messages.chat_id = $1::UUID ORDER BY messages.created_at, messages.id + LIMIT $2::INTEGER +Query Parameters: $1 = '3dcf3ed2-fde3-4c72-8da6-3d291584e568', $2 = '51' +Limit (cost=37.81..37.83 rows=10 width=153) (actual time=0.047..0.048 rows=10.00 loops=1) + Buffers: shared hit=12 + -> Sort (cost=37.81..37.83 rows=10 width=153) (actual time=0.047..0.047 rows=10.00 loops=1) + Sort Key: messages.created_at, messages.id + Sort Method: quicksort Memory: 27kB + Buffers: shared hit=12 + -> Bitmap Heap Scan on messages (cost=4.36..37.64 rows=10 width=153) (actual time=0.021..0.042 rows=10.00 loops=1) + Recheck Cond: (chat_id = '3dcf3ed2-fde3-4c72-8da6-3d291584e568'::uuid) + Heap Blocks: exact=10 + Buffers: shared hit=12 + -> Bitmap Index Scan on ix_messages_chat_id_created_at_id (cost=0.00..4.36 rows=10 width=0) (actual time=0.009..0.009 rows=10.00 loops=1) + Index Cond: (chat_id = '3dcf3ed2-fde3-4c72-8da6-3d291584e568'::uuid) + Index Searches: 1 + Buffers: shared hit=2 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=10) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=10) + Filter: (message_id = messages.id) + +## Страницы сравнения в psql: варианты + +Тот же текст запроса и те же параметры, что у плана приложения этой +страницы, в одной транзакции, которая откатывается: индексы базы +после неё те же. Каждый вариант выполнен дважды, здесь — второе +выполнение. `psql` — индекс приложения, custom plan; `generic` — он +же с force_generic_plan; `or-cursor` — условие курсора через OR; +`no-index` — без индекса приложения; варианты индекса вместо него: +`chat_only` (chat_id), `covering` (chat_id, created_at, id) INCLUDE (sender_id, text). + +### read 5k: middle, после 2500 + +#### psql + +Limit (cost=0.29..18.53 rows=51 width=153) (actual time=0.010..0.056 rows=51.00 loops=1) + Buffers: shared hit=53 + -> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..894.15 rows=2499 width=153) (actual time=0.010..0.053 rows=51.00 loops=1) + Index Cond: ((chat_id = 'e12c9819-0da8-4ba6-83cf-a8f7e1be48b6'::uuid) AND (ROW(created_at, id) > ROW('2026-10-31 20:24:38.589912+00'::timestamp with time zone, '53146b82-aceb-4178-811a-86a646e422ce'::uuid))) + Index Searches: 1 + Buffers: shared hit=53 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=51) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51) + Filter: (message_id = messages.id) +Planning: + Buffers: shared hit=3 +Planning Time: 0.063 ms +Execution Time: 0.065 ms + +#### generic + +Limit (cost=0.29..14.23 rows=4 width=153) (actual time=0.019..0.064 rows=51.00 loops=1) + Buffers: shared hit=53 + -> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..157.21 rows=45 width=153) (actual time=0.018..0.062 rows=51.00 loops=1) + Index Cond: ((chat_id = $1) AND (ROW(created_at, id) > ROW($2, $3))) + Index Searches: 1 + Buffers: shared hit=53 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=51) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51) + Filter: (message_id = messages.id) +Planning Time: 0.010 ms +Execution Time: 0.077 ms + +#### or-cursor + +Limit (cost=0.29..22.67 rows=51 width=153) (actual time=0.322..0.374 rows=51.00 loops=1) + Buffers: shared hit=2365 + -> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..1097.45 rows=2500 width=153) (actual time=0.322..0.371 rows=51.00 loops=1) + Index Cond: (chat_id = 'e12c9819-0da8-4ba6-83cf-a8f7e1be48b6'::uuid) + Filter: ((created_at > '2026-10-31 20:24:38.589912+00'::timestamp with time zone) OR ((created_at = '2026-10-31 20:24:38.589912+00'::timestamp with time zone) AND (id > '53146b82-aceb-4178-811a-86a646e422ce'::uuid))) + Rows Removed by Filter: 2500 + Index Searches: 1 + Buffers: shared hit=2365 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=51) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51) + Filter: (message_id = messages.id) +Planning: + Buffers: shared hit=3 +Planning Time: 0.052 ms +Execution Time: 0.380 ms + +#### no-index + +Limit (cost=453.61..453.73 rows=51 width=153) (actual time=2.113..2.117 rows=51.00 loops=1) + Buffers: shared hit=184 + -> Sort (cost=453.61..459.85 rows=2499 width=153) (actual time=2.113..2.114 rows=51.00 loops=1) + Sort Key: messages.created_at, messages.id + Sort Method: top-N heapsort Memory: 44kB + Buffers: shared hit=184 + -> Seq Scan on messages (cost=0.00..370.24 rows=2499 width=153) (actual time=0.154..1.813 rows=2500.00 loops=1) + Filter: ((chat_id = 'e12c9819-0da8-4ba6-83cf-a8f7e1be48b6'::uuid) AND (ROW(created_at, id) > ROW('2026-10-31 20:24:38.589912+00'::timestamp with time zone, '53146b82-aceb-4178-811a-86a646e422ce'::uuid))) + Rows Removed by Filter: 6000 + Buffers: shared hit=184 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=2500) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=2500) + Filter: (message_id = messages.id) +Planning: + Buffers: shared hit=3 +Planning Time: 0.038 ms +Execution Time: 2.122 ms + +#### chat_only + +Limit (cost=453.61..453.73 rows=51 width=153) (actual time=2.113..2.117 rows=51.00 loops=1) + Buffers: shared hit=184 + -> Sort (cost=453.61..459.85 rows=2499 width=153) (actual time=2.113..2.115 rows=51.00 loops=1) + Sort Key: messages.created_at, messages.id + Sort Method: top-N heapsort Memory: 44kB + Buffers: shared hit=184 + -> Seq Scan on messages (cost=0.00..370.24 rows=2499 width=153) (actual time=0.180..1.802 rows=2500.00 loops=1) + Filter: ((chat_id = 'e12c9819-0da8-4ba6-83cf-a8f7e1be48b6'::uuid) AND (ROW(created_at, id) > ROW('2026-10-31 20:24:38.589912+00'::timestamp with time zone, '53146b82-aceb-4178-811a-86a646e422ce'::uuid))) + Rows Removed by Filter: 6000 + Buffers: shared hit=184 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=2500) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=2500) + Filter: (message_id = messages.id) +Planning: + Buffers: shared hit=3 +Planning Time: 0.048 ms +Execution Time: 2.124 ms + +#### covering + +Limit (cost=0.41..6.28 rows=51 width=153) (actual time=0.006..0.046 rows=51.00 loops=1) + Buffers: shared hit=5 + -> Index Only Scan using bench_variant on messages (cost=0.41..287.88 rows=2499 width=153) (actual time=0.006..0.043 rows=51.00 loops=1) + Index Cond: ((chat_id = 'e12c9819-0da8-4ba6-83cf-a8f7e1be48b6'::uuid) AND (ROW(created_at, id) > ROW('2026-10-31 20:24:38.589912+00'::timestamp with time zone, '53146b82-aceb-4178-811a-86a646e422ce'::uuid))) + Heap Fetches: 0 + Index Searches: 1 + Buffers: shared hit=5 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51) + Filter: (message_id = messages.id) +Planning: + Buffers: shared hit=3 +Planning Time: 0.041 ms +Execution Time: 0.053 ms + +### bg 1k: middle, после 500 + +#### psql + +Limit (cost=0.29..74.03 rows=51 width=153) (actual time=0.011..0.053 rows=51.00 loops=1) + Buffers: shared hit=46 + -> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..724.74 rows=501 width=153) (actual time=0.011..0.050 rows=51.00 loops=1) + Index Cond: ((chat_id = '296f4cbe-97a0-4dfe-a14b-2c3b1a4440a3'::uuid) AND (ROW(created_at, id) > ROW('2026-10-31 20:24:38.568925+00'::timestamp with time zone, 'f4606134-1824-43bd-a240-3ea3b55a63ec'::uuid))) + Index Searches: 1 + Buffers: shared hit=46 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51) + Filter: (message_id = messages.id) +Planning: + Buffers: shared hit=3 +Planning Time: 0.072 ms +Execution Time: 0.064 ms + +#### generic + +Limit (cost=0.29..14.23 rows=4 width=153) (actual time=0.009..0.057 rows=51.00 loops=1) + Buffers: shared hit=46 + -> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..157.21 rows=45 width=153) (actual time=0.009..0.054 rows=51.00 loops=1) + Index Cond: ((chat_id = $1) AND (ROW(created_at, id) > ROW($2, $3))) + Index Searches: 1 + Buffers: shared hit=46 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=51) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51) + Filter: (message_id = messages.id) +Planning Time: 0.005 ms +Execution Time: 0.064 ms + +#### or-cursor + +Limit (cost=0.29..78.09 rows=51 width=153) (actual time=0.073..0.109 rows=51.00 loops=1) + Buffers: shared hit=498 + -> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..764.59 rows=501 width=153) (actual time=0.073..0.107 rows=51.00 loops=1) + Index Cond: (chat_id = '296f4cbe-97a0-4dfe-a14b-2c3b1a4440a3'::uuid) + Filter: ((created_at > '2026-10-31 20:24:38.568925+00'::timestamp with time zone) OR ((created_at = '2026-10-31 20:24:38.568925+00'::timestamp with time zone) AND (id > 'f4606134-1824-43bd-a240-3ea3b55a63ec'::uuid))) + Rows Removed by Filter: 500 + Index Searches: 1 + Buffers: shared hit=498 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51) + Filter: (message_id = messages.id) +Planning: + Buffers: shared hit=3 +Planning Time: 0.049 ms +Execution Time: 0.114 ms + +#### no-index + +Limit (cost=356.98..357.11 rows=51 width=153) (actual time=0.560..0.563 rows=51.00 loops=1) + Buffers: shared hit=184 + -> Sort (cost=356.98..358.23 rows=501 width=153) (actual time=0.559..0.561 rows=51.00 loops=1) + Sort Key: messages.created_at, messages.id + Sort Method: top-N heapsort Memory: 39kB + Buffers: shared hit=184 + -> Seq Scan on messages (cost=0.00..340.26 rows=501 width=153) (actual time=0.127..0.499 rows=500.00 loops=1) + Filter: ((chat_id = '296f4cbe-97a0-4dfe-a14b-2c3b1a4440a3'::uuid) AND (ROW(created_at, id) > ROW('2026-10-31 20:24:38.568925+00'::timestamp with time zone, 'f4606134-1824-43bd-a240-3ea3b55a63ec'::uuid))) + Rows Removed by Filter: 8000 + Buffers: shared hit=184 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=500) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=500) + Filter: (message_id = messages.id) +Planning: + Buffers: shared hit=3 +Planning Time: 0.040 ms +Execution Time: 0.568 ms + +#### chat_only + +Limit (cost=241.64..241.77 rows=51 width=153) (actual time=0.425..0.428 rows=51.00 loops=1) + Buffers: shared hit=186 + -> Sort (cost=241.64..242.89 rows=501 width=153) (actual time=0.424..0.426 rows=51.00 loops=1) + Sort Key: messages.created_at, messages.id + Sort Method: top-N heapsort Memory: 39kB + Buffers: shared hit=186 + -> Bitmap Heap Scan on messages (cost=15.91..224.93 rows=501 width=153) (actual time=0.078..0.374 rows=500.00 loops=1) + Recheck Cond: (chat_id = '296f4cbe-97a0-4dfe-a14b-2c3b1a4440a3'::uuid) + Filter: (ROW(created_at, id) > ROW('2026-10-31 20:24:38.568925+00'::timestamp with time zone, 'f4606134-1824-43bd-a240-3ea3b55a63ec'::uuid)) + Rows Removed by Filter: 500 + Heap Blocks: exact=184 + Buffers: shared hit=186 + -> Bitmap Index Scan on bench_variant (cost=0.00..15.79 rows=1000 width=0) (actual time=0.017..0.018 rows=1000.00 loops=1) + Index Cond: (chat_id = '296f4cbe-97a0-4dfe-a14b-2c3b1a4440a3'::uuid) + Index Searches: 1 + Buffers: shared hit=2 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=500) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=500) + Filter: (message_id = messages.id) +Planning: + Buffers: shared hit=3 +Planning Time: 0.047 ms +Execution Time: 0.435 ms + +#### covering + +Limit (cost=0.41..6.27 rows=51 width=153) (actual time=0.007..0.043 rows=51.00 loops=1) + Buffers: shared hit=5 + -> Index Only Scan using bench_variant on messages (cost=0.41..57.94 rows=501 width=153) (actual time=0.006..0.041 rows=51.00 loops=1) + Index Cond: ((chat_id = '296f4cbe-97a0-4dfe-a14b-2c3b1a4440a3'::uuid) AND (ROW(created_at, id) > ROW('2026-10-31 20:24:38.568925+00'::timestamp with time zone, 'f4606134-1824-43bd-a240-3ea3b55a63ec'::uuid))) + Heap Fetches: 0 + Index Searches: 1 + Buffers: shared hit=5 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51) + Filter: (message_id = messages.id) +Planning: + Buffers: shared hit=3 +Planning Time: 0.066 ms +Execution Time: 0.053 ms + +### bg 100: first, после 0 + +#### psql + +Limit (cost=0.29..154.68 rows=51 width=153) (actual time=0.007..0.055 rows=51.00 loops=1) + Buffers: shared hit=51 + -> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..303.03 rows=100 width=153) (actual time=0.007..0.052 rows=51.00 loops=1) + Index Cond: (chat_id = 'fb160065-34cc-4298-8362-ba055cc9499f'::uuid) + Index Searches: 1 + Buffers: shared hit=51 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=51) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51) + Filter: (message_id = messages.id) +Planning: + Buffers: shared hit=3 +Planning Time: 0.040 ms +Execution Time: 0.061 ms + +#### generic + +Limit (cost=0.29..39.44 rows=14 width=153) (actual time=0.011..0.057 rows=51.00 loops=1) + Buffers: shared hit=51 + -> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..377.84 rows=135 width=153) (actual time=0.010..0.055 rows=51.00 loops=1) + Index Cond: (chat_id = $1) + Index Searches: 1 + Buffers: shared hit=51 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.000..0.001 rows=0.00 loops=51) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51) + Filter: (message_id = messages.id) +Planning Time: 0.003 ms +Execution Time: 0.063 ms + +#### no-index + +Limit (cost=295.07..295.20 rows=51 width=153) (actual time=0.264..0.267 rows=51.00 loops=1) + Buffers: shared hit=184 + -> Sort (cost=295.07..295.32 rows=100 width=153) (actual time=0.263..0.265 rows=51.00 loops=1) + Sort Key: messages.created_at, messages.id + Sort Method: quicksort Memory: 50kB + Buffers: shared hit=184 + -> Seq Scan on messages (cost=0.00..291.75 rows=100 width=153) (actual time=0.007..0.248 rows=100.00 loops=1) + Filter: (chat_id = 'fb160065-34cc-4298-8362-ba055cc9499f'::uuid) + Rows Removed by Filter: 8400 + Buffers: shared hit=184 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=100) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=100) + Filter: (message_id = messages.id) +Planning: + Buffers: shared hit=3 +Planning Time: 0.038 ms +Execution Time: 0.273 ms + +#### chat_only + +Limit (cost=171.84..171.97 rows=51 width=153) (actual time=0.117..0.120 rows=51.00 loops=1) + Buffers: shared hit=84 + -> Sort (cost=171.84..172.09 rows=100 width=153) (actual time=0.116..0.118 rows=51.00 loops=1) + Sort Key: messages.created_at, messages.id + Sort Method: quicksort Memory: 50kB + Buffers: shared hit=84 + -> Bitmap Heap Scan on messages (cost=5.06..168.52 rows=100 width=153) (actual time=0.014..0.102 rows=100.00 loops=1) + Recheck Cond: (chat_id = 'fb160065-34cc-4298-8362-ba055cc9499f'::uuid) + Heap Blocks: exact=82 + Buffers: shared hit=84 + -> Bitmap Index Scan on bench_variant (cost=0.00..5.04 rows=100 width=0) (actual time=0.005..0.005 rows=100.00 loops=1) + Index Cond: (chat_id = 'fb160065-34cc-4298-8362-ba055cc9499f'::uuid) + Index Searches: 1 + Buffers: shared hit=2 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=100) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=100) + Filter: (message_id = messages.id) +Planning: + Buffers: shared hit=3 +Planning Time: 0.051 ms +Execution Time: 0.129 ms + +#### covering + +Limit (cost=0.41..6.15 rows=51 width=153) (actual time=0.005..0.041 rows=51.00 loops=1) + Buffers: shared hit=5 + -> Index Only Scan using bench_variant on messages (cost=0.41..11.66 rows=100 width=153) (actual time=0.005..0.039 rows=51.00 loops=1) + Index Cond: (chat_id = 'fb160065-34cc-4298-8362-ba055cc9499f'::uuid) + Heap Fetches: 0 + Index Searches: 1 + Buffers: shared hit=5 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51) + Filter: (message_id = messages.id) +Planning: + Buffers: shared hit=3 +Planning Time: 0.046 ms +Execution Time: 0.048 ms + +### bg 10: first, после 0 + +#### psql + +Limit (cost=37.81..37.83 rows=10 width=153) (actual time=0.020..0.021 rows=10.00 loops=1) + Buffers: shared hit=12 + -> Sort (cost=37.81..37.83 rows=10 width=153) (actual time=0.020..0.020 rows=10.00 loops=1) + Sort Key: messages.created_at, messages.id + Sort Method: quicksort Memory: 27kB + Buffers: shared hit=12 + -> Bitmap Heap Scan on messages (cost=4.36..37.64 rows=10 width=153) (actual time=0.009..0.018 rows=10.00 loops=1) + Recheck Cond: (chat_id = '3dcf3ed2-fde3-4c72-8da6-3d291584e568'::uuid) + Heap Blocks: exact=10 + Buffers: shared hit=12 + -> Bitmap Index Scan on ix_messages_chat_id_created_at_id (cost=0.00..4.36 rows=10 width=0) (actual time=0.004..0.004 rows=10.00 loops=1) + Index Cond: (chat_id = '3dcf3ed2-fde3-4c72-8da6-3d291584e568'::uuid) + Index Searches: 1 + Buffers: shared hit=2 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=10) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=10) + Filter: (message_id = messages.id) +Planning: + Buffers: shared hit=3 +Planning Time: 0.040 ms +Execution Time: 0.030 ms + +#### generic + +Limit (cost=0.29..39.44 rows=14 width=153) (actual time=0.009..0.020 rows=10.00 loops=1) + Buffers: shared hit=12 + -> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..377.84 rows=135 width=153) (actual time=0.008..0.019 rows=10.00 loops=1) + Index Cond: (chat_id = $1) + Index Searches: 1 + Buffers: shared hit=12 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=10) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=10) + Filter: (message_id = messages.id) +Planning Time: 0.003 ms +Execution Time: 0.024 ms + +#### no-index + +Limit (cost=290.57..290.59 rows=10 width=153) (actual time=0.197..0.198 rows=10.00 loops=1) + Buffers: shared hit=184 + -> Sort (cost=290.57..290.59 rows=10 width=153) (actual time=0.197..0.197 rows=10.00 loops=1) + Sort Key: messages.created_at, messages.id + Sort Method: quicksort Memory: 27kB + Buffers: shared hit=184 + -> Seq Scan on messages (cost=0.00..290.40 rows=10 width=153) (actual time=0.009..0.194 rows=10.00 loops=1) + Filter: (chat_id = '3dcf3ed2-fde3-4c72-8da6-3d291584e568'::uuid) + Rows Removed by Filter: 8490 + Buffers: shared hit=184 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=10) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=10) + Filter: (message_id = messages.id) +Planning: + Buffers: shared hit=3 +Planning Time: 0.035 ms +Execution Time: 0.202 ms + +#### chat_only + +Limit (cost=37.81..37.83 rows=10 width=153) (actual time=0.015..0.017 rows=10.00 loops=1) + Buffers: shared hit=12 + -> Sort (cost=37.81..37.83 rows=10 width=153) (actual time=0.015..0.016 rows=10.00 loops=1) + Sort Key: messages.created_at, messages.id + Sort Method: quicksort Memory: 27kB + Buffers: shared hit=12 + -> Bitmap Heap Scan on messages (cost=4.36..37.64 rows=10 width=153) (actual time=0.005..0.014 rows=10.00 loops=1) + Recheck Cond: (chat_id = '3dcf3ed2-fde3-4c72-8da6-3d291584e568'::uuid) + Heap Blocks: exact=10 + Buffers: shared hit=12 + -> Bitmap Index Scan on bench_variant (cost=0.00..4.36 rows=10 width=0) (actual time=0.002..0.002 rows=10.00 loops=1) + Index Cond: (chat_id = '3dcf3ed2-fde3-4c72-8da6-3d291584e568'::uuid) + Index Searches: 1 + Buffers: shared hit=2 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=10) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=10) + Filter: (message_id = messages.id) +Planning: + Buffers: shared hit=3 +Planning Time: 0.036 ms +Execution Time: 0.022 ms + +#### covering + +Limit (cost=0.41..4.74 rows=10 width=153) (actual time=0.005..0.013 rows=10.00 loops=1) + Buffers: shared hit=4 + -> Index Only Scan using bench_variant on messages (cost=0.41..4.74 rows=10 width=153) (actual time=0.005..0.012 rows=10.00 loops=1) + Index Cond: (chat_id = '3dcf3ed2-fde3-4c72-8da6-3d291584e568'::uuid) + Heap Fetches: 0 + Index Searches: 1 + Buffers: shared hit=4 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=10) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=10) + Filter: (message_id = messages.id) +Planning: + Buffers: shared hit=3 +Planning Time: 0.037 ms +Execution Time: 0.019 ms diff --git a/evidence/bench/unit-of-work-after/meta.json b/evidence/bench/unit-of-work-after/meta.json new file mode 100644 index 00000000..75b7966e --- /dev/null +++ b/evidence/bench/unit-of-work-after/meta.json @@ -0,0 +1,1888 @@ +{ + "label": "unit-of-work-after", + "status": "complete", + "started_at": "2026-10-31T20:23:07+00:00", + "command": "uv run python bench/run.py --profile quick --label unit-of-work-after", + "git": { + "commit": "6ba74b1", + "dirty": false + }, + "overrides": {}, + "host_state": { + "start": { + "swap_used_mib": 7631.62, + "swap_total_mib": 8192.0, + "swapouts": 7156652, + "memory_free_percent": 49, + "power": "AC Power", + "battery_percent": 80 + }, + "end": { + "swap_used_mib": 7599.62, + "swap_total_mib": 8192.0, + "swapouts": 7156652, + "memory_free_percent": 44, + "power": "AC Power", + "battery_percent": 80 + }, + "swapouts_delta": 0, + "slept_seconds": 0 + }, + "host_warnings": [], + "other_containers": [ + "domains-api-1", + "domains-bot-1", + "domains-postgres-1" + ], + "app_image": { + "tag": "mtusi-messenger:bench", + "id": "sha256:e3a79e5643dc4ad8a5db9fcdc394e278b5bad66735a21065b7b09e64456d5210", + "versions": { + "python": "3.12.14", + "fastapi": "0.141.1", + "starlette": "1.7.0", + "pydantic": "2.13.5", + "uvicorn": "0.54.0", + "sqlalchemy": "2.1.1", + "asyncpg": "0.31.0", + "redis": "8.1.0" + } + }, + "generator": { + "image": "grafana/k6:2.3.0@sha256:9c2dee7f8ed74d317e4027c06a10f169b625638189de8d4555d0b3486a5aeb34", + "version": "k6 v2.3.0 (commit/e088784614, go1.27.1, linux/arm64)" + }, + "docker": { + "server": "29.9.2", + "vm_os": "Docker Desktop", + "kernel": "7.0.14-linuxkit", + "vm_cpus": 12, + "vm_memory_gib": 7.7, + "cgroup": "2", + "logging_driver": "local" + }, + "host": { + "os": "macOS 26.7.1", + "machine": "Apple M3 Pro", + "memory_gib": 18.0, + "performance_cores": 6, + "efficiency_cores": 6 + }, + "profile": { + "name": "quick", + "sizes": [ + 1000, + 5000, + 10000 + ], + "concurrency": [ + 1, + 4, + 16 + ], + "repeats": 1, + "read_warmup_s": 2, + "read_measure_s": 5, + "write_warmup": 100, + "write_measure": 1000, + "prefill_chunk": 25000, + "prefill_vus": 32, + "text_length": 64, + "page_limit": 50, + "walk_limit": 100, + "cursor_pool": 1000, + "members": 10, + "seed": 20260930, + "warmup_seed_shift": 1000003, + "generator_cpu_limit": 4.0, + "cpus": "1", + "memory": "2g", + "db_cpus": "4", + "db_memory": "3g", + "cache_cpus": "2", + "cache_memory": "512m", + "session_ttl_seconds": 21600, + "background": [ + [ + 2, + 1000 + ], + [ + 10, + 100 + ], + [ + 50, + 10 + ] + ], + "index_variants": [ + [ + "chat_only", + "(chat_id)" + ], + [ + "covering", + "(chat_id, created_at, id) INCLUDE (sender_id, text)" + ] + ], + "write_probe_rows": 5000, + "write_probe_repeats": 3, + "restore": false, + "restore_jobs": 4, + "restore_write_load": 5000, + "restore_write_vus": 10, + "replicas": 1, + "lb_cpus": "1", + "lb_memory": "256m", + "failover_modes": [], + "failover_write_rate": 0, + "failover_read_rate": 0, + "failover_before_s": 0, + "failover_down_s": 0, + "failover_after_s": 0, + "failover_success": 0.99, + "failover_pre_vus": 600, + "failover_max_vus": 1500, + "rollout_from": "", + "rollout_before_s": 0, + "rollout_budget_s": 0, + "rollout_after_s": 0, + "sample_resources": false, + "uploads_variants": [], + "uploads_before": "", + "uploads_success_codes": [ + [ + "before", + 201 + ], + [ + "unlimited", + 202 + ], + [ + "limited", + 202 + ] + ], + "uploads_sizes": [], + "uploads_clients": [], + "uploads_ramp_s": 3, + "uploads_window_s": 20, + "uploads_unlimited_env": [ + [ + "UPLOADS__MAX_CONCURRENT", + "1000" + ], + [ + "UPLOADS__MAX_WAITING", + "0" + ] + ], + "uploads_sample_interval_s": 0.2, + "s3_cpus": "1", + "s3_memory": "512m", + "broker_cpus": "1", + "broker_memory": "512m", + "relay_cpus": "0.25", + "relay_memory": "256m", + "worker_cpus": "1", + "worker_memory": "1g", + "cleaner_cpus": "0.25", + "cleaner_memory": "256m", + "reconcile_stages": [], + "reconcile_before": "", + "reconcile_s4_clean": 0, + "reconcile_s4_candidates": [], + "reconcile_s4_max_changes": 100, + "reconcile_grace_s": 30, + "reconcile_fresh_wait_s": 2, + "reconcile_fast_cpus": "1", + "reconcile_default_rate": 2000, + "reconcile_background": [ + [ + "download", + 300 + ], + [ + "write", + 50 + ], + [ + "read", + 50 + ] + ], + "reconcile_downloads": 5000, + "reconcile_bg_max_vus": 600, + "reconcile_quiet_s": 30, + "reconcile_fill_processes": 3, + "reconcile_fill_threads": 24, + "reconcile_sample_interval_s": 0.5, + "reconcile_metrics_port": 9327, + "reconcile_h1_stages": [], + "reconcile_h2_stages": [], + "reconcile_h3_stages": [], + "reconcile_s4_base": "", + "db_max_connections": 100, + "series": "", + "configs": [], + "write_chats": 1, + "mix": [], + "fixed_rps": [], + "ladder_base": 100, + "step_factor": 1.25, + "start_rps_per_replica": 300, + "bisect_steps": 2, + "max_steps": 12, + "first_warmup_s": 15, + "step_warmup_s": 5, + "step_measure_s": 20, + "cooldown_s": 10, + "slo_p95_ms": 200, + "slo_error_ratio": 0.01, + "abort_error_ratio": 0.5, + "abort_p95_ms": 2000, + "request_timeout_s": 15, + "prevus_per_rps": 0.05, + "vus_per_rps": 0.2, + "generator_cpus": "", + "generator_memory": "", + "sampler_cpus": "0.25", + "sampler_memory": "128m", + "sample_interval_s": 1.0, + "order_seed": 20261011 + }, + "sizes": [ + { + "size": 1000, + "messages_total": 4500, + "rss_before_mib": 121.4, + "rss_after_mib": 127.6, + "bytes_per_message": 1430, + "prefill_seconds": 9.2, + "prefill_rate": 488, + "cursors": 9, + "maintenance_seconds": 0.1, + "messages_rows": 4500, + "messages_table_bytes": 868352, + "messages_indexes_bytes": 614400, + "db_bytes_per_message": 330, + "plans": [ + { + "chat": "read 1k", + "chat_size": 1000, + "page": "first", + "after": 0, + "source": "app", + "node": "Index Scan using ix_messages_chat_id_created_at_id on messages", + "shared_hit": 27, + "shared_read": 0, + "rows": 51.0, + "time_ms": 0.156, + "kind": "custom" + }, + { + "chat": "read 1k", + "chat_size": 1000, + "page": "middle", + "after": 500, + "source": "app", + "node": "Index Scan using ix_messages_chat_id_created_at_id on messages", + "shared_hit": 47, + "shared_read": 0, + "rows": 51.0, + "time_ms": 0.16, + "kind": "custom" + }, + { + "chat": "read 1k", + "chat_size": 1000, + "page": "middle", + "after": 500, + "source": "psql", + "node": "Index Scan using ix_messages_chat_id_created_at_id on messages", + "shared_hit": 47, + "shared_read": 0, + "rows": 51.0, + "time_ms": 0.07, + "kind": "custom" + }, + { + "chat": "read 1k", + "chat_size": 1000, + "page": "middle", + "after": 500, + "source": "generic", + "node": "Index Scan using ix_messages_chat_id_created_at_id on messages", + "shared_hit": 47, + "shared_read": 0, + "rows": 51.0, + "time_ms": 0.069, + "kind": "generic" + }, + { + "chat": "read 1k", + "chat_size": 1000, + "page": "middle", + "after": 500, + "source": "or-cursor", + "node": "Index Scan using ix_messages_chat_id_created_at_id on messages", + "shared_hit": 496, + "shared_read": 0, + "rows": 51.0, + "time_ms": 0.128, + "kind": "custom" + }, + { + "chat": "read 1k", + "chat_size": 1000, + "page": "middle", + "after": 500, + "source": "no-index", + "node": "Seq Scan on messages", + "shared_hit": 101, + "shared_read": 0, + "rows": 51.0, + "time_ms": 0.578, + "kind": "custom" + }, + { + "chat": "read 1k", + "chat_size": 1000, + "page": "middle", + "after": 500, + "source": "chat_only", + "node": "Bitmap Heap Scan on messages", + "shared_hit": 103, + "shared_read": 0, + "rows": 51.0, + "time_ms": 0.466, + "kind": "custom" + }, + { + "chat": "read 1k", + "chat_size": 1000, + "page": "middle", + "after": 500, + "source": "covering", + "node": "Index Only Scan using bench_variant on messages", + "shared_hit": 4, + "shared_read": 0, + "rows": 51.0, + "time_ms": 0.057, + "kind": "custom" + }, + { + "chat": "read 1k", + "chat_size": 1000, + "page": "last", + "after": 900, + "source": "app", + "node": "Bitmap Heap Scan on messages", + "shared_hit": 22, + "shared_read": 0, + "rows": 51.0, + "time_ms": 0.279, + "kind": "custom" + }, + { + "chat": "bg 1k", + "chat_size": 1000, + "page": "first", + "after": 0, + "source": "app", + "node": "Index Scan using ix_messages_chat_id_created_at_id on messages", + "shared_hit": 32, + "shared_read": 0, + "rows": 51.0, + "time_ms": 0.135, + "kind": "custom" + }, + { + "chat": "bg 1k", + "chat_size": 1000, + "page": "middle", + "after": 500, + "source": "app", + "node": "Index Scan using ix_messages_chat_id_created_at_id on messages", + "shared_hit": 49, + "shared_read": 0, + "rows": 51.0, + "time_ms": 0.108, + "kind": "custom" + }, + { + "chat": "bg 1k", + "chat_size": 1000, + "page": "middle", + "after": 500, + "source": "psql", + "node": "Index Scan using ix_messages_chat_id_created_at_id on messages", + "shared_hit": 49, + "shared_read": 0, + "rows": 51.0, + "time_ms": 0.068, + "kind": "custom" + }, + { + "chat": "bg 1k", + "chat_size": 1000, + "page": "middle", + "after": 500, + "source": "generic", + "node": "Index Scan using ix_messages_chat_id_created_at_id on messages", + "shared_hit": 49, + "shared_read": 0, + "rows": 51.0, + "time_ms": 0.069, + "kind": "generic" + }, + { + "chat": "bg 1k", + "chat_size": 1000, + "page": "middle", + "after": 500, + "source": "or-cursor", + "node": "Index Scan using ix_messages_chat_id_created_at_id on messages", + "shared_hit": 487, + "shared_read": 0, + "rows": 51.0, + "time_ms": 0.125, + "kind": "custom" + }, + { + "chat": "bg 1k", + "chat_size": 1000, + "page": "middle", + "after": 500, + "source": "no-index", + "node": "Seq Scan on messages", + "shared_hit": 101, + "shared_read": 0, + "rows": 51.0, + "time_ms": 0.489, + "kind": "custom" + }, + { + "chat": "bg 1k", + "chat_size": 1000, + "page": "middle", + "after": 500, + "source": "chat_only", + "node": "Bitmap Heap Scan on messages", + "shared_hit": 101, + "shared_read": 0, + "rows": 51.0, + "time_ms": 0.431, + "kind": "custom" + }, + { + "chat": "bg 1k", + "chat_size": 1000, + "page": "middle", + "after": 500, + "source": "covering", + "node": "Index Only Scan using bench_variant on messages", + "shared_hit": 4, + "shared_read": 0, + "rows": 51.0, + "time_ms": 0.055, + "kind": "custom" + }, + { + "chat": "bg 1k", + "chat_size": 1000, + "page": "last", + "after": 900, + "source": "app", + "node": "Bitmap Heap Scan on messages", + "shared_hit": 19, + "shared_read": 0, + "rows": 51.0, + "time_ms": 0.154, + "kind": "custom" + }, + { + "chat": "bg 100", + "chat_size": 100, + "page": "first", + "after": 0, + "source": "app", + "node": "Bitmap Heap Scan on messages", + "shared_hit": 65, + "shared_read": 0, + "rows": 51.0, + "time_ms": 0.314, + "kind": "custom" + }, + { + "chat": "bg 100", + "chat_size": 100, + "page": "first", + "after": 0, + "source": "psql", + "node": "Bitmap Heap Scan on messages", + "shared_hit": 65, + "shared_read": 0, + "rows": 51.0, + "time_ms": 0.138, + "kind": "custom" + }, + { + "chat": "bg 100", + "chat_size": 100, + "page": "first", + "after": 0, + "source": "generic", + "node": "Index Scan using ix_messages_chat_id_created_at_id on messages", + "shared_hit": 45, + "shared_read": 0, + "rows": 51.0, + "time_ms": 0.065, + "kind": "generic" + }, + { + "chat": "bg 100", + "chat_size": 100, + "page": "first", + "after": 0, + "source": "no-index", + "node": "Seq Scan on messages", + "shared_hit": 101, + "shared_read": 0, + "rows": 51.0, + "time_ms": 0.198, + "kind": "custom" + }, + { + "chat": "bg 100", + "chat_size": 100, + "page": "first", + "after": 0, + "source": "chat_only", + "node": "Bitmap Heap Scan on messages", + "shared_hit": 65, + "shared_read": 0, + "rows": 51.0, + "time_ms": 0.125, + "kind": "custom" + }, + { + "chat": "bg 100", + "chat_size": 100, + "page": "first", + "after": 0, + "source": "covering", + "node": "Index Only Scan using bench_variant on messages", + "shared_hit": 4, + "shared_read": 0, + "rows": 51.0, + "time_ms": 0.049, + "kind": "custom" + }, + { + "chat": "bg 10", + "chat_size": 10, + "page": "first", + "after": 0, + "source": "app", + "node": "Bitmap Heap Scan on messages", + "shared_hit": 12, + "shared_read": 0, + "rows": 10.0, + "time_ms": 0.043, + "kind": "custom" + }, + { + "chat": "bg 10", + "chat_size": 10, + "page": "first", + "after": 0, + "source": "psql", + "node": "Bitmap Heap Scan on messages", + "shared_hit": 12, + "shared_read": 0, + "rows": 10.0, + "time_ms": 0.047, + "kind": "custom" + }, + { + "chat": "bg 10", + "chat_size": 10, + "page": "first", + "after": 0, + "source": "generic", + "node": "Index Scan using ix_messages_chat_id_created_at_id on messages", + "shared_hit": 12, + "shared_read": 0, + "rows": 10.0, + "time_ms": 0.029, + "kind": "generic" + }, + { + "chat": "bg 10", + "chat_size": 10, + "page": "first", + "after": 0, + "source": "no-index", + "node": "Seq Scan on messages", + "shared_hit": 101, + "shared_read": 0, + "rows": 10.0, + "time_ms": 0.146, + "kind": "custom" + }, + { + "chat": "bg 10", + "chat_size": 10, + "page": "first", + "after": 0, + "source": "chat_only", + "node": "Bitmap Heap Scan on messages", + "shared_hit": 12, + "shared_read": 0, + "rows": 10.0, + "time_ms": 0.033, + "kind": "custom" + }, + { + "chat": "bg 10", + "chat_size": 10, + "page": "first", + "after": 0, + "source": "covering", + "node": "Index Only Scan using bench_variant on messages", + "shared_hit": 3, + "shared_read": 0, + "rows": 10.0, + "time_ms": 0.015, + "kind": "custom" + } + ], + "rss_peak_mib": 185.0, + "write_cost": [ + { + "variant": "app", + "columns": "(chat_id, created_at, id)", + "rows": 5000, + "messages": 7800, + "index_bytes": 475136, + "index_bytes_per_message": 60.9, + "insert_us_per_message": [ + 5.86, + 5.07, + 5.8 + ], + "wal_bytes_per_message": [ + 501.0, + 489.6, + 489.6 + ], + "fpi_per_1000": [ + 12.0, + 21.2, + 21.2 + ], + "long_text": "ok" + }, + { + "variant": "chat_only", + "columns": "(chat_id)", + "rows": 5000, + "messages": 7800, + "index_bytes": 73728, + "index_bytes_per_message": 9.5, + "insert_us_per_message": [ + 4.97, + 4.89, + 5.17 + ], + "wal_bytes_per_message": [ + 402.8, + 401.7, + 401.7 + ], + "fpi_per_1000": [ + 18.6, + 18.6, + 18.6 + ], + "long_text": "ok" + }, + { + "variant": "covering", + "columns": "(chat_id, created_at, id) INCLUDE (sender_id, text)", + "rows": 5000, + "messages": 7800, + "index_bytes": 1245184, + "index_bytes_per_message": 159.6, + "insert_us_per_message": [ + 5.55, + 5.38, + 6.05 + ], + "wal_bytes_per_message": [ + 694.8, + 694.8, + 694.8 + ], + "fpi_per_1000": [ + 25.0, + 25.0, + 25.0 + ], + "long_text": "index row requires 12072 bytes, maximum size is 8191" + }, + { + "variant": "none", + "columns": null, + "rows": 5000, + "messages": 7800, + "index_bytes": 0, + "index_bytes_per_message": 0.0, + "insert_us_per_message": [ + 4.38, + 4.35, + 4.38 + ], + "wal_bytes_per_message": [ + 314.5, + 314.5, + 314.5 + ], + "fpi_per_1000": [ + 17.2, + 17.2, + 17.2 + ], + "long_text": "ok" + } + ] + }, + { + "size": 5000, + "messages_total": 8500, + "rss_before_mib": 121.5, + "rss_after_mib": 127.6, + "bytes_per_message": 758, + "prefill_seconds": 17.3, + "prefill_rate": 492, + "cursors": 49, + "maintenance_seconds": 0.1, + "messages_rows": 8500, + "messages_table_bytes": 1548288, + "messages_indexes_bytes": 1179648, + "db_bytes_per_message": 321, + "plans": [ + { + "chat": "read 5k", + "chat_size": 5000, + "page": "first", + "after": 0, + "source": "app", + "node": "Index Scan using ix_messages_chat_id_created_at_id on messages", + "shared_hit": 25, + "shared_read": 0, + "rows": 51.0, + "time_ms": 0.156, + "kind": "custom" + }, + { + "chat": "read 5k", + "chat_size": 5000, + "page": "middle", + "after": 2500, + "source": "app", + "node": "Index Scan using ix_messages_chat_id_created_at_id on messages", + "shared_hit": 53, + "shared_read": 0, + "rows": 51.0, + "time_ms": 0.178, + "kind": "generic" + }, + { + "chat": "read 5k", + "chat_size": 5000, + "page": "middle", + "after": 2500, + "source": "psql", + "node": "Index Scan using ix_messages_chat_id_created_at_id on messages", + "shared_hit": 53, + "shared_read": 0, + "rows": 51.0, + "time_ms": 0.065, + "kind": "custom" + }, + { + "chat": "read 5k", + "chat_size": 5000, + "page": "middle", + "after": 2500, + "source": "generic", + "node": "Index Scan using ix_messages_chat_id_created_at_id on messages", + "shared_hit": 53, + "shared_read": 0, + "rows": 51.0, + "time_ms": 0.077, + "kind": "generic" + }, + { + "chat": "read 5k", + "chat_size": 5000, + "page": "middle", + "after": 2500, + "source": "or-cursor", + "node": "Index Scan using ix_messages_chat_id_created_at_id on messages", + "shared_hit": 2365, + "shared_read": 0, + "rows": 51.0, + "time_ms": 0.38, + "kind": "custom" + }, + { + "chat": "read 5k", + "chat_size": 5000, + "page": "middle", + "after": 2500, + "source": "no-index", + "node": "Seq Scan on messages", + "shared_hit": 184, + "shared_read": 0, + "rows": 51.0, + "time_ms": 2.122, + "kind": "custom" + }, + { + "chat": "read 5k", + "chat_size": 5000, + "page": "middle", + "after": 2500, + "source": "chat_only", + "node": "Seq Scan on messages", + "shared_hit": 184, + "shared_read": 0, + "rows": 51.0, + "time_ms": 2.124, + "kind": "custom" + }, + { + "chat": "read 5k", + "chat_size": 5000, + "page": "middle", + "after": 2500, + "source": "covering", + "node": "Index Only Scan using bench_variant on messages", + "shared_hit": 5, + "shared_read": 0, + "rows": 51.0, + "time_ms": 0.053, + "kind": "custom" + }, + { + "chat": "read 5k", + "chat_size": 5000, + "page": "last", + "after": 4900, + "source": "app", + "node": "Index Scan using ix_messages_chat_id_created_at_id on messages", + "shared_hit": 50, + "shared_read": 0, + "rows": 51.0, + "time_ms": 0.159, + "kind": "generic" + }, + { + "chat": "bg 1k", + "chat_size": 1000, + "page": "first", + "after": 0, + "source": "app", + "node": "Index Scan using ix_messages_chat_id_created_at_id on messages", + "shared_hit": 42, + "shared_read": 0, + "rows": 51.0, + "time_ms": 0.113, + "kind": "custom" + }, + { + "chat": "bg 1k", + "chat_size": 1000, + "page": "middle", + "after": 500, + "source": "app", + "node": "Index Scan using ix_messages_chat_id_created_at_id on messages", + "shared_hit": 46, + "shared_read": 0, + "rows": 51.0, + "time_ms": 0.128, + "kind": "generic" + }, + { + "chat": "bg 1k", + "chat_size": 1000, + "page": "middle", + "after": 500, + "source": "psql", + "node": "Index Scan using ix_messages_chat_id_created_at_id on messages", + "shared_hit": 46, + "shared_read": 0, + "rows": 51.0, + "time_ms": 0.064, + "kind": "custom" + }, + { + "chat": "bg 1k", + "chat_size": 1000, + "page": "middle", + "after": 500, + "source": "generic", + "node": "Index Scan using ix_messages_chat_id_created_at_id on messages", + "shared_hit": 46, + "shared_read": 0, + "rows": 51.0, + "time_ms": 0.064, + "kind": "generic" + }, + { + "chat": "bg 1k", + "chat_size": 1000, + "page": "middle", + "after": 500, + "source": "or-cursor", + "node": "Index Scan using ix_messages_chat_id_created_at_id on messages", + "shared_hit": 498, + "shared_read": 0, + "rows": 51.0, + "time_ms": 0.114, + "kind": "custom" + }, + { + "chat": "bg 1k", + "chat_size": 1000, + "page": "middle", + "after": 500, + "source": "no-index", + "node": "Seq Scan on messages", + "shared_hit": 184, + "shared_read": 0, + "rows": 51.0, + "time_ms": 0.568, + "kind": "custom" + }, + { + "chat": "bg 1k", + "chat_size": 1000, + "page": "middle", + "after": 500, + "source": "chat_only", + "node": "Bitmap Heap Scan on messages", + "shared_hit": 186, + "shared_read": 0, + "rows": 51.0, + "time_ms": 0.435, + "kind": "custom" + }, + { + "chat": "bg 1k", + "chat_size": 1000, + "page": "middle", + "after": 500, + "source": "covering", + "node": "Index Only Scan using bench_variant on messages", + "shared_hit": 5, + "shared_read": 0, + "rows": 51.0, + "time_ms": 0.053, + "kind": "custom" + }, + { + "chat": "bg 1k", + "chat_size": 1000, + "page": "last", + "after": 900, + "source": "app", + "node": "Index Scan using ix_messages_chat_id_created_at_id on messages", + "shared_hit": 50, + "shared_read": 0, + "rows": 51.0, + "time_ms": 0.108, + "kind": "generic" + }, + { + "chat": "bg 100", + "chat_size": 100, + "page": "first", + "after": 0, + "source": "app", + "node": "Index Scan using ix_messages_chat_id_created_at_id on messages", + "shared_hit": 51, + "shared_read": 0, + "rows": 51.0, + "time_ms": 0.172, + "kind": "custom" + }, + { + "chat": "bg 100", + "chat_size": 100, + "page": "first", + "after": 0, + "source": "psql", + "node": "Index Scan using ix_messages_chat_id_created_at_id on messages", + "shared_hit": 51, + "shared_read": 0, + "rows": 51.0, + "time_ms": 0.061, + "kind": "custom" + }, + { + "chat": "bg 100", + "chat_size": 100, + "page": "first", + "after": 0, + "source": "generic", + "node": "Index Scan using ix_messages_chat_id_created_at_id on messages", + "shared_hit": 51, + "shared_read": 0, + "rows": 51.0, + "time_ms": 0.063, + "kind": "generic" + }, + { + "chat": "bg 100", + "chat_size": 100, + "page": "first", + "after": 0, + "source": "no-index", + "node": "Seq Scan on messages", + "shared_hit": 184, + "shared_read": 0, + "rows": 51.0, + "time_ms": 0.273, + "kind": "custom" + }, + { + "chat": "bg 100", + "chat_size": 100, + "page": "first", + "after": 0, + "source": "chat_only", + "node": "Bitmap Heap Scan on messages", + "shared_hit": 84, + "shared_read": 0, + "rows": 51.0, + "time_ms": 0.129, + "kind": "custom" + }, + { + "chat": "bg 100", + "chat_size": 100, + "page": "first", + "after": 0, + "source": "covering", + "node": "Index Only Scan using bench_variant on messages", + "shared_hit": 5, + "shared_read": 0, + "rows": 51.0, + "time_ms": 0.048, + "kind": "custom" + }, + { + "chat": "bg 10", + "chat_size": 10, + "page": "first", + "after": 0, + "source": "app", + "node": "Bitmap Heap Scan on messages", + "shared_hit": 12, + "shared_read": 0, + "rows": 10.0, + "time_ms": 0.052, + "kind": "custom" + }, + { + "chat": "bg 10", + "chat_size": 10, + "page": "first", + "after": 0, + "source": "psql", + "node": "Bitmap Heap Scan on messages", + "shared_hit": 12, + "shared_read": 0, + "rows": 10.0, + "time_ms": 0.03, + "kind": "custom" + }, + { + "chat": "bg 10", + "chat_size": 10, + "page": "first", + "after": 0, + "source": "generic", + "node": "Index Scan using ix_messages_chat_id_created_at_id on messages", + "shared_hit": 12, + "shared_read": 0, + "rows": 10.0, + "time_ms": 0.024, + "kind": "generic" + }, + { + "chat": "bg 10", + "chat_size": 10, + "page": "first", + "after": 0, + "source": "no-index", + "node": "Seq Scan on messages", + "shared_hit": 184, + "shared_read": 0, + "rows": 10.0, + "time_ms": 0.202, + "kind": "custom" + }, + { + "chat": "bg 10", + "chat_size": 10, + "page": "first", + "after": 0, + "source": "chat_only", + "node": "Bitmap Heap Scan on messages", + "shared_hit": 12, + "shared_read": 0, + "rows": 10.0, + "time_ms": 0.022, + "kind": "custom" + }, + { + "chat": "bg 10", + "chat_size": 10, + "page": "first", + "after": 0, + "source": "covering", + "node": "Index Only Scan using bench_variant on messages", + "shared_hit": 4, + "shared_read": 0, + "rows": 10.0, + "time_ms": 0.019, + "kind": "custom" + } + ], + "rss_peak_mib": 185.0, + "write_cost": [ + { + "variant": "app", + "columns": "(chat_id, created_at, id)", + "rows": 5000, + "messages": 11800, + "index_bytes": 712704, + "index_bytes_per_message": 60.4, + "insert_us_per_message": [ + 5.91, + 4.98, + 6.52 + ], + "wal_bytes_per_message": [ + 500.6, + 506.1, + 506.1 + ], + "fpi_per_1000": [ + 17.6, + 22.0, + 22.0 + ], + "long_text": "ok" + }, + { + "variant": "chat_only", + "columns": "(chat_id)", + "rows": 5000, + "messages": 11800, + "index_bytes": 106496, + "index_bytes_per_message": 9.0, + "insert_us_per_message": [ + 5.02, + 5.05, + 4.87 + ], + "wal_bytes_per_message": [ + 423.8, + 423.2, + 422.0 + ], + "fpi_per_1000": [ + 19.2, + 19.8, + 19.8 + ], + "long_text": "ok" + }, + { + "variant": "covering", + "columns": "(chat_id, created_at, id) INCLUDE (sender_id, text)", + "rows": 5000, + "messages": 11800, + "index_bytes": 1892352, + "index_bytes_per_message": 160.4, + "insert_us_per_message": [ + 5.77, + 5.55, + 5.61 + ], + "wal_bytes_per_message": [ + 712.0, + 710.9, + 710.9 + ], + "fpi_per_1000": [ + 25.4, + 25.6, + 25.6 + ], + "long_text": "index row requires 12072 bytes, maximum size is 8191" + }, + { + "variant": "none", + "columns": null, + "rows": 5000, + "messages": 11800, + "index_bytes": 0, + "index_bytes_per_message": 0.0, + "insert_us_per_message": [ + 4.35, + 4.26, + 4.32 + ], + "wal_bytes_per_message": [ + 333.9, + 333.9, + 333.9 + ], + "fpi_per_1000": [ + 18.0, + 18.2, + 18.2 + ], + "long_text": "ok" + } + ] + }, + { + "size": 10000, + "messages_total": 13500, + "rss_before_mib": 121.5, + "rss_after_mib": 127.6, + "bytes_per_message": 478, + "prefill_seconds": 27.2, + "prefill_rate": 497, + "cursors": 99, + "maintenance_seconds": 0.2, + "messages_rows": 13500, + "messages_table_bytes": 2449408, + "messages_indexes_bytes": 1974272, + "db_bytes_per_message": 328, + "plans": [ + { + "chat": "read 10k", + "chat_size": 10000, + "page": "first", + "after": 0, + "source": "app", + "node": "Index Scan using ix_messages_chat_id_created_at_id on messages", + "shared_hit": 10, + "shared_read": 0, + "rows": 51.0, + "time_ms": 0.183, + "kind": "custom" + }, + { + "chat": "read 10k", + "chat_size": 10000, + "page": "middle", + "after": 5000, + "source": "app", + "node": "Index Scan using ix_messages_chat_id_created_at_id on messages", + "shared_hit": 50, + "shared_read": 0, + "rows": 51.0, + "time_ms": 0.173, + "kind": "generic" + }, + { + "chat": "read 10k", + "chat_size": 10000, + "page": "middle", + "after": 5000, + "source": "psql", + "node": "Index Scan using ix_messages_chat_id_created_at_id on messages", + "shared_hit": 50, + "shared_read": 0, + "rows": 51.0, + "time_ms": 0.063, + "kind": "custom" + }, + { + "chat": "read 10k", + "chat_size": 10000, + "page": "middle", + "after": 5000, + "source": "generic", + "node": "Index Scan using ix_messages_chat_id_created_at_id on messages", + "shared_hit": 50, + "shared_read": 0, + "rows": 51.0, + "time_ms": 0.065, + "kind": "generic" + }, + { + "chat": "read 10k", + "chat_size": 10000, + "page": "middle", + "after": 5000, + "source": "or-cursor", + "node": "Index Scan using ix_messages_chat_id_created_at_id on messages", + "shared_hit": 4713, + "shared_read": 0, + "rows": 51.0, + "time_ms": 0.732, + "kind": "custom" + }, + { + "chat": "read 10k", + "chat_size": 10000, + "page": "middle", + "after": 5000, + "source": "no-index", + "node": "Seq Scan on messages", + "shared_hit": 294, + "shared_read": 0, + "rows": 51.0, + "time_ms": 4.012, + "kind": "custom" + }, + { + "chat": "read 10k", + "chat_size": 10000, + "page": "middle", + "after": 5000, + "source": "chat_only", + "node": "Seq Scan on messages", + "shared_hit": 294, + "shared_read": 0, + "rows": 51.0, + "time_ms": 3.763, + "kind": "custom" + }, + { + "chat": "read 10k", + "chat_size": 10000, + "page": "middle", + "after": 5000, + "source": "covering", + "node": "Index Only Scan using bench_variant on messages", + "shared_hit": 5, + "shared_read": 0, + "rows": 51.0, + "time_ms": 0.051, + "kind": "custom" + }, + { + "chat": "read 10k", + "chat_size": 10000, + "page": "last", + "after": 9900, + "source": "app", + "node": "Index Scan using ix_messages_chat_id_created_at_id on messages", + "shared_hit": 48, + "shared_read": 0, + "rows": 51.0, + "time_ms": 0.165, + "kind": "generic" + }, + { + "chat": "bg 1k", + "chat_size": 1000, + "page": "first", + "after": 0, + "source": "app", + "node": "Index Scan using ix_messages_chat_id_created_at_id on messages", + "shared_hit": 48, + "shared_read": 0, + "rows": 51.0, + "time_ms": 0.15, + "kind": "custom" + }, + { + "chat": "bg 1k", + "chat_size": 1000, + "page": "middle", + "after": 500, + "source": "app", + "node": "Index Scan using ix_messages_chat_id_created_at_id on messages", + "shared_hit": 47, + "shared_read": 0, + "rows": 51.0, + "time_ms": 0.174, + "kind": "generic" + }, + { + "chat": "bg 1k", + "chat_size": 1000, + "page": "middle", + "after": 500, + "source": "psql", + "node": "Index Scan using ix_messages_chat_id_created_at_id on messages", + "shared_hit": 47, + "shared_read": 0, + "rows": 51.0, + "time_ms": 0.056, + "kind": "custom" + }, + { + "chat": "bg 1k", + "chat_size": 1000, + "page": "middle", + "after": 500, + "source": "generic", + "node": "Index Scan using ix_messages_chat_id_created_at_id on messages", + "shared_hit": 47, + "shared_read": 0, + "rows": 51.0, + "time_ms": 0.061, + "kind": "generic" + }, + { + "chat": "bg 1k", + "chat_size": 1000, + "page": "middle", + "after": 500, + "source": "or-cursor", + "node": "Index Scan using ix_messages_chat_id_created_at_id on messages", + "shared_hit": 514, + "shared_read": 0, + "rows": 51.0, + "time_ms": 0.125, + "kind": "custom" + }, + { + "chat": "bg 1k", + "chat_size": 1000, + "page": "middle", + "after": 500, + "source": "no-index", + "node": "Seq Scan on messages", + "shared_hit": 294, + "shared_read": 0, + "rows": 51.0, + "time_ms": 0.708, + "kind": "custom" + }, + { + "chat": "bg 1k", + "chat_size": 1000, + "page": "middle", + "after": 500, + "source": "chat_only", + "node": "Bitmap Heap Scan on messages", + "shared_hit": 285, + "shared_read": 0, + "rows": 51.0, + "time_ms": 0.484, + "kind": "custom" + }, + { + "chat": "bg 1k", + "chat_size": 1000, + "page": "middle", + "after": 500, + "source": "covering", + "node": "Index Only Scan using bench_variant on messages", + "shared_hit": 5, + "shared_read": 0, + "rows": 51.0, + "time_ms": 0.055, + "kind": "custom" + }, + { + "chat": "bg 1k", + "chat_size": 1000, + "page": "last", + "after": 900, + "source": "app", + "node": "Index Scan using ix_messages_chat_id_created_at_id on messages", + "shared_hit": 48, + "shared_read": 0, + "rows": 51.0, + "time_ms": 0.136, + "kind": "generic" + }, + { + "chat": "bg 100", + "chat_size": 100, + "page": "first", + "after": 0, + "source": "app", + "node": "Index Scan using ix_messages_chat_id_created_at_id on messages", + "shared_hit": 43, + "shared_read": 0, + "rows": 51.0, + "time_ms": 0.182, + "kind": "custom" + }, + { + "chat": "bg 100", + "chat_size": 100, + "page": "first", + "after": 0, + "source": "psql", + "node": "Index Scan using ix_messages_chat_id_created_at_id on messages", + "shared_hit": 43, + "shared_read": 0, + "rows": 51.0, + "time_ms": 0.063, + "kind": "custom" + }, + { + "chat": "bg 100", + "chat_size": 100, + "page": "first", + "after": 0, + "source": "generic", + "node": "Index Scan using ix_messages_chat_id_created_at_id on messages", + "shared_hit": 43, + "shared_read": 0, + "rows": 51.0, + "time_ms": 0.064, + "kind": "generic" + }, + { + "chat": "bg 100", + "chat_size": 100, + "page": "first", + "after": 0, + "source": "no-index", + "node": "Seq Scan on messages", + "shared_hit": 294, + "shared_read": 0, + "rows": 51.0, + "time_ms": 0.403, + "kind": "custom" + }, + { + "chat": "bg 100", + "chat_size": 100, + "page": "first", + "after": 0, + "source": "chat_only", + "node": "Bitmap Heap Scan on messages", + "shared_hit": 85, + "shared_read": 0, + "rows": 51.0, + "time_ms": 0.129, + "kind": "custom" + }, + { + "chat": "bg 100", + "chat_size": 100, + "page": "first", + "after": 0, + "source": "covering", + "node": "Index Only Scan using bench_variant on messages", + "shared_hit": 5, + "shared_read": 0, + "rows": 51.0, + "time_ms": 0.055, + "kind": "custom" + }, + { + "chat": "bg 10", + "chat_size": 10, + "page": "first", + "after": 0, + "source": "app", + "node": "Index Scan using ix_messages_chat_id_created_at_id on messages", + "shared_hit": 12, + "shared_read": 0, + "rows": 10.0, + "time_ms": 0.086, + "kind": "custom" + }, + { + "chat": "bg 10", + "chat_size": 10, + "page": "first", + "after": 0, + "source": "psql", + "node": "Index Scan using ix_messages_chat_id_created_at_id on messages", + "shared_hit": 12, + "shared_read": 0, + "rows": 10.0, + "time_ms": 0.028, + "kind": "custom" + }, + { + "chat": "bg 10", + "chat_size": 10, + "page": "first", + "after": 0, + "source": "generic", + "node": "Index Scan using ix_messages_chat_id_created_at_id on messages", + "shared_hit": 12, + "shared_read": 0, + "rows": 10.0, + "time_ms": 0.024, + "kind": "generic" + }, + { + "chat": "bg 10", + "chat_size": 10, + "page": "first", + "after": 0, + "source": "no-index", + "node": "Seq Scan on messages", + "shared_hit": 294, + "shared_read": 0, + "rows": 10.0, + "time_ms": 0.329, + "kind": "custom" + }, + { + "chat": "bg 10", + "chat_size": 10, + "page": "first", + "after": 0, + "source": "chat_only", + "node": "Index Scan using bench_variant on messages", + "shared_hit": 12, + "shared_read": 0, + "rows": 10.0, + "time_ms": 0.027, + "kind": "custom" + }, + { + "chat": "bg 10", + "chat_size": 10, + "page": "first", + "after": 0, + "source": "covering", + "node": "Index Only Scan using bench_variant on messages", + "shared_hit": 4, + "shared_read": 0, + "rows": 10.0, + "time_ms": 0.019, + "kind": "custom" + } + ], + "rss_peak_mib": 185.0, + "write_cost": [ + { + "variant": "app", + "columns": "(chat_id, created_at, id)", + "rows": 5000, + "messages": 16800, + "index_bytes": 999424, + "index_bytes_per_message": 59.5, + "insert_us_per_message": [ + 7.05, + 5.21, + 5.11 + ], + "wal_bytes_per_message": [ + 556.3, + 542.6, + 542.6 + ], + "fpi_per_1000": [ + 19.2, + 31.2, + 31.2 + ], + "long_text": "ok" + }, + { + "variant": "chat_only", + "columns": "(chat_id)", + "rows": 5000, + "messages": 16800, + "index_bytes": 139264, + "index_bytes_per_message": 8.3, + "insert_us_per_message": [ + 4.9, + 4.8, + 4.83 + ], + "wal_bytes_per_message": [ + 458.0, + 454.5, + 454.5 + ], + "fpi_per_1000": [ + 27.6, + 28.8, + 29.0 + ], + "long_text": "ok" + }, + { + "variant": "covering", + "columns": "(chat_id, created_at, id) INCLUDE (sender_id, text)", + "rows": 5000, + "messages": 16800, + "index_bytes": 2695168, + "index_bytes_per_message": 160.4, + "insert_us_per_message": [ + 5.88, + 5.64, + 5.72 + ], + "wal_bytes_per_message": [ + 754.6, + 754.0, + 752.6 + ], + "fpi_per_1000": [ + 35.0, + 35.6, + 35.6 + ], + "long_text": "index row requires 12072 bytes, maximum size is 8191" + }, + { + "variant": "none", + "columns": null, + "rows": 5000, + "messages": 16800, + "index_bytes": 0, + "index_bytes_per_message": 0.0, + "insert_us_per_message": [ + 4.34, + 4.79, + 4.42 + ], + "wal_bytes_per_message": [ + 369.5, + 368.1, + 368.1 + ], + "fpi_per_1000": [ + 27.4, + 27.6, + 27.6 + ], + "long_text": "ok" + } + ] + } + ], + "limits": { + "api": { + "nano_cpus": 1000000000, + "memory": 2147483648, + "memory_swap": 2147483648, + "published_ports": {}, + "healthcheck": [ + "NONE" + ], + "log_driver": "local" + }, + "postgres": { + "nano_cpus": 4000000000, + "memory": 3221225472, + "memory_swap": 3221225472, + "published_ports": {}, + "healthcheck": [ + "CMD-SHELL", + "pg_isready -h 127.0.0.1 -U \"$POSTGRES_USER\" -d \"$POSTGRES_DB\"" + ], + "log_driver": "local" + }, + "valkey": { + "nano_cpus": 2000000000, + "memory": 536870912, + "memory_swap": 536870912, + "published_ports": {}, + "healthcheck": [ + "CMD-SHELL", + "test \"$(valkey-cli -p \"$VALKEY_PORT\" ping)\" = PONG" + ], + "log_driver": "local" + }, + "haproxy": { + "nano_cpus": 1000000000, + "memory": 268435456, + "memory_swap": 268435456, + "published_ports": {}, + "healthcheck": [ + "CMD", + "bash", + "-c", + "exec 3<>/dev/tcp/127.0.0.1/8404 && printf 'GET /lb/ready HTTP/1.0\\r\\n\\r\\n' >&3 && head -n 1 <&3 | grep -q ' 200 '" + ], + "log_driver": "local" + }, + "k6": { + "nano_cpus": 0, + "memory": 0, + "memory_swap": 0, + "published_ports": {}, + "healthcheck": null, + "log_driver": "local" + }, + "api_replicas": 1, + "max_connections": 100 + }, + "stand": { + "api_tcp_rmem": "4096 131072 524288", + "postgres": { + "image": "postgres:18.6-trixie@sha256:5a5a84b19854a9ffaa54082c166ff4ec27473a361e496e5ea167f298f2da9722", + "id": "sha256:f4fcd2b983483177b15d72d94fb3614736211554f7cac5c2cc54a05c75110b90", + "version": "18.6 (Debian 18.6-1.pgdg13+2)", + "settings": { + "autovacuum": "on", + "checkpoint_timeout": "5min", + "effective_cache_size": "4GB", + "fsync": "on", + "jit": "on", + "maintenance_work_mem": "64MB", + "max_connections": "100", + "max_wal_size": "1GB", + "plan_cache_mode": "auto", + "random_page_cost": "4", + "shared_buffers": "128MB", + "shared_preload_libraries": "auto_explain", + "synchronous_commit": "on", + "wal_level": "replica", + "work_mem": "4MB" + } + }, + "valkey": { + "image": "valkey/valkey:9.1.2-trixie@sha256:418652cfb58ef879d4978c33553735d7147016032d5aefaa14c828e611eb9dfd", + "id": "sha256:5a6ac3cceea0d4cebe48911dfa5f393f49feea86a2c55c5ac6b0ba733a1713b6", + "version": "9.1.2", + "maxmemory": "67108864", + "maxmemory-clients": "0", + "maxmemory-eviction-tenacity": "10", + "maxmemory-policy": "allkeys-lru", + "maxmemory-samples": "5" + }, + "haproxy": { + "image": "haproxy:3.4.6-trixie@sha256:e273915691a8eab3f105bf3e39fd4c29a4ecf334e33421903b5589d25e14db26", + "id": "sha256:a92cbb5d7b4ba27898706659bde5039cc86e4ebee44f243d410f268200f7406f", + "version": "HAProxy version 3.4.6-56332c5 2026/09/28 - https://haproxy.org/" + }, + "app_env": { + "APP__PORT": "8080", + "APP__RUN_MODE": "docker", + "AUTH__SESSION_TTL_SECONDS": "21600", + "CACHE__HOST": "valkey", + "CACHE__PORT": "6379", + "DATABASE__HOST": "postgres", + "DATABASE__NAME": "bench", + "DATABASE__PORT": "5432", + "DATABASE__USER": "bench", + "S3__BUCKET": "bench", + "S3__HOST": "s3", + "S3__PORT": "8333" + } + }, + "finished_at": "2026-10-31T20:26:59+00:00" +} diff --git a/evidence/bench/unit-of-work-after/prefill.csv b/evidence/bench/unit-of-work-after/prefill.csv new file mode 100644 index 00000000..5e95e938 --- /dev/null +++ b/evidence/bench/unit-of-work-after/prefill.csv @@ -0,0 +1,4 @@ +size,chunk,messages_before,messages_after,duration_s,requests_ok,requests_failed,rps,error_ratio,p50_ms,p95_ms,p99_ms,max_ms,app_cpu_cores,rss_end_mib,mem_cgroup_end_mib,generator_cpu_cores,flags,db_cpu_cores,cell,attempt +1000,1,0,4500,9.23,4500,0,487.5,0.0,57.744,133.952,180.042,316.055,1.001,127.6,120.3,0.105,,0.19,, +5000,1,0,8500,17.276,8500,0,492.0,0.0,55.683,140.252,190.905,329.158,0.999,127.6,118.9,0.103,,0.192,, +10000,1,0,13500,27.19,13500,0,496.5,0.0,56.805,132.984,180.953,321.418,0.999,127.6,118.4,0.099,,0.189,, diff --git a/evidence/bench/unit-of-work-after/progress.json b/evidence/bench/unit-of-work-after/progress.json new file mode 100644 index 00000000..18d793f7 --- /dev/null +++ b/evidence/bench/unit-of-work-after/progress.json @@ -0,0 +1,12 @@ +{ + "label": "unit-of-work-after", + "profile": "quick", + "stage": "done", + "size": 10000, + "runs_done": 18, + "runs_total": 18, + "elapsed_s": 232, + "eta_s": 0, + "warnings": [], + "updated_at": "2026-10-31T20:26:59+00:00" +} diff --git a/evidence/bench/unit-of-work-after/raw/prefill-10k-01.json b/evidence/bench/unit-of-work-after/raw/prefill-10k-01.json new file mode 100644 index 00000000..4367ad82 --- /dev/null +++ b/evidence/bench/unit-of-work-after/raw/prefill-10k-01.json @@ -0,0 +1 @@ +{"root_group":{"name":"","path":"","id":"d41d8cd98f00b204e9800998ecf8427e","groups":[],"checks":[{"name":"message 201","path":"::message 201","id":"6445aff337e1ade0bc10402fbac79882","passes":13500,"fails":0}]},"options":{"summaryTimeUnit":"","noColor":true,"summaryTrendStats":["avg","min","med","p(50)","p(95)","p(99)","max"]},"state":{"isStdOutTTY":false,"isStdErrTTY":false,"testRunDurationMs":27189.677123},"metrics":{"checks":{"contains":"default","values":{"rate":1,"passes":13500,"fails":0},"type":"rate"},"http_req_waiting":{"type":"trend","contains":"time","values":{"p(95)":132.95090414999999,"p(99)":180.93459874999996,"max":321.356791,"avg":64.31712892777783,"min":20.327334,"med":56.7864795,"p(50)":56.7864795}},"data_sent":{"contains":"data","values":{"count":5076000,"rate":186688.49861796133},"type":"counter"},"http_reqs":{"type":"counter","contains":"default","values":{"count":13500,"rate":496.5119644094716}},"http_req_blocked":{"type":"trend","contains":"time","values":{"max":2.576083,"avg":0.0055037169629627075,"min":0.000458,"med":0.001042,"p(50)":0.001042,"p(95)":0.002375,"p(99)":0.005167409999999995}},"iteration_duration":{"type":"trend","contains":"time","values":{"p(50)":56.8733955,"p(95)":133.03922534999995,"p(99)":181.01220666999998,"max":323.570584,"avg":64.4134922988887,"min":20.387792,"med":56.8733955}},"vus":{"type":"gauge","contains":"default","values":{"value":32,"min":32,"max":32}},"vus_max":{"type":"gauge","contains":"default","values":{"value":32,"min":32,"max":32}},"http_req_duration{expected_response:true}":{"thresholds":{"max>=0":{"ok":true}},"type":"trend","contains":"time","values":{"min":20.340084,"med":56.805354,"p(50)":56.805354,"p(95)":132.98426105,"p(99)":180.95251740999998,"max":321.418375,"avg":64.34017009659262}},"http_req_failed":{"type":"rate","contains":"default","values":{"rate":0,"passes":0,"fails":13500}},"http_req_duration":{"type":"trend","contains":"time","values":{"p(95)":132.98426105,"p(99)":180.95251740999998,"max":321.418375,"avg":64.34017009659262,"min":20.340084,"med":56.805354,"p(50)":56.805354}},"iterations":{"contains":"default","values":{"count":13500,"rate":496.5119644094716},"type":"counter"},"data_received":{"values":{"count":6615000,"rate":243290.86256064108},"type":"counter","contains":"data"},"http_req_tls_handshaking":{"type":"trend","contains":"time","values":{"avg":0,"min":0,"med":0,"p(50)":0,"p(95)":0,"p(99)":0,"max":0}},"http_req_connecting":{"type":"trend","contains":"time","values":{"max":0.512041,"avg":0.0003175462962962963,"min":0,"med":0,"p(50)":0,"p(95)":0,"p(99)":0}},"http_req_sending":{"contains":"time","values":{"med":0.004083,"p(50)":0.004083,"p(95)":0.011625,"p(99)":0.021750409999999994,"max":0.2695,"avg":0.00533743896296289,"min":0.001958},"type":"trend"},"http_req_receiving":{"contains":"time","values":{"avg":0.01770372985185193,"min":0.004542,"med":0.014834,"p(50)":0.014834,"p(95)":0.036375,"p(99)":0.05787957999999995,"max":0.286417},"type":"trend"}}} \ No newline at end of file diff --git a/evidence/bench/unit-of-work-after/raw/prefill-1k-01.json b/evidence/bench/unit-of-work-after/raw/prefill-1k-01.json new file mode 100644 index 00000000..ac085b22 --- /dev/null +++ b/evidence/bench/unit-of-work-after/raw/prefill-1k-01.json @@ -0,0 +1 @@ +{"root_group":{"name":"","path":"","id":"d41d8cd98f00b204e9800998ecf8427e","groups":[],"checks":[{"passes":4500,"fails":0,"name":"message 201","path":"::message 201","id":"6445aff337e1ade0bc10402fbac79882"}]},"options":{"summaryTrendStats":["avg","min","med","p(50)","p(95)","p(99)","max"],"summaryTimeUnit":"","noColor":true},"state":{"isStdOutTTY":false,"isStdErrTTY":false,"testRunDurationMs":9230.194046},"metrics":{"iteration_duration":{"type":"trend","contains":"time","values":{"avg":65.52788921577809,"min":20.467334,"med":57.832688000000005,"p(50)":57.832688000000005,"p(95)":134.0061374999999,"p(99)":180.57026125,"max":316.115917}},"http_req_receiving":{"type":"trend","contains":"time","values":{"avg":0.01831031444444449,"min":0.004625,"med":0.015167,"p(50)":0.015167,"p(95)":0.03746009999999999,"p(99)":0.06623856999999989,"max":0.218708}},"data_sent":{"type":"counter","contains":"data","values":{"count":1692000,"rate":183311.42244330668}},"http_req_failed":{"values":{"rate":0,"passes":0,"fails":4500},"type":"rate","contains":"default"},"checks":{"type":"rate","contains":"default","values":{"passes":4500,"fails":0,"rate":1}},"http_req_blocked":{"type":"trend","contains":"time","values":{"min":0.000458,"med":0.001083,"p(50)":0.001083,"p(95)":0.002292,"p(99)":0.009836329999999987,"max":1.590208,"avg":0.006626726888888941}},"http_reqs":{"type":"counter","contains":"default","values":{"count":4500,"rate":487.5303788385816}},"http_req_duration{expected_response:true}":{"type":"trend","contains":"time","values":{"p(99)":180.04155000999998,"max":316.054709,"avg":65.45115012999989,"min":20.390417,"med":57.744104,"p(50)":57.744104,"p(95)":133.95184759999992},"thresholds":{"max>=0":{"ok":true}}},"http_req_tls_handshaking":{"contains":"time","values":{"p(99)":0,"max":0,"avg":0,"min":0,"med":0,"p(50)":0,"p(95)":0},"type":"trend"},"data_received":{"contains":"data","values":{"count":2205000,"rate":238889.885630905},"type":"counter"},"http_req_waiting":{"type":"trend","contains":"time","values":{"p(99)":180.03003000999996,"max":316.027209,"avg":65.42744734155552,"min":20.366625,"med":57.7173125,"p(50)":57.7173125,"p(95)":133.93560479999994}},"iterations":{"values":{"count":4500,"rate":487.5303788385816},"type":"counter","contains":"default"},"vus":{"type":"gauge","contains":"default","values":{"max":32,"value":32,"min":32}},"vus_max":{"type":"gauge","contains":"default","values":{"value":32,"min":32,"max":32}},"http_req_duration":{"type":"trend","contains":"time","values":{"max":316.054709,"avg":65.45115012999989,"min":20.390417,"med":57.744104,"p(50)":57.744104,"p(95)":133.95184759999992,"p(99)":180.04155000999998}},"http_req_sending":{"type":"trend","contains":"time","values":{"avg":0.005392473999999991,"min":0.001958,"med":0.004125,"p(50)":0.004125,"p(95)":0.011627049999999991,"p(99)":0.022635839999999956,"max":0.213792}},"http_req_connecting":{"type":"trend","contains":"time","values":{"min":0,"med":0,"p(50)":0,"p(95)":0,"p(99)":0,"max":0.2775,"avg":0.000706129111111111}}}} \ No newline at end of file diff --git a/evidence/bench/unit-of-work-after/raw/prefill-5k-01.json b/evidence/bench/unit-of-work-after/raw/prefill-5k-01.json new file mode 100644 index 00000000..2dc2235d --- /dev/null +++ b/evidence/bench/unit-of-work-after/raw/prefill-5k-01.json @@ -0,0 +1 @@ +{"root_group":{"groups":[],"checks":[{"id":"6445aff337e1ade0bc10402fbac79882","passes":8500,"fails":0,"name":"message 201","path":"::message 201"}],"name":"","path":"","id":"d41d8cd98f00b204e9800998ecf8427e"},"options":{"summaryTrendStats":["avg","min","med","p(50)","p(95)","p(99)","max"],"summaryTimeUnit":"","noColor":true},"state":{"isStdOutTTY":false,"isStdErrTTY":false,"testRunDurationMs":17276.269577},"metrics":{"iterations":{"type":"counter","contains":"default","values":{"count":8500,"rate":492.0043625225726}},"checks":{"contains":"default","values":{"fails":0,"rate":1,"passes":8500},"type":"rate"},"http_req_duration{expected_response:true}":{"contains":"time","values":{"p(95)":140.25182325,"p(99)":190.90460083999997,"max":329.158333,"avg":64.9178918292941,"min":20.328167,"med":55.682812,"p(50)":55.682812},"thresholds":{"max>=0":{"ok":true}},"type":"trend"},"http_req_sending":{"type":"trend","contains":"time","values":{"p(50)":0.004208,"p(95)":0.012458,"p(99)":0.022169339999999975,"max":0.222125,"avg":0.005572461999999937,"min":0.001958,"med":0.004208}},"data_received":{"type":"counter","contains":"data","values":{"count":4165000,"rate":241082.13763606056}},"http_reqs":{"type":"counter","contains":"default","values":{"count":8500,"rate":492.0043625225726}},"iteration_duration":{"type":"trend","contains":"time","values":{"avg":64.99221260482351,"min":20.377959,"med":55.745020499999995,"p(50)":55.745020499999995,"p(95)":140.32584759999992,"p(99)":191.55400717,"max":329.227875}},"http_req_connecting":{"type":"trend","contains":"time","values":{"avg":0.0004613432941176472,"min":0,"med":0,"p(50)":0,"p(95)":0,"p(99)":0,"max":0.304958}},"http_req_receiving":{"type":"trend","contains":"time","values":{"p(50)":0.015125,"p(95)":0.03920805,"p(99)":0.06613041999999997,"max":0.4165,"avg":0.018574271058823498,"min":0.004666,"med":0.015125}},"http_req_waiting":{"contains":"time","values":{"avg":64.89374509623538,"min":20.317042,"med":55.656687000000005,"p(50)":55.656687000000005,"p(95)":140.19741315,"p(99)":190.74523600999993,"max":329.125084},"type":"trend"},"vus":{"type":"gauge","contains":"default","values":{"value":32,"min":32,"max":32}},"vus_max":{"type":"gauge","contains":"default","values":{"value":32,"min":32,"max":32}},"http_req_duration":{"type":"trend","contains":"time","values":{"p(95)":140.25182325,"p(99)":190.90460083999997,"max":329.158333,"avg":64.9178918292941,"min":20.328167,"med":55.682812,"p(50)":55.682812}},"http_req_tls_handshaking":{"values":{"p(99)":0,"max":0,"avg":0,"min":0,"med":0,"p(50)":0,"p(95)":0},"type":"trend","contains":"time"},"http_req_failed":{"values":{"rate":0,"passes":0,"fails":8500},"type":"rate","contains":"default"},"http_req_blocked":{"type":"trend","contains":"time","values":{"p(99)":0.0062924099999999965,"max":1.656083,"avg":0.0038655840000000486,"min":0.000458,"med":0.001083,"p(50)":0.001083,"p(95)":0.002417}},"data_sent":{"type":"counter","contains":"data","values":{"count":3196000,"rate":184993.6403084873}}}} \ No newline at end of file diff --git a/evidence/bench/unit-of-work-after/raw/read-10k-c1-r1.json b/evidence/bench/unit-of-work-after/raw/read-10k-c1-r1.json new file mode 100644 index 00000000..e76416f7 --- /dev/null +++ b/evidence/bench/unit-of-work-after/raw/read-10k-c1-r1.json @@ -0,0 +1 @@ +{"root_group":{"name":"","path":"","id":"d41d8cd98f00b204e9800998ecf8427e","groups":[],"checks":[{"fails":0,"name":"status 200","path":"::status 200","id":"fad9fa412b86fcb03bee97c80dcd61f1","passes":2086},{"name":"full page","path":"::full page","id":"736a4affc4111c8285c374c0b4d25aed","passes":2086,"fails":0}]},"options":{"summaryTrendStats":["avg","min","med","p(50)","p(95)","p(99)","max"],"summaryTimeUnit":"","noColor":true},"state":{"isStdOutTTY":false,"isStdErrTTY":false,"testRunDurationMs":5001.72196},"metrics":{"http_req_waiting":{"values":{"med":2.191375,"p(50)":2.191375,"p(95)":2.9072705,"p(99)":4.0882143499999986,"max":9.279417,"avg":2.2918886308724873,"min":1.833666},"type":"trend","contains":"time"},"data_received":{"type":"counter","contains":"data","values":{"count":30370074,"rate":6071923.678060665}},"http_req_duration{expected_response:true}":{"type":"trend","contains":"time","values":{"min":1.850375,"med":2.2183124999999997,"p(50)":2.2183124999999997,"p(95)":2.9552917499999998,"p(99)":4.161641099999998,"max":9.367167,"avg":2.321879934324063},"thresholds":{"max>=0":{"ok":true}}},"http_req_receiving":{"type":"trend","contains":"time","values":{"avg":0.02598910642377749,"min":0.0125,"med":0.021084,"p(50)":0.021084,"p(95)":0.050760499999999986,"p(99)":0.07584194999999999,"max":0.207167}},"iteration_duration":{"contains":"time","values":{"avg":2.3943000210930028,"min":1.904166,"med":2.284354,"p(50)":2.284354,"p(95)":3.051458,"p(99)":4.2998873999999985,"max":9.554875},"type":"trend"},"http_req_duration":{"values":{"p(50)":2.2183124999999997,"p(95)":2.9552917499999998,"p(99)":4.161641099999998,"max":9.367167,"avg":2.321879934324063,"min":1.850375,"med":2.2183124999999997},"type":"trend","contains":"time"},"http_reqs":{"type":"counter","contains":"default","values":{"count":2086,"rate":417.056369122925}},"vus":{"contains":"default","values":{"min":1,"max":1,"value":1},"type":"gauge"},"http_req_blocked":{"type":"trend","contains":"time","values":{"min":0.000542,"med":0.001042,"p(50)":0.001042,"p(95)":0.0021147499999999964,"p(99)":0.0033706499999999954,"max":0.475083,"avg":0.001471345158197501}},"http_req_failed":{"type":"rate","contains":"default","values":{"rate":0,"passes":0,"fails":2086}},"http_req_tls_handshaking":{"type":"trend","contains":"time","values":{"p(99)":0,"max":0,"avg":0,"min":0,"med":0,"p(50)":0,"p(95)":0}},"checks":{"type":"rate","contains":"default","values":{"rate":1,"passes":4172,"fails":0}},"iterations":{"type":"counter","contains":"default","values":{"count":2086,"rate":417.056369122925}},"vus_max":{"type":"gauge","contains":"default","values":{"value":1,"min":1,"max":1}},"http_req_sending":{"type":"trend","contains":"time","values":{"med":0.003125,"p(50)":0.003125,"p(95)":0.008739749999999998,"p(99)":0.01609374999999999,"max":0.105208,"avg":0.004002197027804413,"min":0.001792}},"data_sent":{"type":"counter","contains":"data","values":{"rate":174329.56229338265,"count":871948}},"http_req_connecting":{"type":"trend","contains":"time","values":{"med":0,"p(50)":0,"p(95)":0,"p(99)":0,"max":0.132542,"avg":0.00006353883029721956,"min":0}}}} \ No newline at end of file diff --git a/evidence/bench/unit-of-work-after/raw/read-10k-c16-r1.json b/evidence/bench/unit-of-work-after/raw/read-10k-c16-r1.json new file mode 100644 index 00000000..04aeba0e --- /dev/null +++ b/evidence/bench/unit-of-work-after/raw/read-10k-c16-r1.json @@ -0,0 +1 @@ +{"state":{"isStdOutTTY":false,"isStdErrTTY":false,"testRunDurationMs":5014.13571},"metrics":{"vus_max":{"contains":"default","values":{"value":16,"min":16,"max":16},"type":"gauge"},"data_received":{"contains":"data","values":{"count":41347560,"rate":8246198.824961601},"type":"counter"},"http_req_blocked":{"type":"trend","contains":"time","values":{"p(50)":0.000917,"p(95)":0.001959,"p(99)":0.006992859999999997,"max":1.111084,"avg":0.006506575704225427,"min":0.000458,"med":0.000917}},"http_req_connecting":{"contains":"time","values":{"p(95)":0,"p(99)":0,"max":0.152458,"avg":0.0005383654929577464,"min":0,"med":0,"p(50)":0},"type":"trend"},"http_req_sending":{"type":"trend","contains":"time","values":{"p(99)":0.020193499999999993,"max":0.136458,"avg":0.003936164788732426,"min":0.00175,"med":0.0029795,"p(50)":0.0029795,"p(95)":0.007002049999999995}},"http_req_waiting":{"contains":"time","values":{"avg":28.115221237676,"min":15.035125,"med":26.0595,"p(50)":26.0595,"p(95)":54.028943749999875,"p(99)":63.81551138,"max":71.131333},"type":"trend"},"iteration_duration":{"type":"trend","contains":"time","values":{"p(50)":26.158521,"p(95)":54.15496634999988,"p(99)":63.90134411,"max":71.214458,"avg":28.21871787852109,"min":15.122334,"med":26.158521}},"vus":{"type":"gauge","contains":"default","values":{"value":16,"min":16,"max":16}},"http_req_tls_handshaking":{"type":"trend","contains":"time","values":{"p(50)":0,"p(95)":0,"p(99)":0,"max":0,"avg":0,"min":0,"med":0}},"http_req_duration":{"type":"trend","contains":"time","values":{"p(95)":54.076899349999884,"p(99)":63.838450879999996,"max":71.148292,"avg":28.142992576408407,"min":15.05825,"med":26.084145999999997,"p(50)":26.084145999999997}},"http_reqs":{"type":"counter","contains":"default","values":{"count":2840,"rate":566.3987104170342}},"http_req_failed":{"type":"rate","contains":"default","values":{"rate":0,"passes":0,"fails":2840}},"data_sent":{"type":"counter","contains":"data","values":{"count":1187120,"rate":236754.6609543203}},"http_req_receiving":{"contains":"time","values":{"avg":0.023835173943661924,"min":0.007292,"med":0.019917,"p(50)":0.019917,"p(95)":0.04596219999999999,"p(99)":0.07268486999999998,"max":0.288541},"type":"trend"},"iterations":{"type":"counter","contains":"default","values":{"count":2840,"rate":566.3987104170342}},"checks":{"type":"rate","contains":"default","values":{"rate":1,"passes":5680,"fails":0}},"http_req_duration{expected_response:true}":{"values":{"min":15.05825,"med":26.084145999999997,"p(50)":26.084145999999997,"p(95)":54.076899349999884,"p(99)":63.838450879999996,"max":71.148292,"avg":28.142992576408407},"thresholds":{"max>=0":{"ok":true}},"type":"trend","contains":"time"}},"root_group":{"name":"","path":"","id":"d41d8cd98f00b204e9800998ecf8427e","groups":[],"checks":[{"name":"status 200","path":"::status 200","id":"fad9fa412b86fcb03bee97c80dcd61f1","passes":2840,"fails":0},{"fails":0,"name":"full page","path":"::full page","id":"736a4affc4111c8285c374c0b4d25aed","passes":2840}]},"options":{"summaryTrendStats":["avg","min","med","p(50)","p(95)","p(99)","max"],"summaryTimeUnit":"","noColor":true}} \ No newline at end of file diff --git a/evidence/bench/unit-of-work-after/raw/read-10k-c4-r1.json b/evidence/bench/unit-of-work-after/raw/read-10k-c4-r1.json new file mode 100644 index 00000000..2156f6f1 --- /dev/null +++ b/evidence/bench/unit-of-work-after/raw/read-10k-c4-r1.json @@ -0,0 +1 @@ +{"root_group":{"groups":[],"checks":[{"fails":0,"name":"status 200","path":"::status 200","id":"fad9fa412b86fcb03bee97c80dcd61f1","passes":2983},{"name":"full page","path":"::full page","id":"736a4affc4111c8285c374c0b4d25aed","passes":2983,"fails":0}],"name":"","path":"","id":"d41d8cd98f00b204e9800998ecf8427e"},"options":{"summaryTrendStats":["avg","min","med","p(50)","p(95)","p(99)","max"],"summaryTimeUnit":"","noColor":true},"state":{"isStdOutTTY":false,"isStdErrTTY":false,"testRunDurationMs":5002.517669},"metrics":{"http_req_sending":{"type":"trend","contains":"time","values":{"p(50)":0.002958,"p(95)":0.008953899999999996,"p(99)":0.026916179999999998,"max":0.253167,"avg":0.00426409621186729,"min":0.0015,"med":0.002958}},"iteration_duration":{"type":"trend","contains":"time","values":{"avg":6.702080893395912,"min":3.969458,"med":6.08225,"p(50)":6.08225,"p(95)":8.935066899999999,"p(99)":16.723635499999997,"max":53.947708}},"http_reqs":{"type":"counter","contains":"default","values":{"count":2983,"rate":596.2997429245062}},"vus_max":{"type":"gauge","contains":"default","values":{"value":4,"min":4,"max":4}},"http_req_receiving":{"values":{"min":0.007875,"med":0.019333,"p(50)":0.019333,"p(95)":0.05614519999999997,"p(99)":0.11041549999999987,"max":0.384875,"avg":0.025283911163258423},"type":"trend","contains":"time"},"vus":{"contains":"default","values":{"value":4,"min":4,"max":4},"type":"gauge"},"http_req_duration":{"type":"trend","contains":"time","values":{"p(50)":6.011625,"p(95)":8.843999400000001,"p(99)":16.63976,"max":53.866083,"avg":6.626327401944355,"min":3.891333,"med":6.011625}},"http_req_waiting":{"type":"trend","contains":"time","values":{"max":53.818875,"avg":6.596779394569224,"min":3.854417,"med":5.986875,"p(50)":5.986875,"p(95)":8.8187872,"p(99)":16.60168556}},"iterations":{"contains":"default","values":{"rate":596.2997429245062,"count":2983},"type":"counter"},"http_req_failed":{"type":"rate","contains":"default","values":{"rate":0,"passes":0,"fails":2983}},"checks":{"type":"rate","contains":"default","values":{"fails":0,"rate":1,"passes":5966}},"http_req_connecting":{"type":"trend","contains":"time","values":{"med":0,"p(50)":0,"p(95)":0,"p(99)":0,"max":0.185042,"avg":0.0002088783104257459,"min":0}},"data_sent":{"type":"counter","contains":"data","values":{"count":1246894,"rate":249253.29254244358}},"http_req_duration{expected_response:true}":{"type":"trend","contains":"time","values":{"min":3.891333,"med":6.011625,"p(50)":6.011625,"p(95)":8.843999400000001,"p(99)":16.63976,"max":53.866083,"avg":6.626327401944355},"thresholds":{"max>=0":{"ok":true}}},"data_received":{"type":"counter","contains":"data","values":{"count":43429497,"rate":8681527.957237884}},"http_req_blocked":{"values":{"p(50)":0.000958,"p(95)":0.002375,"p(99)":0.00544249999999999,"max":0.661875,"avg":0.0021751350988937408,"min":0.0005,"med":0.000958},"type":"trend","contains":"time"},"http_req_tls_handshaking":{"values":{"avg":0,"min":0,"med":0,"p(50)":0,"p(95)":0,"p(99)":0,"max":0},"type":"trend","contains":"time"}}} \ No newline at end of file diff --git a/evidence/bench/unit-of-work-after/raw/read-1k-c1-r1.json b/evidence/bench/unit-of-work-after/raw/read-1k-c1-r1.json new file mode 100644 index 00000000..e0d489bf --- /dev/null +++ b/evidence/bench/unit-of-work-after/raw/read-1k-c1-r1.json @@ -0,0 +1 @@ +{"root_group":{"id":"d41d8cd98f00b204e9800998ecf8427e","groups":[],"checks":[{"name":"status 200","path":"::status 200","id":"fad9fa412b86fcb03bee97c80dcd61f1","passes":2085,"fails":0},{"id":"736a4affc4111c8285c374c0b4d25aed","passes":2085,"fails":0,"name":"full page","path":"::full page"}],"name":"","path":""},"options":{"noColor":true,"summaryTrendStats":["avg","min","med","p(50)","p(95)","p(99)","max"],"summaryTimeUnit":""},"state":{"isStdOutTTY":false,"isStdErrTTY":false,"testRunDurationMs":5000.077003},"metrics":{"http_req_duration":{"contains":"time","values":{"avg":2.3229551194244586,"min":1.826625,"med":2.221667,"p(50)":2.221667,"p(95)":2.9193663999999995,"p(99)":3.76187272,"max":12.807625},"type":"trend"},"vus_max":{"type":"gauge","contains":"default","values":{"value":1,"min":1,"max":1}},"http_req_waiting":{"type":"trend","contains":"time","values":{"max":12.66075,"avg":2.2925789558752983,"min":1.808208,"med":2.195167,"p(50)":2.195167,"p(95)":2.869224799999999,"p(99)":3.70756556}},"http_req_connecting":{"values":{"p(50)":0,"p(95)":0,"p(99)":0,"max":0.108625,"avg":0.00005209832134292566,"min":0,"med":0},"type":"trend","contains":"time"},"http_req_tls_handshaking":{"contains":"time","values":{"avg":0,"min":0,"med":0,"p(50)":0,"p(95)":0,"p(99)":0,"max":0},"type":"trend"},"http_reqs":{"contains":"default","values":{"rate":416.99357804870186,"count":2085},"type":"counter"},"http_req_sending":{"type":"trend","contains":"time","values":{"p(95)":0.008458,"p(99)":0.01597555999999997,"max":0.170542,"avg":0.004117697841726627,"min":0.001667,"med":0.003042,"p(50)":0.003042}},"http_req_failed":{"values":{"passes":0,"fails":2085,"rate":0},"type":"rate","contains":"default"},"http_req_duration{expected_response:true}":{"values":{"avg":2.3229551194244586,"min":1.826625,"med":2.221667,"p(50)":2.221667,"p(95)":2.9193663999999995,"p(99)":3.76187272,"max":12.807625},"thresholds":{"max>=0":{"ok":true}},"type":"trend","contains":"time"},"data_received":{"type":"counter","contains":"data","values":{"count":30355515,"rate":6071009.502811051}},"vus":{"type":"gauge","contains":"default","values":{"value":1,"min":1,"max":1}},"data_sent":{"type":"counter","contains":"data","values":{"count":871530,"rate":174303.31562435738}},"iteration_duration":{"values":{"min":1.913542,"med":2.287791,"p(50)":2.287791,"p(95)":3.031616599999999,"p(99)":3.8599455599999994,"max":12.987709,"avg":2.3945366767386145},"type":"trend","contains":"time"},"http_req_blocked":{"type":"trend","contains":"time","values":{"max":0.5135,"avg":0.001448032613908868,"min":0.000583,"med":0.001083,"p(50)":0.001083,"p(95)":0.002125,"p(99)":0.003256719999999999}},"http_req_receiving":{"type":"trend","contains":"time","values":{"min":0.011417,"med":0.021125,"p(50)":0.021125,"p(95)":0.05215039999999999,"p(99)":0.08475,"max":0.281167,"avg":0.026258465707434033}},"checks":{"values":{"rate":1,"passes":4170,"fails":0},"type":"rate","contains":"default"},"iterations":{"type":"counter","contains":"default","values":{"count":2085,"rate":416.99357804870186}}}} \ No newline at end of file diff --git a/evidence/bench/unit-of-work-after/raw/read-1k-c16-r1.json b/evidence/bench/unit-of-work-after/raw/read-1k-c16-r1.json new file mode 100644 index 00000000..49fe943b --- /dev/null +++ b/evidence/bench/unit-of-work-after/raw/read-1k-c16-r1.json @@ -0,0 +1 @@ +{"state":{"testRunDurationMs":5018.430419,"isStdOutTTY":false,"isStdErrTTY":false},"metrics":{"iterations":{"type":"counter","contains":"default","values":{"count":2852,"rate":568.3051794844463}},"data_sent":{"type":"counter","contains":"data","values":{"count":1192136,"rate":237551.56502449853}},"iteration_duration":{"type":"trend","contains":"time","values":{"avg":28.12566447230019,"min":16.95325,"med":26.077396,"p(50)":26.077396,"p(95)":56.367629349999895,"p(99)":66.91783258000001,"max":73.381458}},"vus":{"type":"gauge","contains":"default","values":{"value":16,"min":16,"max":16}},"vus_max":{"type":"gauge","contains":"default","values":{"value":16,"min":16,"max":16}},"http_reqs":{"type":"counter","contains":"default","values":{"count":2852,"rate":568.3051794844463}},"http_req_connecting":{"contains":"time","values":{"avg":0.0009257682328190741,"min":0,"med":0,"p(50)":0,"p(95)":0,"p(99)":0,"max":0.304208},"type":"trend"},"http_req_failed":{"type":"rate","contains":"default","values":{"rate":0,"passes":0,"fails":2852}},"http_req_tls_handshaking":{"type":"trend","contains":"time","values":{"avg":0,"min":0,"med":0,"p(50)":0,"p(95)":0,"p(99)":0,"max":0}},"http_req_sending":{"type":"trend","contains":"time","values":{"min":0.001625,"med":0.003,"p(50)":0.003,"p(95)":0.00779145,"p(99)":0.02495432999999999,"max":0.237583,"avg":0.004307600280504954}},"http_req_waiting":{"type":"trend","contains":"time","values":{"avg":28.022048732117835,"min":16.826125,"med":25.980978999999998,"p(50)":25.980978999999998,"p(95)":56.280253499999894,"p(99)":66.83168742,"max":73.272792}},"http_req_duration":{"type":"trend","contains":"time","values":{"med":26.010729,"p(50)":26.010729,"p(95)":56.300268749999894,"p(99)":66.85538125,"max":73.324083,"avg":28.0510954386395,"min":16.879125}},"http_req_blocked":{"type":"trend","contains":"time","values":{"max":0.975709,"avg":0.005406860098176765,"min":0.000458,"med":0.000958,"p(50)":0.000958,"p(95)":0.002,"p(99)":0.0063485799999999865}},"http_req_receiving":{"values":{"min":0.007041,"med":0.02,"p(50)":0.02,"p(95)":0.047893899999999996,"p(99)":0.09100307999999996,"max":0.561416,"avg":0.024739106241234207},"type":"trend","contains":"time"},"http_req_duration{expected_response:true}":{"contains":"time","values":{"min":16.879125,"med":26.010729,"p(50)":26.010729,"p(95)":56.300268749999894,"p(99)":66.85538125,"max":73.324083,"avg":28.0510954386395},"thresholds":{"max>=0":{"ok":true}},"type":"trend"},"checks":{"type":"rate","contains":"default","values":{"rate":1,"passes":5704,"fails":0}},"data_received":{"type":"counter","contains":"data","values":{"count":41522268,"rate":8273955.108114053}}},"root_group":{"checks":[{"id":"fad9fa412b86fcb03bee97c80dcd61f1","passes":2852,"fails":0,"name":"status 200","path":"::status 200"},{"name":"full page","path":"::full page","id":"736a4affc4111c8285c374c0b4d25aed","passes":2852,"fails":0}],"name":"","path":"","id":"d41d8cd98f00b204e9800998ecf8427e","groups":[]},"options":{"summaryTrendStats":["avg","min","med","p(50)","p(95)","p(99)","max"],"summaryTimeUnit":"","noColor":true}} \ No newline at end of file diff --git a/evidence/bench/unit-of-work-after/raw/read-1k-c4-r1.json b/evidence/bench/unit-of-work-after/raw/read-1k-c4-r1.json new file mode 100644 index 00000000..96c18385 --- /dev/null +++ b/evidence/bench/unit-of-work-after/raw/read-1k-c4-r1.json @@ -0,0 +1 @@ +{"state":{"isStdOutTTY":false,"isStdErrTTY":false,"testRunDurationMs":5003.220211},"metrics":{"vus_max":{"type":"gauge","contains":"default","values":{"value":4,"min":4,"max":4}},"http_req_duration{expected_response:true}":{"type":"trend","contains":"time","values":{"avg":6.397552297445833,"min":5.097625,"med":6.076208,"p(50)":6.076208,"p(95)":7.626383599999999,"p(99)":10.917583359999998,"max":47.5205},"thresholds":{"max>=0":{"ok":true}}},"http_req_tls_handshaking":{"type":"trend","contains":"time","values":{"p(95)":0,"p(99)":0,"max":0,"avg":0,"min":0,"med":0,"p(50)":0}},"checks":{"type":"rate","contains":"default","values":{"passes":6186,"fails":0,"rate":1}},"http_req_failed":{"type":"rate","contains":"default","values":{"passes":0,"fails":3093,"rate":0}},"iteration_duration":{"type":"trend","contains":"time","values":{"avg":6.465945855480103,"min":5.163167,"med":6.139125,"p(50)":6.139125,"p(95)":7.729182799999999,"p(99)":10.984212719999999,"max":47.581042}},"http_req_waiting":{"contains":"time","values":{"p(50)":6.046542,"p(95)":7.554659,"p(99)":10.888967,"max":47.498417,"avg":6.369435519236985,"min":5.080042,"med":6.046542},"type":"trend"},"http_req_blocked":{"type":"trend","contains":"time","values":{"p(50)":0.000958,"p(95)":0.0019164,"p(99)":0.004336359999999999,"max":1.087917,"avg":0.002571816359521525,"min":0.000542,"med":0.000958}},"http_req_receiving":{"type":"trend","contains":"time","values":{"p(99)":0.10333463999999995,"max":0.616375,"avg":0.024096509537665685,"min":0.008959,"med":0.018792,"p(50)":0.018792,"p(95)":0.0478918}},"data_received":{"type":"counter","contains":"data","values":{"count":45030987,"rate":9000400.7620923}},"http_req_duration":{"type":"trend","contains":"time","values":{"min":5.097625,"med":6.076208,"p(50)":6.076208,"p(95)":7.626383599999999,"p(99)":10.917583359999998,"max":47.5205,"avg":6.397552297445833}},"vus":{"type":"gauge","contains":"default","values":{"max":4,"value":4,"min":4}},"http_reqs":{"contains":"default","values":{"count":3093,"rate":618.2018519192458},"type":"counter"},"http_req_connecting":{"type":"trend","contains":"time","values":{"max":0.167625,"avg":0.00014540898803750403,"min":0,"med":0,"p(50)":0,"p(95)":0,"p(99)":0}},"http_req_sending":{"contains":"time","values":{"max":0.275667,"avg":0.00402026867119305,"min":0.001625,"med":0.002834,"p(50)":0.002834,"p(95)":0.006691799999999977,"p(99)":0.024066639999999976},"type":"trend"},"data_sent":{"values":{"count":1292874,"rate":258408.37410224474},"type":"counter","contains":"data"},"iterations":{"values":{"count":3093,"rate":618.2018519192458},"type":"counter","contains":"default"}},"root_group":{"name":"","path":"","id":"d41d8cd98f00b204e9800998ecf8427e","groups":[],"checks":[{"name":"status 200","path":"::status 200","id":"fad9fa412b86fcb03bee97c80dcd61f1","passes":3093,"fails":0},{"name":"full page","path":"::full page","id":"736a4affc4111c8285c374c0b4d25aed","passes":3093,"fails":0}]},"options":{"summaryTrendStats":["avg","min","med","p(50)","p(95)","p(99)","max"],"summaryTimeUnit":"","noColor":true}} \ No newline at end of file diff --git a/evidence/bench/unit-of-work-after/raw/read-5k-c1-r1.json b/evidence/bench/unit-of-work-after/raw/read-5k-c1-r1.json new file mode 100644 index 00000000..a5da7734 --- /dev/null +++ b/evidence/bench/unit-of-work-after/raw/read-5k-c1-r1.json @@ -0,0 +1 @@ +{"root_group":{"name":"","path":"","id":"d41d8cd98f00b204e9800998ecf8427e","groups":[],"checks":[{"path":"::status 200","id":"fad9fa412b86fcb03bee97c80dcd61f1","passes":2156,"fails":0,"name":"status 200"},{"path":"::full page","id":"736a4affc4111c8285c374c0b4d25aed","passes":2156,"fails":0,"name":"full page"}]},"options":{"summaryTrendStats":["avg","min","med","p(50)","p(95)","p(99)","max"],"summaryTimeUnit":"","noColor":true},"state":{"isStdOutTTY":false,"isStdErrTTY":false,"testRunDurationMs":5000.565627},"metrics":{"http_req_duration":{"type":"trend","contains":"time","values":{"max":8.11375,"avg":2.2451795909090912,"min":1.90625,"med":2.162292,"p(50)":2.162292,"p(95)":2.79482325,"p(99)":3.4564038}},"http_req_blocked":{"type":"trend","contains":"time","values":{"min":0.000542,"med":0.001,"p(50)":0.001,"p(95)":0.00208325,"p(99)":0.0030893999999999943,"max":0.563417,"avg":0.0015144369202226323}},"iterations":{"type":"counter","contains":"default","values":{"count":2156,"rate":431.15122584511573}},"data_sent":{"type":"counter","contains":"data","values":{"count":901208,"rate":180221.2124032584}},"iteration_duration":{"type":"trend","contains":"time","values":{"avg":2.3158437773654907,"min":1.962291,"med":2.2246045,"p(50)":2.2246045,"p(95)":2.889312749999999,"p(99)":3.5605213499999997,"max":8.911458}},"http_req_waiting":{"type":"trend","contains":"time","values":{"avg":2.216082878014835,"min":1.887833,"med":2.1367295,"p(50)":2.1367295,"p(95)":2.75439625,"p(99)":3.40082295,"max":7.9775}},"http_req_failed":{"type":"rate","contains":"default","values":{"passes":0,"fails":2156,"rate":0}},"vus_max":{"type":"gauge","contains":"default","values":{"value":1,"min":1,"max":1}},"http_req_tls_handshaking":{"type":"trend","contains":"time","values":{"p(95)":0,"p(99)":0,"max":0,"avg":0,"min":0,"med":0,"p(50)":0}},"checks":{"values":{"rate":1,"passes":4312,"fails":0},"type":"rate","contains":"default"},"vus":{"type":"gauge","contains":"default","values":{"min":1,"max":1,"value":1}},"http_req_sending":{"type":"trend","contains":"time","values":{"avg":0.0038737115027829374,"min":0.001666,"med":0.002917,"p(50)":0.002917,"p(95)":0.00820825,"p(99)":0.01493545,"max":0.117708}},"http_req_connecting":{"type":"trend","contains":"time","values":{"p(99)":0,"max":0.122125,"avg":0.00005664424860853432,"min":0,"med":0,"p(50)":0,"p(95)":0}},"http_req_duration{expected_response:true}":{"contains":"time","values":{"med":2.162292,"p(50)":2.162292,"p(95)":2.79482325,"p(99)":3.4564038,"max":8.11375,"avg":2.2451795909090912,"min":1.90625},"thresholds":{"max>=0":{"ok":true}},"type":"trend"},"http_req_receiving":{"type":"trend","contains":"time","values":{"med":0.020792,"p(50)":0.020792,"p(95)":0.049551999999999985,"p(99)":0.0760148,"max":0.12775,"avg":0.025223001391465615,"min":0.013542}},"http_reqs":{"type":"counter","contains":"default","values":{"count":2156,"rate":431.15122584511573}},"data_received":{"values":{"count":31389204,"rate":6277130.69707904},"type":"counter","contains":"data"}}} \ No newline at end of file diff --git a/evidence/bench/unit-of-work-after/raw/read-5k-c16-r1.json b/evidence/bench/unit-of-work-after/raw/read-5k-c16-r1.json new file mode 100644 index 00000000..53368174 --- /dev/null +++ b/evidence/bench/unit-of-work-after/raw/read-5k-c16-r1.json @@ -0,0 +1 @@ +{"options":{"noColor":true,"summaryTrendStats":["avg","min","med","p(50)","p(95)","p(99)","max"],"summaryTimeUnit":""},"state":{"isStdOutTTY":false,"isStdErrTTY":false,"testRunDurationMs":5035.103336},"metrics":{"http_req_waiting":{"type":"trend","contains":"time","values":{"max":78.18825,"avg":28.180085395782136,"min":16.226583,"med":25.414583,"p(50)":25.414583,"p(95)":56.1267418,"p(99)":67.85688144}},"checks":{"type":"rate","contains":"default","values":{"fails":0,"rate":1,"passes":5690}},"http_req_failed":{"values":{"rate":0,"passes":0,"fails":2845},"type":"rate","contains":"default"},"iterations":{"type":"counter","contains":"default","values":{"count":2845,"rate":565.0330907131158}},"vus_max":{"contains":"default","values":{"value":16,"min":16,"max":16},"type":"gauge"},"http_req_blocked":{"type":"trend","contains":"time","values":{"max":0.92075,"avg":0.004690142355008824,"min":0.0005,"med":0.000958,"p(50)":0.000958,"p(95)":0.002208,"p(99)":0.007660479999999986}},"http_reqs":{"type":"counter","contains":"default","values":{"count":2845,"rate":565.0330907131158}},"http_req_sending":{"contains":"time","values":{"med":0.002958,"p(50)":0.002958,"p(95)":0.008366599999999995,"p(99)":0.01664995999999999,"max":0.175458,"avg":0.0038856653778559223,"min":0.00175},"type":"trend"},"http_req_duration":{"type":"trend","contains":"time","values":{"avg":28.208660703339174,"min":16.322708,"med":25.437167,"p(50)":25.437167,"p(95)":56.142933199999995,"p(99)":67.89432151999999,"max":78.228167}},"data_received":{"values":{"rate":8226316.767692253,"count":41420355},"type":"counter","contains":"data"},"iteration_duration":{"type":"trend","contains":"time","values":{"p(50)":25.51725,"p(95)":56.207683599999996,"p(99)":67.95575996,"max":78.312875,"avg":28.284825590861136,"min":16.723875,"med":25.51725}},"http_req_duration{expected_response:true}":{"type":"trend","contains":"time","values":{"avg":28.208660703339174,"min":16.322708,"med":25.437167,"p(50)":25.437167,"p(95)":56.142933199999995,"p(99)":67.89432151999999,"max":78.228167},"thresholds":{"max>=0":{"ok":true}}},"http_req_receiving":{"type":"trend","contains":"time","values":{"min":0.006833,"med":0.019667,"p(50)":0.019667,"p(95)":0.051774399999999984,"p(99)":0.08984495999999999,"max":0.357333,"avg":0.024689642179261877}},"data_sent":{"values":{"count":1189210,"rate":236183.83191808243},"type":"counter","contains":"data"},"vus":{"values":{"value":16,"min":16,"max":16},"type":"gauge","contains":"default"},"http_req_connecting":{"contains":"time","values":{"avg":0.0006472467486818981,"min":0,"med":0,"p(50)":0,"p(95)":0,"p(99)":0,"max":0.281334},"type":"trend"},"http_req_tls_handshaking":{"contains":"time","values":{"avg":0,"min":0,"med":0,"p(50)":0,"p(95)":0,"p(99)":0,"max":0},"type":"trend"}},"root_group":{"name":"","path":"","id":"d41d8cd98f00b204e9800998ecf8427e","groups":[],"checks":[{"id":"fad9fa412b86fcb03bee97c80dcd61f1","passes":2845,"fails":0,"name":"status 200","path":"::status 200"},{"name":"full page","path":"::full page","id":"736a4affc4111c8285c374c0b4d25aed","passes":2845,"fails":0}]}} \ No newline at end of file diff --git a/evidence/bench/unit-of-work-after/raw/read-5k-c4-r1.json b/evidence/bench/unit-of-work-after/raw/read-5k-c4-r1.json new file mode 100644 index 00000000..a16eebcc --- /dev/null +++ b/evidence/bench/unit-of-work-after/raw/read-5k-c4-r1.json @@ -0,0 +1 @@ +{"root_group":{"id":"d41d8cd98f00b204e9800998ecf8427e","groups":[],"checks":[{"passes":3078,"fails":0,"name":"status 200","path":"::status 200","id":"fad9fa412b86fcb03bee97c80dcd61f1"},{"name":"full page","path":"::full page","id":"736a4affc4111c8285c374c0b4d25aed","passes":3078,"fails":0}],"name":"","path":""},"options":{"summaryTrendStats":["avg","min","med","p(50)","p(95)","p(99)","max"],"summaryTimeUnit":"","noColor":true},"state":{"isStdOutTTY":false,"isStdErrTTY":false,"testRunDurationMs":5004.400363},"metrics":{"http_reqs":{"type":"counter","contains":"default","values":{"count":3078,"rate":615.0587036874931}},"http_req_duration{expected_response:true}":{"thresholds":{"max>=0":{"ok":true}},"type":"trend","contains":"time","values":{"p(99)":13.77936809,"max":54.117625,"avg":6.425303464912284,"min":4.929417,"med":5.9691875,"p(50)":5.9691875,"p(95)":7.597579549999999}},"checks":{"type":"rate","contains":"default","values":{"fails":0,"rate":1,"passes":6156}},"iterations":{"type":"counter","contains":"default","values":{"rate":615.0587036874931,"count":3078}},"http_req_blocked":{"contains":"time","values":{"med":0.000959,"p(50)":0.000959,"p(95)":0.002125,"p(99)":0.004977859999999998,"max":0.902416,"avg":0.0024011884340480972,"min":0.000541},"type":"trend"},"iteration_duration":{"type":"trend","contains":"time","values":{"max":54.183167,"avg":6.498326862897976,"min":4.997208,"med":6.033062,"p(50)":6.033062,"p(95)":7.70628935,"p(99)":13.84396607}},"vus_max":{"contains":"default","values":{"value":4,"min":4,"max":4},"type":"gauge"},"data_sent":{"type":"counter","contains":"data","values":{"count":1286604,"rate":257094.53814137212}},"http_req_connecting":{"type":"trend","contains":"time","values":{"med":0,"p(50)":0,"p(95)":0,"p(99)":0,"max":0.158709,"avg":0.0001494077322936972,"min":0}},"data_received":{"type":"counter","contains":"data","values":{"rate":8954639.666986212,"count":44812602}},"http_req_sending":{"type":"trend","contains":"time","values":{"p(95)":0.008833,"p(99)":0.022483589999999977,"max":0.202958,"avg":0.004289829434697895,"min":0.001708,"med":0.003041,"p(50)":0.003041}},"http_req_waiting":{"contains":"time","values":{"avg":6.396198562053303,"min":4.851,"med":5.941,"p(50)":5.941,"p(95)":7.5647839999999995,"p(99)":13.75739716,"max":53.874416},"type":"trend"},"http_req_failed":{"type":"rate","contains":"default","values":{"rate":0,"passes":0,"fails":3078}},"http_req_tls_handshaking":{"type":"trend","contains":"time","values":{"med":0,"p(50)":0,"p(95)":0,"p(99)":0,"max":0,"avg":0,"min":0}},"http_req_duration":{"contains":"time","values":{"med":5.9691875,"p(50)":5.9691875,"p(95)":7.597579549999999,"p(99)":13.77936809,"max":54.117625,"avg":6.425303464912284,"min":4.929417},"type":"trend"},"vus":{"type":"gauge","contains":"default","values":{"value":4,"min":4,"max":4}},"http_req_receiving":{"type":"trend","contains":"time","values":{"p(50)":0.019146,"p(95)":0.05121429999999999,"p(99)":0.11929838999999991,"max":0.551,"avg":0.024815073424301524,"min":0.008917,"med":0.019146}}}} \ No newline at end of file diff --git a/evidence/bench/unit-of-work-after/raw/write-10k-c1-r1.json b/evidence/bench/unit-of-work-after/raw/write-10k-c1-r1.json new file mode 100644 index 00000000..79853d80 --- /dev/null +++ b/evidence/bench/unit-of-work-after/raw/write-10k-c1-r1.json @@ -0,0 +1 @@ +{"root_group":{"groups":[],"checks":[{"name":"message 201","path":"::message 201","id":"6445aff337e1ade0bc10402fbac79882","passes":1000,"fails":0}],"name":"","path":"","id":"d41d8cd98f00b204e9800998ecf8427e"},"options":{"summaryTrendStats":["avg","min","med","p(50)","p(95)","p(99)","max"],"summaryTimeUnit":"","noColor":true},"state":{"isStdOutTTY":false,"isStdErrTTY":false,"testRunDurationMs":2643.077585},"metrics":{"vus_max":{"type":"gauge","contains":"default","values":{"value":1,"min":1,"max":1}},"iterations":{"type":"counter","contains":"default","values":{"count":1000,"rate":378.34682026558824}},"http_req_sending":{"type":"trend","contains":"time","values":{"avg":0.0056532489999999965,"min":0.002333,"med":0.004458,"p(50)":0.004458,"p(95)":0.01226039999999999,"p(99)":0.026044489999999997,"max":0.105583}},"http_req_failed":{"type":"rate","contains":"default","values":{"rate":0,"passes":0,"fails":1000}},"http_req_blocked":{"type":"trend","contains":"time","values":{"p(95)":0.0025020499999999983,"p(99)":0.006804079999999989,"max":0.49875,"avg":0.002227167999999992,"min":0.000666,"med":0.001167,"p(50)":0.001167}},"checks":{"type":"rate","contains":"default","values":{"rate":1,"passes":1000,"fails":0}},"http_req_receiving":{"values":{"med":0.015708,"p(50)":0.015708,"p(95)":0.03953749999999997,"p(99)":0.058047319999999916,"max":0.199708,"avg":0.019952871999999976,"min":0.010125},"type":"trend","contains":"time"},"iteration_duration":{"type":"trend","contains":"time","values":{"avg":2.6393210610000035,"min":2.064792,"med":2.4705000000000004,"p(50)":2.4705000000000004,"p(95)":3.5712211499999995,"p(99)":5.043757739999998,"max":11.916209}},"http_req_duration{expected_response:true}":{"type":"trend","contains":"time","values":{"p(50)":2.411979,"p(95)":3.4531020999999984,"p(99)":4.907222169999998,"max":11.742167,"avg":2.572333423999999,"min":2.027541,"med":2.411979},"thresholds":{"max>=0":{"ok":true}}},"http_req_duration":{"type":"trend","contains":"time","values":{"min":2.027541,"med":2.411979,"p(50)":2.411979,"p(95)":3.4531020999999984,"p(99)":4.907222169999998,"max":11.742167,"avg":2.572333423999999}},"http_req_connecting":{"type":"trend","contains":"time","values":{"avg":0.00010104200000000001,"min":0,"med":0,"p(50)":0,"p(95)":0,"p(99)":0,"max":0.101042}},"http_req_waiting":{"type":"trend","contains":"time","values":{"p(99)":4.795540749999998,"max":11.651167,"avg":2.546727302999998,"min":2.01325,"med":2.3918125,"p(50)":2.3918125,"p(95)":3.4034683999999973}},"data_received":{"values":{"count":490000,"rate":185389.94193013824},"type":"counter","contains":"data"},"vus":{"type":"gauge","contains":"default","values":{"value":1,"min":1,"max":1}},"http_req_tls_handshaking":{"type":"trend","contains":"time","values":{"max":0,"avg":0,"min":0,"med":0,"p(50)":0,"p(95)":0,"p(99)":0}},"data_sent":{"values":{"count":376000,"rate":142258.40441986118},"type":"counter","contains":"data"},"http_reqs":{"type":"counter","contains":"default","values":{"count":1000,"rate":378.34682026558824}}}} \ No newline at end of file diff --git a/evidence/bench/unit-of-work-after/raw/write-10k-c16-r1.json b/evidence/bench/unit-of-work-after/raw/write-10k-c16-r1.json new file mode 100644 index 00000000..afe637f7 --- /dev/null +++ b/evidence/bench/unit-of-work-after/raw/write-10k-c16-r1.json @@ -0,0 +1 @@ +{"options":{"summaryTrendStats":["avg","min","med","p(50)","p(95)","p(99)","max"],"summaryTimeUnit":"","noColor":true},"state":{"isStdOutTTY":false,"isStdErrTTY":false,"testRunDurationMs":1942.546918},"metrics":{"http_req_duration{expected_response:true}":{"type":"trend","contains":"time","values":{"p(50)":29.177208999999998,"p(95)":44.99443155,"p(99)":66.266635,"max":69.522209,"avg":30.933831306999984,"min":16.585,"med":29.177208999999998},"thresholds":{"max>=0":{"ok":true}}},"http_req_blocked":{"type":"trend","contains":"time","values":{"max":0.675125,"avg":0.00930603200000007,"min":0.000542,"med":0.001042,"p(50)":0.001042,"p(95)":0.00266605,"p(99)":0.47226273999999996}},"data_sent":{"values":{"rate":193560.31842315584,"count":376000},"type":"counter","contains":"data"},"vus":{"type":"gauge","contains":"default","values":{"value":16,"min":16,"max":16}},"http_req_waiting":{"contains":"time","values":{"max":69.50175,"avg":30.90990272299997,"min":16.567834,"med":29.140916500000003,"p(50)":29.140916500000003,"p(95)":44.94767115,"p(99)":66.25622008},"type":"trend"},"checks":{"contains":"default","values":{"passes":1000,"fails":0,"rate":1},"type":"rate"},"iterations":{"type":"counter","contains":"default","values":{"count":1000,"rate":514.7880809126485}},"http_req_duration":{"type":"trend","contains":"time","values":{"med":29.177208999999998,"p(50)":29.177208999999998,"p(95)":44.99443155,"p(99)":66.266635,"max":69.522209,"avg":30.933831306999984,"min":16.585}},"http_req_sending":{"type":"trend","contains":"time","values":{"min":0.002125,"med":0.004166,"p(50)":0.004166,"p(95)":0.01318989999999998,"p(99)":0.033897919999999984,"max":0.077958,"avg":0.005824462999999999}},"http_req_tls_handshaking":{"contains":"time","values":{"avg":0,"min":0,"med":0,"p(50)":0,"p(95)":0,"p(99)":0,"max":0},"type":"trend"},"iteration_duration":{"type":"trend","contains":"time","values":{"p(50)":29.2556875,"p(95)":45.08806249999999,"p(99)":66.31149042,"max":69.577375,"avg":31.010193856999972,"min":16.648083,"med":29.2556875}},"data_received":{"type":"counter","contains":"data","values":{"count":490000,"rate":252246.15964719778}},"http_req_receiving":{"type":"trend","contains":"time","values":{"p(99)":0.06004324,"max":0.130583,"avg":0.018104120999999994,"min":0.005208,"med":0.015,"p(50)":0.015,"p(95)":0.038917}},"vus_max":{"contains":"default","values":{"value":16,"min":16,"max":16},"type":"gauge"},"http_req_connecting":{"type":"trend","contains":"time","values":{"avg":0.002146791,"min":0,"med":0,"p(50)":0,"p(95)":0,"p(99)":0.09646032999999997,"max":0.28325}},"http_req_failed":{"type":"rate","contains":"default","values":{"rate":0,"passes":0,"fails":1000}},"http_reqs":{"type":"counter","contains":"default","values":{"count":1000,"rate":514.7880809126485}}},"root_group":{"name":"","path":"","id":"d41d8cd98f00b204e9800998ecf8427e","groups":[],"checks":[{"fails":0,"name":"message 201","path":"::message 201","id":"6445aff337e1ade0bc10402fbac79882","passes":1000}]}} \ No newline at end of file diff --git a/evidence/bench/unit-of-work-after/raw/write-10k-c4-r1.json b/evidence/bench/unit-of-work-after/raw/write-10k-c4-r1.json new file mode 100644 index 00000000..d9347580 --- /dev/null +++ b/evidence/bench/unit-of-work-after/raw/write-10k-c4-r1.json @@ -0,0 +1 @@ +{"root_group":{"checks":[{"fails":0,"name":"message 201","path":"::message 201","id":"6445aff337e1ade0bc10402fbac79882","passes":1000}],"name":"","path":"","id":"d41d8cd98f00b204e9800998ecf8427e","groups":[]},"options":{"summaryTrendStats":["avg","min","med","p(50)","p(95)","p(99)","max"],"summaryTimeUnit":"","noColor":true},"state":{"isStdErrTTY":false,"testRunDurationMs":1831.542918,"isStdOutTTY":false},"metrics":{"checks":{"type":"rate","contains":"default","values":{"rate":1,"passes":1000,"fails":0}},"http_req_waiting":{"type":"trend","contains":"time","values":{"avg":7.2328762560000035,"min":5.266708,"med":6.698792,"p(50)":6.698792,"p(95)":9.66762565,"p(99)":12.738756249999998,"max":49.462291}},"http_req_receiving":{"contains":"time","values":{"p(95)":0.031879199999999996,"p(99)":0.04800417,"max":0.130625,"avg":0.015755112999999953,"min":0.005291,"med":0.0129795,"p(50)":0.0129795},"type":"trend"},"vus_max":{"type":"gauge","contains":"default","values":{"value":4,"min":4,"max":4}},"http_req_connecting":{"type":"trend","contains":"time","values":{"min":0,"med":0,"p(50)":0,"p(95)":0,"p(99)":0,"max":0.231875,"avg":0.0007268760000000001}},"http_req_sending":{"type":"trend","contains":"time","values":{"med":0.003792,"p(50)":0.003792,"p(95)":0.011719399999999991,"p(99)":0.02202165999999998,"max":0.174125,"avg":0.005365873999999993,"min":0.002041}},"http_req_failed":{"type":"rate","contains":"default","values":{"passes":0,"fails":1000,"rate":0}},"http_req_duration{expected_response:true}":{"type":"trend","contains":"time","values":{"p(50)":6.717771,"p(95)":9.69400175,"p(99)":12.86709958,"max":49.481458,"avg":7.253997242999997,"min":5.287458,"med":6.717771},"thresholds":{"max>=0":{"ok":true}}},"http_req_tls_handshaking":{"contains":"time","values":{"avg":0,"min":0,"med":0,"p(50)":0,"p(95)":0,"p(99)":0,"max":0},"type":"trend"},"data_sent":{"type":"counter","contains":"data","values":{"count":376000,"rate":205291.39465133735}},"http_reqs":{"type":"counter","contains":"default","values":{"rate":545.9877517322802,"count":1000}},"vus":{"values":{"value":4,"min":4,"max":4},"type":"gauge","contains":"default"},"iterations":{"contains":"default","values":{"count":1000,"rate":545.9877517322802},"type":"counter"},"iteration_duration":{"type":"trend","contains":"time","values":{"p(95)":9.77271105,"p(99)":12.9788945,"max":49.529667,"avg":7.318827585000002,"min":5.344792,"med":6.7809375,"p(50)":6.7809375}},"http_req_blocked":{"values":{"max":0.882875,"avg":0.004234382999999999,"min":0.000541,"med":0.001,"p(50)":0.001,"p(95)":0.002208,"p(99)":0.005867739999999969},"type":"trend","contains":"time"},"data_received":{"type":"counter","contains":"data","values":{"count":490000,"rate":267533.9983488173}},"http_req_duration":{"type":"trend","contains":"time","values":{"p(95)":9.69400175,"p(99)":12.86709958,"max":49.481458,"avg":7.253997242999997,"min":5.287458,"med":6.717771,"p(50)":6.717771}}}} \ No newline at end of file diff --git a/evidence/bench/unit-of-work-after/raw/write-1k-c1-r1.json b/evidence/bench/unit-of-work-after/raw/write-1k-c1-r1.json new file mode 100644 index 00000000..8c3e921b --- /dev/null +++ b/evidence/bench/unit-of-work-after/raw/write-1k-c1-r1.json @@ -0,0 +1 @@ +{"options":{"noColor":true,"summaryTrendStats":["avg","min","med","p(50)","p(95)","p(99)","max"],"summaryTimeUnit":""},"state":{"isStdOutTTY":false,"isStdErrTTY":false,"testRunDurationMs":2661.00346},"metrics":{"http_req_failed":{"type":"rate","contains":"default","values":{"rate":0,"passes":0,"fails":1000}},"vus_max":{"values":{"value":1,"min":1,"max":1},"type":"gauge","contains":"default"},"checks":{"values":{"passes":1000,"fails":0,"rate":1},"type":"rate","contains":"default"},"http_req_receiving":{"values":{"p(95)":0.03889794999999998,"p(99)":0.06935382999999999,"max":0.256166,"avg":0.019682251999999963,"min":0.009875,"med":0.015542,"p(50)":0.015542},"type":"trend","contains":"time"},"iterations":{"type":"counter","contains":"default","values":{"count":1000,"rate":375.79808332906117}},"iteration_duration":{"type":"trend","contains":"time","values":{"avg":2.656671208999997,"min":2.071333,"med":2.4682295,"p(50)":2.4682295,"p(95)":3.7350922999999985,"p(99)":5.372018089999999,"max":14.197083}},"http_req_duration{expected_response:true}":{"type":"trend","contains":"time","values":{"avg":2.5885219269999986,"min":2.031625,"med":2.4043545,"p(50)":2.4043545,"p(95)":3.635204149999999,"p(99)":5.176087170000001,"max":13.957458},"thresholds":{"max>=0":{"ok":true}}},"http_req_sending":{"values":{"avg":0.005729933000000003,"min":0.002417,"med":0.004375,"p(50)":0.004375,"p(95)":0.013178499999999989,"p(99)":0.019751249999999998,"max":0.116708},"type":"trend","contains":"time"},"http_reqs":{"type":"counter","contains":"default","values":{"count":1000,"rate":375.79808332906117}},"data_received":{"type":"counter","contains":"data","values":{"count":490000,"rate":184141.06083123997}},"http_req_duration":{"values":{"avg":2.5885219269999986,"min":2.031625,"med":2.4043545,"p(50)":2.4043545,"p(95)":3.635204149999999,"p(99)":5.176087170000001,"max":13.957458},"type":"trend","contains":"time"},"vus":{"contains":"default","values":{"value":1,"min":1,"max":1},"type":"gauge"},"http_req_blocked":{"values":{"min":0.000583,"med":0.00125,"p(50)":0.00125,"p(95)":0.002542,"p(99)":0.004085239999999999,"max":0.554167,"avg":0.001959872999999992},"type":"trend","contains":"time"},"http_req_connecting":{"type":"trend","contains":"time","values":{"avg":0.000103459,"min":0,"med":0,"p(50)":0,"p(95)":0,"p(99)":0,"max":0.103459}},"http_req_tls_handshaking":{"values":{"avg":0,"min":0,"med":0,"p(50)":0,"p(95)":0,"p(99)":0,"max":0},"type":"trend","contains":"time"},"data_sent":{"type":"counter","contains":"data","values":{"count":376000,"rate":141300.079331727}},"http_req_waiting":{"contains":"time","values":{"min":2.01575,"med":2.3839375,"p(50)":2.3839375,"p(95)":3.5983169499999996,"p(99)":5.064193749999999,"max":13.862458,"avg":2.563109741999997},"type":"trend"}},"root_group":{"path":"","id":"d41d8cd98f00b204e9800998ecf8427e","groups":[],"checks":[{"fails":0,"name":"message 201","path":"::message 201","id":"6445aff337e1ade0bc10402fbac79882","passes":1000}],"name":""}} \ No newline at end of file diff --git a/evidence/bench/unit-of-work-after/raw/write-1k-c16-r1.json b/evidence/bench/unit-of-work-after/raw/write-1k-c16-r1.json new file mode 100644 index 00000000..1edf56db --- /dev/null +++ b/evidence/bench/unit-of-work-after/raw/write-1k-c16-r1.json @@ -0,0 +1 @@ +{"state":{"isStdOutTTY":false,"isStdErrTTY":false,"testRunDurationMs":1930.910043},"metrics":{"http_reqs":{"type":"counter","contains":"default","values":{"rate":517.8905167670724,"count":1000}},"vus_max":{"type":"gauge","contains":"default","values":{"value":16,"min":16,"max":16}},"http_req_tls_handshaking":{"type":"trend","contains":"time","values":{"max":0,"avg":0,"min":0,"med":0,"p(50)":0,"p(95)":0,"p(99)":0}},"iterations":{"type":"counter","contains":"default","values":{"count":1000,"rate":517.8905167670724}},"http_req_sending":{"type":"trend","contains":"time","values":{"min":0.001958,"med":0.004083,"p(50)":0.004083,"p(95)":0.011342299999999993,"p(99)":0.12596949999999996,"max":0.171541,"avg":0.007393258000000007}},"http_req_receiving":{"type":"trend","contains":"time","values":{"p(50)":0.014895499999999999,"p(95)":0.03519104999999998,"p(99)":0.05456782999999998,"max":0.213625,"avg":0.01763274299999998,"min":0.004875,"med":0.014895499999999999}},"checks":{"type":"rate","contains":"default","values":{"rate":1,"passes":1000,"fails":0}},"http_req_duration{expected_response:true}":{"type":"trend","contains":"time","values":{"avg":30.737733305999967,"min":15.189584,"med":28.6821665,"p(50)":28.6821665,"p(95)":42.57651814999986,"p(99)":77.09808316,"max":83.811666},"thresholds":{"max>=0":{"ok":true}}},"http_req_waiting":{"values":{"p(50)":28.648249999999997,"p(95)":42.556616699999864,"p(99)":77.0708125,"max":83.786417,"avg":30.71270730499999,"min":15.17675,"med":28.648249999999997},"type":"trend","contains":"time"},"iteration_duration":{"type":"trend","contains":"time","values":{"avg":30.814248803000044,"min":15.230875,"med":28.7347705,"p(50)":28.7347705,"p(95)":42.64126669999986,"p(99)":77.17800176,"max":83.879542}},"vus":{"type":"gauge","contains":"default","values":{"value":16,"min":16,"max":16}},"http_req_blocked":{"type":"trend","contains":"time","values":{"p(99)":0.48780908,"max":0.7415,"avg":0.009609650000000065,"min":0.0005,"med":0.0010205000000000001,"p(50)":0.0010205000000000001,"p(95)":0.002083}},"http_req_failed":{"type":"rate","contains":"default","values":{"rate":0,"passes":0,"fails":1000}},"http_req_duration":{"contains":"time","values":{"med":28.6821665,"p(50)":28.6821665,"p(95)":42.57651814999986,"p(99)":77.09808316,"max":83.811666,"avg":30.737733305999967,"min":15.189584},"type":"trend"},"http_req_connecting":{"type":"trend","contains":"time","values":{"med":0,"p(50)":0,"p(95)":0,"p(99)":0.10751333999999999,"max":0.243708,"avg":0.002241374,"min":0}},"data_sent":{"contains":"data","values":{"count":376000,"rate":194726.83430441923},"type":"counter"},"data_received":{"type":"counter","contains":"data","values":{"count":490000,"rate":253766.3532158655}}},"root_group":{"id":"d41d8cd98f00b204e9800998ecf8427e","groups":[],"checks":[{"name":"message 201","path":"::message 201","id":"6445aff337e1ade0bc10402fbac79882","passes":1000,"fails":0}],"name":"","path":""},"options":{"noColor":true,"summaryTrendStats":["avg","min","med","p(50)","p(95)","p(99)","max"],"summaryTimeUnit":""}} \ No newline at end of file diff --git a/evidence/bench/unit-of-work-after/raw/write-1k-c4-r1.json b/evidence/bench/unit-of-work-after/raw/write-1k-c4-r1.json new file mode 100644 index 00000000..59234171 --- /dev/null +++ b/evidence/bench/unit-of-work-after/raw/write-1k-c4-r1.json @@ -0,0 +1 @@ +{"root_group":{"checks":[{"name":"message 201","path":"::message 201","id":"6445aff337e1ade0bc10402fbac79882","passes":1000,"fails":0}],"name":"","path":"","id":"d41d8cd98f00b204e9800998ecf8427e","groups":[]},"options":{"summaryTimeUnit":"","noColor":true,"summaryTrendStats":["avg","min","med","p(50)","p(95)","p(99)","max"]},"state":{"isStdOutTTY":false,"isStdErrTTY":false,"testRunDurationMs":1709.027945},"metrics":{"checks":{"type":"rate","contains":"default","values":{"rate":1,"passes":1000,"fails":0}},"data_received":{"type":"counter","contains":"data","values":{"count":490000,"rate":286712.6903533458}},"http_req_duration{expected_response:true}":{"values":{"avg":6.770621169000005,"min":5.475667,"med":6.512625,"p(50)":6.512625,"p(95)":7.790464249999999,"p(99)":10.00905625,"max":45.321083},"thresholds":{"max>=0":{"ok":true}},"type":"trend","contains":"time"},"http_req_sending":{"contains":"time","values":{"med":0.003625,"p(50)":0.003625,"p(95)":0.011338149999999996,"p(99)":0.04666540999999996,"max":0.284292,"avg":0.005943480999999996,"min":0.002},"type":"trend"},"http_req_connecting":{"type":"trend","contains":"time","values":{"med":0,"p(50)":0,"p(95)":0,"p(99)":0,"max":0.120667,"avg":0.00038991699999999993,"min":0}},"vus":{"type":"gauge","contains":"default","values":{"min":4,"max":4,"value":4}},"iterations":{"type":"counter","contains":"default","values":{"count":1000,"rate":585.1279394966242}},"http_req_waiting":{"type":"trend","contains":"time","values":{"max":45.298583,"avg":6.749173715000003,"min":5.41775,"med":6.4963545,"p(50)":6.4963545,"p(95)":7.749725,"p(99)":9.82830842}},"http_req_duration":{"type":"trend","contains":"time","values":{"p(99)":10.00905625,"max":45.321083,"avg":6.770621169000005,"min":5.475667,"med":6.512625,"p(50)":6.512625,"p(95)":7.790464249999999}},"http_req_tls_handshaking":{"type":"trend","contains":"time","values":{"p(99)":0,"max":0,"avg":0,"min":0,"med":0,"p(50)":0,"p(95)":0}},"data_sent":{"type":"counter","contains":"data","values":{"count":376000,"rate":220008.10525073067}},"http_req_receiving":{"type":"trend","contains":"time","values":{"max":0.309875,"avg":0.015503972999999982,"min":0.004,"med":0.0113125,"p(50)":0.0113125,"p(95)":0.03683924999999999,"p(99)":0.05962523999999985}},"http_req_failed":{"type":"rate","contains":"default","values":{"rate":0,"passes":0,"fails":1000}},"http_reqs":{"type":"counter","contains":"default","values":{"count":1000,"rate":585.1279394966242}},"http_req_blocked":{"values":{"min":0.000458,"med":0.000958,"p(50)":0.000958,"p(95)":0.002083,"p(99)":0.003543249999999999,"max":0.477708,"avg":0.002691585999999997},"type":"trend","contains":"time"},"iteration_duration":{"type":"trend","contains":"time","values":{"p(50)":6.569520499999999,"p(95)":7.870337500000001,"p(99)":10.6346695,"max":45.38875,"avg":6.831152906999999,"min":5.592042,"med":6.569520499999999}},"vus_max":{"type":"gauge","contains":"default","values":{"value":4,"min":4,"max":4}}}} \ No newline at end of file diff --git a/evidence/bench/unit-of-work-after/raw/write-5k-c1-r1.json b/evidence/bench/unit-of-work-after/raw/write-5k-c1-r1.json new file mode 100644 index 00000000..07b7d412 --- /dev/null +++ b/evidence/bench/unit-of-work-after/raw/write-5k-c1-r1.json @@ -0,0 +1 @@ +{"root_group":{"name":"","path":"","id":"d41d8cd98f00b204e9800998ecf8427e","groups":[],"checks":[{"name":"message 201","path":"::message 201","id":"6445aff337e1ade0bc10402fbac79882","passes":1000,"fails":0}]},"options":{"summaryTrendStats":["avg","min","med","p(50)","p(95)","p(99)","max"],"summaryTimeUnit":"","noColor":true},"state":{"isStdOutTTY":false,"isStdErrTTY":false,"testRunDurationMs":2499.285543},"metrics":{"vus_max":{"type":"gauge","contains":"default","values":{"value":1,"min":1,"max":1}},"http_reqs":{"contains":"default","values":{"count":1000,"rate":400.11434579806235},"type":"counter"},"vus":{"type":"gauge","contains":"default","values":{"value":1,"min":1,"max":1}},"http_req_sending":{"type":"trend","contains":"time","values":{"min":0.002291,"med":0.004,"p(50)":0.004,"p(95)":0.010964249999999995,"p(99)":0.01781683999999998,"max":0.11,"avg":0.005324662999999993}},"http_req_duration{expected_response:true}":{"values":{"avg":2.4352147959999995,"min":1.98325,"med":2.3347085,"p(50)":2.3347085,"p(95)":3.11337145,"p(99)":4.17272625,"max":6.670042},"thresholds":{"max>=0":{"ok":true}},"type":"trend","contains":"time"},"http_req_waiting":{"contains":"time","values":{"avg":2.4127738830000007,"min":1.968166,"med":2.3126670000000003,"p(50)":2.3126670000000003,"p(95)":3.0806872,"p(99)":4.128559159999999,"max":6.61125},"type":"trend"},"http_req_failed":{"contains":"default","values":{"rate":0,"passes":0,"fails":1000},"type":"rate"},"http_req_duration":{"type":"trend","contains":"time","values":{"avg":2.4352147959999995,"min":1.98325,"med":2.3347085,"p(50)":2.3347085,"p(95)":3.11337145,"p(99)":4.17272625,"max":6.670042}},"data_received":{"values":{"count":490000,"rate":196056.02944105054},"type":"counter","contains":"data"},"http_req_connecting":{"contains":"time","values":{"p(95)":0,"p(99)":0,"max":0.0935,"avg":0.0000935,"min":0,"med":0,"p(50)":0},"type":"trend"},"http_req_receiving":{"values":{"avg":0.017116249999999986,"min":0.008333,"med":0.0141875,"p(50)":0.0141875,"p(95)":0.031463149999999995,"p(99)":0.04759966999999998,"max":0.187875},"type":"trend","contains":"time"},"data_sent":{"type":"counter","contains":"data","values":{"count":376000,"rate":150442.99402007143}},"http_req_blocked":{"type":"trend","contains":"time","values":{"p(50)":0.001083,"p(95)":0.002083,"p(99)":0.003003329999999997,"max":0.434208,"avg":0.0016854299999999884,"min":0.000666,"med":0.001083}},"iteration_duration":{"type":"trend","contains":"time","values":{"min":2.023958,"med":2.3845625000000004,"p(50)":2.3845625000000004,"p(95)":3.2080475999999996,"p(99)":4.29520518,"max":6.82275,"avg":2.495532967}},"iterations":{"type":"counter","contains":"default","values":{"count":1000,"rate":400.11434579806235}},"http_req_tls_handshaking":{"contains":"time","values":{"max":0,"avg":0,"min":0,"med":0,"p(50)":0,"p(95)":0,"p(99)":0},"type":"trend"},"checks":{"type":"rate","contains":"default","values":{"rate":1,"passes":1000,"fails":0}}}} \ No newline at end of file diff --git a/evidence/bench/unit-of-work-after/raw/write-5k-c16-r1.json b/evidence/bench/unit-of-work-after/raw/write-5k-c16-r1.json new file mode 100644 index 00000000..68700728 --- /dev/null +++ b/evidence/bench/unit-of-work-after/raw/write-5k-c16-r1.json @@ -0,0 +1 @@ +{"root_group":{"name":"","path":"","id":"d41d8cd98f00b204e9800998ecf8427e","groups":[],"checks":[{"id":"6445aff337e1ade0bc10402fbac79882","passes":1000,"fails":0,"name":"message 201","path":"::message 201"}]},"options":{"noColor":true,"summaryTrendStats":["avg","min","med","p(50)","p(95)","p(99)","max"],"summaryTimeUnit":""},"state":{"isStdOutTTY":false,"isStdErrTTY":false,"testRunDurationMs":1897.544709},"metrics":{"http_req_connecting":{"type":"trend","contains":"time","values":{"min":0,"med":0,"p(50)":0,"p(95)":0,"p(99)":0.1448462499999996,"max":0.352917,"avg":0.003329376}},"data_sent":{"contains":"data","values":{"count":376000,"rate":198150.79888059702},"type":"counter"},"iteration_duration":{"type":"trend","contains":"time","values":{"avg":30.26871481799999,"min":19.6535,"med":27.856458500000002,"p(50)":27.856458500000002,"p(95)":45.03120204999995,"p(99)":75.91491291999999,"max":82.534042}},"http_req_tls_handshaking":{"type":"trend","contains":"time","values":{"p(99)":0,"max":0,"avg":0,"min":0,"med":0,"p(50)":0,"p(95)":0}},"data_received":{"values":{"count":490000,"rate":258228.43471141634},"type":"counter","contains":"data"},"vus":{"type":"gauge","contains":"default","values":{"min":16,"max":16,"value":16}},"http_req_duration":{"type":"trend","contains":"time","values":{"p(99)":74.63274267,"max":81.487583,"avg":30.18790630100003,"min":19.599666,"med":27.809854,"p(50)":27.809854,"p(95)":44.95925354999995}},"checks":{"type":"rate","contains":"default","values":{"rate":1,"passes":1000,"fails":0}},"vus_max":{"type":"gauge","contains":"default","values":{"max":16,"value":16,"min":16}},"http_req_sending":{"type":"trend","contains":"time","values":{"p(50)":0.004042,"p(95)":0.011377099999999998,"p(99)":0.028280839999999974,"max":0.070708,"avg":0.00536654,"min":0.002042,"med":0.004042}},"iterations":{"contains":"default","values":{"count":1000,"rate":526.9968055335028},"type":"counter"},"http_req_failed":{"type":"rate","contains":"default","values":{"fails":1000,"rate":0,"passes":0}},"http_req_blocked":{"type":"trend","contains":"time","values":{"max":1.097834,"avg":0.014326870000000038,"min":0.000458,"med":0.001,"p(50)":0.001,"p(95)":0.002166,"p(99)":0.7119654199999991}},"http_reqs":{"type":"counter","contains":"default","values":{"count":1000,"rate":526.9968055335028}},"http_req_receiving":{"type":"trend","contains":"time","values":{"p(95)":0.03534229999999999,"p(99)":0.05893224999999999,"max":0.172084,"avg":0.017506172000000018,"min":0.005125,"med":0.014646,"p(50)":0.014646}},"http_req_waiting":{"contains":"time","values":{"p(99)":74.61307366999999,"max":81.451958,"avg":30.165033588999982,"min":19.587792,"med":27.791542,"p(50)":27.791542,"p(95)":44.93727319999995},"type":"trend"},"http_req_duration{expected_response:true}":{"type":"trend","contains":"time","values":{"max":81.487583,"avg":30.18790630100003,"min":19.599666,"med":27.809854,"p(50)":27.809854,"p(95)":44.95925354999995,"p(99)":74.63274267},"thresholds":{"max>=0":{"ok":true}}}}} \ No newline at end of file diff --git a/evidence/bench/unit-of-work-after/raw/write-5k-c4-r1.json b/evidence/bench/unit-of-work-after/raw/write-5k-c4-r1.json new file mode 100644 index 00000000..ef572a12 --- /dev/null +++ b/evidence/bench/unit-of-work-after/raw/write-5k-c4-r1.json @@ -0,0 +1 @@ +{"root_group":{"groups":[],"checks":[{"name":"message 201","path":"::message 201","id":"6445aff337e1ade0bc10402fbac79882","passes":1000,"fails":0}],"name":"","path":"","id":"d41d8cd98f00b204e9800998ecf8427e"},"options":{"summaryTrendStats":["avg","min","med","p(50)","p(95)","p(99)","max"],"summaryTimeUnit":"","noColor":true},"state":{"isStdOutTTY":false,"isStdErrTTY":false,"testRunDurationMs":1766.698918},"metrics":{"http_req_sending":{"contains":"time","values":{"p(95)":0.012675349999999991,"p(99)":0.04755857999999991,"max":0.208125,"avg":0.006234194999999996,"min":0.002167,"med":0.0039165,"p(50)":0.0039165},"type":"trend"},"http_req_waiting":{"type":"trend","contains":"time","values":{"avg":6.966763175999989,"min":4.326375,"med":6.513937,"p(50)":6.513937,"p(95)":9.2097333,"p(99)":13.635809999999998,"max":47.0805}},"http_req_receiving":{"type":"trend","contains":"time","values":{"min":0.004625,"med":0.0120625,"p(50)":0.0120625,"p(95)":0.04082324999999998,"p(99)":0.06288857999999996,"max":0.356125,"avg":0.016932802999999958}},"data_sent":{"values":{"count":376000,"rate":212826.30343468633},"type":"counter","contains":"data"},"http_req_duration":{"type":"trend","contains":"time","values":{"min":4.342417,"med":6.5357085,"p(50)":6.5357085,"p(95)":9.23373155,"p(99)":13.664201499999997,"max":47.109792,"avg":6.989930173999996}},"vus_max":{"type":"gauge","contains":"default","values":{"value":4,"min":4,"max":4}},"http_req_failed":{"values":{"fails":1000,"rate":0,"passes":0},"type":"rate","contains":"default"},"vus":{"type":"gauge","contains":"default","values":{"value":4,"min":4,"max":4}},"iterations":{"type":"counter","contains":"default","values":{"count":1000,"rate":566.0274027518253}},"http_req_blocked":{"type":"trend","contains":"time","values":{"max":0.7775,"avg":0.004280834000000003,"min":0.0005,"med":0.001,"p(50)":0.001,"p(95)":0.002461049999999998,"p(99)":0.006379579999999996}},"http_req_connecting":{"type":"trend","contains":"time","values":{"p(99)":0,"max":0.148917,"avg":0.000513833,"min":0,"med":0,"p(50)":0,"p(95)":0}},"iteration_duration":{"type":"trend","contains":"time","values":{"min":4.732208,"med":6.593146,"p(50)":6.593146,"p(95)":9.385426449999999,"p(99)":13.729791079999998,"max":47.198834,"avg":7.057867474000005}},"http_reqs":{"type":"counter","contains":"default","values":{"count":1000,"rate":566.0274027518253}},"checks":{"type":"rate","contains":"default","values":{"passes":1000,"fails":0,"rate":1}},"http_req_duration{expected_response:true}":{"type":"trend","contains":"time","values":{"p(95)":9.23373155,"p(99)":13.664201499999997,"max":47.109792,"avg":6.989930173999996,"min":4.342417,"med":6.5357085,"p(50)":6.5357085},"thresholds":{"max>=0":{"ok":true}}},"http_req_tls_handshaking":{"type":"trend","contains":"time","values":{"max":0,"avg":0,"min":0,"med":0,"p(50)":0,"p(95)":0,"p(99)":0}},"data_received":{"type":"counter","contains":"data","values":{"count":490000,"rate":277353.4273483944}}}} \ No newline at end of file diff --git a/evidence/bench/unit-of-work-after/runs.csv b/evidence/bench/unit-of-work-after/runs.csv new file mode 100644 index 00000000..c6688959 --- /dev/null +++ b/evidence/bench/unit-of-work-after/runs.csv @@ -0,0 +1,19 @@ +run,scenario,size,concurrency,repeat,duration_s,requests_ok,requests_failed,rps,error_ratio,p50_ms,p95_ms,p99_ms,max_ms,app_cpu_cores,rss_start_mib,rss_end_mib,rss_max_mib,mem_cgroup_end_mib,store_messages_start,store_messages_end,generator_cpu_cores,flags,check_failed,db_cpu_cores,series,cell,attempt,config,replicas,replica_cpus,replica_memory,db_max_connections,step,step_kind,target_rps,sent,missing,dropped_iterations,slo_error_ratio,slo_pass,fail_reason,read_p95_ms,write_p95_ms,me_p95_ms,read_errors,write_errors,me_errors,short_pages,vus_max,generator_throttled_ratio,generator_mem_peak_mib,app_cpu_replica_max,app_cpu_second_max,app_throttled_ratio,app_throttled_ms,app_mem_peak_mib,app_us_per_request,db_throttled_ratio,db_mem_peak_mib,db_us_per_request,lb_cpu_cores,lb_throttled_ratio,cache_cpu_cores,vm_busy_cores,vm_cpu_pressure,db_commits_per_s,db_rollbacks_per_s,db_wal_mib_per_s,db_wal_fsyncs_per_s,db_sessions_new,db_conn_max,db_conn_replica_max,db_aas_cpu,db_aas_wal,db_aas_lock,db_aas_lwlock,db_aas_io,db_aas_other,db_idle_in_tx_mean,pool_busy_share,db_too_many_clients,lb_qtime_ms,lb_ctime_ms,lb_rtime_ms,lb_ttime_ms,lb_scur_max,lb_qcur_max,lb_retries,lb_redispatches,lb_econ,lb_eresp,lb_chkdown,lb_5xx,instances,instance_share_min,instance_share_max,host_swapouts,signs,error_codes,level +1,read,1000,1,1,5.0,2085,0,417.0,0.0,2.222,2.919,3.762,12.808,0.755,127.6,127.6,127.6,118.7,4500,4500,0.1,,0,0.125,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +2,read,1000,4,1,5.003,3093,0,618.2,0.0,6.076,7.626,10.918,47.52,0.993,127.6,127.6,127.6,118.4,4500,4500,0.132,,0,0.172,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +3,read,1000,16,1,5.018,2852,0,568.3,0.0,26.011,56.3,66.855,73.324,1.004,127.6,127.6,127.7,116.7,4500,4500,0.133,,0,0.168,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +4,write,1000,1,1,2.661,1000,0,375.8,0.0,2.404,3.635,5.176,13.957,0.755,127.6,127.6,127.6,118.6,4600,5600,0.091,,0,0.134,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +5,write,1000,4,1,1.709,1000,0,585.1,0.0,6.513,7.79,10.009,45.321,0.984,127.6,127.6,127.6,112.0,5700,6700,0.117,,0,0.179,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +6,write,1000,16,1,1.931,1000,0,517.9,0.0,28.682,42.577,77.098,83.812,1.012,127.6,127.6,127.7,117.0,6800,7800,0.124,,0,0.203,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +7,read,5000,1,1,5.001,2156,0,431.2,0.0,2.162,2.795,3.456,8.114,0.755,127.7,127.7,127.7,118.9,8500,8500,0.102,,0,0.124,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +8,read,5000,4,1,5.004,3078,0,615.1,0.0,5.969,7.598,13.779,54.118,0.992,127.7,127.7,127.7,117.2,8500,8500,0.138,,0,0.18,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +9,read,5000,16,1,5.035,2845,0,565.0,0.0,25.437,56.143,67.894,78.228,1.003,127.7,127.7,127.7,118.6,8500,8500,0.176,,0,0.17,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +10,write,5000,1,1,2.499,1000,0,400.1,0.0,2.335,3.113,4.173,6.67,0.757,127.7,127.7,127.7,117.0,8600,9600,0.118,,0,0.135,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +11,write,5000,4,1,1.767,1000,0,566.0,0.0,6.536,9.234,13.664,47.11,0.982,127.7,127.7,127.7,118.9,9700,10700,0.123,,0,0.205,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +12,write,5000,16,1,1.898,1000,0,527.0,0.0,27.81,44.959,74.633,81.488,1.013,127.7,127.7,127.7,118.0,10800,11800,0.133,,0,0.195,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +13,read,10000,1,1,5.002,2086,0,417.1,0.0,2.218,2.955,4.162,9.367,0.753,127.7,127.7,127.7,118.7,13500,13500,0.103,,0,0.124,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +14,read,10000,4,1,5.003,2983,0,596.3,0.0,6.012,8.844,16.64,53.866,0.994,127.7,127.7,127.7,116.9,13500,13500,0.138,,0,0.183,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +15,read,10000,16,1,5.014,2840,0,566.4,0.0,26.084,54.077,63.838,71.148,1.003,127.7,127.7,127.8,117.2,13500,13500,0.134,,0,0.167,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +16,write,10000,1,1,2.643,1000,0,378.3,0.0,2.412,3.453,4.907,11.742,0.748,127.7,127.7,127.7,118.0,13600,14600,0.088,,0,0.127,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +17,write,10000,4,1,1.832,1000,0,546.0,0.0,6.718,9.694,12.867,49.481,1.003,127.7,127.7,127.7,116.7,14700,15700,0.119,,0,0.193,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +18,write,10000,16,1,1.943,1000,0,514.8,0.0,29.177,44.994,66.267,69.522,1.01,127.7,127.7,127.7,118.3,15800,16800,0.132,,0,0.219,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, diff --git a/evidence/bench/unit-of-work-after/summary.md b/evidence/bench/unit-of-work-after/summary.md new file mode 100644 index 00000000..77577f62 --- /dev/null +++ b/evidence/bench/unit-of-work-after/summary.md @@ -0,0 +1,167 @@ +# Нагрузочный замер: метка `unit-of-work-after` + +- Статус: **complete** +- Commit: `6ba74b1` +- Профиль `quick`: размеры 1k, 5k, 10k; клиенты 1, 4, 16; повторов 1; чтение 5 с после 2 с прогрева; запись 1000 после 100 +- Лимиты без swap: API 1 CPU / 2g × 1 реплик за HAProxy 1 CPU / 256m, PostgreSQL 4 CPU / 3g, Valkey 2 CPU / 512m; CPU и RSS API — сумма по репликам; значения — медиана (min–max) по повторам +- Посторонние контейнеры в VM во время замера: domains-api-1, domains-bot-1, domains-postgres-1 + +## Сценарий `read` + +| Размер | Клиенты | RPS | p50, мс | p95, мс | p99, мс | max, мс | CPU API, ядер | CPU БД, ядер | RSS конец, МиБ | Сообщений в начале | Пометки | +|---|---|---|---|---|---|---|---|---|---|---|---| +| 1k | 1 | 417 | 2.22 | 2.92 | 3.76 | 12.8 | 0.76 | 0.12 | 127.6 | 4500 | — | +| 1k | 4 | 618 | 6.08 | 7.63 | 10.92 | 47.5 | 0.99 | 0.17 | 127.6 | 4500 | — | +| 1k | 16 | 568 | 26.01 | 56.30 | 66.86 | 73.3 | 1.00 | 0.17 | 127.6 | 4500 | — | +| 5k | 1 | 431 | 2.16 | 2.79 | 3.46 | 8.1 | 0.76 | 0.12 | 127.7 | 8500 | — | +| 5k | 4 | 615 | 5.97 | 7.60 | 13.78 | 54.1 | 0.99 | 0.18 | 127.7 | 8500 | — | +| 5k | 16 | 565 | 25.44 | 56.14 | 67.89 | 78.2 | 1.00 | 0.17 | 127.7 | 8500 | — | +| 10k | 1 | 417 | 2.22 | 2.96 | 4.16 | 9.4 | 0.75 | 0.12 | 127.7 | 13500 | — | +| 10k | 4 | 596 | 6.01 | 8.84 | 16.64 | 53.9 | 0.99 | 0.18 | 127.7 | 13500 | — | +| 10k | 16 | 566 | 26.08 | 54.08 | 63.84 | 71.1 | 1.00 | 0.17 | 127.7 | 13500 | — | + +## Сценарий `write` + +| Размер | Клиенты | RPS | p50, мс | p95, мс | p99, мс | max, мс | CPU API, ядер | CPU БД, ядер | RSS конец, МиБ | Сообщений в начале | Пометки | +|---|---|---|---|---|---|---|---|---|---|---|---| +| 1k | 1 | 376 | 2.40 | 3.63 | 5.18 | 14.0 | 0.76 | 0.13 | 127.6 | 4600 | — | +| 1k | 4 | 585 | 6.51 | 7.79 | 10.01 | 45.3 | 0.98 | 0.18 | 127.6 | 5700 | — | +| 1k | 16 | 518 | 28.68 | 42.58 | 77.10 | 83.8 | 1.01 | 0.20 | 127.6 | 6800 | — | +| 5k | 1 | 400 | 2.33 | 3.11 | 4.17 | 6.7 | 0.76 | 0.14 | 127.7 | 8600 | — | +| 5k | 4 | 566 | 6.54 | 9.23 | 13.66 | 47.1 | 0.98 | 0.20 | 127.7 | 9700 | — | +| 5k | 16 | 527 | 27.81 | 44.96 | 74.63 | 81.5 | 1.01 | 0.20 | 127.7 | 10800 | — | +| 10k | 1 | 378 | 2.41 | 3.45 | 4.91 | 11.7 | 0.75 | 0.13 | 127.7 | 13600 | — | +| 10k | 4 | 546 | 6.72 | 9.69 | 12.87 | 49.5 | 1.00 | 0.19 | 127.7 | 14700 | — | +| 10k | 16 | 515 | 29.18 | 44.99 | 66.27 | 69.5 | 1.01 | 0.22 | 127.7 | 15800 | — | + +## Память и наполнение по размерам + +Объём `messages` — после `VACUUM (ANALYZE)`, до прогонов: в таблице N сообщений читаемого чата и сообщения фоновых чатов (`Сообщений`). + +| Размер | Сообщений | RSS API до, МиБ | RSS API после, МиБ | Байт RSS на сообщение | Таблица, МиБ | Индексы, МиБ | Байт в БД на сообщение | Наполнение, сообщ/с | Курсоров в пуле | Пик RSS за размер, МиБ | +|---|---|---|---|---|---|---|---|---|---|---| +| 1k | 4500 | 121.4 | 127.6 | 1430 | 0.8 | 0.6 | 330 | 488 | 9 | 185.0 | +| 5k | 8500 | 121.5 | 127.6 | 758 | 1.5 | 1.1 | 321 | 492 | 49 | 185.0 | +| 10k | 13500 | 121.5 | 127.6 | 478 | 2.3 | 1.9 | 328 | 497 | 99 | 185.0 | + +## Планы запроса истории + +Страница (`limit` профиля) читаемого чата и первого чата каждого фонового уровня. `app` — план запроса приложения (auto_explain). Остальное — тот же запрос с теми же параметрами в psql, в откатываемой транзакции: `psql` — индекс приложения, `generic` — он же с generic plan, `or-cursor` — условие курсора через OR, `no-index` — без индекса, дальше — варианты индекса профиля. Буферы — верхнего узла плана, файлы — `explain-<размер>.txt`. + +| Размер | Чат | Страница | После сообщений | Вариант | Узел | shared hit | read | Строк | Время, мс | План | +|---|---|---|---|---|---|---|---|---|---|---| +| 1k | read 1k | first | 0 | app | Index Scan using ix_messages_chat_id_created_at_id on messages | 27 | 0 | 51 | 0.156 | custom | +| 1k | read 1k | middle | 500 | app | Index Scan using ix_messages_chat_id_created_at_id on messages | 47 | 0 | 51 | 0.160 | custom | +| 1k | read 1k | middle | 500 | psql | Index Scan using ix_messages_chat_id_created_at_id on messages | 47 | 0 | 51 | 0.070 | custom | +| 1k | read 1k | middle | 500 | generic | Index Scan using ix_messages_chat_id_created_at_id on messages | 47 | 0 | 51 | 0.069 | generic | +| 1k | read 1k | middle | 500 | or-cursor | Index Scan using ix_messages_chat_id_created_at_id on messages | 496 | 0 | 51 | 0.128 | custom | +| 1k | read 1k | middle | 500 | no-index | Seq Scan on messages | 101 | 0 | 51 | 0.578 | custom | +| 1k | read 1k | middle | 500 | chat_only | Bitmap Heap Scan on messages | 103 | 0 | 51 | 0.466 | custom | +| 1k | read 1k | middle | 500 | covering | Index Only Scan using bench_variant on messages | 4 | 0 | 51 | 0.057 | custom | +| 1k | read 1k | last | 900 | app | Bitmap Heap Scan on messages | 22 | 0 | 51 | 0.279 | custom | +| 1k | bg 1k | first | 0 | app | Index Scan using ix_messages_chat_id_created_at_id on messages | 32 | 0 | 51 | 0.135 | custom | +| 1k | bg 1k | middle | 500 | app | Index Scan using ix_messages_chat_id_created_at_id on messages | 49 | 0 | 51 | 0.108 | custom | +| 1k | bg 1k | middle | 500 | psql | Index Scan using ix_messages_chat_id_created_at_id on messages | 49 | 0 | 51 | 0.068 | custom | +| 1k | bg 1k | middle | 500 | generic | Index Scan using ix_messages_chat_id_created_at_id on messages | 49 | 0 | 51 | 0.069 | generic | +| 1k | bg 1k | middle | 500 | or-cursor | Index Scan using ix_messages_chat_id_created_at_id on messages | 487 | 0 | 51 | 0.125 | custom | +| 1k | bg 1k | middle | 500 | no-index | Seq Scan on messages | 101 | 0 | 51 | 0.489 | custom | +| 1k | bg 1k | middle | 500 | chat_only | Bitmap Heap Scan on messages | 101 | 0 | 51 | 0.431 | custom | +| 1k | bg 1k | middle | 500 | covering | Index Only Scan using bench_variant on messages | 4 | 0 | 51 | 0.055 | custom | +| 1k | bg 1k | last | 900 | app | Bitmap Heap Scan on messages | 19 | 0 | 51 | 0.154 | custom | +| 1k | bg 100 | first | 0 | app | Bitmap Heap Scan on messages | 65 | 0 | 51 | 0.314 | custom | +| 1k | bg 100 | first | 0 | psql | Bitmap Heap Scan on messages | 65 | 0 | 51 | 0.138 | custom | +| 1k | bg 100 | first | 0 | generic | Index Scan using ix_messages_chat_id_created_at_id on messages | 45 | 0 | 51 | 0.065 | generic | +| 1k | bg 100 | first | 0 | no-index | Seq Scan on messages | 101 | 0 | 51 | 0.198 | custom | +| 1k | bg 100 | first | 0 | chat_only | Bitmap Heap Scan on messages | 65 | 0 | 51 | 0.125 | custom | +| 1k | bg 100 | first | 0 | covering | Index Only Scan using bench_variant on messages | 4 | 0 | 51 | 0.049 | custom | +| 1k | bg 10 | first | 0 | app | Bitmap Heap Scan on messages | 12 | 0 | 10 | 0.043 | custom | +| 1k | bg 10 | first | 0 | psql | Bitmap Heap Scan on messages | 12 | 0 | 10 | 0.047 | custom | +| 1k | bg 10 | first | 0 | generic | Index Scan using ix_messages_chat_id_created_at_id on messages | 12 | 0 | 10 | 0.029 | generic | +| 1k | bg 10 | first | 0 | no-index | Seq Scan on messages | 101 | 0 | 10 | 0.146 | custom | +| 1k | bg 10 | first | 0 | chat_only | Bitmap Heap Scan on messages | 12 | 0 | 10 | 0.033 | custom | +| 1k | bg 10 | first | 0 | covering | Index Only Scan using bench_variant on messages | 3 | 0 | 10 | 0.015 | custom | +| 5k | read 5k | first | 0 | app | Index Scan using ix_messages_chat_id_created_at_id on messages | 25 | 0 | 51 | 0.156 | custom | +| 5k | read 5k | middle | 2500 | app | Index Scan using ix_messages_chat_id_created_at_id on messages | 53 | 0 | 51 | 0.178 | generic | +| 5k | read 5k | middle | 2500 | psql | Index Scan using ix_messages_chat_id_created_at_id on messages | 53 | 0 | 51 | 0.065 | custom | +| 5k | read 5k | middle | 2500 | generic | Index Scan using ix_messages_chat_id_created_at_id on messages | 53 | 0 | 51 | 0.077 | generic | +| 5k | read 5k | middle | 2500 | or-cursor | Index Scan using ix_messages_chat_id_created_at_id on messages | 2365 | 0 | 51 | 0.380 | custom | +| 5k | read 5k | middle | 2500 | no-index | Seq Scan on messages | 184 | 0 | 51 | 2.122 | custom | +| 5k | read 5k | middle | 2500 | chat_only | Seq Scan on messages | 184 | 0 | 51 | 2.124 | custom | +| 5k | read 5k | middle | 2500 | covering | Index Only Scan using bench_variant on messages | 5 | 0 | 51 | 0.053 | custom | +| 5k | read 5k | last | 4900 | app | Index Scan using ix_messages_chat_id_created_at_id on messages | 50 | 0 | 51 | 0.159 | generic | +| 5k | bg 1k | first | 0 | app | Index Scan using ix_messages_chat_id_created_at_id on messages | 42 | 0 | 51 | 0.113 | custom | +| 5k | bg 1k | middle | 500 | app | Index Scan using ix_messages_chat_id_created_at_id on messages | 46 | 0 | 51 | 0.128 | generic | +| 5k | bg 1k | middle | 500 | psql | Index Scan using ix_messages_chat_id_created_at_id on messages | 46 | 0 | 51 | 0.064 | custom | +| 5k | bg 1k | middle | 500 | generic | Index Scan using ix_messages_chat_id_created_at_id on messages | 46 | 0 | 51 | 0.064 | generic | +| 5k | bg 1k | middle | 500 | or-cursor | Index Scan using ix_messages_chat_id_created_at_id on messages | 498 | 0 | 51 | 0.114 | custom | +| 5k | bg 1k | middle | 500 | no-index | Seq Scan on messages | 184 | 0 | 51 | 0.568 | custom | +| 5k | bg 1k | middle | 500 | chat_only | Bitmap Heap Scan on messages | 186 | 0 | 51 | 0.435 | custom | +| 5k | bg 1k | middle | 500 | covering | Index Only Scan using bench_variant on messages | 5 | 0 | 51 | 0.053 | custom | +| 5k | bg 1k | last | 900 | app | Index Scan using ix_messages_chat_id_created_at_id on messages | 50 | 0 | 51 | 0.108 | generic | +| 5k | bg 100 | first | 0 | app | Index Scan using ix_messages_chat_id_created_at_id on messages | 51 | 0 | 51 | 0.172 | custom | +| 5k | bg 100 | first | 0 | psql | Index Scan using ix_messages_chat_id_created_at_id on messages | 51 | 0 | 51 | 0.061 | custom | +| 5k | bg 100 | first | 0 | generic | Index Scan using ix_messages_chat_id_created_at_id on messages | 51 | 0 | 51 | 0.063 | generic | +| 5k | bg 100 | first | 0 | no-index | Seq Scan on messages | 184 | 0 | 51 | 0.273 | custom | +| 5k | bg 100 | first | 0 | chat_only | Bitmap Heap Scan on messages | 84 | 0 | 51 | 0.129 | custom | +| 5k | bg 100 | first | 0 | covering | Index Only Scan using bench_variant on messages | 5 | 0 | 51 | 0.048 | custom | +| 5k | bg 10 | first | 0 | app | Bitmap Heap Scan on messages | 12 | 0 | 10 | 0.052 | custom | +| 5k | bg 10 | first | 0 | psql | Bitmap Heap Scan on messages | 12 | 0 | 10 | 0.030 | custom | +| 5k | bg 10 | first | 0 | generic | Index Scan using ix_messages_chat_id_created_at_id on messages | 12 | 0 | 10 | 0.024 | generic | +| 5k | bg 10 | first | 0 | no-index | Seq Scan on messages | 184 | 0 | 10 | 0.202 | custom | +| 5k | bg 10 | first | 0 | chat_only | Bitmap Heap Scan on messages | 12 | 0 | 10 | 0.022 | custom | +| 5k | bg 10 | first | 0 | covering | Index Only Scan using bench_variant on messages | 4 | 0 | 10 | 0.019 | custom | +| 10k | read 10k | first | 0 | app | Index Scan using ix_messages_chat_id_created_at_id on messages | 10 | 0 | 51 | 0.183 | custom | +| 10k | read 10k | middle | 5000 | app | Index Scan using ix_messages_chat_id_created_at_id on messages | 50 | 0 | 51 | 0.173 | generic | +| 10k | read 10k | middle | 5000 | psql | Index Scan using ix_messages_chat_id_created_at_id on messages | 50 | 0 | 51 | 0.063 | custom | +| 10k | read 10k | middle | 5000 | generic | Index Scan using ix_messages_chat_id_created_at_id on messages | 50 | 0 | 51 | 0.065 | generic | +| 10k | read 10k | middle | 5000 | or-cursor | Index Scan using ix_messages_chat_id_created_at_id on messages | 4713 | 0 | 51 | 0.732 | custom | +| 10k | read 10k | middle | 5000 | no-index | Seq Scan on messages | 294 | 0 | 51 | 4.012 | custom | +| 10k | read 10k | middle | 5000 | chat_only | Seq Scan on messages | 294 | 0 | 51 | 3.763 | custom | +| 10k | read 10k | middle | 5000 | covering | Index Only Scan using bench_variant on messages | 5 | 0 | 51 | 0.051 | custom | +| 10k | read 10k | last | 9900 | app | Index Scan using ix_messages_chat_id_created_at_id on messages | 48 | 0 | 51 | 0.165 | generic | +| 10k | bg 1k | first | 0 | app | Index Scan using ix_messages_chat_id_created_at_id on messages | 48 | 0 | 51 | 0.150 | custom | +| 10k | bg 1k | middle | 500 | app | Index Scan using ix_messages_chat_id_created_at_id on messages | 47 | 0 | 51 | 0.174 | generic | +| 10k | bg 1k | middle | 500 | psql | Index Scan using ix_messages_chat_id_created_at_id on messages | 47 | 0 | 51 | 0.056 | custom | +| 10k | bg 1k | middle | 500 | generic | Index Scan using ix_messages_chat_id_created_at_id on messages | 47 | 0 | 51 | 0.061 | generic | +| 10k | bg 1k | middle | 500 | or-cursor | Index Scan using ix_messages_chat_id_created_at_id on messages | 514 | 0 | 51 | 0.125 | custom | +| 10k | bg 1k | middle | 500 | no-index | Seq Scan on messages | 294 | 0 | 51 | 0.708 | custom | +| 10k | bg 1k | middle | 500 | chat_only | Bitmap Heap Scan on messages | 285 | 0 | 51 | 0.484 | custom | +| 10k | bg 1k | middle | 500 | covering | Index Only Scan using bench_variant on messages | 5 | 0 | 51 | 0.055 | custom | +| 10k | bg 1k | last | 900 | app | Index Scan using ix_messages_chat_id_created_at_id on messages | 48 | 0 | 51 | 0.136 | generic | +| 10k | bg 100 | first | 0 | app | Index Scan using ix_messages_chat_id_created_at_id on messages | 43 | 0 | 51 | 0.182 | custom | +| 10k | bg 100 | first | 0 | psql | Index Scan using ix_messages_chat_id_created_at_id on messages | 43 | 0 | 51 | 0.063 | custom | +| 10k | bg 100 | first | 0 | generic | Index Scan using ix_messages_chat_id_created_at_id on messages | 43 | 0 | 51 | 0.064 | generic | +| 10k | bg 100 | first | 0 | no-index | Seq Scan on messages | 294 | 0 | 51 | 0.403 | custom | +| 10k | bg 100 | first | 0 | chat_only | Bitmap Heap Scan on messages | 85 | 0 | 51 | 0.129 | custom | +| 10k | bg 100 | first | 0 | covering | Index Only Scan using bench_variant on messages | 5 | 0 | 51 | 0.055 | custom | +| 10k | bg 10 | first | 0 | app | Index Scan using ix_messages_chat_id_created_at_id on messages | 12 | 0 | 10 | 0.086 | custom | +| 10k | bg 10 | first | 0 | psql | Index Scan using ix_messages_chat_id_created_at_id on messages | 12 | 0 | 10 | 0.028 | custom | +| 10k | bg 10 | first | 0 | generic | Index Scan using ix_messages_chat_id_created_at_id on messages | 12 | 0 | 10 | 0.024 | generic | +| 10k | bg 10 | first | 0 | no-index | Seq Scan on messages | 294 | 0 | 10 | 0.329 | custom | +| 10k | bg 10 | first | 0 | chat_only | Index Scan using bench_variant on messages | 12 | 0 | 10 | 0.027 | custom | +| 10k | bg 10 | first | 0 | covering | Index Only Scan using bench_variant on messages | 4 | 0 | 10 | 0.019 | custom | + +## Стоимость записи по вариантам индекса + +Вставка порции сообщений во все чаты в пропорции наполнения одной командой, в транзакции, которая откатывается; индекс истории построен заново, перед вставкой `CHECKPOINT`. Значения — медиана (min–max) повторов. «4000 символов» — вставка сообщения максимальной длины из несжимаемого текста. + +| Размер | Вариант | Строк вставки | Индекс, МиБ | Байт индекса на сообщение | мкс на сообщение | WAL байт на сообщение | FPI на 1000 | 4000 символов | +|---|---|---|---|---|---|---|---|---| +| 1k | app | 5000 | 0.5 | 60.9 | 5.80 (5.07–5.86) | 490 (490–501) | 21.2 (12.0–21.2) | ok | +| 1k | chat_only | 5000 | 0.1 | 9.5 | 4.97 (4.89–5.17) | 402 (402–403) | 18.6 (18.6–18.6) | ok | +| 1k | covering | 5000 | 1.2 | 159.6 | 5.55 (5.38–6.05) | 695 (695–695) | 25.0 (25.0–25.0) | index row requires 12072 bytes, maximum size is 8191 | +| 1k | none | 5000 | 0.0 | 0.0 | 4.38 (4.35–4.38) | 314 (314–314) | 17.2 (17.2–17.2) | ok | +| 5k | app | 5000 | 0.7 | 60.4 | 5.91 (4.98–6.52) | 506 (501–506) | 22.0 (17.6–22.0) | ok | +| 5k | chat_only | 5000 | 0.1 | 9.0 | 5.02 (4.87–5.05) | 423 (422–424) | 19.8 (19.2–19.8) | ok | +| 5k | covering | 5000 | 1.8 | 160.4 | 5.61 (5.55–5.77) | 711 (711–712) | 25.6 (25.4–25.6) | index row requires 12072 bytes, maximum size is 8191 | +| 5k | none | 5000 | 0.0 | 0.0 | 4.32 (4.26–4.35) | 334 (334–334) | 18.2 (18.0–18.2) | ok | +| 10k | app | 5000 | 1.0 | 59.5 | 5.21 (5.11–7.05) | 543 (543–556) | 31.2 (19.2–31.2) | ok | +| 10k | chat_only | 5000 | 0.1 | 8.3 | 4.83 (4.80–4.90) | 454 (454–458) | 28.8 (27.6–29.0) | ok | +| 10k | covering | 5000 | 2.6 | 160.4 | 5.72 (5.64–5.88) | 754 (753–755) | 35.6 (35.0–35.6) | index row requires 12072 bytes, maximum size is 8191 | +| 10k | none | 5000 | 0.0 | 0.0 | 4.42 (4.34–4.79) | 368 (368–370) | 27.6 (27.4–27.6) | ok | + +## Кривая наполнения 10k: запись при росте хранилища, 32 клиента + +| Порция | Сообщений после | RPS | p50, мс | p95, мс | p99, мс | max, мс | CPU API, ядер | CPU БД, ядер | RSS, МиБ | Пометки | +|---|---|---|---|---|---|---|---|---|---|---| +| 1 | 13500 | 496 | 56.805 | 132.984 | 180.953 | 321.418 | 0.999 | 0.189 | 127.6 | — | diff --git a/evidence/bench/unit-of-work-before/explain-10k.txt b/evidence/bench/unit-of-work-before/explain-10k.txt new file mode 100644 index 00000000..c112cb3e --- /dev/null +++ b/evidence/bench/unit-of-work-before/explain-10k.txt @@ -0,0 +1,673 @@ +# План запроса истории: размер 10k + +Commit b2fb88f +Читаемый чат — 10000 сообщений; фоновые чаты: 2 × 1k, 10 × 100, 50 × 10. +Страница — `limit` профиля; «после» — сколько сообщений чата до +страницы. + +## Планы приложения + +auto_explain (ANALYZE, BUFFERS, TIMING): запрос, параметры и план, +с которыми его выполнило приложение (prepared statement asyncpg). + +### read 10k: first, после 0 + +duration: 0.166 ms plan: +Query Text: SELECT messages.id, messages.chat_id, messages.sender_id, messages.text, messages.created_at, array((SELECT message_attachments.attachment_id +FROM message_attachments +WHERE message_attachments.message_id = messages.id ORDER BY message_attachments.position)) AS attachment_ids +FROM messages +WHERE messages.chat_id = $1::UUID ORDER BY messages.created_at, messages.id + LIMIT $2::INTEGER +Query Parameters: $1 = 'a15252a7-4b4d-4826-b9af-d40b3f396740', $2 = '51' +Limit (cost=0.29..9.63 rows=51 width=153) (actual time=0.040..0.132 rows=51.00 loops=1) + Buffers: shared hit=18 + -> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..1832.72 rows=10000 width=153) (actual time=0.038..0.128 rows=51.00 loops=1) + Index Cond: (chat_id = 'a15252a7-4b4d-4826-b9af-d40b3f396740'::uuid) + Index Searches: 1 + Buffers: shared hit=18 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=51) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51) + Filter: (message_id = messages.id) + +### read 10k: middle, после 5000 + +duration: 0.159 ms plan: +Query Text: SELECT messages.id, messages.chat_id, messages.sender_id, messages.text, messages.created_at, array((SELECT message_attachments.attachment_id +FROM message_attachments +WHERE message_attachments.message_id = messages.id ORDER BY message_attachments.position)) AS attachment_ids +FROM messages +WHERE messages.chat_id = $1::UUID AND (messages.created_at, messages.id) > ($2::TIMESTAMP WITH TIME ZONE, $3::UUID) ORDER BY messages.created_at, messages.id + LIMIT $4::INTEGER +Query Parameters: $1 = 'a15252a7-4b4d-4826-b9af-d40b3f396740', $2 = '2026-10-31 20:35:09.519876+00', $3 = '6819996c-a9b7-49bf-a667-63e22465f335', $4 = '51' +Limit (cost=0.29..21.80 rows=7 width=153) (actual time=0.038..0.115 rows=51.00 loops=1) + Buffers: shared hit=54 + -> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..218.47 rows=71 width=153) (actual time=0.037..0.112 rows=51.00 loops=1) + Index Cond: ((chat_id = $1) AND (ROW(created_at, id) > ROW($2, $3))) + Index Searches: 1 + Buffers: shared hit=54 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=51) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51) + Filter: (message_id = messages.id) + +### read 10k: last, после 9900 + +duration: 0.111 ms plan: +Query Text: SELECT messages.id, messages.chat_id, messages.sender_id, messages.text, messages.created_at, array((SELECT message_attachments.attachment_id +FROM message_attachments +WHERE message_attachments.message_id = messages.id ORDER BY message_attachments.position)) AS attachment_ids +FROM messages +WHERE messages.chat_id = $1::UUID AND (messages.created_at, messages.id) > ($2::TIMESTAMP WITH TIME ZONE, $3::UUID) ORDER BY messages.created_at, messages.id + LIMIT $4::INTEGER +Query Parameters: $1 = 'a15252a7-4b4d-4826-b9af-d40b3f396740', $2 = '2026-10-31 20:35:21.624448+00', $3 = '11df026f-1d67-40fd-9265-0191805efd2b', $4 = '51' +Limit (cost=0.29..21.80 rows=7 width=153) (actual time=0.019..0.081 rows=51.00 loops=1) + Buffers: shared hit=54 + -> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..218.47 rows=71 width=153) (actual time=0.019..0.078 rows=51.00 loops=1) + Index Cond: ((chat_id = $1) AND (ROW(created_at, id) > ROW($2, $3))) + Index Searches: 1 + Buffers: shared hit=54 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=51) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51) + Filter: (message_id = messages.id) + +### bg 1k: first, после 0 + +duration: 0.147 ms plan: +Query Text: SELECT messages.id, messages.chat_id, messages.sender_id, messages.text, messages.created_at, array((SELECT message_attachments.attachment_id +FROM message_attachments +WHERE message_attachments.message_id = messages.id ORDER BY message_attachments.position)) AS attachment_ids +FROM messages +WHERE messages.chat_id = $1::UUID ORDER BY messages.created_at, messages.id + LIMIT $2::INTEGER +Query Parameters: $1 = '7efbb7d2-1786-4de5-9216-ec211d58e49a', $2 = '51' +Limit (cost=0.29..54.21 rows=51 width=153) (actual time=0.024..0.110 rows=51.00 loops=1) + Buffers: shared hit=47 + -> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..1057.63 rows=1000 width=153) (actual time=0.024..0.107 rows=51.00 loops=1) + Index Cond: (chat_id = '7efbb7d2-1786-4de5-9216-ec211d58e49a'::uuid) + Index Searches: 1 + Buffers: shared hit=47 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=51) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51) + Filter: (message_id = messages.id) + +### bg 1k: middle, после 500 + +duration: 0.129 ms plan: +Query Text: SELECT messages.id, messages.chat_id, messages.sender_id, messages.text, messages.created_at, array((SELECT message_attachments.attachment_id +FROM message_attachments +WHERE message_attachments.message_id = messages.id ORDER BY message_attachments.position)) AS attachment_ids +FROM messages +WHERE messages.chat_id = $1::UUID AND (messages.created_at, messages.id) > ($2::TIMESTAMP WITH TIME ZONE, $3::UUID) ORDER BY messages.created_at, messages.id + LIMIT $4::INTEGER +Query Parameters: $1 = '7efbb7d2-1786-4de5-9216-ec211d58e49a', $2 = '2026-10-31 20:35:09.525761+00', $3 = '34ae19f0-3c97-4690-bc5e-a23eb57bddda', $4 = '51' +Limit (cost=0.29..21.80 rows=7 width=153) (actual time=0.020..0.095 rows=51.00 loops=1) + Buffers: shared hit=46 + -> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..218.47 rows=71 width=153) (actual time=0.019..0.092 rows=51.00 loops=1) + Index Cond: ((chat_id = $1) AND (ROW(created_at, id) > ROW($2, $3))) + Index Searches: 1 + Buffers: shared hit=46 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=51) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51) + Filter: (message_id = messages.id) + +### bg 1k: last, после 900 + +duration: 0.131 ms plan: +Query Text: SELECT messages.id, messages.chat_id, messages.sender_id, messages.text, messages.created_at, array((SELECT message_attachments.attachment_id +FROM message_attachments +WHERE message_attachments.message_id = messages.id ORDER BY message_attachments.position)) AS attachment_ids +FROM messages +WHERE messages.chat_id = $1::UUID AND (messages.created_at, messages.id) > ($2::TIMESTAMP WITH TIME ZONE, $3::UUID) ORDER BY messages.created_at, messages.id + LIMIT $4::INTEGER +Query Parameters: $1 = '7efbb7d2-1786-4de5-9216-ec211d58e49a', $2 = '2026-10-31 20:35:19.321243+00', $3 = 'a8ca10b3-a372-48db-83d1-cb4cab0e70db', $4 = '51' +Limit (cost=0.29..21.80 rows=7 width=153) (actual time=0.020..0.095 rows=51.00 loops=1) + Buffers: shared hit=47 + -> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..218.47 rows=71 width=153) (actual time=0.020..0.092 rows=51.00 loops=1) + Index Cond: ((chat_id = $1) AND (ROW(created_at, id) > ROW($2, $3))) + Index Searches: 1 + Buffers: shared hit=47 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=51) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51) + Filter: (message_id = messages.id) + +### bg 100: first, после 0 + +duration: 0.157 ms plan: +Query Text: SELECT messages.id, messages.chat_id, messages.sender_id, messages.text, messages.created_at, array((SELECT message_attachments.attachment_id +FROM message_attachments +WHERE message_attachments.message_id = messages.id ORDER BY message_attachments.position)) AS attachment_ids +FROM messages +WHERE messages.chat_id = $1::UUID ORDER BY messages.created_at, messages.id + LIMIT $2::INTEGER +Query Parameters: $1 = 'e071a7a6-8832-4ab0-b80e-e5830f099a95', $2 = '51' +Limit (cost=0.29..151.04 rows=51 width=153) (actual time=0.024..0.130 rows=51.00 loops=1) + Buffers: shared hit=51 + -> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..295.88 rows=100 width=153) (actual time=0.024..0.127 rows=51.00 loops=1) + Index Cond: (chat_id = 'e071a7a6-8832-4ab0-b80e-e5830f099a95'::uuid) + Index Searches: 1 + Buffers: shared hit=51 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=51) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51) + Filter: (message_id = messages.id) + +### bg 10: first, после 0 + +duration: 0.043 ms plan: +Query Text: SELECT messages.id, messages.chat_id, messages.sender_id, messages.text, messages.created_at, array((SELECT message_attachments.attachment_id +FROM message_attachments +WHERE message_attachments.message_id = messages.id ORDER BY message_attachments.position)) AS attachment_ids +FROM messages +WHERE messages.chat_id = $1::UUID ORDER BY messages.created_at, messages.id + LIMIT $2::INTEGER +Query Parameters: $1 = '1324dcfc-ac5c-4d64-b55b-d9f8febbff32', $2 = '51' +Limit (cost=0.29..38.26 rows=10 width=153) (actual time=0.016..0.040 rows=10.00 loops=1) + Buffers: shared hit=12 + -> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..38.26 rows=10 width=153) (actual time=0.015..0.039 rows=10.00 loops=1) + Index Cond: (chat_id = '1324dcfc-ac5c-4d64-b55b-d9f8febbff32'::uuid) + Index Searches: 1 + Buffers: shared hit=12 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=10) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=10) + Filter: (message_id = messages.id) + +## Страницы сравнения в psql: варианты + +Тот же текст запроса и те же параметры, что у плана приложения этой +страницы, в одной транзакции, которая откатывается: индексы базы +после неё те же. Каждый вариант выполнен дважды, здесь — второе +выполнение. `psql` — индекс приложения, custom plan; `generic` — он +же с force_generic_plan; `or-cursor` — условие курсора через OR; +`no-index` — без индекса приложения; варианты индекса вместо него: +`chat_only` (chat_id), `covering` (chat_id, created_at, id) INCLUDE (sender_id, text). + +### read 10k: middle, после 5000 + +#### psql + +Limit (cost=0.29..14.72 rows=51 width=153) (actual time=0.007..0.050 rows=51.00 loops=1) + Buffers: shared hit=54 + -> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..1415.52 rows=5001 width=153) (actual time=0.007..0.047 rows=51.00 loops=1) + Index Cond: ((chat_id = 'a15252a7-4b4d-4826-b9af-d40b3f396740'::uuid) AND (ROW(created_at, id) > ROW('2026-10-31 20:35:09.519876+00'::timestamp with time zone, '6819996c-a9b7-49bf-a667-63e22465f335'::uuid))) + Index Searches: 1 + Buffers: shared hit=54 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51) + Filter: (message_id = messages.id) +Planning: + Buffers: shared hit=3 +Planning Time: 0.060 ms +Execution Time: 0.056 ms + +#### generic + +Limit (cost=0.29..21.80 rows=7 width=153) (actual time=0.009..0.059 rows=51.00 loops=1) + Buffers: shared hit=54 + -> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..218.47 rows=71 width=153) (actual time=0.009..0.056 rows=51.00 loops=1) + Index Cond: ((chat_id = $1) AND (ROW(created_at, id) > ROW($2, $3))) + Index Searches: 1 + Buffers: shared hit=54 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=51) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51) + Filter: (message_id = messages.id) +Planning Time: 0.010 ms +Execution Time: 0.069 ms + +#### or-cursor + +Limit (cost=0.29..18.97 rows=51 width=153) (actual time=0.578..0.614 rows=51.00 loops=1) + Buffers: shared hit=5077 + -> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..1832.74 rows=5001 width=153) (actual time=0.578..0.611 rows=51.00 loops=1) + Index Cond: (chat_id = 'a15252a7-4b4d-4826-b9af-d40b3f396740'::uuid) + Filter: ((created_at > '2026-10-31 20:35:09.519876+00'::timestamp with time zone) OR ((created_at = '2026-10-31 20:35:09.519876+00'::timestamp with time zone) AND (id > '6819996c-a9b7-49bf-a667-63e22465f335'::uuid))) + Rows Removed by Filter: 5000 + Index Searches: 1 + Buffers: shared hit=5077 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51) + Filter: (message_id = messages.id) +Planning: + Buffers: shared hit=3 +Planning Time: 0.070 ms +Execution Time: 0.621 ms + +#### no-index + +Limit (cost=772.11..772.24 rows=51 width=153) (actual time=3.749..3.753 rows=51.00 loops=1) + Buffers: shared hit=294 + -> Sort (cost=772.11..784.61 rows=5001 width=153) (actual time=3.749..3.751 rows=51.00 loops=1) + Sort Key: messages.created_at, messages.id + Sort Method: top-N heapsort Memory: 45kB + Buffers: shared hit=294 + -> Seq Scan on messages (cost=0.00..605.26 rows=5001 width=153) (actual time=0.248..3.288 rows=5000.00 loops=1) + Filter: ((chat_id = 'a15252a7-4b4d-4826-b9af-d40b3f396740'::uuid) AND (ROW(created_at, id) > ROW('2026-10-31 20:35:09.519876+00'::timestamp with time zone, '6819996c-a9b7-49bf-a667-63e22465f335'::uuid))) + Rows Removed by Filter: 8500 + Buffers: shared hit=294 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=5000) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=5000) + Filter: (message_id = messages.id) +Planning: + Buffers: shared hit=3 +Planning Time: 0.059 ms +Execution Time: 3.760 ms + +#### chat_only + +Limit (cost=772.11..772.24 rows=51 width=153) (actual time=3.711..3.715 rows=51.00 loops=1) + Buffers: shared hit=294 + -> Sort (cost=772.11..784.61 rows=5001 width=153) (actual time=3.710..3.713 rows=51.00 loops=1) + Sort Key: messages.created_at, messages.id + Sort Method: top-N heapsort Memory: 45kB + Buffers: shared hit=294 + -> Seq Scan on messages (cost=0.00..605.26 rows=5001 width=153) (actual time=0.305..3.238 rows=5000.00 loops=1) + Filter: ((chat_id = 'a15252a7-4b4d-4826-b9af-d40b3f396740'::uuid) AND (ROW(created_at, id) > ROW('2026-10-31 20:35:09.519876+00'::timestamp with time zone, '6819996c-a9b7-49bf-a667-63e22465f335'::uuid))) + Rows Removed by Filter: 8500 + Buffers: shared hit=294 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=5000) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=5000) + Filter: (message_id = messages.id) +Planning: + Buffers: shared hit=3 +Planning Time: 0.080 ms +Execution Time: 3.726 ms + +#### covering + +Limit (cost=0.41..6.19 rows=51 width=153) (actual time=0.005..0.044 rows=51.00 loops=1) + Buffers: shared hit=5 + -> Index Only Scan using bench_variant on messages (cost=0.41..567.45 rows=5001 width=153) (actual time=0.005..0.041 rows=51.00 loops=1) + Index Cond: ((chat_id = 'a15252a7-4b4d-4826-b9af-d40b3f396740'::uuid) AND (ROW(created_at, id) > ROW('2026-10-31 20:35:09.519876+00'::timestamp with time zone, '6819996c-a9b7-49bf-a667-63e22465f335'::uuid))) + Heap Fetches: 0 + Index Searches: 1 + Buffers: shared hit=5 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51) + Filter: (message_id = messages.id) +Planning: + Buffers: shared hit=3 +Planning Time: 0.050 ms +Execution Time: 0.051 ms + +### bg 1k: middle, после 500 + +#### psql + +Limit (cost=0.29..96.23 rows=51 width=153) (actual time=0.007..0.047 rows=51.00 loops=1) + Buffers: shared hit=46 + -> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..940.93 rows=500 width=153) (actual time=0.006..0.045 rows=51.00 loops=1) + Index Cond: ((chat_id = '7efbb7d2-1786-4de5-9216-ec211d58e49a'::uuid) AND (ROW(created_at, id) > ROW('2026-10-31 20:35:09.525761+00'::timestamp with time zone, '34ae19f0-3c97-4690-bc5e-a23eb57bddda'::uuid))) + Index Searches: 1 + Buffers: shared hit=46 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51) + Filter: (message_id = messages.id) +Planning: + Buffers: shared hit=3 +Planning Time: 0.058 ms +Execution Time: 0.054 ms + +#### generic + +Limit (cost=0.29..21.80 rows=7 width=153) (actual time=0.012..0.054 rows=51.00 loops=1) + Buffers: shared hit=46 + -> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..218.47 rows=71 width=153) (actual time=0.011..0.051 rows=51.00 loops=1) + Index Cond: ((chat_id = $1) AND (ROW(created_at, id) > ROW($2, $3))) + Index Searches: 1 + Buffers: shared hit=46 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51) + Filter: (message_id = messages.id) +Planning Time: 0.010 ms +Execution Time: 0.066 ms + +#### or-cursor + +Limit (cost=0.29..108.13 rows=51 width=153) (actual time=0.094..0.135 rows=51.00 loops=1) + Buffers: shared hit=507 + -> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..1057.63 rows=500 width=153) (actual time=0.094..0.132 rows=51.00 loops=1) + Index Cond: (chat_id = '7efbb7d2-1786-4de5-9216-ec211d58e49a'::uuid) + Filter: ((created_at > '2026-10-31 20:35:09.525761+00'::timestamp with time zone) OR ((created_at = '2026-10-31 20:35:09.525761+00'::timestamp with time zone) AND (id > '34ae19f0-3c97-4690-bc5e-a23eb57bddda'::uuid))) + Rows Removed by Filter: 500 + Index Searches: 1 + Buffers: shared hit=507 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51) + Filter: (message_id = messages.id) +Planning: + Buffers: shared hit=3 +Planning Time: 0.046 ms +Execution Time: 0.141 ms + +#### no-index + +Limit (cost=554.43..554.56 rows=51 width=153) (actual time=1.044..1.047 rows=51.00 loops=1) + Buffers: shared hit=294 + -> Sort (cost=554.43..555.68 rows=500 width=153) (actual time=1.043..1.045 rows=51.00 loops=1) + Sort Key: messages.created_at, messages.id + Sort Method: top-N heapsort Memory: 39kB + Buffers: shared hit=294 + -> Seq Scan on messages (cost=0.00..537.75 rows=500 width=153) (actual time=0.530..0.995 rows=500.00 loops=1) + Filter: ((chat_id = '7efbb7d2-1786-4de5-9216-ec211d58e49a'::uuid) AND (ROW(created_at, id) > ROW('2026-10-31 20:35:09.525761+00'::timestamp with time zone, '34ae19f0-3c97-4690-bc5e-a23eb57bddda'::uuid))) + Rows Removed by Filter: 13000 + Buffers: shared hit=294 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=500) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=500) + Filter: (message_id = messages.id) +Planning: + Buffers: shared hit=3 +Planning Time: 0.104 ms +Execution Time: 1.061 ms + +#### chat_only + +Limit (cost=351.59..351.72 rows=51 width=153) (actual time=0.456..0.460 rows=51.00 loops=1) + Buffers: shared hit=286 + -> Sort (cost=351.59..352.84 rows=500 width=153) (actual time=0.456..0.458 rows=51.00 loops=1) + Sort Key: messages.created_at, messages.id + Sort Method: top-N heapsort Memory: 39kB + Buffers: shared hit=286 + -> Bitmap Heap Scan on messages (cost=15.91..334.91 rows=500 width=153) (actual time=0.083..0.407 rows=500.00 loops=1) + Recheck Cond: (chat_id = '7efbb7d2-1786-4de5-9216-ec211d58e49a'::uuid) + Filter: (ROW(created_at, id) > ROW('2026-10-31 20:35:09.525761+00'::timestamp with time zone, '34ae19f0-3c97-4690-bc5e-a23eb57bddda'::uuid)) + Rows Removed by Filter: 500 + Heap Blocks: exact=283 + Buffers: shared hit=286 + -> Bitmap Index Scan on bench_variant (cost=0.00..15.79 rows=1000 width=0) (actual time=0.018..0.018 rows=1000.00 loops=1) + Index Cond: (chat_id = '7efbb7d2-1786-4de5-9216-ec211d58e49a'::uuid) + Index Searches: 1 + Buffers: shared hit=3 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=500) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=500) + Filter: (message_id = messages.id) +Planning: + Buffers: shared hit=3 +Planning Time: 0.046 ms +Execution Time: 0.467 ms + +#### covering + +Limit (cost=0.41..6.28 rows=51 width=153) (actual time=0.006..0.044 rows=51.00 loops=1) + Buffers: shared hit=5 + -> Index Only Scan using bench_variant on messages (cost=0.41..57.91 rows=500 width=153) (actual time=0.005..0.041 rows=51.00 loops=1) + Index Cond: ((chat_id = '7efbb7d2-1786-4de5-9216-ec211d58e49a'::uuid) AND (ROW(created_at, id) > ROW('2026-10-31 20:35:09.525761+00'::timestamp with time zone, '34ae19f0-3c97-4690-bc5e-a23eb57bddda'::uuid))) + Heap Fetches: 0 + Index Searches: 1 + Buffers: shared hit=5 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51) + Filter: (message_id = messages.id) +Planning: + Buffers: shared hit=3 +Planning Time: 0.040 ms +Execution Time: 0.051 ms + +### bg 100: first, после 0 + +#### psql + +Limit (cost=0.29..151.04 rows=51 width=153) (actual time=0.005..0.053 rows=51.00 loops=1) + Buffers: shared hit=51 + -> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..295.88 rows=100 width=153) (actual time=0.005..0.051 rows=51.00 loops=1) + Index Cond: (chat_id = 'e071a7a6-8832-4ab0-b80e-e5830f099a95'::uuid) + Index Searches: 1 + Buffers: shared hit=51 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51) + Filter: (message_id = messages.id) +Planning: + Buffers: shared hit=3 +Planning Time: 0.045 ms +Execution Time: 0.060 ms + +#### generic + +Limit (cost=0.29..53.03 rows=21 width=153) (actual time=0.010..0.064 rows=51.00 loops=1) + Buffers: shared hit=51 + -> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..537.81 rows=214 width=153) (actual time=0.009..0.061 rows=51.00 loops=1) + Index Cond: (chat_id = $1) + Index Searches: 1 + Buffers: shared hit=51 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=51) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51) + Filter: (message_id = messages.id) +Planning Time: 0.004 ms +Execution Time: 0.072 ms + +#### no-index + +Limit (cost=467.57..467.70 rows=51 width=153) (actual time=0.405..0.409 rows=51.00 loops=1) + Buffers: shared hit=294 + -> Sort (cost=467.57..467.82 rows=100 width=153) (actual time=0.405..0.406 rows=51.00 loops=1) + Sort Key: messages.created_at, messages.id + Sort Method: quicksort Memory: 50kB + Buffers: shared hit=294 + -> Seq Scan on messages (cost=0.00..464.25 rows=100 width=153) (actual time=0.013..0.390 rows=100.00 loops=1) + Filter: (chat_id = 'e071a7a6-8832-4ab0-b80e-e5830f099a95'::uuid) + Rows Removed by Filter: 13400 + Buffers: shared hit=294 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=100) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=100) + Filter: (message_id = messages.id) +Planning: + Buffers: shared hit=3 +Planning Time: 0.036 ms +Execution Time: 0.415 ms + +#### chat_only + +Limit (cost=215.59..215.72 rows=51 width=153) (actual time=0.118..0.122 rows=51.00 loops=1) + Buffers: shared hit=95 + -> Sort (cost=215.59..215.84 rows=100 width=153) (actual time=0.118..0.120 rows=51.00 loops=1) + Sort Key: messages.created_at, messages.id + Sort Method: quicksort Memory: 50kB + Buffers: shared hit=95 + -> Bitmap Heap Scan on messages (cost=5.06..212.27 rows=100 width=153) (actual time=0.014..0.104 rows=100.00 loops=1) + Recheck Cond: (chat_id = 'e071a7a6-8832-4ab0-b80e-e5830f099a95'::uuid) + Heap Blocks: exact=93 + Buffers: shared hit=95 + -> Bitmap Index Scan on bench_variant (cost=0.00..5.04 rows=100 width=0) (actual time=0.004..0.004 rows=100.00 loops=1) + Index Cond: (chat_id = 'e071a7a6-8832-4ab0-b80e-e5830f099a95'::uuid) + Index Searches: 1 + Buffers: shared hit=2 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=100) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=100) + Filter: (message_id = messages.id) +Planning: + Buffers: shared hit=3 +Planning Time: 0.056 ms +Execution Time: 0.131 ms + +#### covering + +Limit (cost=0.41..6.15 rows=51 width=153) (actual time=0.006..0.045 rows=51.00 loops=1) + Buffers: shared hit=4 + -> Index Only Scan using bench_variant on messages (cost=0.41..11.66 rows=100 width=153) (actual time=0.006..0.041 rows=51.00 loops=1) + Index Cond: (chat_id = 'e071a7a6-8832-4ab0-b80e-e5830f099a95'::uuid) + Heap Fetches: 0 + Index Searches: 1 + Buffers: shared hit=4 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.000..0.001 rows=0.00 loops=51) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51) + Filter: (message_id = messages.id) +Planning: + Buffers: shared hit=3 +Planning Time: 0.039 ms +Execution Time: 0.051 ms + +### bg 10: first, после 0 + +#### psql + +Limit (cost=0.29..38.26 rows=10 width=153) (actual time=0.006..0.017 rows=10.00 loops=1) + Buffers: shared hit=12 + -> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..38.26 rows=10 width=153) (actual time=0.005..0.016 rows=10.00 loops=1) + Index Cond: (chat_id = '1324dcfc-ac5c-4d64-b55b-d9f8febbff32'::uuid) + Index Searches: 1 + Buffers: shared hit=12 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=10) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=10) + Filter: (message_id = messages.id) +Planning: + Buffers: shared hit=3 +Planning Time: 0.047 ms +Execution Time: 0.022 ms + +#### generic + +Limit (cost=0.29..53.03 rows=21 width=153) (actual time=0.009..0.020 rows=10.00 loops=1) + Buffers: shared hit=12 + -> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..537.81 rows=214 width=153) (actual time=0.008..0.019 rows=10.00 loops=1) + Index Cond: (chat_id = $1) + Index Searches: 1 + Buffers: shared hit=12 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=10) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=10) + Filter: (message_id = messages.id) +Planning Time: 0.003 ms +Execution Time: 0.026 ms + +#### no-index + +Limit (cost=463.07..463.09 rows=10 width=153) (actual time=0.352..0.353 rows=10.00 loops=1) + Buffers: shared hit=294 + -> Sort (cost=463.07..463.09 rows=10 width=153) (actual time=0.352..0.352 rows=10.00 loops=1) + Sort Key: messages.created_at, messages.id + Sort Method: quicksort Memory: 27kB + Buffers: shared hit=294 + -> Seq Scan on messages (cost=0.00..462.90 rows=10 width=153) (actual time=0.026..0.349 rows=10.00 loops=1) + Filter: (chat_id = '1324dcfc-ac5c-4d64-b55b-d9f8febbff32'::uuid) + Rows Removed by Filter: 13490 + Buffers: shared hit=294 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=10) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=10) + Filter: (message_id = messages.id) +Planning: + Buffers: shared hit=3 +Planning Time: 0.037 ms +Execution Time: 0.358 ms + +#### chat_only + +Limit (cost=33.48..33.50 rows=10 width=153) (actual time=0.017..0.018 rows=10.00 loops=1) + Buffers: shared hit=12 + -> Sort (cost=33.48..33.50 rows=10 width=153) (actual time=0.017..0.017 rows=10.00 loops=1) + Sort Key: messages.created_at, messages.id + Sort Method: quicksort Memory: 27kB + Buffers: shared hit=12 + -> Index Scan using bench_variant on messages (cost=0.29..33.31 rows=10 width=153) (actual time=0.004..0.015 rows=10.00 loops=1) + Index Cond: (chat_id = '1324dcfc-ac5c-4d64-b55b-d9f8febbff32'::uuid) + Index Searches: 1 + Buffers: shared hit=12 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=10) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=10) + Filter: (message_id = messages.id) +Planning: + Buffers: shared hit=3 +Planning Time: 0.033 ms +Execution Time: 0.023 ms + +#### covering + +Limit (cost=0.41..4.74 rows=10 width=153) (actual time=0.005..0.013 rows=10.00 loops=1) + Buffers: shared hit=4 + -> Index Only Scan using bench_variant on messages (cost=0.41..4.74 rows=10 width=153) (actual time=0.005..0.012 rows=10.00 loops=1) + Index Cond: (chat_id = '1324dcfc-ac5c-4d64-b55b-d9f8febbff32'::uuid) + Heap Fetches: 0 + Index Searches: 1 + Buffers: shared hit=4 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=10) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=10) + Filter: (message_id = messages.id) +Planning: + Buffers: shared hit=3 +Planning Time: 0.040 ms +Execution Time: 0.019 ms diff --git a/evidence/bench/unit-of-work-before/explain-1k.txt b/evidence/bench/unit-of-work-before/explain-1k.txt new file mode 100644 index 00000000..e73576e9 --- /dev/null +++ b/evidence/bench/unit-of-work-before/explain-1k.txt @@ -0,0 +1,731 @@ +# План запроса истории: размер 1k + +Commit b2fb88f +Читаемый чат — 1000 сообщений; фоновые чаты: 2 × 1k, 10 × 100, 50 × 10. +Страница — `limit` профиля; «после» — сколько сообщений чата до +страницы. + +## Планы приложения + +auto_explain (ANALYZE, BUFFERS, TIMING): запрос, параметры и план, +с которыми его выполнило приложение (prepared statement asyncpg). + +### read 1k: first, после 0 + +duration: 0.112 ms plan: +Query Text: SELECT messages.id, messages.chat_id, messages.sender_id, messages.text, messages.created_at, array((SELECT message_attachments.attachment_id +FROM message_attachments +WHERE message_attachments.message_id = messages.id ORDER BY message_attachments.position)) AS attachment_ids +FROM messages +WHERE messages.chat_id = $1::UUID ORDER BY messages.created_at, messages.id + LIMIT $2::INTEGER +Query Parameters: $1 = '86fab098-90d6-41f8-8651-e1a1d894b47f', $2 = '51' +Limit (cost=0.28..24.54 rows=51 width=153) (actual time=0.021..0.080 rows=51.00 loops=1) + Buffers: shared hit=38 + -> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.28..475.91 rows=1000 width=153) (actual time=0.020..0.076 rows=51.00 loops=1) + Index Cond: (chat_id = '86fab098-90d6-41f8-8651-e1a1d894b47f'::uuid) + Index Searches: 1 + Buffers: shared hit=38 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=51) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51) + Filter: (message_id = messages.id) + +### read 1k: middle, после 500 + +duration: 0.109 ms plan: +Query Text: SELECT messages.id, messages.chat_id, messages.sender_id, messages.text, messages.created_at, array((SELECT message_attachments.attachment_id +FROM message_attachments +WHERE message_attachments.message_id = messages.id ORDER BY message_attachments.position)) AS attachment_ids +FROM messages +WHERE messages.chat_id = $1::UUID AND (messages.created_at, messages.id) > ($2::TIMESTAMP WITH TIME ZONE, $3::UUID) ORDER BY messages.created_at, messages.id + LIMIT $4::INTEGER +Query Parameters: $1 = '86fab098-90d6-41f8-8651-e1a1d894b47f', $2 = '2026-10-31 20:32:35.560579+00', $3 = '56b675e9-b197-40df-b5bf-70da08443b02', $4 = '51' +Limit (cost=0.28..44.89 rows=51 width=153) (actual time=0.012..0.073 rows=51.00 loops=1) + Buffers: shared hit=52 + -> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.28..436.74 rows=499 width=153) (actual time=0.011..0.070 rows=51.00 loops=1) + Index Cond: ((chat_id = '86fab098-90d6-41f8-8651-e1a1d894b47f'::uuid) AND (ROW(created_at, id) > ROW('2026-10-31 20:32:35.560579+00'::timestamp with time zone, '56b675e9-b197-40df-b5bf-70da08443b02'::uuid))) + Index Searches: 1 + Buffers: shared hit=52 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=51) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51) + Filter: (message_id = messages.id) + +### read 1k: last, после 900 + +duration: 0.190 ms plan: +Query Text: SELECT messages.id, messages.chat_id, messages.sender_id, messages.text, messages.created_at, array((SELECT message_attachments.attachment_id +FROM message_attachments +WHERE message_attachments.message_id = messages.id ORDER BY message_attachments.position)) AS attachment_ids +FROM messages +WHERE messages.chat_id = $1::UUID AND (messages.created_at, messages.id) > ($2::TIMESTAMP WITH TIME ZONE, $3::UUID) ORDER BY messages.created_at, messages.id + LIMIT $4::INTEGER +Query Parameters: $1 = '86fab098-90d6-41f8-8651-e1a1d894b47f', $2 = '2026-10-31 20:32:38.6944+00', $3 = '15f6b21b-4c28-40a8-b298-28397cbf0a2e', $4 = '51' +Limit (cost=119.82..119.95 rows=51 width=153) (actual time=0.153..0.157 rows=51.00 loops=1) + Buffers: shared hit=27 + -> Sort (cost=119.82..120.08 rows=102 width=153) (actual time=0.152..0.154 rows=51.00 loops=1) + Sort Key: messages.created_at, messages.id + Sort Method: quicksort Memory: 50kB + Buffers: shared hit=27 + -> Bitmap Heap Scan on messages (cost=9.33..116.42 rows=102 width=153) (actual time=0.019..0.115 rows=100.00 loops=1) + Recheck Cond: ((chat_id = '86fab098-90d6-41f8-8651-e1a1d894b47f'::uuid) AND (ROW(created_at, id) > ROW('2026-10-31 20:32:38.6944+00'::timestamp with time zone, '15f6b21b-4c28-40a8-b298-28397cbf0a2e'::uuid))) + Heap Blocks: exact=18 + Buffers: shared hit=21 + -> Bitmap Index Scan on ix_messages_chat_id_created_at_id (cost=0.00..9.30 rows=102 width=0) (actual time=0.009..0.009 rows=100.00 loops=1) + Index Cond: ((chat_id = '86fab098-90d6-41f8-8651-e1a1d894b47f'::uuid) AND (ROW(created_at, id) > ROW('2026-10-31 20:32:38.6944+00'::timestamp with time zone, '15f6b21b-4c28-40a8-b298-28397cbf0a2e'::uuid))) + Index Searches: 1 + Buffers: shared hit=3 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=100) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=100) + Filter: (message_id = messages.id) + +### bg 1k: first, после 0 + +duration: 0.097 ms plan: +Query Text: SELECT messages.id, messages.chat_id, messages.sender_id, messages.text, messages.created_at, array((SELECT message_attachments.attachment_id +FROM message_attachments +WHERE message_attachments.message_id = messages.id ORDER BY message_attachments.position)) AS attachment_ids +FROM messages +WHERE messages.chat_id = $1::UUID ORDER BY messages.created_at, messages.id + LIMIT $2::INTEGER +Query Parameters: $1 = '4a92e036-81de-4387-8577-bca03fd549a7', $2 = '51' +Limit (cost=0.28..24.54 rows=51 width=153) (actual time=0.010..0.068 rows=51.00 loops=1) + Buffers: shared hit=43 + -> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.28..475.91 rows=1000 width=153) (actual time=0.010..0.066 rows=51.00 loops=1) + Index Cond: (chat_id = '4a92e036-81de-4387-8577-bca03fd549a7'::uuid) + Index Searches: 1 + Buffers: shared hit=43 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=51) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51) + Filter: (message_id = messages.id) + +### bg 1k: middle, после 500 + +duration: 0.096 ms plan: +Query Text: SELECT messages.id, messages.chat_id, messages.sender_id, messages.text, messages.created_at, array((SELECT message_attachments.attachment_id +FROM message_attachments +WHERE message_attachments.message_id = messages.id ORDER BY message_attachments.position)) AS attachment_ids +FROM messages +WHERE messages.chat_id = $1::UUID AND (messages.created_at, messages.id) > ($2::TIMESTAMP WITH TIME ZONE, $3::UUID) ORDER BY messages.created_at, messages.id + LIMIT $4::INTEGER +Query Parameters: $1 = '4a92e036-81de-4387-8577-bca03fd549a7', $2 = '2026-10-31 20:32:35.544798+00', $3 = 'a727e0c7-e3cb-4ce8-bff7-59e9c11b7c6f', $4 = '51' +Limit (cost=0.28..44.72 rows=51 width=153) (actual time=0.011..0.066 rows=51.00 loops=1) + Buffers: shared hit=53 + -> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.28..436.81 rows=501 width=153) (actual time=0.010..0.063 rows=51.00 loops=1) + Index Cond: ((chat_id = '4a92e036-81de-4387-8577-bca03fd549a7'::uuid) AND (ROW(created_at, id) > ROW('2026-10-31 20:32:35.544798+00'::timestamp with time zone, 'a727e0c7-e3cb-4ce8-bff7-59e9c11b7c6f'::uuid))) + Index Searches: 1 + Buffers: shared hit=53 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51) + Filter: (message_id = messages.id) + +### bg 1k: last, после 900 + +duration: 0.145 ms plan: +Query Text: SELECT messages.id, messages.chat_id, messages.sender_id, messages.text, messages.created_at, array((SELECT message_attachments.attachment_id +FROM message_attachments +WHERE message_attachments.message_id = messages.id ORDER BY message_attachments.position)) AS attachment_ids +FROM messages +WHERE messages.chat_id = $1::UUID AND (messages.created_at, messages.id) > ($2::TIMESTAMP WITH TIME ZONE, $3::UUID) ORDER BY messages.created_at, messages.id + LIMIT $4::INTEGER +Query Parameters: $1 = '4a92e036-81de-4387-8577-bca03fd549a7', $2 = '2026-10-31 20:32:38.721445+00', $3 = 'a1f7ba6d-d70d-485c-ba73-68124a4f887b', $4 = '51' +Limit (cost=118.86..118.98 rows=51 width=153) (actual time=0.112..0.116 rows=51.00 loops=1) + Buffers: shared hit=19 + -> Sort (cost=118.86..119.10 rows=98 width=153) (actual time=0.112..0.114 rows=51.00 loops=1) + Sort Key: messages.created_at, messages.id + Sort Method: quicksort Memory: 50kB + Buffers: shared hit=19 + -> Bitmap Heap Scan on messages (cost=9.29..115.62 rows=98 width=153) (actual time=0.013..0.093 rows=100.00 loops=1) + Recheck Cond: ((chat_id = '4a92e036-81de-4387-8577-bca03fd549a7'::uuid) AND (ROW(created_at, id) > ROW('2026-10-31 20:32:38.721445+00'::timestamp with time zone, 'a1f7ba6d-d70d-485c-ba73-68124a4f887b'::uuid))) + Heap Blocks: exact=17 + Buffers: shared hit=19 + -> Bitmap Index Scan on ix_messages_chat_id_created_at_id (cost=0.00..9.26 rows=98 width=0) (actual time=0.007..0.007 rows=100.00 loops=1) + Index Cond: ((chat_id = '4a92e036-81de-4387-8577-bca03fd549a7'::uuid) AND (ROW(created_at, id) > ROW('2026-10-31 20:32:38.721445+00'::timestamp with time zone, 'a1f7ba6d-d70d-485c-ba73-68124a4f887b'::uuid))) + Index Searches: 1 + Buffers: shared hit=2 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=100) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=100) + Filter: (message_id = messages.id) + +### bg 100: first, после 0 + +duration: 0.197 ms plan: +Query Text: SELECT messages.id, messages.chat_id, messages.sender_id, messages.text, messages.created_at, array((SELECT message_attachments.attachment_id +FROM message_attachments +WHERE message_attachments.message_id = messages.id ORDER BY message_attachments.position)) AS attachment_ids +FROM messages +WHERE messages.chat_id = $1::UUID ORDER BY messages.created_at, messages.id + LIMIT $2::INTEGER +Query Parameters: $1 = '20a79c04-8e44-4239-98e4-6e42867bb00b', $2 = '51' +Limit (cost=118.60..118.73 rows=51 width=153) (actual time=0.163..0.167 rows=51.00 loops=1) + Buffers: shared hit=73 + -> Sort (cost=118.60..118.85 rows=100 width=153) (actual time=0.162..0.164 rows=51.00 loops=1) + Sort Key: messages.created_at, messages.id + Sort Method: quicksort Memory: 50kB + Buffers: shared hit=73 + -> Bitmap Heap Scan on messages (cost=9.06..115.28 rows=100 width=153) (actual time=0.023..0.141 rows=100.00 loops=1) + Recheck Cond: (chat_id = '20a79c04-8e44-4239-98e4-6e42867bb00b'::uuid) + Heap Blocks: exact=70 + Buffers: shared hit=73 + -> Bitmap Index Scan on ix_messages_chat_id_created_at_id (cost=0.00..9.03 rows=100 width=0) (actual time=0.010..0.010 rows=100.00 loops=1) + Index Cond: (chat_id = '20a79c04-8e44-4239-98e4-6e42867bb00b'::uuid) + Index Searches: 1 + Buffers: shared hit=3 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=100) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=100) + Filter: (message_id = messages.id) + +### bg 10: first, после 0 + +duration: 0.036 ms plan: +Query Text: SELECT messages.id, messages.chat_id, messages.sender_id, messages.text, messages.created_at, array((SELECT message_attachments.attachment_id +FROM message_attachments +WHERE message_attachments.message_id = messages.id ORDER BY message_attachments.position)) AS attachment_ids +FROM messages +WHERE messages.chat_id = $1::UUID ORDER BY messages.created_at, messages.id + LIMIT $2::INTEGER +Query Parameters: $1 = 'ed5c39bf-15e3-48b5-bb93-a93544b7da4a', $2 = '51' +Limit (cost=35.31..35.34 rows=10 width=153) (actual time=0.031..0.032 rows=10.00 loops=1) + Buffers: shared hit=12 + -> Sort (cost=35.31..35.34 rows=10 width=153) (actual time=0.031..0.031 rows=10.00 loops=1) + Sort Key: messages.created_at, messages.id + Sort Method: quicksort Memory: 27kB + Buffers: shared hit=12 + -> Bitmap Heap Scan on messages (cost=4.36..35.15 rows=10 width=153) (actual time=0.013..0.028 rows=10.00 loops=1) + Recheck Cond: (chat_id = 'ed5c39bf-15e3-48b5-bb93-a93544b7da4a'::uuid) + Heap Blocks: exact=10 + Buffers: shared hit=12 + -> Bitmap Index Scan on ix_messages_chat_id_created_at_id (cost=0.00..4.36 rows=10 width=0) (actual time=0.005..0.005 rows=10.00 loops=1) + Index Cond: (chat_id = 'ed5c39bf-15e3-48b5-bb93-a93544b7da4a'::uuid) + Index Searches: 1 + Buffers: shared hit=2 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=10) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=10) + Filter: (message_id = messages.id) + +## Страницы сравнения в psql: варианты + +Тот же текст запроса и те же параметры, что у плана приложения этой +страницы, в одной транзакции, которая откатывается: индексы базы +после неё те же. Каждый вариант выполнен дважды, здесь — второе +выполнение. `psql` — индекс приложения, custom plan; `generic` — он +же с force_generic_plan; `or-cursor` — условие курсора через OR; +`no-index` — без индекса приложения; варианты индекса вместо него: +`chat_only` (chat_id), `covering` (chat_id, created_at, id) INCLUDE (sender_id, text). + +### read 1k: middle, после 500 + +#### psql + +Limit (cost=0.28..44.89 rows=51 width=153) (actual time=0.007..0.060 rows=51.00 loops=1) + Buffers: shared hit=52 + -> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.28..436.74 rows=499 width=153) (actual time=0.007..0.056 rows=51.00 loops=1) + Index Cond: ((chat_id = '86fab098-90d6-41f8-8651-e1a1d894b47f'::uuid) AND (ROW(created_at, id) > ROW('2026-10-31 20:32:35.560579+00'::timestamp with time zone, '56b675e9-b197-40df-b5bf-70da08443b02'::uuid))) + Index Searches: 1 + Buffers: shared hit=52 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=51) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51) + Filter: (message_id = messages.id) +Planning: + Buffers: shared hit=3 +Planning Time: 0.057 ms +Execution Time: 0.067 ms + +#### generic + +Limit (cost=0.28..7.93 rows=2 width=153) (actual time=0.015..0.066 rows=51.00 loops=1) + Buffers: shared hit=52 + -> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.28..92.03 rows=24 width=153) (actual time=0.014..0.063 rows=51.00 loops=1) + Index Cond: ((chat_id = $1) AND (ROW(created_at, id) > ROW($2, $3))) + Index Searches: 1 + Buffers: shared hit=52 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=51) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51) + Filter: (message_id = messages.id) +Planning Time: 0.010 ms +Execution Time: 0.079 ms + +#### or-cursor + +Limit (cost=0.28..48.89 rows=51 width=153) (actual time=0.082..0.126 rows=51.00 loops=1) + Buffers: shared hit=533 + -> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.28..475.90 rows=499 width=153) (actual time=0.081..0.123 rows=51.00 loops=1) + Index Cond: (chat_id = '86fab098-90d6-41f8-8651-e1a1d894b47f'::uuid) + Filter: ((created_at > '2026-10-31 20:32:35.560579+00'::timestamp with time zone) OR ((created_at = '2026-10-31 20:32:35.560579+00'::timestamp with time zone) AND (id > '56b675e9-b197-40df-b5bf-70da08443b02'::uuid))) + Rows Removed by Filter: 500 + Index Searches: 1 + Buffers: shared hit=533 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51) + Filter: (message_id = messages.id) +Planning: + Buffers: shared hit=3 +Planning Time: 0.049 ms +Execution Time: 0.132 ms + +#### no-index + +Limit (cost=202.88..203.01 rows=51 width=153) (actual time=0.572..0.576 rows=51.00 loops=1) + Buffers: shared hit=100 + -> Sort (cost=202.88..204.13 rows=499 width=153) (actual time=0.572..0.574 rows=51.00 loops=1) + Sort Key: messages.created_at, messages.id + Sort Method: top-N heapsort Memory: 42kB + Buffers: shared hit=100 + -> Seq Scan on messages (cost=0.00..186.24 rows=499 width=153) (actual time=0.075..0.510 rows=500.00 loops=1) + Filter: ((chat_id = '86fab098-90d6-41f8-8651-e1a1d894b47f'::uuid) AND (ROW(created_at, id) > ROW('2026-10-31 20:32:35.560579+00'::timestamp with time zone, '56b675e9-b197-40df-b5bf-70da08443b02'::uuid))) + Rows Removed by Filter: 4000 + Buffers: shared hit=100 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=500) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=500) + Filter: (message_id = messages.id) +Planning: + Buffers: shared hit=3 +Planning Time: 0.040 ms +Execution Time: 0.582 ms + +#### chat_only + +Limit (cost=157.54..157.67 rows=51 width=153) (actual time=0.493..0.497 rows=51.00 loops=1) + Buffers: shared hit=103 + -> Sort (cost=157.54..158.79 rows=499 width=153) (actual time=0.493..0.495 rows=51.00 loops=1) + Sort Key: messages.created_at, messages.id + Sort Method: top-N heapsort Memory: 42kB + Buffers: shared hit=103 + -> Bitmap Heap Scan on messages (cost=15.91..140.89 rows=499 width=153) (actual time=0.063..0.432 rows=500.00 loops=1) + Recheck Cond: (chat_id = '86fab098-90d6-41f8-8651-e1a1d894b47f'::uuid) + Filter: (ROW(created_at, id) > ROW('2026-10-31 20:32:35.560579+00'::timestamp with time zone, '56b675e9-b197-40df-b5bf-70da08443b02'::uuid)) + Rows Removed by Filter: 500 + Heap Blocks: exact=100 + Buffers: shared hit=103 + -> Bitmap Index Scan on bench_variant (cost=0.00..15.78 rows=1000 width=0) (actual time=0.019..0.019 rows=1000.00 loops=1) + Index Cond: (chat_id = '86fab098-90d6-41f8-8651-e1a1d894b47f'::uuid) + Index Searches: 1 + Buffers: shared hit=3 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=500) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=500) + Filter: (message_id = messages.id) +Planning: + Buffers: shared hit=3 +Planning Time: 0.037 ms +Execution Time: 0.503 ms + +#### covering + +Limit (cost=0.28..6.16 rows=51 width=153) (actual time=0.005..0.045 rows=51.00 loops=1) + Buffers: shared hit=4 + -> Index Only Scan using bench_variant on messages (cost=0.28..57.75 rows=499 width=153) (actual time=0.005..0.042 rows=51.00 loops=1) + Index Cond: ((chat_id = '86fab098-90d6-41f8-8651-e1a1d894b47f'::uuid) AND (ROW(created_at, id) > ROW('2026-10-31 20:32:35.560579+00'::timestamp with time zone, '56b675e9-b197-40df-b5bf-70da08443b02'::uuid))) + Heap Fetches: 0 + Index Searches: 1 + Buffers: shared hit=4 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51) + Filter: (message_id = messages.id) +Planning: + Buffers: shared hit=3 +Planning Time: 0.042 ms +Execution Time: 0.051 ms + +### bg 1k: middle, после 500 + +#### psql + +Limit (cost=0.28..44.72 rows=51 width=153) (actual time=0.012..0.062 rows=51.00 loops=1) + Buffers: shared hit=53 + -> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.28..436.81 rows=501 width=153) (actual time=0.012..0.058 rows=51.00 loops=1) + Index Cond: ((chat_id = '4a92e036-81de-4387-8577-bca03fd549a7'::uuid) AND (ROW(created_at, id) > ROW('2026-10-31 20:32:35.544798+00'::timestamp with time zone, 'a727e0c7-e3cb-4ce8-bff7-59e9c11b7c6f'::uuid))) + Index Searches: 1 + Buffers: shared hit=53 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=51) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51) + Filter: (message_id = messages.id) +Planning: + Buffers: shared hit=3 +Planning Time: 0.058 ms +Execution Time: 0.072 ms + +#### generic + +Limit (cost=0.28..7.93 rows=2 width=153) (actual time=0.010..0.056 rows=51.00 loops=1) + Buffers: shared hit=53 + -> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.28..92.03 rows=24 width=153) (actual time=0.009..0.053 rows=51.00 loops=1) + Index Cond: ((chat_id = $1) AND (ROW(created_at, id) > ROW($2, $3))) + Index Searches: 1 + Buffers: shared hit=53 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=51) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51) + Filter: (message_id = messages.id) +Planning Time: 0.006 ms +Execution Time: 0.063 ms + +#### or-cursor + +Limit (cost=0.28..48.70 rows=51 width=153) (actual time=0.076..0.116 rows=51.00 loops=1) + Buffers: shared hit=540 + -> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.28..475.93 rows=501 width=153) (actual time=0.076..0.114 rows=51.00 loops=1) + Index Cond: (chat_id = '4a92e036-81de-4387-8577-bca03fd549a7'::uuid) + Filter: ((created_at > '2026-10-31 20:32:35.544798+00'::timestamp with time zone) OR ((created_at = '2026-10-31 20:32:35.544798+00'::timestamp with time zone) AND (id > 'a727e0c7-e3cb-4ce8-bff7-59e9c11b7c6f'::uuid))) + Rows Removed by Filter: 500 + Index Searches: 1 + Buffers: shared hit=540 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51) + Filter: (message_id = messages.id) +Planning: + Buffers: shared hit=3 +Planning Time: 0.044 ms +Execution Time: 0.121 ms + +#### no-index + +Limit (cost=202.98..203.11 rows=51 width=153) (actual time=0.486..0.490 rows=51.00 loops=1) + Buffers: shared hit=100 + -> Sort (cost=202.98..204.23 rows=501 width=153) (actual time=0.486..0.488 rows=51.00 loops=1) + Sort Key: messages.created_at, messages.id + Sort Method: top-N heapsort Memory: 43kB + Buffers: shared hit=100 + -> Seq Scan on messages (cost=0.00..186.27 rows=501 width=153) (actual time=0.070..0.431 rows=500.00 loops=1) + Filter: ((chat_id = '4a92e036-81de-4387-8577-bca03fd549a7'::uuid) AND (ROW(created_at, id) > ROW('2026-10-31 20:32:35.544798+00'::timestamp with time zone, 'a727e0c7-e3cb-4ce8-bff7-59e9c11b7c6f'::uuid))) + Rows Removed by Filter: 4000 + Buffers: shared hit=100 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=500) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=500) + Filter: (message_id = messages.id) +Planning: + Buffers: shared hit=3 +Planning Time: 0.043 ms +Execution Time: 0.497 ms + +#### chat_only + +Limit (cost=157.64..157.76 rows=51 width=153) (actual time=0.436..0.440 rows=51.00 loops=1) + Buffers: shared hit=103 + -> Sort (cost=157.64..158.89 rows=501 width=153) (actual time=0.436..0.437 rows=51.00 loops=1) + Sort Key: messages.created_at, messages.id + Sort Method: top-N heapsort Memory: 43kB + Buffers: shared hit=103 + -> Bitmap Heap Scan on messages (cost=15.91..140.92 rows=501 width=153) (actual time=0.053..0.382 rows=500.00 loops=1) + Recheck Cond: (chat_id = '4a92e036-81de-4387-8577-bca03fd549a7'::uuid) + Filter: (ROW(created_at, id) > ROW('2026-10-31 20:32:35.544798+00'::timestamp with time zone, 'a727e0c7-e3cb-4ce8-bff7-59e9c11b7c6f'::uuid)) + Rows Removed by Filter: 500 + Heap Blocks: exact=100 + Buffers: shared hit=103 + -> Bitmap Index Scan on bench_variant (cost=0.00..15.78 rows=1000 width=0) (actual time=0.012..0.012 rows=1000.00 loops=1) + Index Cond: (chat_id = '4a92e036-81de-4387-8577-bca03fd549a7'::uuid) + Index Searches: 1 + Buffers: shared hit=3 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=500) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=500) + Filter: (message_id = messages.id) +Planning: + Buffers: shared hit=3 +Planning Time: 0.045 ms +Execution Time: 0.446 ms + +#### covering + +Limit (cost=0.28..6.14 rows=51 width=153) (actual time=0.006..0.045 rows=51.00 loops=1) + Buffers: shared hit=4 + -> Index Only Scan using bench_variant on messages (cost=0.28..57.82 rows=501 width=153) (actual time=0.006..0.043 rows=51.00 loops=1) + Index Cond: ((chat_id = '4a92e036-81de-4387-8577-bca03fd549a7'::uuid) AND (ROW(created_at, id) > ROW('2026-10-31 20:32:35.544798+00'::timestamp with time zone, 'a727e0c7-e3cb-4ce8-bff7-59e9c11b7c6f'::uuid))) + Heap Fetches: 0 + Index Searches: 1 + Buffers: shared hit=4 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51) + Filter: (message_id = messages.id) +Planning: + Buffers: shared hit=3 +Planning Time: 0.040 ms +Execution Time: 0.052 ms + +### bg 100: first, после 0 + +#### psql + +Limit (cost=118.60..118.73 rows=51 width=153) (actual time=0.118..0.123 rows=51.00 loops=1) + Buffers: shared hit=73 + -> Sort (cost=118.60..118.85 rows=100 width=153) (actual time=0.118..0.120 rows=51.00 loops=1) + Sort Key: messages.created_at, messages.id + Sort Method: quicksort Memory: 50kB + Buffers: shared hit=73 + -> Bitmap Heap Scan on messages (cost=9.06..115.28 rows=100 width=153) (actual time=0.022..0.103 rows=100.00 loops=1) + Recheck Cond: (chat_id = '20a79c04-8e44-4239-98e4-6e42867bb00b'::uuid) + Heap Blocks: exact=70 + Buffers: shared hit=73 + -> Bitmap Index Scan on ix_messages_chat_id_created_at_id (cost=0.00..9.03 rows=100 width=0) (actual time=0.010..0.010 rows=100.00 loops=1) + Index Cond: (chat_id = '20a79c04-8e44-4239-98e4-6e42867bb00b'::uuid) + Index Searches: 1 + Buffers: shared hit=3 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=100) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=100) + Filter: (message_id = messages.id) +Planning: + Buffers: shared hit=3 +Planning Time: 0.064 ms +Execution Time: 0.136 ms + +#### generic + +Limit (cost=0.28..21.54 rows=7 width=153) (actual time=0.009..0.050 rows=51.00 loops=1) + Buffers: shared hit=47 + -> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.28..215.90 rows=71 width=153) (actual time=0.008..0.046 rows=51.00 loops=1) + Index Cond: (chat_id = $1) + Index Searches: 1 + Buffers: shared hit=47 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51) + Filter: (message_id = messages.id) +Planning Time: 0.004 ms +Execution Time: 0.057 ms + +#### no-index + +Limit (cost=161.07..161.20 rows=51 width=153) (actual time=0.196..0.200 rows=51.00 loops=1) + Buffers: shared hit=100 + -> Sort (cost=161.07..161.32 rows=100 width=153) (actual time=0.196..0.197 rows=51.00 loops=1) + Sort Key: messages.created_at, messages.id + Sort Method: quicksort Memory: 50kB + Buffers: shared hit=100 + -> Seq Scan on messages (cost=0.00..157.75 rows=100 width=153) (actual time=0.004..0.182 rows=100.00 loops=1) + Filter: (chat_id = '20a79c04-8e44-4239-98e4-6e42867bb00b'::uuid) + Rows Removed by Filter: 4400 + Buffers: shared hit=100 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=100) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=100) + Filter: (message_id = messages.id) +Planning: + Buffers: shared hit=3 +Planning Time: 0.038 ms +Execution Time: 0.206 ms + +#### chat_only + +Limit (cost=114.60..114.73 rows=51 width=153) (actual time=0.107..0.111 rows=51.00 loops=1) + Buffers: shared hit=72 + -> Sort (cost=114.60..114.85 rows=100 width=153) (actual time=0.107..0.109 rows=51.00 loops=1) + Sort Key: messages.created_at, messages.id + Sort Method: quicksort Memory: 50kB + Buffers: shared hit=72 + -> Bitmap Heap Scan on messages (cost=5.06..111.28 rows=100 width=153) (actual time=0.014..0.093 rows=100.00 loops=1) + Recheck Cond: (chat_id = '20a79c04-8e44-4239-98e4-6e42867bb00b'::uuid) + Heap Blocks: exact=70 + Buffers: shared hit=72 + -> Bitmap Index Scan on bench_variant (cost=0.00..5.03 rows=100 width=0) (actual time=0.005..0.005 rows=100.00 loops=1) + Index Cond: (chat_id = '20a79c04-8e44-4239-98e4-6e42867bb00b'::uuid) + Index Searches: 1 + Buffers: shared hit=2 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=100) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=100) + Filter: (message_id = messages.id) +Planning: + Buffers: shared hit=3 +Planning Time: 0.054 ms +Execution Time: 0.119 ms + +#### covering + +Limit (cost=0.28..6.02 rows=51 width=153) (actual time=0.005..0.040 rows=51.00 loops=1) + Buffers: shared hit=4 + -> Index Only Scan using bench_variant on messages (cost=0.28..11.53 rows=100 width=153) (actual time=0.005..0.038 rows=51.00 loops=1) + Index Cond: (chat_id = '20a79c04-8e44-4239-98e4-6e42867bb00b'::uuid) + Heap Fetches: 0 + Index Searches: 1 + Buffers: shared hit=4 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51) + Filter: (message_id = messages.id) +Planning: + Buffers: shared hit=3 +Planning Time: 0.038 ms +Execution Time: 0.047 ms + +### bg 10: first, после 0 + +#### psql + +Limit (cost=35.31..35.34 rows=10 width=153) (actual time=0.020..0.021 rows=10.00 loops=1) + Buffers: shared hit=12 + -> Sort (cost=35.31..35.34 rows=10 width=153) (actual time=0.020..0.020 rows=10.00 loops=1) + Sort Key: messages.created_at, messages.id + Sort Method: quicksort Memory: 27kB + Buffers: shared hit=12 + -> Bitmap Heap Scan on messages (cost=4.36..35.15 rows=10 width=153) (actual time=0.009..0.018 rows=10.00 loops=1) + Recheck Cond: (chat_id = 'ed5c39bf-15e3-48b5-bb93-a93544b7da4a'::uuid) + Heap Blocks: exact=10 + Buffers: shared hit=12 + -> Bitmap Index Scan on ix_messages_chat_id_created_at_id (cost=0.00..4.36 rows=10 width=0) (actual time=0.004..0.004 rows=10.00 loops=1) + Index Cond: (chat_id = 'ed5c39bf-15e3-48b5-bb93-a93544b7da4a'::uuid) + Index Searches: 1 + Buffers: shared hit=2 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=10) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=10) + Filter: (message_id = messages.id) +Planning: + Buffers: shared hit=3 +Planning Time: 0.042 ms +Execution Time: 0.031 ms + +#### generic + +Limit (cost=0.28..21.54 rows=7 width=153) (actual time=0.009..0.020 rows=10.00 loops=1) + Buffers: shared hit=12 + -> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.28..215.90 rows=71 width=153) (actual time=0.008..0.019 rows=10.00 loops=1) + Index Cond: (chat_id = $1) + Index Searches: 1 + Buffers: shared hit=12 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=10) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=10) + Filter: (message_id = messages.id) +Planning Time: 0.004 ms +Execution Time: 0.026 ms + +#### no-index + +Limit (cost=156.57..156.59 rows=10 width=153) (actual time=0.127..0.128 rows=10.00 loops=1) + Buffers: shared hit=100 + -> Sort (cost=156.57..156.59 rows=10 width=153) (actual time=0.126..0.127 rows=10.00 loops=1) + Sort Key: messages.created_at, messages.id + Sort Method: quicksort Memory: 27kB + Buffers: shared hit=100 + -> Seq Scan on messages (cost=0.00..156.40 rows=10 width=153) (actual time=0.008..0.124 rows=10.00 loops=1) + Filter: (chat_id = 'ed5c39bf-15e3-48b5-bb93-a93544b7da4a'::uuid) + Rows Removed by Filter: 4490 + Buffers: shared hit=100 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=10) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=10) + Filter: (message_id = messages.id) +Planning: + Buffers: shared hit=3 +Planning Time: 0.033 ms +Execution Time: 0.132 ms + +#### chat_only + +Limit (cost=35.31..35.34 rows=10 width=153) (actual time=0.021..0.022 rows=10.00 loops=1) + Buffers: shared hit=12 + -> Sort (cost=35.31..35.34 rows=10 width=153) (actual time=0.020..0.021 rows=10.00 loops=1) + Sort Key: messages.created_at, messages.id + Sort Method: quicksort Memory: 27kB + Buffers: shared hit=12 + -> Bitmap Heap Scan on messages (cost=4.36..35.15 rows=10 width=153) (actual time=0.009..0.018 rows=10.00 loops=1) + Recheck Cond: (chat_id = 'ed5c39bf-15e3-48b5-bb93-a93544b7da4a'::uuid) + Heap Blocks: exact=10 + Buffers: shared hit=12 + -> Bitmap Index Scan on bench_variant (cost=0.00..4.36 rows=10 width=0) (actual time=0.003..0.003 rows=10.00 loops=1) + Index Cond: (chat_id = 'ed5c39bf-15e3-48b5-bb93-a93544b7da4a'::uuid) + Index Searches: 1 + Buffers: shared hit=2 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=10) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=10) + Filter: (message_id = messages.id) +Planning: + Buffers: shared hit=3 +Planning Time: 0.050 ms +Execution Time: 0.030 ms + +#### covering + +Limit (cost=0.28..4.61 rows=10 width=153) (actual time=0.005..0.013 rows=10.00 loops=1) + Buffers: shared hit=3 + -> Index Only Scan using bench_variant on messages (cost=0.28..4.61 rows=10 width=153) (actual time=0.004..0.012 rows=10.00 loops=1) + Index Cond: (chat_id = 'ed5c39bf-15e3-48b5-bb93-a93544b7da4a'::uuid) + Heap Fetches: 0 + Index Searches: 1 + Buffers: shared hit=3 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=10) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=10) + Filter: (message_id = messages.id) +Planning: + Buffers: shared hit=3 +Planning Time: 0.035 ms +Execution Time: 0.018 ms diff --git a/evidence/bench/unit-of-work-before/explain-5k.txt b/evidence/bench/unit-of-work-before/explain-5k.txt new file mode 100644 index 00000000..4fbfa9b1 --- /dev/null +++ b/evidence/bench/unit-of-work-before/explain-5k.txt @@ -0,0 +1,693 @@ +# План запроса истории: размер 5k + +Commit b2fb88f +Читаемый чат — 5000 сообщений; фоновые чаты: 2 × 1k, 10 × 100, 50 × 10. +Страница — `limit` профиля; «после» — сколько сообщений чата до +страницы. + +## Планы приложения + +auto_explain (ANALYZE, BUFFERS, TIMING): запрос, параметры и план, +с которыми его выполнило приложение (prepared statement asyncpg). + +### read 5k: first, после 0 + +duration: 0.135 ms plan: +Query Text: SELECT messages.id, messages.chat_id, messages.sender_id, messages.text, messages.created_at, array((SELECT message_attachments.attachment_id +FROM message_attachments +WHERE message_attachments.message_id = messages.id ORDER BY message_attachments.position)) AS attachment_ids +FROM messages +WHERE messages.chat_id = $1::UUID ORDER BY messages.created_at, messages.id + LIMIT $2::INTEGER +Query Parameters: $1 = 'c5a461fa-1df5-48fc-99f3-07c2b4fc839c', $2 = '51' +Limit (cost=0.29..11.43 rows=51 width=153) (actual time=0.035..0.104 rows=51.00 loops=1) + Buffers: shared hit=27 + -> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..1092.83 rows=5000 width=153) (actual time=0.034..0.100 rows=51.00 loops=1) + Index Cond: (chat_id = 'c5a461fa-1df5-48fc-99f3-07c2b4fc839c'::uuid) + Index Searches: 1 + Buffers: shared hit=27 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=51) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51) + Filter: (message_id = messages.id) + +### read 5k: middle, после 2500 + +duration: 0.130 ms plan: +Query Text: SELECT messages.id, messages.chat_id, messages.sender_id, messages.text, messages.created_at, array((SELECT message_attachments.attachment_id +FROM message_attachments +WHERE message_attachments.message_id = messages.id ORDER BY message_attachments.position)) AS attachment_ids +FROM messages +WHERE messages.chat_id = $1::UUID AND (messages.created_at, messages.id) > ($2::TIMESTAMP WITH TIME ZONE, $3::UUID) ORDER BY messages.created_at, messages.id + LIMIT $4::INTEGER +Query Parameters: $1 = 'c5a461fa-1df5-48fc-99f3-07c2b4fc839c', $2 = '2026-10-31 20:33:47.697992+00', $3 = 'd0685e16-8d05-433e-94b2-52f7f33fc60d', $4 = '51' +Limit (cost=0.29..14.23 rows=4 width=153) (actual time=0.021..0.099 rows=51.00 loops=1) + Buffers: shared hit=54 + -> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..157.19 rows=45 width=153) (actual time=0.020..0.097 rows=51.00 loops=1) + Index Cond: ((chat_id = $1) AND (ROW(created_at, id) > ROW($2, $3))) + Index Searches: 1 + Buffers: shared hit=54 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=51) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51) + Filter: (message_id = messages.id) + +### read 5k: last, после 4900 + +duration: 0.119 ms plan: +Query Text: SELECT messages.id, messages.chat_id, messages.sender_id, messages.text, messages.created_at, array((SELECT message_attachments.attachment_id +FROM message_attachments +WHERE message_attachments.message_id = messages.id ORDER BY message_attachments.position)) AS attachment_ids +FROM messages +WHERE messages.chat_id = $1::UUID AND (messages.created_at, messages.id) > ($2::TIMESTAMP WITH TIME ZONE, $3::UUID) ORDER BY messages.created_at, messages.id + LIMIT $4::INTEGER +Query Parameters: $1 = 'c5a461fa-1df5-48fc-99f3-07c2b4fc839c', $2 = '2026-10-31 20:33:55.782721+00', $3 = '56aa58ee-98f4-437c-86bd-dc713751a74e', $4 = '51' +Limit (cost=0.29..14.23 rows=4 width=153) (actual time=0.024..0.088 rows=51.00 loops=1) + Buffers: shared hit=53 + -> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..157.19 rows=45 width=153) (actual time=0.023..0.085 rows=51.00 loops=1) + Index Cond: ((chat_id = $1) AND (ROW(created_at, id) > ROW($2, $3))) + Index Searches: 1 + Buffers: shared hit=53 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=51) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51) + Filter: (message_id = messages.id) + +### bg 1k: first, после 0 + +duration: 0.118 ms plan: +Query Text: SELECT messages.id, messages.chat_id, messages.sender_id, messages.text, messages.created_at, array((SELECT message_attachments.attachment_id +FROM message_attachments +WHERE message_attachments.message_id = messages.id ORDER BY message_attachments.position)) AS attachment_ids +FROM messages +WHERE messages.chat_id = $1::UUID ORDER BY messages.created_at, messages.id + LIMIT $2::INTEGER +Query Parameters: $1 = '32b1f6b8-cb91-4797-90f1-11562fd0d15c', $2 = '51' +Limit (cost=0.29..39.43 rows=51 width=153) (actual time=0.021..0.087 rows=51.00 loops=1) + Buffers: shared hit=47 + -> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..767.87 rows=1000 width=153) (actual time=0.021..0.084 rows=51.00 loops=1) + Index Cond: (chat_id = '32b1f6b8-cb91-4797-90f1-11562fd0d15c'::uuid) + Index Searches: 1 + Buffers: shared hit=47 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51) + Filter: (message_id = messages.id) + +### bg 1k: middle, после 500 + +duration: 0.122 ms plan: +Query Text: SELECT messages.id, messages.chat_id, messages.sender_id, messages.text, messages.created_at, array((SELECT message_attachments.attachment_id +FROM message_attachments +WHERE message_attachments.message_id = messages.id ORDER BY message_attachments.position)) AS attachment_ids +FROM messages +WHERE messages.chat_id = $1::UUID AND (messages.created_at, messages.id) > ($2::TIMESTAMP WITH TIME ZONE, $3::UUID) ORDER BY messages.created_at, messages.id + LIMIT $4::INTEGER +Query Parameters: $1 = '32b1f6b8-cb91-4797-90f1-11562fd0d15c', $2 = '2026-10-31 20:33:47.678256+00', $3 = '5b0bf7b2-94b1-471b-b626-e907cff5d820', $4 = '51' +Limit (cost=0.29..14.23 rows=4 width=153) (actual time=0.015..0.094 rows=51.00 loops=1) + Buffers: shared hit=49 + -> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..157.19 rows=45 width=153) (actual time=0.014..0.091 rows=51.00 loops=1) + Index Cond: ((chat_id = $1) AND (ROW(created_at, id) > ROW($2, $3))) + Index Searches: 1 + Buffers: shared hit=49 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=51) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51) + Filter: (message_id = messages.id) + +### bg 1k: last, после 900 + +duration: 0.136 ms plan: +Query Text: SELECT messages.id, messages.chat_id, messages.sender_id, messages.text, messages.created_at, array((SELECT message_attachments.attachment_id +FROM message_attachments +WHERE message_attachments.message_id = messages.id ORDER BY message_attachments.position)) AS attachment_ids +FROM messages +WHERE messages.chat_id = $1::UUID AND (messages.created_at, messages.id) > ($2::TIMESTAMP WITH TIME ZONE, $3::UUID) ORDER BY messages.created_at, messages.id + LIMIT $4::INTEGER +Query Parameters: $1 = '32b1f6b8-cb91-4797-90f1-11562fd0d15c', $2 = '2026-10-31 20:33:54.608508+00', $3 = 'b1c48e4e-55f2-4bb1-9e3d-6cefb21aca9c', $4 = '51' +Limit (cost=0.29..14.23 rows=4 width=153) (actual time=0.023..0.104 rows=51.00 loops=1) + Buffers: shared hit=51 + -> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..157.19 rows=45 width=153) (actual time=0.022..0.101 rows=51.00 loops=1) + Index Cond: ((chat_id = $1) AND (ROW(created_at, id) > ROW($2, $3))) + Index Searches: 1 + Buffers: shared hit=51 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=51) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51) + Filter: (message_id = messages.id) + +### bg 100: first, после 0 + +duration: 0.168 ms plan: +Query Text: SELECT messages.id, messages.chat_id, messages.sender_id, messages.text, messages.created_at, array((SELECT message_attachments.attachment_id +FROM message_attachments +WHERE message_attachments.message_id = messages.id ORDER BY message_attachments.position)) AS attachment_ids +FROM messages +WHERE messages.chat_id = $1::UUID ORDER BY messages.created_at, messages.id + LIMIT $2::INTEGER +Query Parameters: $1 = '31bc7aa7-0ed7-4867-b3f9-6a2f17caa6fb', $2 = '51' +Limit (cost=0.29..154.67 rows=51 width=153) (actual time=0.017..0.139 rows=51.00 loops=1) + Buffers: shared hit=47 + -> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..302.99 rows=100 width=153) (actual time=0.016..0.136 rows=51.00 loops=1) + Index Cond: (chat_id = '31bc7aa7-0ed7-4867-b3f9-6a2f17caa6fb'::uuid) + Index Searches: 1 + Buffers: shared hit=47 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=51) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51) + Filter: (message_id = messages.id) + +### bg 10: first, после 0 + +duration: 0.088 ms plan: +Query Text: SELECT messages.id, messages.chat_id, messages.sender_id, messages.text, messages.created_at, array((SELECT message_attachments.attachment_id +FROM message_attachments +WHERE message_attachments.message_id = messages.id ORDER BY message_attachments.position)) AS attachment_ids +FROM messages +WHERE messages.chat_id = $1::UUID ORDER BY messages.created_at, messages.id + LIMIT $2::INTEGER +Query Parameters: $1 = '2a802f02-74f4-4937-bd97-9c4045417c5e', $2 = '51' +Limit (cost=37.85..37.87 rows=10 width=153) (actual time=0.077..0.078 rows=10.00 loops=1) + Buffers: shared hit=12 + -> Sort (cost=37.85..37.87 rows=10 width=153) (actual time=0.077..0.077 rows=10.00 loops=1) + Sort Key: messages.created_at, messages.id + Sort Method: quicksort Memory: 27kB + Buffers: shared hit=12 + -> Bitmap Heap Scan on messages (cost=4.36..37.68 rows=10 width=153) (actual time=0.032..0.071 rows=10.00 loops=1) + Recheck Cond: (chat_id = '2a802f02-74f4-4937-bd97-9c4045417c5e'::uuid) + Heap Blocks: exact=10 + Buffers: shared hit=12 + -> Bitmap Index Scan on ix_messages_chat_id_created_at_id (cost=0.00..4.36 rows=10 width=0) (actual time=0.007..0.007 rows=10.00 loops=1) + Index Cond: (chat_id = '2a802f02-74f4-4937-bd97-9c4045417c5e'::uuid) + Index Searches: 1 + Buffers: shared hit=2 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.002..0.002 rows=0.00 loops=10) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=10) + Filter: (message_id = messages.id) + +## Страницы сравнения в psql: варианты + +Тот же текст запроса и те же параметры, что у плана приложения этой +страницы, в одной транзакции, которая откатывается: индексы базы +после неё те же. Каждый вариант выполнен дважды, здесь — второе +выполнение. `psql` — индекс приложения, custom plan; `generic` — он +же с force_generic_plan; `or-cursor` — условие курсора через OR; +`no-index` — без индекса приложения; варианты индекса вместо него: +`chat_only` (chat_id), `covering` (chat_id, created_at, id) INCLUDE (sender_id, text). + +### read 5k: middle, после 2500 + +#### psql + +Limit (cost=0.29..18.59 rows=51 width=153) (actual time=0.007..0.056 rows=51.00 loops=1) + Buffers: shared hit=54 + -> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..897.48 rows=2500 width=153) (actual time=0.007..0.053 rows=51.00 loops=1) + Index Cond: ((chat_id = 'c5a461fa-1df5-48fc-99f3-07c2b4fc839c'::uuid) AND (ROW(created_at, id) > ROW('2026-10-31 20:33:47.697992+00'::timestamp with time zone, 'd0685e16-8d05-433e-94b2-52f7f33fc60d'::uuid))) + Index Searches: 1 + Buffers: shared hit=54 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=51) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51) + Filter: (message_id = messages.id) +Planning: + Buffers: shared hit=3 +Planning Time: 0.053 ms +Execution Time: 0.063 ms + +#### generic + +Limit (cost=0.29..14.23 rows=4 width=153) (actual time=0.009..0.056 rows=51.00 loops=1) + Buffers: shared hit=54 + -> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..157.19 rows=45 width=153) (actual time=0.008..0.053 rows=51.00 loops=1) + Index Cond: ((chat_id = $1) AND (ROW(created_at, id) > ROW($2, $3))) + Index Searches: 1 + Buffers: shared hit=54 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=51) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51) + Filter: (message_id = messages.id) +Planning Time: 0.005 ms +Execution Time: 0.064 ms + +#### or-cursor + +Limit (cost=0.29..22.57 rows=51 width=153) (actual time=0.354..0.397 rows=51.00 loops=1) + Buffers: shared hit=2555 + -> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..1092.83 rows=2500 width=153) (actual time=0.354..0.394 rows=51.00 loops=1) + Index Cond: (chat_id = 'c5a461fa-1df5-48fc-99f3-07c2b4fc839c'::uuid) + Filter: ((created_at > '2026-10-31 20:33:47.697992+00'::timestamp with time zone) OR ((created_at = '2026-10-31 20:33:47.697992+00'::timestamp with time zone) AND (id > 'd0685e16-8d05-433e-94b2-52f7f33fc60d'::uuid))) + Rows Removed by Filter: 2500 + Index Searches: 1 + Buffers: shared hit=2555 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51) + Filter: (message_id = messages.id) +Planning: + Buffers: shared hit=3 +Planning Time: 0.042 ms +Execution Time: 0.402 ms + +#### no-index + +Limit (cost=455.66..455.78 rows=51 width=153) (actual time=2.231..2.236 rows=51.00 loops=1) + Buffers: shared hit=186 + -> Sort (cost=455.66..461.91 rows=2500 width=153) (actual time=2.231..2.233 rows=51.00 loops=1) + Sort Key: messages.created_at, messages.id + Sort Method: top-N heapsort Memory: 43kB + Buffers: shared hit=186 + -> Seq Scan on messages (cost=0.00..372.25 rows=2500 width=153) (actual time=0.181..1.941 rows=2500.00 loops=1) + Filter: ((chat_id = 'c5a461fa-1df5-48fc-99f3-07c2b4fc839c'::uuid) AND (ROW(created_at, id) > ROW('2026-10-31 20:33:47.697992+00'::timestamp with time zone, 'd0685e16-8d05-433e-94b2-52f7f33fc60d'::uuid))) + Rows Removed by Filter: 6000 + Buffers: shared hit=186 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=2500) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=2500) + Filter: (message_id = messages.id) +Planning: + Buffers: shared hit=3 +Planning Time: 0.043 ms +Execution Time: 2.243 ms + +#### chat_only + +Limit (cost=455.66..455.78 rows=51 width=153) (actual time=2.007..2.011 rows=51.00 loops=1) + Buffers: shared hit=186 + -> Sort (cost=455.66..461.91 rows=2500 width=153) (actual time=2.007..2.009 rows=51.00 loops=1) + Sort Key: messages.created_at, messages.id + Sort Method: top-N heapsort Memory: 43kB + Buffers: shared hit=186 + -> Seq Scan on messages (cost=0.00..372.25 rows=2500 width=153) (actual time=0.147..1.756 rows=2500.00 loops=1) + Filter: ((chat_id = 'c5a461fa-1df5-48fc-99f3-07c2b4fc839c'::uuid) AND (ROW(created_at, id) > ROW('2026-10-31 20:33:47.697992+00'::timestamp with time zone, 'd0685e16-8d05-433e-94b2-52f7f33fc60d'::uuid))) + Rows Removed by Filter: 6000 + Buffers: shared hit=186 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=2500) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=2500) + Filter: (message_id = messages.id) +Planning: + Buffers: shared hit=3 +Planning Time: 0.040 ms +Execution Time: 2.017 ms + +#### covering + +Limit (cost=0.41..6.28 rows=51 width=153) (actual time=0.006..0.041 rows=51.00 loops=1) + Buffers: shared hit=5 + -> Index Only Scan using bench_variant on messages (cost=0.41..287.91 rows=2500 width=153) (actual time=0.006..0.039 rows=51.00 loops=1) + Index Cond: ((chat_id = 'c5a461fa-1df5-48fc-99f3-07c2b4fc839c'::uuid) AND (ROW(created_at, id) > ROW('2026-10-31 20:33:47.697992+00'::timestamp with time zone, 'd0685e16-8d05-433e-94b2-52f7f33fc60d'::uuid))) + Heap Fetches: 0 + Index Searches: 1 + Buffers: shared hit=5 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51) + Filter: (message_id = messages.id) +Planning: + Buffers: shared hit=3 +Planning Time: 0.039 ms +Execution Time: 0.047 ms + +### bg 1k: middle, после 500 + +#### psql + +Limit (cost=0.29..74.22 rows=51 width=153) (actual time=0.006..0.052 rows=51.00 loops=1) + Buffers: shared hit=49 + -> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..728.07 rows=502 width=153) (actual time=0.006..0.050 rows=51.00 loops=1) + Index Cond: ((chat_id = '32b1f6b8-cb91-4797-90f1-11562fd0d15c'::uuid) AND (ROW(created_at, id) > ROW('2026-10-31 20:33:47.678256+00'::timestamp with time zone, '5b0bf7b2-94b1-471b-b626-e907cff5d820'::uuid))) + Index Searches: 1 + Buffers: shared hit=49 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=51) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51) + Filter: (message_id = messages.id) +Planning: + Buffers: shared hit=3 +Planning Time: 0.048 ms +Execution Time: 0.059 ms + +#### generic + +Limit (cost=0.29..14.23 rows=4 width=153) (actual time=0.013..0.063 rows=51.00 loops=1) + Buffers: shared hit=49 + -> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..157.19 rows=45 width=153) (actual time=0.013..0.060 rows=51.00 loops=1) + Index Cond: ((chat_id = $1) AND (ROW(created_at, id) > ROW($2, $3))) + Index Searches: 1 + Buffers: shared hit=49 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=51) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51) + Filter: (message_id = messages.id) +Planning Time: 0.009 ms +Execution Time: 0.075 ms + +#### or-cursor + +Limit (cost=0.29..78.27 rows=51 width=153) (actual time=0.083..0.127 rows=51.00 loops=1) + Buffers: shared hit=531 + -> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..767.90 rows=502 width=153) (actual time=0.083..0.125 rows=51.00 loops=1) + Index Cond: (chat_id = '32b1f6b8-cb91-4797-90f1-11562fd0d15c'::uuid) + Filter: ((created_at > '2026-10-31 20:33:47.678256+00'::timestamp with time zone) OR ((created_at = '2026-10-31 20:33:47.678256+00'::timestamp with time zone) AND (id > '5b0bf7b2-94b1-471b-b626-e907cff5d820'::uuid))) + Rows Removed by Filter: 500 + Index Searches: 1 + Buffers: shared hit=531 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51) + Filter: (message_id = messages.id) +Planning: + Buffers: shared hit=3 +Planning Time: 0.049 ms +Execution Time: 0.134 ms + +#### no-index + +Limit (cost=359.03..359.16 rows=51 width=153) (actual time=0.554..0.558 rows=51.00 loops=1) + Buffers: shared hit=186 + -> Sort (cost=359.03..360.28 rows=502 width=153) (actual time=0.553..0.555 rows=51.00 loops=1) + Sort Key: messages.created_at, messages.id + Sort Method: top-N heapsort Memory: 39kB + Buffers: shared hit=186 + -> Seq Scan on messages (cost=0.00..342.28 rows=502 width=153) (actual time=0.128..0.504 rows=500.00 loops=1) + Filter: ((chat_id = '32b1f6b8-cb91-4797-90f1-11562fd0d15c'::uuid) AND (ROW(created_at, id) > ROW('2026-10-31 20:33:47.678256+00'::timestamp with time zone, '5b0bf7b2-94b1-471b-b626-e907cff5d820'::uuid))) + Rows Removed by Filter: 8000 + Buffers: shared hit=186 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=500) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=500) + Filter: (message_id = messages.id) +Planning: + Buffers: shared hit=3 +Planning Time: 0.074 ms +Execution Time: 0.569 ms + +#### chat_only + +Limit (cost=243.69..243.82 rows=51 width=153) (actual time=0.455..0.459 rows=51.00 loops=1) + Buffers: shared hit=187 + -> Sort (cost=243.69..244.94 rows=502 width=153) (actual time=0.455..0.456 rows=51.00 loops=1) + Sort Key: messages.created_at, messages.id + Sort Method: top-N heapsort Memory: 39kB + Buffers: shared hit=187 + -> Bitmap Heap Scan on messages (cost=15.91..226.94 rows=502 width=153) (actual time=0.077..0.404 rows=500.00 loops=1) + Recheck Cond: (chat_id = '32b1f6b8-cb91-4797-90f1-11562fd0d15c'::uuid) + Filter: (ROW(created_at, id) > ROW('2026-10-31 20:33:47.678256+00'::timestamp with time zone, '5b0bf7b2-94b1-471b-b626-e907cff5d820'::uuid)) + Rows Removed by Filter: 500 + Heap Blocks: exact=184 + Buffers: shared hit=187 + -> Bitmap Index Scan on bench_variant (cost=0.00..15.79 rows=1000 width=0) (actual time=0.014..0.014 rows=1000.00 loops=1) + Index Cond: (chat_id = '32b1f6b8-cb91-4797-90f1-11562fd0d15c'::uuid) + Index Searches: 1 + Buffers: shared hit=3 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=500) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=500) + Filter: (message_id = messages.id) +Planning: + Buffers: shared hit=3 +Planning Time: 0.045 ms +Execution Time: 0.467 ms + +#### covering + +Limit (cost=0.41..6.26 rows=51 width=153) (actual time=0.006..0.048 rows=51.00 loops=1) + Buffers: shared hit=5 + -> Index Only Scan using bench_variant on messages (cost=0.41..57.98 rows=502 width=153) (actual time=0.006..0.045 rows=51.00 loops=1) + Index Cond: ((chat_id = '32b1f6b8-cb91-4797-90f1-11562fd0d15c'::uuid) AND (ROW(created_at, id) > ROW('2026-10-31 20:33:47.678256+00'::timestamp with time zone, '5b0bf7b2-94b1-471b-b626-e907cff5d820'::uuid))) + Heap Fetches: 0 + Index Searches: 1 + Buffers: shared hit=5 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=51) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51) + Filter: (message_id = messages.id) +Planning: + Buffers: shared hit=3 +Planning Time: 0.047 ms +Execution Time: 0.055 ms + +### bg 100: first, после 0 + +#### psql + +Limit (cost=0.29..154.67 rows=51 width=153) (actual time=0.021..0.072 rows=51.00 loops=1) + Buffers: shared hit=47 + -> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..302.99 rows=100 width=153) (actual time=0.021..0.069 rows=51.00 loops=1) + Index Cond: (chat_id = '31bc7aa7-0ed7-4867-b3f9-6a2f17caa6fb'::uuid) + Index Searches: 1 + Buffers: shared hit=47 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=51) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51) + Filter: (message_id = messages.id) +Planning: + Buffers: shared hit=3 +Planning Time: 0.069 ms +Execution Time: 0.080 ms + +#### generic + +Limit (cost=0.29..39.82 rows=14 width=153) (actual time=0.024..0.083 rows=51.00 loops=1) + Buffers: shared hit=47 + -> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..381.48 rows=135 width=153) (actual time=0.023..0.080 rows=51.00 loops=1) + Index Cond: (chat_id = $1) + Index Searches: 1 + Buffers: shared hit=47 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=51) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51) + Filter: (message_id = messages.id) +Planning Time: 0.005 ms +Execution Time: 0.094 ms + +#### no-index + +Limit (cost=297.07..297.20 rows=51 width=153) (actual time=0.353..0.356 rows=51.00 loops=1) + Buffers: shared hit=186 + -> Sort (cost=297.07..297.32 rows=100 width=153) (actual time=0.353..0.354 rows=51.00 loops=1) + Sort Key: messages.created_at, messages.id + Sort Method: quicksort Memory: 50kB + Buffers: shared hit=186 + -> Seq Scan on messages (cost=0.00..293.75 rows=100 width=153) (actual time=0.028..0.336 rows=100.00 loops=1) + Filter: (chat_id = '31bc7aa7-0ed7-4867-b3f9-6a2f17caa6fb'::uuid) + Rows Removed by Filter: 8400 + Buffers: shared hit=186 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=100) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=100) + Filter: (message_id = messages.id) +Planning: + Buffers: shared hit=3 +Planning Time: 0.035 ms +Execution Time: 0.362 ms + +#### chat_only + +Limit (cost=172.68..172.80 rows=51 width=153) (actual time=0.138..0.142 rows=51.00 loops=1) + Buffers: shared hit=83 + -> Sort (cost=172.68..172.93 rows=100 width=153) (actual time=0.138..0.140 rows=51.00 loops=1) + Sort Key: messages.created_at, messages.id + Sort Method: quicksort Memory: 50kB + Buffers: shared hit=83 + -> Bitmap Heap Scan on messages (cost=5.06..169.35 rows=100 width=153) (actual time=0.013..0.124 rows=100.00 loops=1) + Recheck Cond: (chat_id = '31bc7aa7-0ed7-4867-b3f9-6a2f17caa6fb'::uuid) + Heap Blocks: exact=81 + Buffers: shared hit=83 + -> Bitmap Index Scan on bench_variant (cost=0.00..5.04 rows=100 width=0) (actual time=0.004..0.004 rows=100.00 loops=1) + Index Cond: (chat_id = '31bc7aa7-0ed7-4867-b3f9-6a2f17caa6fb'::uuid) + Index Searches: 1 + Buffers: shared hit=2 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=100) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=100) + Filter: (message_id = messages.id) +Planning: + Buffers: shared hit=3 +Planning Time: 0.038 ms +Execution Time: 0.149 ms + +#### covering + +Limit (cost=0.41..6.15 rows=51 width=153) (actual time=0.004..0.048 rows=51.00 loops=1) + Buffers: shared hit=5 + -> Index Only Scan using bench_variant on messages (cost=0.41..11.66 rows=100 width=153) (actual time=0.004..0.045 rows=51.00 loops=1) + Index Cond: (chat_id = '31bc7aa7-0ed7-4867-b3f9-6a2f17caa6fb'::uuid) + Heap Fetches: 0 + Index Searches: 1 + Buffers: shared hit=5 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=51) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51) + Filter: (message_id = messages.id) +Planning: + Buffers: shared hit=3 +Planning Time: 0.035 ms +Execution Time: 0.053 ms + +### bg 10: first, после 0 + +#### psql + +Limit (cost=37.85..37.87 rows=10 width=153) (actual time=0.035..0.036 rows=10.00 loops=1) + Buffers: shared hit=12 + -> Sort (cost=37.85..37.87 rows=10 width=153) (actual time=0.034..0.035 rows=10.00 loops=1) + Sort Key: messages.created_at, messages.id + Sort Method: quicksort Memory: 27kB + Buffers: shared hit=12 + -> Bitmap Heap Scan on messages (cost=4.36..37.68 rows=10 width=153) (actual time=0.020..0.031 rows=10.00 loops=1) + Recheck Cond: (chat_id = '2a802f02-74f4-4937-bd97-9c4045417c5e'::uuid) + Heap Blocks: exact=10 + Buffers: shared hit=12 + -> Bitmap Index Scan on ix_messages_chat_id_created_at_id (cost=0.00..4.36 rows=10 width=0) (actual time=0.005..0.005 rows=10.00 loops=1) + Index Cond: (chat_id = '2a802f02-74f4-4937-bd97-9c4045417c5e'::uuid) + Index Searches: 1 + Buffers: shared hit=2 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=10) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=10) + Filter: (message_id = messages.id) +Planning: + Buffers: shared hit=3 +Planning Time: 0.053 ms +Execution Time: 0.049 ms + +#### generic + +Limit (cost=0.29..39.82 rows=14 width=153) (actual time=0.010..0.021 rows=10.00 loops=1) + Buffers: shared hit=12 + -> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..381.48 rows=135 width=153) (actual time=0.010..0.020 rows=10.00 loops=1) + Index Cond: (chat_id = $1) + Index Searches: 1 + Buffers: shared hit=12 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=10) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=10) + Filter: (message_id = messages.id) +Planning Time: 0.004 ms +Execution Time: 0.029 ms + +#### no-index + +Limit (cost=292.57..292.59 rows=10 width=153) (actual time=0.199..0.200 rows=10.00 loops=1) + Buffers: shared hit=186 + -> Sort (cost=292.57..292.59 rows=10 width=153) (actual time=0.199..0.199 rows=10.00 loops=1) + Sort Key: messages.created_at, messages.id + Sort Method: quicksort Memory: 27kB + Buffers: shared hit=186 + -> Seq Scan on messages (cost=0.00..292.40 rows=10 width=153) (actual time=0.007..0.196 rows=10.00 loops=1) + Filter: (chat_id = '2a802f02-74f4-4937-bd97-9c4045417c5e'::uuid) + Rows Removed by Filter: 8490 + Buffers: shared hit=186 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=10) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=10) + Filter: (message_id = messages.id) +Planning: + Buffers: shared hit=3 +Planning Time: 0.040 ms +Execution Time: 0.205 ms + +#### chat_only + +Limit (cost=37.85..37.87 rows=10 width=153) (actual time=0.019..0.020 rows=10.00 loops=1) + Buffers: shared hit=12 + -> Sort (cost=37.85..37.87 rows=10 width=153) (actual time=0.019..0.019 rows=10.00 loops=1) + Sort Key: messages.created_at, messages.id + Sort Method: quicksort Memory: 27kB + Buffers: shared hit=12 + -> Bitmap Heap Scan on messages (cost=4.36..37.68 rows=10 width=153) (actual time=0.007..0.016 rows=10.00 loops=1) + Recheck Cond: (chat_id = '2a802f02-74f4-4937-bd97-9c4045417c5e'::uuid) + Heap Blocks: exact=10 + Buffers: shared hit=12 + -> Bitmap Index Scan on bench_variant (cost=0.00..4.36 rows=10 width=0) (actual time=0.002..0.002 rows=10.00 loops=1) + Index Cond: (chat_id = '2a802f02-74f4-4937-bd97-9c4045417c5e'::uuid) + Index Searches: 1 + Buffers: shared hit=2 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=10) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=10) + Filter: (message_id = messages.id) +Planning: + Buffers: shared hit=3 +Planning Time: 0.044 ms +Execution Time: 0.026 ms + +#### covering + +Limit (cost=0.41..4.74 rows=10 width=153) (actual time=0.006..0.014 rows=10.00 loops=1) + Buffers: shared hit=4 + -> Index Only Scan using bench_variant on messages (cost=0.41..4.74 rows=10 width=153) (actual time=0.006..0.013 rows=10.00 loops=1) + Index Cond: (chat_id = '2a802f02-74f4-4937-bd97-9c4045417c5e'::uuid) + Heap Fetches: 0 + Index Searches: 1 + Buffers: shared hit=4 + SubPlan 1 + -> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=10) + Sort Key: message_attachments."position" + Sort Method: quicksort Memory: 25kB + -> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=10) + Filter: (message_id = messages.id) +Planning: + Buffers: shared hit=3 +Planning Time: 0.035 ms +Execution Time: 0.020 ms diff --git a/evidence/bench/unit-of-work-before/meta.json b/evidence/bench/unit-of-work-before/meta.json new file mode 100644 index 00000000..ce98b153 --- /dev/null +++ b/evidence/bench/unit-of-work-before/meta.json @@ -0,0 +1,1888 @@ +{ + "label": "unit-of-work-before", + "status": "complete", + "started_at": "2026-10-31T20:32:16+00:00", + "command": "uv run python bench/run.py --profile quick --label unit-of-work-before", + "git": { + "commit": "b2fb88f", + "dirty": false + }, + "overrides": {}, + "host_state": { + "start": { + "swap_used_mib": 8514.5, + "swap_total_mib": 9216.0, + "swapouts": 7240296, + "memory_free_percent": 53, + "power": "AC Power", + "battery_percent": 80 + }, + "end": { + "swap_used_mib": 8250.44, + "swap_total_mib": 9216.0, + "swapouts": 7240296, + "memory_free_percent": 54, + "power": "AC Power", + "battery_percent": 80 + }, + "swapouts_delta": 0, + "slept_seconds": 0 + }, + "host_warnings": [], + "other_containers": [ + "domains-api-1", + "domains-bot-1", + "domains-postgres-1" + ], + "app_image": { + "tag": "mtusi-messenger:bench", + "id": "sha256:3761f241ab1469a102821849ff8d4ed319b13c969b88e96b7c95757741be7b97", + "versions": { + "python": "3.12.14", + "fastapi": "0.141.1", + "starlette": "1.7.0", + "pydantic": "2.13.5", + "uvicorn": "0.54.0", + "sqlalchemy": "2.1.1", + "asyncpg": "0.31.0", + "redis": "8.1.0" + } + }, + "generator": { + "image": "grafana/k6:2.3.0@sha256:9c2dee7f8ed74d317e4027c06a10f169b625638189de8d4555d0b3486a5aeb34", + "version": "k6 v2.3.0 (commit/e088784614, go1.27.1, linux/arm64)" + }, + "docker": { + "server": "29.9.2", + "vm_os": "Docker Desktop", + "kernel": "7.0.14-linuxkit", + "vm_cpus": 12, + "vm_memory_gib": 7.7, + "cgroup": "2", + "logging_driver": "local" + }, + "host": { + "os": "macOS 26.7.1", + "machine": "Apple M3 Pro", + "memory_gib": 18.0, + "performance_cores": 6, + "efficiency_cores": 6 + }, + "profile": { + "name": "quick", + "sizes": [ + 1000, + 5000, + 10000 + ], + "concurrency": [ + 1, + 4, + 16 + ], + "repeats": 1, + "read_warmup_s": 2, + "read_measure_s": 5, + "write_warmup": 100, + "write_measure": 1000, + "prefill_chunk": 25000, + "prefill_vus": 32, + "text_length": 64, + "page_limit": 50, + "walk_limit": 100, + "cursor_pool": 1000, + "members": 10, + "seed": 20260930, + "warmup_seed_shift": 1000003, + "generator_cpu_limit": 4.0, + "cpus": "1", + "memory": "2g", + "db_cpus": "4", + "db_memory": "3g", + "cache_cpus": "2", + "cache_memory": "512m", + "session_ttl_seconds": 21600, + "background": [ + [ + 2, + 1000 + ], + [ + 10, + 100 + ], + [ + 50, + 10 + ] + ], + "index_variants": [ + [ + "chat_only", + "(chat_id)" + ], + [ + "covering", + "(chat_id, created_at, id) INCLUDE (sender_id, text)" + ] + ], + "write_probe_rows": 5000, + "write_probe_repeats": 3, + "restore": false, + "restore_jobs": 4, + "restore_write_load": 5000, + "restore_write_vus": 10, + "replicas": 1, + "lb_cpus": "1", + "lb_memory": "256m", + "failover_modes": [], + "failover_write_rate": 0, + "failover_read_rate": 0, + "failover_before_s": 0, + "failover_down_s": 0, + "failover_after_s": 0, + "failover_success": 0.99, + "failover_pre_vus": 600, + "failover_max_vus": 1500, + "rollout_from": "", + "rollout_before_s": 0, + "rollout_budget_s": 0, + "rollout_after_s": 0, + "sample_resources": false, + "uploads_variants": [], + "uploads_before": "", + "uploads_success_codes": [ + [ + "before", + 201 + ], + [ + "unlimited", + 202 + ], + [ + "limited", + 202 + ] + ], + "uploads_sizes": [], + "uploads_clients": [], + "uploads_ramp_s": 3, + "uploads_window_s": 20, + "uploads_unlimited_env": [ + [ + "UPLOADS__MAX_CONCURRENT", + "1000" + ], + [ + "UPLOADS__MAX_WAITING", + "0" + ] + ], + "uploads_sample_interval_s": 0.2, + "s3_cpus": "1", + "s3_memory": "512m", + "broker_cpus": "1", + "broker_memory": "512m", + "relay_cpus": "0.25", + "relay_memory": "256m", + "worker_cpus": "1", + "worker_memory": "1g", + "cleaner_cpus": "0.25", + "cleaner_memory": "256m", + "reconcile_stages": [], + "reconcile_before": "", + "reconcile_s4_clean": 0, + "reconcile_s4_candidates": [], + "reconcile_s4_max_changes": 100, + "reconcile_grace_s": 30, + "reconcile_fresh_wait_s": 2, + "reconcile_fast_cpus": "1", + "reconcile_default_rate": 2000, + "reconcile_background": [ + [ + "download", + 300 + ], + [ + "write", + 50 + ], + [ + "read", + 50 + ] + ], + "reconcile_downloads": 5000, + "reconcile_bg_max_vus": 600, + "reconcile_quiet_s": 30, + "reconcile_fill_processes": 3, + "reconcile_fill_threads": 24, + "reconcile_sample_interval_s": 0.5, + "reconcile_metrics_port": 9327, + "reconcile_h1_stages": [], + "reconcile_h2_stages": [], + "reconcile_h3_stages": [], + "reconcile_s4_base": "", + "db_max_connections": 100, + "series": "", + "configs": [], + "write_chats": 1, + "mix": [], + "fixed_rps": [], + "ladder_base": 100, + "step_factor": 1.25, + "start_rps_per_replica": 300, + "bisect_steps": 2, + "max_steps": 12, + "first_warmup_s": 15, + "step_warmup_s": 5, + "step_measure_s": 20, + "cooldown_s": 10, + "slo_p95_ms": 200, + "slo_error_ratio": 0.01, + "abort_error_ratio": 0.5, + "abort_p95_ms": 2000, + "request_timeout_s": 15, + "prevus_per_rps": 0.05, + "vus_per_rps": 0.2, + "generator_cpus": "", + "generator_memory": "", + "sampler_cpus": "0.25", + "sampler_memory": "128m", + "sample_interval_s": 1.0, + "order_seed": 20261011 + }, + "sizes": [ + { + "size": 1000, + "messages_total": 4500, + "rss_before_mib": 121.1, + "rss_after_mib": 124.9, + "bytes_per_message": 895, + "prefill_seconds": 8.1, + "prefill_rate": 554, + "cursors": 9, + "maintenance_seconds": 0.1, + "messages_rows": 4500, + "messages_table_bytes": 860160, + "messages_indexes_bytes": 614400, + "db_bytes_per_message": 328, + "plans": [ + { + "chat": "read 1k", + "chat_size": 1000, + "page": "first", + "after": 0, + "source": "app", + "node": "Index Scan using ix_messages_chat_id_created_at_id on messages", + "shared_hit": 38, + "shared_read": 0, + "rows": 51.0, + "time_ms": 0.112, + "kind": "custom" + }, + { + "chat": "read 1k", + "chat_size": 1000, + "page": "middle", + "after": 500, + "source": "app", + "node": "Index Scan using ix_messages_chat_id_created_at_id on messages", + "shared_hit": 52, + "shared_read": 0, + "rows": 51.0, + "time_ms": 0.109, + "kind": "custom" + }, + { + "chat": "read 1k", + "chat_size": 1000, + "page": "middle", + "after": 500, + "source": "psql", + "node": "Index Scan using ix_messages_chat_id_created_at_id on messages", + "shared_hit": 52, + "shared_read": 0, + "rows": 51.0, + "time_ms": 0.067, + "kind": "custom" + }, + { + "chat": "read 1k", + "chat_size": 1000, + "page": "middle", + "after": 500, + "source": "generic", + "node": "Index Scan using ix_messages_chat_id_created_at_id on messages", + "shared_hit": 52, + "shared_read": 0, + "rows": 51.0, + "time_ms": 0.079, + "kind": "generic" + }, + { + "chat": "read 1k", + "chat_size": 1000, + "page": "middle", + "after": 500, + "source": "or-cursor", + "node": "Index Scan using ix_messages_chat_id_created_at_id on messages", + "shared_hit": 533, + "shared_read": 0, + "rows": 51.0, + "time_ms": 0.132, + "kind": "custom" + }, + { + "chat": "read 1k", + "chat_size": 1000, + "page": "middle", + "after": 500, + "source": "no-index", + "node": "Seq Scan on messages", + "shared_hit": 100, + "shared_read": 0, + "rows": 51.0, + "time_ms": 0.582, + "kind": "custom" + }, + { + "chat": "read 1k", + "chat_size": 1000, + "page": "middle", + "after": 500, + "source": "chat_only", + "node": "Bitmap Heap Scan on messages", + "shared_hit": 103, + "shared_read": 0, + "rows": 51.0, + "time_ms": 0.503, + "kind": "custom" + }, + { + "chat": "read 1k", + "chat_size": 1000, + "page": "middle", + "after": 500, + "source": "covering", + "node": "Index Only Scan using bench_variant on messages", + "shared_hit": 4, + "shared_read": 0, + "rows": 51.0, + "time_ms": 0.051, + "kind": "custom" + }, + { + "chat": "read 1k", + "chat_size": 1000, + "page": "last", + "after": 900, + "source": "app", + "node": "Bitmap Heap Scan on messages", + "shared_hit": 27, + "shared_read": 0, + "rows": 51.0, + "time_ms": 0.19, + "kind": "custom" + }, + { + "chat": "bg 1k", + "chat_size": 1000, + "page": "first", + "after": 0, + "source": "app", + "node": "Index Scan using ix_messages_chat_id_created_at_id on messages", + "shared_hit": 43, + "shared_read": 0, + "rows": 51.0, + "time_ms": 0.097, + "kind": "custom" + }, + { + "chat": "bg 1k", + "chat_size": 1000, + "page": "middle", + "after": 500, + "source": "app", + "node": "Index Scan using ix_messages_chat_id_created_at_id on messages", + "shared_hit": 53, + "shared_read": 0, + "rows": 51.0, + "time_ms": 0.096, + "kind": "custom" + }, + { + "chat": "bg 1k", + "chat_size": 1000, + "page": "middle", + "after": 500, + "source": "psql", + "node": "Index Scan using ix_messages_chat_id_created_at_id on messages", + "shared_hit": 53, + "shared_read": 0, + "rows": 51.0, + "time_ms": 0.072, + "kind": "custom" + }, + { + "chat": "bg 1k", + "chat_size": 1000, + "page": "middle", + "after": 500, + "source": "generic", + "node": "Index Scan using ix_messages_chat_id_created_at_id on messages", + "shared_hit": 53, + "shared_read": 0, + "rows": 51.0, + "time_ms": 0.063, + "kind": "generic" + }, + { + "chat": "bg 1k", + "chat_size": 1000, + "page": "middle", + "after": 500, + "source": "or-cursor", + "node": "Index Scan using ix_messages_chat_id_created_at_id on messages", + "shared_hit": 540, + "shared_read": 0, + "rows": 51.0, + "time_ms": 0.121, + "kind": "custom" + }, + { + "chat": "bg 1k", + "chat_size": 1000, + "page": "middle", + "after": 500, + "source": "no-index", + "node": "Seq Scan on messages", + "shared_hit": 100, + "shared_read": 0, + "rows": 51.0, + "time_ms": 0.497, + "kind": "custom" + }, + { + "chat": "bg 1k", + "chat_size": 1000, + "page": "middle", + "after": 500, + "source": "chat_only", + "node": "Bitmap Heap Scan on messages", + "shared_hit": 103, + "shared_read": 0, + "rows": 51.0, + "time_ms": 0.446, + "kind": "custom" + }, + { + "chat": "bg 1k", + "chat_size": 1000, + "page": "middle", + "after": 500, + "source": "covering", + "node": "Index Only Scan using bench_variant on messages", + "shared_hit": 4, + "shared_read": 0, + "rows": 51.0, + "time_ms": 0.052, + "kind": "custom" + }, + { + "chat": "bg 1k", + "chat_size": 1000, + "page": "last", + "after": 900, + "source": "app", + "node": "Bitmap Heap Scan on messages", + "shared_hit": 19, + "shared_read": 0, + "rows": 51.0, + "time_ms": 0.145, + "kind": "custom" + }, + { + "chat": "bg 100", + "chat_size": 100, + "page": "first", + "after": 0, + "source": "app", + "node": "Bitmap Heap Scan on messages", + "shared_hit": 73, + "shared_read": 0, + "rows": 51.0, + "time_ms": 0.197, + "kind": "custom" + }, + { + "chat": "bg 100", + "chat_size": 100, + "page": "first", + "after": 0, + "source": "psql", + "node": "Bitmap Heap Scan on messages", + "shared_hit": 73, + "shared_read": 0, + "rows": 51.0, + "time_ms": 0.136, + "kind": "custom" + }, + { + "chat": "bg 100", + "chat_size": 100, + "page": "first", + "after": 0, + "source": "generic", + "node": "Index Scan using ix_messages_chat_id_created_at_id on messages", + "shared_hit": 47, + "shared_read": 0, + "rows": 51.0, + "time_ms": 0.057, + "kind": "generic" + }, + { + "chat": "bg 100", + "chat_size": 100, + "page": "first", + "after": 0, + "source": "no-index", + "node": "Seq Scan on messages", + "shared_hit": 100, + "shared_read": 0, + "rows": 51.0, + "time_ms": 0.206, + "kind": "custom" + }, + { + "chat": "bg 100", + "chat_size": 100, + "page": "first", + "after": 0, + "source": "chat_only", + "node": "Bitmap Heap Scan on messages", + "shared_hit": 72, + "shared_read": 0, + "rows": 51.0, + "time_ms": 0.119, + "kind": "custom" + }, + { + "chat": "bg 100", + "chat_size": 100, + "page": "first", + "after": 0, + "source": "covering", + "node": "Index Only Scan using bench_variant on messages", + "shared_hit": 4, + "shared_read": 0, + "rows": 51.0, + "time_ms": 0.047, + "kind": "custom" + }, + { + "chat": "bg 10", + "chat_size": 10, + "page": "first", + "after": 0, + "source": "app", + "node": "Bitmap Heap Scan on messages", + "shared_hit": 12, + "shared_read": 0, + "rows": 10.0, + "time_ms": 0.036, + "kind": "custom" + }, + { + "chat": "bg 10", + "chat_size": 10, + "page": "first", + "after": 0, + "source": "psql", + "node": "Bitmap Heap Scan on messages", + "shared_hit": 12, + "shared_read": 0, + "rows": 10.0, + "time_ms": 0.031, + "kind": "custom" + }, + { + "chat": "bg 10", + "chat_size": 10, + "page": "first", + "after": 0, + "source": "generic", + "node": "Index Scan using ix_messages_chat_id_created_at_id on messages", + "shared_hit": 12, + "shared_read": 0, + "rows": 10.0, + "time_ms": 0.026, + "kind": "generic" + }, + { + "chat": "bg 10", + "chat_size": 10, + "page": "first", + "after": 0, + "source": "no-index", + "node": "Seq Scan on messages", + "shared_hit": 100, + "shared_read": 0, + "rows": 10.0, + "time_ms": 0.132, + "kind": "custom" + }, + { + "chat": "bg 10", + "chat_size": 10, + "page": "first", + "after": 0, + "source": "chat_only", + "node": "Bitmap Heap Scan on messages", + "shared_hit": 12, + "shared_read": 0, + "rows": 10.0, + "time_ms": 0.03, + "kind": "custom" + }, + { + "chat": "bg 10", + "chat_size": 10, + "page": "first", + "after": 0, + "source": "covering", + "node": "Index Only Scan using bench_variant on messages", + "shared_hit": 3, + "shared_read": 0, + "rows": 10.0, + "time_ms": 0.018, + "kind": "custom" + } + ], + "rss_peak_mib": 184.6, + "write_cost": [ + { + "variant": "app", + "columns": "(chat_id, created_at, id)", + "rows": 5000, + "messages": 7800, + "index_bytes": 475136, + "index_bytes_per_message": 60.9, + "insert_us_per_message": [ + 5.57, + 4.92, + 5.86 + ], + "wal_bytes_per_message": [ + 498.9, + 487.3, + 487.3 + ], + "fpi_per_1000": [ + 11.2, + 20.2, + 20.2 + ], + "long_text": "ok" + }, + { + "variant": "chat_only", + "columns": "(chat_id)", + "rows": 5000, + "messages": 7800, + "index_bytes": 81920, + "index_bytes_per_message": 10.5, + "insert_us_per_message": [ + 4.77, + 5.09, + 4.73 + ], + "wal_bytes_per_message": [ + 398.8, + 398.8, + 398.8 + ], + "fpi_per_1000": [ + 18.0, + 18.0, + 18.0 + ], + "long_text": "ok" + }, + { + "variant": "covering", + "columns": "(chat_id, created_at, id) INCLUDE (sender_id, text)", + "rows": 5000, + "messages": 7800, + "index_bytes": 1245184, + "index_bytes_per_message": 159.6, + "insert_us_per_message": [ + 6.96, + 5.36, + 5.3 + ], + "wal_bytes_per_message": [ + 693.2, + 693.2, + 693.2 + ], + "fpi_per_1000": [ + 24.2, + 24.2, + 24.2 + ], + "long_text": "index row requires 12072 bytes, maximum size is 8191" + }, + { + "variant": "none", + "columns": null, + "rows": 5000, + "messages": 7800, + "index_bytes": 0, + "index_bytes_per_message": 0.0, + "insert_us_per_message": [ + 4.26, + 4.37, + 4.29 + ], + "wal_bytes_per_message": [ + 314.5, + 314.5, + 314.5 + ], + "fpi_per_1000": [ + 16.6, + 16.6, + 16.6 + ], + "long_text": "ok" + } + ] + }, + { + "size": 5000, + "messages_total": 8500, + "rss_before_mib": 121.1, + "rss_after_mib": 124.9, + "bytes_per_message": 473, + "prefill_seconds": 16.6, + "prefill_rate": 512, + "cursors": 49, + "maintenance_seconds": 0.2, + "messages_rows": 8500, + "messages_table_bytes": 1564672, + "messages_indexes_bytes": 1138688, + "db_bytes_per_message": 318, + "plans": [ + { + "chat": "read 5k", + "chat_size": 5000, + "page": "first", + "after": 0, + "source": "app", + "node": "Index Scan using ix_messages_chat_id_created_at_id on messages", + "shared_hit": 27, + "shared_read": 0, + "rows": 51.0, + "time_ms": 0.135, + "kind": "custom" + }, + { + "chat": "read 5k", + "chat_size": 5000, + "page": "middle", + "after": 2500, + "source": "app", + "node": "Index Scan using ix_messages_chat_id_created_at_id on messages", + "shared_hit": 54, + "shared_read": 0, + "rows": 51.0, + "time_ms": 0.13, + "kind": "generic" + }, + { + "chat": "read 5k", + "chat_size": 5000, + "page": "middle", + "after": 2500, + "source": "psql", + "node": "Index Scan using ix_messages_chat_id_created_at_id on messages", + "shared_hit": 54, + "shared_read": 0, + "rows": 51.0, + "time_ms": 0.063, + "kind": "custom" + }, + { + "chat": "read 5k", + "chat_size": 5000, + "page": "middle", + "after": 2500, + "source": "generic", + "node": "Index Scan using ix_messages_chat_id_created_at_id on messages", + "shared_hit": 54, + "shared_read": 0, + "rows": 51.0, + "time_ms": 0.064, + "kind": "generic" + }, + { + "chat": "read 5k", + "chat_size": 5000, + "page": "middle", + "after": 2500, + "source": "or-cursor", + "node": "Index Scan using ix_messages_chat_id_created_at_id on messages", + "shared_hit": 2555, + "shared_read": 0, + "rows": 51.0, + "time_ms": 0.402, + "kind": "custom" + }, + { + "chat": "read 5k", + "chat_size": 5000, + "page": "middle", + "after": 2500, + "source": "no-index", + "node": "Seq Scan on messages", + "shared_hit": 186, + "shared_read": 0, + "rows": 51.0, + "time_ms": 2.243, + "kind": "custom" + }, + { + "chat": "read 5k", + "chat_size": 5000, + "page": "middle", + "after": 2500, + "source": "chat_only", + "node": "Seq Scan on messages", + "shared_hit": 186, + "shared_read": 0, + "rows": 51.0, + "time_ms": 2.017, + "kind": "custom" + }, + { + "chat": "read 5k", + "chat_size": 5000, + "page": "middle", + "after": 2500, + "source": "covering", + "node": "Index Only Scan using bench_variant on messages", + "shared_hit": 5, + "shared_read": 0, + "rows": 51.0, + "time_ms": 0.047, + "kind": "custom" + }, + { + "chat": "read 5k", + "chat_size": 5000, + "page": "last", + "after": 4900, + "source": "app", + "node": "Index Scan using ix_messages_chat_id_created_at_id on messages", + "shared_hit": 53, + "shared_read": 0, + "rows": 51.0, + "time_ms": 0.119, + "kind": "generic" + }, + { + "chat": "bg 1k", + "chat_size": 1000, + "page": "first", + "after": 0, + "source": "app", + "node": "Index Scan using ix_messages_chat_id_created_at_id on messages", + "shared_hit": 47, + "shared_read": 0, + "rows": 51.0, + "time_ms": 0.118, + "kind": "custom" + }, + { + "chat": "bg 1k", + "chat_size": 1000, + "page": "middle", + "after": 500, + "source": "app", + "node": "Index Scan using ix_messages_chat_id_created_at_id on messages", + "shared_hit": 49, + "shared_read": 0, + "rows": 51.0, + "time_ms": 0.122, + "kind": "generic" + }, + { + "chat": "bg 1k", + "chat_size": 1000, + "page": "middle", + "after": 500, + "source": "psql", + "node": "Index Scan using ix_messages_chat_id_created_at_id on messages", + "shared_hit": 49, + "shared_read": 0, + "rows": 51.0, + "time_ms": 0.059, + "kind": "custom" + }, + { + "chat": "bg 1k", + "chat_size": 1000, + "page": "middle", + "after": 500, + "source": "generic", + "node": "Index Scan using ix_messages_chat_id_created_at_id on messages", + "shared_hit": 49, + "shared_read": 0, + "rows": 51.0, + "time_ms": 0.075, + "kind": "generic" + }, + { + "chat": "bg 1k", + "chat_size": 1000, + "page": "middle", + "after": 500, + "source": "or-cursor", + "node": "Index Scan using ix_messages_chat_id_created_at_id on messages", + "shared_hit": 531, + "shared_read": 0, + "rows": 51.0, + "time_ms": 0.134, + "kind": "custom" + }, + { + "chat": "bg 1k", + "chat_size": 1000, + "page": "middle", + "after": 500, + "source": "no-index", + "node": "Seq Scan on messages", + "shared_hit": 186, + "shared_read": 0, + "rows": 51.0, + "time_ms": 0.569, + "kind": "custom" + }, + { + "chat": "bg 1k", + "chat_size": 1000, + "page": "middle", + "after": 500, + "source": "chat_only", + "node": "Bitmap Heap Scan on messages", + "shared_hit": 187, + "shared_read": 0, + "rows": 51.0, + "time_ms": 0.467, + "kind": "custom" + }, + { + "chat": "bg 1k", + "chat_size": 1000, + "page": "middle", + "after": 500, + "source": "covering", + "node": "Index Only Scan using bench_variant on messages", + "shared_hit": 5, + "shared_read": 0, + "rows": 51.0, + "time_ms": 0.055, + "kind": "custom" + }, + { + "chat": "bg 1k", + "chat_size": 1000, + "page": "last", + "after": 900, + "source": "app", + "node": "Index Scan using ix_messages_chat_id_created_at_id on messages", + "shared_hit": 51, + "shared_read": 0, + "rows": 51.0, + "time_ms": 0.136, + "kind": "generic" + }, + { + "chat": "bg 100", + "chat_size": 100, + "page": "first", + "after": 0, + "source": "app", + "node": "Index Scan using ix_messages_chat_id_created_at_id on messages", + "shared_hit": 47, + "shared_read": 0, + "rows": 51.0, + "time_ms": 0.168, + "kind": "custom" + }, + { + "chat": "bg 100", + "chat_size": 100, + "page": "first", + "after": 0, + "source": "psql", + "node": "Index Scan using ix_messages_chat_id_created_at_id on messages", + "shared_hit": 47, + "shared_read": 0, + "rows": 51.0, + "time_ms": 0.08, + "kind": "custom" + }, + { + "chat": "bg 100", + "chat_size": 100, + "page": "first", + "after": 0, + "source": "generic", + "node": "Index Scan using ix_messages_chat_id_created_at_id on messages", + "shared_hit": 47, + "shared_read": 0, + "rows": 51.0, + "time_ms": 0.094, + "kind": "generic" + }, + { + "chat": "bg 100", + "chat_size": 100, + "page": "first", + "after": 0, + "source": "no-index", + "node": "Seq Scan on messages", + "shared_hit": 186, + "shared_read": 0, + "rows": 51.0, + "time_ms": 0.362, + "kind": "custom" + }, + { + "chat": "bg 100", + "chat_size": 100, + "page": "first", + "after": 0, + "source": "chat_only", + "node": "Bitmap Heap Scan on messages", + "shared_hit": 83, + "shared_read": 0, + "rows": 51.0, + "time_ms": 0.149, + "kind": "custom" + }, + { + "chat": "bg 100", + "chat_size": 100, + "page": "first", + "after": 0, + "source": "covering", + "node": "Index Only Scan using bench_variant on messages", + "shared_hit": 5, + "shared_read": 0, + "rows": 51.0, + "time_ms": 0.053, + "kind": "custom" + }, + { + "chat": "bg 10", + "chat_size": 10, + "page": "first", + "after": 0, + "source": "app", + "node": "Bitmap Heap Scan on messages", + "shared_hit": 12, + "shared_read": 0, + "rows": 10.0, + "time_ms": 0.088, + "kind": "custom" + }, + { + "chat": "bg 10", + "chat_size": 10, + "page": "first", + "after": 0, + "source": "psql", + "node": "Bitmap Heap Scan on messages", + "shared_hit": 12, + "shared_read": 0, + "rows": 10.0, + "time_ms": 0.049, + "kind": "custom" + }, + { + "chat": "bg 10", + "chat_size": 10, + "page": "first", + "after": 0, + "source": "generic", + "node": "Index Scan using ix_messages_chat_id_created_at_id on messages", + "shared_hit": 12, + "shared_read": 0, + "rows": 10.0, + "time_ms": 0.029, + "kind": "generic" + }, + { + "chat": "bg 10", + "chat_size": 10, + "page": "first", + "after": 0, + "source": "no-index", + "node": "Seq Scan on messages", + "shared_hit": 186, + "shared_read": 0, + "rows": 10.0, + "time_ms": 0.205, + "kind": "custom" + }, + { + "chat": "bg 10", + "chat_size": 10, + "page": "first", + "after": 0, + "source": "chat_only", + "node": "Bitmap Heap Scan on messages", + "shared_hit": 12, + "shared_read": 0, + "rows": 10.0, + "time_ms": 0.026, + "kind": "custom" + }, + { + "chat": "bg 10", + "chat_size": 10, + "page": "first", + "after": 0, + "source": "covering", + "node": "Index Only Scan using bench_variant on messages", + "shared_hit": 4, + "shared_read": 0, + "rows": 10.0, + "time_ms": 0.02, + "kind": "custom" + } + ], + "rss_peak_mib": 184.5, + "write_cost": [ + { + "variant": "app", + "columns": "(chat_id, created_at, id)", + "rows": 5000, + "messages": 11800, + "index_bytes": 712704, + "index_bytes_per_message": 60.4, + "insert_us_per_message": [ + 6.68, + 4.93, + 5.05 + ], + "wal_bytes_per_message": [ + 499.7, + 506.0, + 506.0 + ], + "fpi_per_1000": [ + 17.8, + 21.8, + 21.8 + ], + "long_text": "ok" + }, + { + "variant": "chat_only", + "columns": "(chat_id)", + "rows": 5000, + "messages": 11800, + "index_bytes": 106496, + "index_bytes_per_message": 9.0, + "insert_us_per_message": [ + 4.76, + 4.76, + 4.7 + ], + "wal_bytes_per_message": [ + 420.8, + 420.8, + 422.0 + ], + "fpi_per_1000": [ + 19.2, + 19.2, + 19.6 + ], + "long_text": "ok" + }, + { + "variant": "covering", + "columns": "(chat_id, created_at, id) INCLUDE (sender_id, text)", + "rows": 5000, + "messages": 11800, + "index_bytes": 1892352, + "index_bytes_per_message": 160.4, + "insert_us_per_message": [ + 5.81, + 5.45, + 5.87 + ], + "wal_bytes_per_message": [ + 702.6, + 702.6, + 702.6 + ], + "fpi_per_1000": [ + 25.0, + 25.0, + 25.2 + ], + "long_text": "index row requires 12072 bytes, maximum size is 8191" + }, + { + "variant": "none", + "columns": null, + "rows": 5000, + "messages": 11800, + "index_bytes": 0, + "index_bytes_per_message": 0.0, + "insert_us_per_message": [ + 4.7, + 4.27, + 4.25 + ], + "wal_bytes_per_message": [ + 335.5, + 335.5, + 335.5 + ], + "fpi_per_1000": [ + 17.6, + 17.8, + 17.8 + ], + "long_text": "ok" + } + ] + }, + { + "size": 10000, + "messages_total": 13500, + "rss_before_mib": 121.1, + "rss_after_mib": 125.1, + "bytes_per_message": 313, + "prefill_seconds": 26.2, + "prefill_rate": 515, + "cursors": 99, + "maintenance_seconds": 0.2, + "messages_rows": 13500, + "messages_table_bytes": 2449408, + "messages_indexes_bytes": 1990656, + "db_bytes_per_message": 329, + "plans": [ + { + "chat": "read 10k", + "chat_size": 10000, + "page": "first", + "after": 0, + "source": "app", + "node": "Index Scan using ix_messages_chat_id_created_at_id on messages", + "shared_hit": 18, + "shared_read": 0, + "rows": 51.0, + "time_ms": 0.166, + "kind": "custom" + }, + { + "chat": "read 10k", + "chat_size": 10000, + "page": "middle", + "after": 5000, + "source": "app", + "node": "Index Scan using ix_messages_chat_id_created_at_id on messages", + "shared_hit": 54, + "shared_read": 0, + "rows": 51.0, + "time_ms": 0.159, + "kind": "generic" + }, + { + "chat": "read 10k", + "chat_size": 10000, + "page": "middle", + "after": 5000, + "source": "psql", + "node": "Index Scan using ix_messages_chat_id_created_at_id on messages", + "shared_hit": 54, + "shared_read": 0, + "rows": 51.0, + "time_ms": 0.056, + "kind": "custom" + }, + { + "chat": "read 10k", + "chat_size": 10000, + "page": "middle", + "after": 5000, + "source": "generic", + "node": "Index Scan using ix_messages_chat_id_created_at_id on messages", + "shared_hit": 54, + "shared_read": 0, + "rows": 51.0, + "time_ms": 0.069, + "kind": "generic" + }, + { + "chat": "read 10k", + "chat_size": 10000, + "page": "middle", + "after": 5000, + "source": "or-cursor", + "node": "Index Scan using ix_messages_chat_id_created_at_id on messages", + "shared_hit": 5077, + "shared_read": 0, + "rows": 51.0, + "time_ms": 0.621, + "kind": "custom" + }, + { + "chat": "read 10k", + "chat_size": 10000, + "page": "middle", + "after": 5000, + "source": "no-index", + "node": "Seq Scan on messages", + "shared_hit": 294, + "shared_read": 0, + "rows": 51.0, + "time_ms": 3.76, + "kind": "custom" + }, + { + "chat": "read 10k", + "chat_size": 10000, + "page": "middle", + "after": 5000, + "source": "chat_only", + "node": "Seq Scan on messages", + "shared_hit": 294, + "shared_read": 0, + "rows": 51.0, + "time_ms": 3.726, + "kind": "custom" + }, + { + "chat": "read 10k", + "chat_size": 10000, + "page": "middle", + "after": 5000, + "source": "covering", + "node": "Index Only Scan using bench_variant on messages", + "shared_hit": 5, + "shared_read": 0, + "rows": 51.0, + "time_ms": 0.051, + "kind": "custom" + }, + { + "chat": "read 10k", + "chat_size": 10000, + "page": "last", + "after": 9900, + "source": "app", + "node": "Index Scan using ix_messages_chat_id_created_at_id on messages", + "shared_hit": 54, + "shared_read": 0, + "rows": 51.0, + "time_ms": 0.111, + "kind": "generic" + }, + { + "chat": "bg 1k", + "chat_size": 1000, + "page": "first", + "after": 0, + "source": "app", + "node": "Index Scan using ix_messages_chat_id_created_at_id on messages", + "shared_hit": 47, + "shared_read": 0, + "rows": 51.0, + "time_ms": 0.147, + "kind": "custom" + }, + { + "chat": "bg 1k", + "chat_size": 1000, + "page": "middle", + "after": 500, + "source": "app", + "node": "Index Scan using ix_messages_chat_id_created_at_id on messages", + "shared_hit": 46, + "shared_read": 0, + "rows": 51.0, + "time_ms": 0.129, + "kind": "generic" + }, + { + "chat": "bg 1k", + "chat_size": 1000, + "page": "middle", + "after": 500, + "source": "psql", + "node": "Index Scan using ix_messages_chat_id_created_at_id on messages", + "shared_hit": 46, + "shared_read": 0, + "rows": 51.0, + "time_ms": 0.054, + "kind": "custom" + }, + { + "chat": "bg 1k", + "chat_size": 1000, + "page": "middle", + "after": 500, + "source": "generic", + "node": "Index Scan using ix_messages_chat_id_created_at_id on messages", + "shared_hit": 46, + "shared_read": 0, + "rows": 51.0, + "time_ms": 0.066, + "kind": "generic" + }, + { + "chat": "bg 1k", + "chat_size": 1000, + "page": "middle", + "after": 500, + "source": "or-cursor", + "node": "Index Scan using ix_messages_chat_id_created_at_id on messages", + "shared_hit": 507, + "shared_read": 0, + "rows": 51.0, + "time_ms": 0.141, + "kind": "custom" + }, + { + "chat": "bg 1k", + "chat_size": 1000, + "page": "middle", + "after": 500, + "source": "no-index", + "node": "Seq Scan on messages", + "shared_hit": 294, + "shared_read": 0, + "rows": 51.0, + "time_ms": 1.061, + "kind": "custom" + }, + { + "chat": "bg 1k", + "chat_size": 1000, + "page": "middle", + "after": 500, + "source": "chat_only", + "node": "Bitmap Heap Scan on messages", + "shared_hit": 286, + "shared_read": 0, + "rows": 51.0, + "time_ms": 0.467, + "kind": "custom" + }, + { + "chat": "bg 1k", + "chat_size": 1000, + "page": "middle", + "after": 500, + "source": "covering", + "node": "Index Only Scan using bench_variant on messages", + "shared_hit": 5, + "shared_read": 0, + "rows": 51.0, + "time_ms": 0.051, + "kind": "custom" + }, + { + "chat": "bg 1k", + "chat_size": 1000, + "page": "last", + "after": 900, + "source": "app", + "node": "Index Scan using ix_messages_chat_id_created_at_id on messages", + "shared_hit": 47, + "shared_read": 0, + "rows": 51.0, + "time_ms": 0.131, + "kind": "generic" + }, + { + "chat": "bg 100", + "chat_size": 100, + "page": "first", + "after": 0, + "source": "app", + "node": "Index Scan using ix_messages_chat_id_created_at_id on messages", + "shared_hit": 51, + "shared_read": 0, + "rows": 51.0, + "time_ms": 0.157, + "kind": "custom" + }, + { + "chat": "bg 100", + "chat_size": 100, + "page": "first", + "after": 0, + "source": "psql", + "node": "Index Scan using ix_messages_chat_id_created_at_id on messages", + "shared_hit": 51, + "shared_read": 0, + "rows": 51.0, + "time_ms": 0.06, + "kind": "custom" + }, + { + "chat": "bg 100", + "chat_size": 100, + "page": "first", + "after": 0, + "source": "generic", + "node": "Index Scan using ix_messages_chat_id_created_at_id on messages", + "shared_hit": 51, + "shared_read": 0, + "rows": 51.0, + "time_ms": 0.072, + "kind": "generic" + }, + { + "chat": "bg 100", + "chat_size": 100, + "page": "first", + "after": 0, + "source": "no-index", + "node": "Seq Scan on messages", + "shared_hit": 294, + "shared_read": 0, + "rows": 51.0, + "time_ms": 0.415, + "kind": "custom" + }, + { + "chat": "bg 100", + "chat_size": 100, + "page": "first", + "after": 0, + "source": "chat_only", + "node": "Bitmap Heap Scan on messages", + "shared_hit": 95, + "shared_read": 0, + "rows": 51.0, + "time_ms": 0.131, + "kind": "custom" + }, + { + "chat": "bg 100", + "chat_size": 100, + "page": "first", + "after": 0, + "source": "covering", + "node": "Index Only Scan using bench_variant on messages", + "shared_hit": 4, + "shared_read": 0, + "rows": 51.0, + "time_ms": 0.051, + "kind": "custom" + }, + { + "chat": "bg 10", + "chat_size": 10, + "page": "first", + "after": 0, + "source": "app", + "node": "Index Scan using ix_messages_chat_id_created_at_id on messages", + "shared_hit": 12, + "shared_read": 0, + "rows": 10.0, + "time_ms": 0.043, + "kind": "custom" + }, + { + "chat": "bg 10", + "chat_size": 10, + "page": "first", + "after": 0, + "source": "psql", + "node": "Index Scan using ix_messages_chat_id_created_at_id on messages", + "shared_hit": 12, + "shared_read": 0, + "rows": 10.0, + "time_ms": 0.022, + "kind": "custom" + }, + { + "chat": "bg 10", + "chat_size": 10, + "page": "first", + "after": 0, + "source": "generic", + "node": "Index Scan using ix_messages_chat_id_created_at_id on messages", + "shared_hit": 12, + "shared_read": 0, + "rows": 10.0, + "time_ms": 0.026, + "kind": "generic" + }, + { + "chat": "bg 10", + "chat_size": 10, + "page": "first", + "after": 0, + "source": "no-index", + "node": "Seq Scan on messages", + "shared_hit": 294, + "shared_read": 0, + "rows": 10.0, + "time_ms": 0.358, + "kind": "custom" + }, + { + "chat": "bg 10", + "chat_size": 10, + "page": "first", + "after": 0, + "source": "chat_only", + "node": "Index Scan using bench_variant on messages", + "shared_hit": 12, + "shared_read": 0, + "rows": 10.0, + "time_ms": 0.023, + "kind": "custom" + }, + { + "chat": "bg 10", + "chat_size": 10, + "page": "first", + "after": 0, + "source": "covering", + "node": "Index Only Scan using bench_variant on messages", + "shared_hit": 4, + "shared_read": 0, + "rows": 10.0, + "time_ms": 0.019, + "kind": "custom" + } + ], + "rss_peak_mib": 184.5, + "write_cost": [ + { + "variant": "app", + "columns": "(chat_id, created_at, id)", + "rows": 5000, + "messages": 16800, + "index_bytes": 999424, + "index_bytes_per_message": 59.5, + "insert_us_per_message": [ + 6.31, + 5.12, + 5.01 + ], + "wal_bytes_per_message": [ + 557.4, + 540.2, + 541.6 + ], + "fpi_per_1000": [ + 19.0, + 31.4, + 31.6 + ], + "long_text": "ok" + }, + { + "variant": "chat_only", + "columns": "(chat_id)", + "rows": 5000, + "messages": 16800, + "index_bytes": 139264, + "index_bytes_per_message": 8.3, + "insert_us_per_message": [ + 5.69, + 4.8, + 4.72 + ], + "wal_bytes_per_message": [ + 454.4, + 451.6, + 450.2 + ], + "fpi_per_1000": [ + 27.6, + 29.2, + 29.4 + ], + "long_text": "ok" + }, + { + "variant": "covering", + "columns": "(chat_id, created_at, id) INCLUDE (sender_id, text)", + "rows": 5000, + "messages": 16800, + "index_bytes": 2695168, + "index_bytes_per_message": 160.4, + "insert_us_per_message": [ + 7.14, + 5.47, + 5.59 + ], + "wal_bytes_per_message": [ + 749.1, + 747.7, + 747.7 + ], + "fpi_per_1000": [ + 34.8, + 35.4, + 35.4 + ], + "long_text": "index row requires 12072 bytes, maximum size is 8191" + }, + { + "variant": "none", + "columns": null, + "rows": 5000, + "messages": 16800, + "index_bytes": 0, + "index_bytes_per_message": 0.0, + "insert_us_per_message": [ + 4.45, + 4.34, + 4.36 + ], + "wal_bytes_per_message": [ + 367.0, + 364.9, + 364.9 + ], + "fpi_per_1000": [ + 27.4, + 27.8, + 27.8 + ], + "long_text": "ok" + } + ] + } + ], + "limits": { + "api": { + "nano_cpus": 1000000000, + "memory": 2147483648, + "memory_swap": 2147483648, + "published_ports": {}, + "healthcheck": [ + "NONE" + ], + "log_driver": "local" + }, + "postgres": { + "nano_cpus": 4000000000, + "memory": 3221225472, + "memory_swap": 3221225472, + "published_ports": {}, + "healthcheck": [ + "CMD-SHELL", + "pg_isready -h 127.0.0.1 -U \"$POSTGRES_USER\" -d \"$POSTGRES_DB\"" + ], + "log_driver": "local" + }, + "valkey": { + "nano_cpus": 2000000000, + "memory": 536870912, + "memory_swap": 536870912, + "published_ports": {}, + "healthcheck": [ + "CMD-SHELL", + "test \"$(valkey-cli -p \"$VALKEY_PORT\" ping)\" = PONG" + ], + "log_driver": "local" + }, + "haproxy": { + "nano_cpus": 1000000000, + "memory": 268435456, + "memory_swap": 268435456, + "published_ports": {}, + "healthcheck": [ + "CMD", + "bash", + "-c", + "exec 3<>/dev/tcp/127.0.0.1/8404 && printf 'GET /lb/ready HTTP/1.0\\r\\n\\r\\n' >&3 && head -n 1 <&3 | grep -q ' 200 '" + ], + "log_driver": "local" + }, + "k6": { + "nano_cpus": 0, + "memory": 0, + "memory_swap": 0, + "published_ports": {}, + "healthcheck": null, + "log_driver": "local" + }, + "api_replicas": 1, + "max_connections": 100 + }, + "stand": { + "api_tcp_rmem": "4096 131072 524288", + "postgres": { + "image": "postgres:18.6-trixie@sha256:5a5a84b19854a9ffaa54082c166ff4ec27473a361e496e5ea167f298f2da9722", + "id": "sha256:f4fcd2b983483177b15d72d94fb3614736211554f7cac5c2cc54a05c75110b90", + "version": "18.6 (Debian 18.6-1.pgdg13+2)", + "settings": { + "autovacuum": "on", + "checkpoint_timeout": "5min", + "effective_cache_size": "4GB", + "fsync": "on", + "jit": "on", + "maintenance_work_mem": "64MB", + "max_connections": "100", + "max_wal_size": "1GB", + "plan_cache_mode": "auto", + "random_page_cost": "4", + "shared_buffers": "128MB", + "shared_preload_libraries": "auto_explain", + "synchronous_commit": "on", + "wal_level": "replica", + "work_mem": "4MB" + } + }, + "valkey": { + "image": "valkey/valkey:9.1.2-trixie@sha256:418652cfb58ef879d4978c33553735d7147016032d5aefaa14c828e611eb9dfd", + "id": "sha256:5a6ac3cceea0d4cebe48911dfa5f393f49feea86a2c55c5ac6b0ba733a1713b6", + "version": "9.1.2", + "maxmemory": "67108864", + "maxmemory-clients": "0", + "maxmemory-eviction-tenacity": "10", + "maxmemory-policy": "allkeys-lru", + "maxmemory-samples": "5" + }, + "haproxy": { + "image": "haproxy:3.4.6-trixie@sha256:e273915691a8eab3f105bf3e39fd4c29a4ecf334e33421903b5589d25e14db26", + "id": "sha256:a92cbb5d7b4ba27898706659bde5039cc86e4ebee44f243d410f268200f7406f", + "version": "HAProxy version 3.4.6-56332c5 2026/09/28 - https://haproxy.org/" + }, + "app_env": { + "APP__PORT": "8080", + "APP__RUN_MODE": "docker", + "AUTH__SESSION_TTL_SECONDS": "21600", + "CACHE__HOST": "valkey", + "CACHE__PORT": "6379", + "DATABASE__HOST": "postgres", + "DATABASE__NAME": "bench", + "DATABASE__PORT": "5432", + "DATABASE__USER": "bench", + "S3__BUCKET": "bench", + "S3__HOST": "s3", + "S3__PORT": "8333" + } + }, + "finished_at": "2026-10-31T20:36:08+00:00" +} diff --git a/evidence/bench/unit-of-work-before/prefill.csv b/evidence/bench/unit-of-work-before/prefill.csv new file mode 100644 index 00000000..e7c0f479 --- /dev/null +++ b/evidence/bench/unit-of-work-before/prefill.csv @@ -0,0 +1,4 @@ +size,chunk,messages_before,messages_after,duration_s,requests_ok,requests_failed,rps,error_ratio,p50_ms,p95_ms,p99_ms,max_ms,app_cpu_cores,rss_end_mib,mem_cgroup_end_mib,generator_cpu_cores,flags,db_cpu_cores,cell,attempt +1000,1,0,4500,8.129,4500,0,553.5,0.0,53.566,107.997,145.124,203.112,1.001,124.9,118.0,0.125,,0.211,, +5000,1,0,8500,16.609,8500,0,511.8,0.0,54.873,131.129,176.024,367.355,1.0,124.9,115.5,0.12,,0.226,, +10000,1,0,13500,26.218,13500,0,514.9,0.0,56.009,121.243,188.234,417.242,0.996,125.1,113.8,0.119,,0.22,, diff --git a/evidence/bench/unit-of-work-before/progress.json b/evidence/bench/unit-of-work-before/progress.json new file mode 100644 index 00000000..7945af79 --- /dev/null +++ b/evidence/bench/unit-of-work-before/progress.json @@ -0,0 +1,12 @@ +{ + "label": "unit-of-work-before", + "profile": "quick", + "stage": "done", + "size": 10000, + "runs_done": 18, + "runs_total": 18, + "elapsed_s": 232, + "eta_s": 0, + "warnings": [], + "updated_at": "2026-10-31T20:36:08+00:00" +} diff --git a/evidence/bench/unit-of-work-before/raw/prefill-10k-01.json b/evidence/bench/unit-of-work-before/raw/prefill-10k-01.json new file mode 100644 index 00000000..20a807a5 --- /dev/null +++ b/evidence/bench/unit-of-work-before/raw/prefill-10k-01.json @@ -0,0 +1 @@ +{"options":{"summaryTimeUnit":"","noColor":true,"summaryTrendStats":["avg","min","med","p(50)","p(95)","p(99)","max"]},"state":{"isStdOutTTY":false,"isStdErrTTY":false,"testRunDurationMs":26217.897831},"metrics":{"iteration_duration":{"type":"trend","contains":"time","values":{"med":56.0817085,"p(50)":56.0817085,"p(95)":121.36764969999999,"p(99)":188.31833032999998,"max":417.289458,"avg":62.08268073674041,"min":10.908}},"data_sent":{"type":"counter","contains":"data","values":{"count":5076000,"rate":193608.19973896406}},"http_req_blocked":{"values":{"p(95)":0.002958,"p(99)":0.006208,"max":1.231625,"avg":0.0036268236296294123,"min":0.0005,"med":0.001292,"p(50)":0.001292},"type":"trend","contains":"time"},"http_reqs":{"values":{"count":13500,"rate":514.9154248376703},"type":"counter","contains":"default"},"checks":{"type":"rate","contains":"default","values":{"rate":1,"passes":13500,"fails":0}},"http_req_connecting":{"values":{"p(95)":0,"p(99)":0,"max":0.405125,"avg":0.00043700940740740743,"min":0,"med":0,"p(50)":0},"type":"trend","contains":"time"},"http_req_sending":{"type":"trend","contains":"time","values":{"avg":0.007020301851851752,"min":0.002,"med":0.00525,"p(50)":0.00525,"p(95)":0.015375,"p(99)":0.027752079999999974,"max":0.41175}},"data_received":{"type":"counter","contains":"data","values":{"rate":252308.55817045848,"count":6615000}},"http_req_failed":{"type":"rate","contains":"default","values":{"rate":0,"passes":0,"fails":13500}},"iterations":{"type":"counter","contains":"default","values":{"count":13500,"rate":514.9154248376703}},"vus_max":{"type":"gauge","contains":"default","values":{"value":32,"min":32,"max":32}},"http_req_duration{expected_response:true}":{"type":"trend","contains":"time","values":{"p(95)":121.24275384999996,"p(99)":188.23404533,"max":417.241917,"avg":61.99720407022209,"min":10.842917,"med":56.0085415,"p(50)":56.0085415},"thresholds":{"max>=0":{"ok":true}}},"vus":{"type":"gauge","contains":"default","values":{"value":32,"min":32,"max":32}},"http_req_tls_handshaking":{"type":"trend","contains":"time","values":{"med":0,"p(50)":0,"p(95)":0,"p(99)":0,"max":0,"avg":0,"min":0}},"http_req_receiving":{"type":"trend","contains":"time","values":{"avg":0.021931994296296276,"min":0.004875,"med":0.017292,"p(50)":0.017292,"p(95)":0.04758604999999998,"p(99)":0.07875458999999994,"max":1.298125}},"http_req_waiting":{"type":"trend","contains":"time","values":{"min":10.821416,"med":55.973562,"p(50)":55.973562,"p(95)":121.20813124999995,"p(99)":188.21679398999999,"max":417.229417,"avg":61.96825177407398}},"http_req_duration":{"contains":"time","values":{"p(99)":188.23404533,"max":417.241917,"avg":61.99720407022209,"min":10.842917,"med":56.0085415,"p(50)":56.0085415,"p(95)":121.24275384999996},"type":"trend"}},"root_group":{"name":"","path":"","id":"d41d8cd98f00b204e9800998ecf8427e","groups":[],"checks":[{"path":"::message 201","id":"6445aff337e1ade0bc10402fbac79882","passes":13500,"fails":0,"name":"message 201"}]}} \ No newline at end of file diff --git a/evidence/bench/unit-of-work-before/raw/prefill-1k-01.json b/evidence/bench/unit-of-work-before/raw/prefill-1k-01.json new file mode 100644 index 00000000..f2165950 --- /dev/null +++ b/evidence/bench/unit-of-work-before/raw/prefill-1k-01.json @@ -0,0 +1 @@ +{"options":{"summaryTrendStats":["avg","min","med","p(50)","p(95)","p(99)","max"],"summaryTimeUnit":"","noColor":true},"state":{"isStdOutTTY":false,"isStdErrTTY":false,"testRunDurationMs":8129.394198},"metrics":{"http_req_connecting":{"type":"trend","contains":"time","values":{"p(95)":0,"p(99)":0,"max":0.238542,"avg":0.000649676,"min":0,"med":0,"p(50)":0}},"iterations":{"type":"counter","contains":"default","values":{"rate":553.5467822568,"count":4500}},"vus":{"type":"gauge","contains":"default","values":{"value":32,"min":32,"max":32}},"checks":{"type":"rate","contains":"default","values":{"fails":0,"rate":1,"passes":4500}},"iteration_duration":{"type":"trend","contains":"time","values":{"min":11.12675,"med":53.629854,"p(50)":53.629854,"p(95)":108.05101904999998,"p(99)":145.20654075,"max":203.160667,"avg":57.65925558577789}},"http_req_tls_handshaking":{"type":"trend","contains":"time","values":{"avg":0,"min":0,"med":0,"p(50)":0,"p(95)":0,"p(99)":0,"max":0}},"http_req_duration":{"type":"trend","contains":"time","values":{"avg":57.58373600199996,"min":11.06175,"med":53.565521000000004,"p(50)":53.565521000000004,"p(95)":107.99710415,"p(99)":145.12359458,"max":203.112167}},"http_req_blocked":{"contains":"time","values":{"min":0.0005,"med":0.001208,"p(50)":0.001208,"p(95)":0.002542,"p(99)":0.010333839999999997,"max":1.939167,"avg":0.01047257377777748},"type":"trend"},"http_req_sending":{"contains":"time","values":{"med":0.004709,"p(50)":0.004709,"p(95)":0.013417,"p(99)":0.02838749999999995,"max":0.492583,"avg":0.0068133179999999745,"min":0.002167},"type":"trend"},"data_received":{"type":"counter","contains":"data","values":{"count":2205000,"rate":271237.923305832}},"data_sent":{"type":"counter","contains":"data","values":{"count":1692000,"rate":208133.59012855683}},"http_req_receiving":{"type":"trend","contains":"time","values":{"max":0.158708,"avg":0.019934207999999964,"min":0.005,"med":0.016542,"p(50)":0.016542,"p(95)":0.04138544999999996,"p(99)":0.06270925}},"http_req_failed":{"type":"rate","contains":"default","values":{"rate":0,"passes":0,"fails":4500}},"http_req_duration{expected_response:true}":{"contains":"time","values":{"p(50)":53.565521000000004,"p(95)":107.99710415,"p(99)":145.12359458,"max":203.112167,"avg":57.58373600199996,"min":11.06175,"med":53.565521000000004},"thresholds":{"max>=0":{"ok":true}},"type":"trend"},"http_reqs":{"type":"counter","contains":"default","values":{"count":4500,"rate":553.5467822568}},"http_req_waiting":{"type":"trend","contains":"time","values":{"avg":57.55698847600002,"min":11.042792,"med":53.5413955,"p(50)":53.5413955,"p(95)":107.96220805,"p(99)":145.10563825,"max":203.095375}},"vus_max":{"type":"gauge","contains":"default","values":{"value":32,"min":32,"max":32}}},"root_group":{"id":"d41d8cd98f00b204e9800998ecf8427e","groups":[],"checks":[{"name":"message 201","path":"::message 201","id":"6445aff337e1ade0bc10402fbac79882","passes":4500,"fails":0}],"name":"","path":""}} \ No newline at end of file diff --git a/evidence/bench/unit-of-work-before/raw/prefill-5k-01.json b/evidence/bench/unit-of-work-before/raw/prefill-5k-01.json new file mode 100644 index 00000000..e3ea2efc --- /dev/null +++ b/evidence/bench/unit-of-work-before/raw/prefill-5k-01.json @@ -0,0 +1 @@ +{"root_group":{"name":"","path":"","id":"d41d8cd98f00b204e9800998ecf8427e","groups":[],"checks":[{"passes":8500,"fails":0,"name":"message 201","path":"::message 201","id":"6445aff337e1ade0bc10402fbac79882"}]},"options":{"summaryTrendStats":["avg","min","med","p(50)","p(95)","p(99)","max"],"summaryTimeUnit":"","noColor":true},"state":{"isStdOutTTY":false,"isStdErrTTY":false,"testRunDurationMs":16608.764133},"metrics":{"http_req_waiting":{"type":"trend","contains":"time","values":{"med":54.8474165,"p(50)":54.8474165,"p(95)":131.10701635,"p(99)":175.99143532999997,"max":367.328875,"avg":62.34265841941195,"min":10.559792}},"iterations":{"values":{"count":8500,"rate":511.7779945535698},"type":"counter","contains":"default"},"vus":{"type":"gauge","contains":"default","values":{"value":32,"min":32,"max":32}},"http_req_receiving":{"values":{"p(99)":0.09283716999999997,"max":1.376042,"avg":0.02192834011764702,"min":0.004625,"med":0.016208,"p(50)":0.016208,"p(95)":0.05},"type":"trend","contains":"time"},"vus_max":{"type":"gauge","contains":"default","values":{"min":32,"max":32,"value":32}},"http_req_blocked":{"type":"trend","contains":"time","values":{"avg":0.00597289235294084,"min":0.000458,"med":0.001167,"p(50)":0.001167,"p(95)":0.003167,"p(99)":0.0072520799999999845,"max":1.702709}},"http_req_tls_handshaking":{"contains":"time","values":{"p(99)":0,"max":0,"avg":0,"min":0,"med":0,"p(50)":0,"p(95)":0},"type":"trend"},"http_req_duration":{"type":"trend","contains":"time","values":{"p(99)":176.02381499999996,"max":367.35525,"avg":62.371295071764656,"min":10.578875,"med":54.872604,"p(50)":54.872604,"p(95)":131.1289899}},"data_sent":{"contains":"data","values":{"count":3196000,"rate":192428.52595214226},"type":"counter"},"http_reqs":{"values":{"count":8500,"rate":511.7779945535698},"type":"counter","contains":"default"},"http_req_failed":{"type":"rate","contains":"default","values":{"rate":0,"passes":0,"fails":8500}},"data_received":{"type":"counter","contains":"data","values":{"count":4165000,"rate":250771.2173312492}},"http_req_sending":{"type":"trend","contains":"time","values":{"p(50)":0.004625,"p(95)":0.016334,"p(99)":0.03304366999999999,"max":0.2145,"avg":0.006708312235294045,"min":0.001875,"med":0.004625}},"http_req_duration{expected_response:true}":{"thresholds":{"max>=0":{"ok":true}},"type":"trend","contains":"time","values":{"min":10.578875,"med":54.872604,"p(50)":54.872604,"p(95)":131.1289899,"p(99)":176.02381499999996,"max":367.35525,"avg":62.371295071764656}},"http_req_connecting":{"values":{"avg":0.0006276516470588236,"min":0,"med":0,"p(50)":0,"p(95)":0,"p(99)":0,"max":0.821208},"type":"trend","contains":"time"},"checks":{"type":"rate","contains":"default","values":{"rate":1,"passes":8500,"fails":0}},"iteration_duration":{"type":"trend","contains":"time","values":{"p(99)":176.63479883,"max":367.434584,"avg":62.4581675835293,"min":10.6265,"med":54.941229500000006,"p(50)":54.941229500000006,"p(95)":131.26773605}}}} \ No newline at end of file diff --git a/evidence/bench/unit-of-work-before/raw/read-10k-c1-r1.json b/evidence/bench/unit-of-work-before/raw/read-10k-c1-r1.json new file mode 100644 index 00000000..7c9b3405 --- /dev/null +++ b/evidence/bench/unit-of-work-before/raw/read-10k-c1-r1.json @@ -0,0 +1 @@ +{"root_group":{"id":"d41d8cd98f00b204e9800998ecf8427e","groups":[],"checks":[{"name":"status 200","path":"::status 200","id":"fad9fa412b86fcb03bee97c80dcd61f1","passes":2253,"fails":0},{"name":"full page","path":"::full page","id":"736a4affc4111c8285c374c0b4d25aed","passes":2253,"fails":0}],"name":"","path":""},"options":{"summaryTrendStats":["avg","min","med","p(50)","p(95)","p(99)","max"],"summaryTimeUnit":"","noColor":true},"state":{"isStdOutTTY":false,"isStdErrTTY":false,"testRunDurationMs":5000.271503},"metrics":{"iterations":{"type":"counter","contains":"default","values":{"count":2253,"rate":450.57553347818686}},"http_req_failed":{"values":{"rate":0,"passes":0,"fails":2253},"type":"rate","contains":"default"},"http_req_blocked":{"type":"trend","contains":"time","values":{"med":0.001084,"p(50)":0.001084,"p(95)":0.003083,"p(99)":0.005101999999999997,"max":1.077708,"avg":0.002211543719485143,"min":0.000541}},"http_req_duration{expected_response:true}":{"contains":"time","values":{"max":48.953416,"avg":2.130954683976918,"min":1.450709,"med":1.854375,"p(50)":1.854375,"p(95)":3.1597245999999988,"p(99)":6.159564999999994},"thresholds":{"max>=0":{"ok":true}},"type":"trend"},"http_req_tls_handshaking":{"values":{"med":0,"p(50)":0,"p(95)":0,"p(99)":0,"max":0,"avg":0,"min":0},"type":"trend","contains":"time"},"http_req_waiting":{"type":"trend","contains":"time","values":{"p(50)":1.829334,"p(95)":3.076249599999998,"p(99)":5.8753721599999995,"max":46.974291,"avg":2.093924473146916,"min":1.435209,"med":1.829334}},"data_received":{"type":"counter","contains":"data","values":{"count":32801427,"rate":6559929.191908922}},"http_req_duration":{"type":"trend","contains":"time","values":{"max":48.953416,"avg":2.130954683976918,"min":1.450709,"med":1.854375,"p(50)":1.854375,"p(95)":3.1597245999999988,"p(99)":6.159564999999994}},"data_sent":{"values":{"rate":188340.57299388212,"count":941754},"type":"counter","contains":"data"},"checks":{"type":"rate","contains":"default","values":{"passes":4506,"fails":0,"rate":1}},"vus":{"type":"gauge","contains":"default","values":{"value":1,"min":1,"max":1}},"http_req_connecting":{"type":"trend","contains":"time","values":{"p(99)":0,"max":0.133541,"avg":0.00005927252552152685,"min":0,"med":0,"p(50)":0,"p(95)":0}},"http_req_sending":{"type":"trend","contains":"time","values":{"p(99)":0.02248167999999998,"max":0.838458,"avg":0.005323498890368457,"min":0.001584,"med":0.003125,"p(50)":0.003125,"p(95)":0.013391799999999995}},"http_req_receiving":{"type":"trend","contains":"time","values":{"p(99)":0.12193715999999993,"max":1.96425,"avg":0.03170671193963595,"min":0.011792,"med":0.021958,"p(50)":0.021958,"p(95)":0.07168319999999995}},"iteration_duration":{"type":"trend","contains":"time","values":{"p(95)":3.307266199999999,"p(99)":6.396825319999996,"max":52.15775,"avg":2.2152040532623154,"min":1.500041,"med":1.926208,"p(50)":1.926208}},"vus_max":{"values":{"value":1,"min":1,"max":1},"type":"gauge","contains":"default"},"http_reqs":{"values":{"count":2253,"rate":450.57553347818686},"type":"counter","contains":"default"}}} \ No newline at end of file diff --git a/evidence/bench/unit-of-work-before/raw/read-10k-c16-r1.json b/evidence/bench/unit-of-work-before/raw/read-10k-c16-r1.json new file mode 100644 index 00000000..27b6b054 --- /dev/null +++ b/evidence/bench/unit-of-work-before/raw/read-10k-c16-r1.json @@ -0,0 +1 @@ +{"root_group":{"id":"d41d8cd98f00b204e9800998ecf8427e","groups":[],"checks":[{"id":"fad9fa412b86fcb03bee97c80dcd61f1","passes":3053,"fails":0,"name":"status 200","path":"::status 200"},{"id":"736a4affc4111c8285c374c0b4d25aed","passes":3053,"fails":0,"name":"full page","path":"::full page"}],"name":"","path":""},"options":{"summaryTrendStats":["avg","min","med","p(50)","p(95)","p(99)","max"],"summaryTimeUnit":"","noColor":true},"state":{"isStdOutTTY":false,"isStdErrTTY":false,"testRunDurationMs":5020.045753},"metrics":{"http_req_tls_handshaking":{"values":{"avg":0,"min":0,"med":0,"p(50)":0,"p(95)":0,"p(99)":0,"max":0},"type":"trend","contains":"time"},"http_req_failed":{"type":"rate","contains":"default","values":{"rate":0,"passes":0,"fails":3053}},"checks":{"type":"rate","contains":"default","values":{"rate":1,"passes":6106,"fails":0}},"http_req_connecting":{"type":"trend","contains":"time","values":{"avg":0.0005948110055682934,"min":0,"med":0,"p(50)":0,"p(95)":0,"p(99)":0,"max":0.3855}},"data_sent":{"type":"counter","contains":"data","values":{"count":1276154,"rate":254211.6273018757}},"vus":{"type":"gauge","contains":"default","values":{"value":16,"min":16,"max":16}},"http_req_duration":{"contains":"time","values":{"avg":26.181166798886302,"min":7.941916,"med":22.064041,"p(50)":22.064041,"p(95)":56.76235899999999,"p(99)":79.45444183999999,"max":216.868917},"type":"trend"},"http_req_sending":{"type":"trend","contains":"time","values":{"avg":0.0049047608909270025,"min":0.001625,"med":0.003,"p(50)":0.003,"p(95)":0.013350399999999995,"p(99)":0.028433839999999995,"max":0.291166}},"http_req_blocked":{"contains":"time","values":{"max":0.978125,"avg":0.005365760890927007,"min":0.000458,"med":0.000917,"p(50)":0.000917,"p(95)":0.0036833999999999947,"p(99)":0.00958348},"type":"trend"},"vus_max":{"type":"gauge","contains":"default","values":{"value":16,"min":16,"max":16}},"data_received":{"contains":"data","values":{"count":44448627,"rate":8854227.4686316},"type":"counter"},"http_req_duration{expected_response:true}":{"type":"trend","contains":"time","values":{"avg":26.181166798886302,"min":7.941916,"med":22.064041,"p(50)":22.064041,"p(95)":56.76235899999999,"p(99)":79.45444183999999,"max":216.868917},"thresholds":{"max>=0":{"ok":true}}},"iterations":{"type":"counter","contains":"default","values":{"count":3053,"rate":608.1617878035304}},"http_reqs":{"type":"counter","contains":"default","values":{"count":3053,"rate":608.1617878035304}},"http_req_waiting":{"contains":"time","values":{"avg":26.148865134621694,"min":7.918167,"med":22.042416,"p(50)":22.042416,"p(95)":56.74389139999999,"p(99)":79.375535,"max":216.794583},"type":"trend"},"iteration_duration":{"type":"trend","contains":"time","values":{"avg":26.265951053717636,"min":8.001958,"med":22.146833,"p(50)":22.146833,"p(95)":56.88824999999999,"p(99)":79.64376315999999,"max":217.035042}},"http_req_receiving":{"contains":"time","values":{"avg":0.02739690337373078,"min":0.007542,"med":0.019208,"p(50)":0.019208,"p(95)":0.07083299999999991,"p(99)":0.13634999999999997,"max":0.743542},"type":"trend"}}} \ No newline at end of file diff --git a/evidence/bench/unit-of-work-before/raw/read-10k-c4-r1.json b/evidence/bench/unit-of-work-before/raw/read-10k-c4-r1.json new file mode 100644 index 00000000..63f026e0 --- /dev/null +++ b/evidence/bench/unit-of-work-before/raw/read-10k-c4-r1.json @@ -0,0 +1 @@ +{"root_group":{"name":"","path":"","id":"d41d8cd98f00b204e9800998ecf8427e","groups":[],"checks":[{"name":"status 200","path":"::status 200","id":"fad9fa412b86fcb03bee97c80dcd61f1","passes":3164,"fails":0},{"name":"full page","path":"::full page","id":"736a4affc4111c8285c374c0b4d25aed","passes":3164,"fails":0}]},"options":{"summaryTrendStats":["avg","min","med","p(50)","p(95)","p(99)","max"],"summaryTimeUnit":"","noColor":true},"state":{"isStdErrTTY":false,"testRunDurationMs":5004.397627,"isStdOutTTY":false},"metrics":{"http_req_sending":{"type":"trend","contains":"time","values":{"p(95)":0.012910699999999994,"p(99)":0.025209,"max":0.163083,"avg":0.0050704216182048505,"min":0.001542,"med":0.003375,"p(50)":0.003375}},"data_received":{"type":"counter","contains":"data","values":{"rate":9204839.310023915,"count":46064676}},"http_req_duration{expected_response:true}":{"type":"trend","contains":"time","values":{"p(99)":14.285878459999994,"max":55.594459,"avg":6.2370559108723205,"min":3.327209,"med":5.6359794999999995,"p(50)":5.6359794999999995,"p(95)":8.469265149999998},"thresholds":{"max>=0":{"ok":true}}},"http_req_tls_handshaking":{"type":"trend","contains":"time","values":{"p(50)":0,"p(95)":0,"p(99)":0,"max":0,"avg":0,"min":0,"med":0}},"http_req_connecting":{"type":"trend","contains":"time","values":{"min":0,"med":0,"p(50)":0,"p(95)":0,"p(99)":0,"max":0.201958,"avg":0.00019118710493046777}},"vus":{"type":"gauge","contains":"default","values":{"value":4,"min":4,"max":4}},"http_req_blocked":{"type":"trend","contains":"time","values":{"avg":0.002943344500632133,"min":0.0005,"med":0.001042,"p(50)":0.001042,"p(95)":0.003167,"p(99)":0.006640169999999999,"max":1.206834}},"iteration_duration":{"type":"trend","contains":"time","values":{"p(50)":5.7143125,"p(95)":8.6252608,"p(99)":14.427661249999995,"max":55.678792,"avg":6.320211902338795,"min":3.404083,"med":5.7143125}},"checks":{"type":"rate","contains":"default","values":{"passes":6328,"fails":0,"rate":1}},"http_req_duration":{"values":{"p(99)":14.285878459999994,"max":55.594459,"avg":6.2370559108723205,"min":3.327209,"med":5.6359794999999995,"p(50)":5.6359794999999995,"p(95)":8.469265149999998},"type":"trend","contains":"time"},"http_reqs":{"type":"counter","contains":"default","values":{"count":3164,"rate":632.2439254086074}},"http_req_waiting":{"contains":"time","values":{"min":3.305417,"med":5.605938,"p(50)":5.605938,"p(95)":8.4078536,"p(99)":14.12857749999999,"max":55.554666,"avg":6.202394768963339},"type":"trend"},"http_req_failed":{"type":"rate","contains":"default","values":{"rate":0,"passes":0,"fails":3164}},"data_sent":{"type":"counter","contains":"data","values":{"count":1322552,"rate":264277.9608207979}},"vus_max":{"type":"gauge","contains":"default","values":{"max":4,"value":4,"min":4}},"iterations":{"type":"counter","contains":"default","values":{"rate":632.2439254086074,"count":3164}},"http_req_receiving":{"contains":"time","values":{"p(95)":0.06993379999999998,"p(99)":0.12717124999999999,"max":1.720959,"avg":0.029590720290771172,"min":0.009,"med":0.0203335,"p(50)":0.0203335},"type":"trend"}}} \ No newline at end of file diff --git a/evidence/bench/unit-of-work-before/raw/read-1k-c1-r1.json b/evidence/bench/unit-of-work-before/raw/read-1k-c1-r1.json new file mode 100644 index 00000000..36a3d4a4 --- /dev/null +++ b/evidence/bench/unit-of-work-before/raw/read-1k-c1-r1.json @@ -0,0 +1 @@ +{"root_group":{"checks":[{"name":"status 200","path":"::status 200","id":"fad9fa412b86fcb03bee97c80dcd61f1","passes":2489,"fails":0},{"fails":0,"name":"full page","path":"::full page","id":"736a4affc4111c8285c374c0b4d25aed","passes":2489}],"name":"","path":"","id":"d41d8cd98f00b204e9800998ecf8427e","groups":[]},"options":{"summaryTimeUnit":"","noColor":true,"summaryTrendStats":["avg","min","med","p(50)","p(95)","p(99)","max"]},"state":{"isStdOutTTY":false,"isStdErrTTY":false,"testRunDurationMs":5001.461169},"metrics":{"http_req_duration{expected_response:true}":{"thresholds":{"max>=0":{"ok":true}},"type":"trend","contains":"time","values":{"max":3.887292,"avg":1.9278422800321393,"min":1.5285,"med":1.855875,"p(50)":1.855875,"p(95)":2.4594664,"p(99)":2.9532430799999996}},"iterations":{"type":"counter","contains":"default","values":{"count":2489,"rate":497.65456851435573}},"vus":{"type":"gauge","contains":"default","values":{"value":1,"min":1,"max":1}},"http_req_tls_handshaking":{"type":"trend","contains":"time","values":{"p(95)":0,"p(99)":0,"max":0,"avg":0,"min":0,"med":0,"p(50)":0}},"data_sent":{"type":"counter","contains":"data","values":{"count":1040402,"rate":208019.6096390007}},"http_req_connecting":{"type":"trend","contains":"time","values":{"min":0,"med":0,"p(50)":0,"p(95)":0,"p(99)":0,"max":0.1185,"avg":0.00004760948171956609}},"checks":{"contains":"default","values":{"rate":1,"passes":4978,"fails":0},"type":"rate"},"http_req_duration":{"type":"trend","contains":"time","values":{"p(95)":2.4594664,"p(99)":2.9532430799999996,"max":3.887292,"avg":1.9278422800321393,"min":1.5285,"med":1.855875,"p(50)":1.855875}},"http_req_failed":{"contains":"default","values":{"passes":0,"fails":2489,"rate":0},"type":"rate"},"http_reqs":{"type":"counter","contains":"default","values":{"count":2489,"rate":497.65456851435573}},"http_req_blocked":{"type":"trend","contains":"time","values":{"p(99)":0.004347999999999998,"max":0.4935,"avg":0.0016562591402169465,"min":0.000583,"med":0.001208,"p(50)":0.001208,"p(95)":0.0024835999999999955}},"http_req_sending":{"type":"trend","contains":"time","values":{"max":0.1295,"avg":0.004578830453997602,"min":0.00175,"med":0.003417,"p(50)":0.003417,"p(95)":0.010566599999999995,"p(99)":0.02178311999999999}},"http_req_receiving":{"type":"trend","contains":"time","values":{"p(99)":0.09022303999999998,"max":0.437791,"avg":0.02939842948975484,"min":0.012542,"med":0.023833,"p(50)":0.023833,"p(95)":0.05711639999999999}},"vus_max":{"values":{"max":1,"value":1,"min":1},"type":"gauge","contains":"default"},"http_req_waiting":{"type":"trend","contains":"time","values":{"med":1.824667,"p(50)":1.824667,"p(95)":2.4054667999999997,"p(99)":2.86957696,"max":3.795709,"avg":1.8938650200883875,"min":1.506584}},"data_received":{"type":"counter","contains":"data","values":{"count":36237351,"rate":7245352.863000505}},"iteration_duration":{"values":{"p(50)":1.928834,"p(95)":2.579233,"p(99)":3.10140196,"max":4.283792,"avg":2.0054184089995983,"min":1.586875,"med":1.928834},"type":"trend","contains":"time"}}} \ No newline at end of file diff --git a/evidence/bench/unit-of-work-before/raw/read-1k-c16-r1.json b/evidence/bench/unit-of-work-before/raw/read-1k-c16-r1.json new file mode 100644 index 00000000..1a41c6a5 --- /dev/null +++ b/evidence/bench/unit-of-work-before/raw/read-1k-c16-r1.json @@ -0,0 +1 @@ +{"root_group":{"checks":[{"path":"::status 200","id":"fad9fa412b86fcb03bee97c80dcd61f1","passes":3513,"fails":0,"name":"status 200"},{"name":"full page","path":"::full page","id":"736a4affc4111c8285c374c0b4d25aed","passes":3513,"fails":0}],"name":"","path":"","id":"d41d8cd98f00b204e9800998ecf8427e","groups":[]},"options":{"noColor":true,"summaryTrendStats":["avg","min","med","p(50)","p(95)","p(99)","max"],"summaryTimeUnit":""},"state":{"isStdOutTTY":false,"isStdErrTTY":false,"testRunDurationMs":5016.84253},"metrics":{"http_req_blocked":{"type":"trend","contains":"time","values":{"avg":0.0038652063763165647,"min":0.000458,"med":0.000833,"p(50)":0.000833,"p(95)":0.00175,"p(99)":0.004948039999999997,"max":0.896958}},"http_req_connecting":{"type":"trend","contains":"time","values":{"p(99)":0,"max":0.369333,"avg":0.0005176606888699117,"min":0,"med":0,"p(50)":0,"p(95)":0}},"http_req_sending":{"type":"trend","contains":"time","values":{"max":0.081167,"avg":0.0033468306290919824,"min":0.001708,"med":0.002709,"p(50)":0.002709,"p(95)":0.005933399999999994,"p(99)":0.014454999999999989}},"http_req_receiving":{"values":{"med":0.017459,"p(50)":0.017459,"p(95)":0.040733399999999975,"p(99)":0.08879687999999997,"max":0.717167,"avg":0.021207658411614004,"min":0.006875},"type":"trend","contains":"time"},"checks":{"type":"rate","contains":"default","values":{"rate":1,"passes":7026,"fails":0}},"http_req_duration{expected_response:true}":{"type":"trend","contains":"time","values":{"min":8.515959,"med":20.992125,"p(50)":20.992125,"p(95)":39.748124999999995,"p(99)":61.90779,"max":85.8895,"avg":22.743520846569826},"thresholds":{"max>=0":{"ok":true}}},"http_req_duration":{"type":"trend","contains":"time","values":{"p(50)":20.992125,"p(95)":39.748124999999995,"p(99)":61.90779,"max":85.8895,"avg":22.743520846569826,"min":8.515959,"med":20.992125}},"http_reqs":{"type":"counter","contains":"default","values":{"count":3513,"rate":700.2412332045033}},"http_req_tls_handshaking":{"type":"trend","contains":"time","values":{"avg":0,"min":0,"med":0,"p(50)":0,"p(95)":0,"p(99)":0,"max":0}},"vus":{"type":"gauge","contains":"default","values":{"value":16,"min":16,"max":16}},"iterations":{"type":"counter","contains":"default","values":{"count":3513,"rate":700.2412332045033}},"data_received":{"type":"counter","contains":"data","values":{"count":51145767,"rate":10194812.114224363}},"iteration_duration":{"type":"trend","contains":"time","values":{"med":21.050208,"p(50)":21.050208,"p(95)":39.80692539999999,"p(99)":61.97183496,"max":85.983333,"avg":22.810347667805306,"min":8.574542}},"http_req_waiting":{"type":"trend","contains":"time","values":{"med":20.971459,"p(50)":20.971459,"p(95)":39.728266999999995,"p(99)":61.880613000000004,"max":85.871209,"avg":22.718966357529222,"min":8.490875}},"http_req_failed":{"type":"rate","contains":"default","values":{"fails":3513,"rate":0,"passes":0}},"data_sent":{"values":{"count":1468434,"rate":292700.83547948237},"type":"counter","contains":"data"},"vus_max":{"type":"gauge","contains":"default","values":{"value":16,"min":16,"max":16}}}} \ No newline at end of file diff --git a/evidence/bench/unit-of-work-before/raw/read-1k-c4-r1.json b/evidence/bench/unit-of-work-before/raw/read-1k-c4-r1.json new file mode 100644 index 00000000..db776990 --- /dev/null +++ b/evidence/bench/unit-of-work-before/raw/read-1k-c4-r1.json @@ -0,0 +1 @@ +{"state":{"isStdOutTTY":false,"isStdErrTTY":false,"testRunDurationMs":5002.932919},"metrics":{"vus_max":{"type":"gauge","contains":"default","values":{"value":4,"min":4,"max":4}},"http_req_connecting":{"contains":"time","values":{"p(50)":0,"p(95)":0,"p(99)":0,"max":0.301459,"avg":0.00028230925644916535,"min":0,"med":0},"type":"trend"},"http_req_failed":{"type":"rate","contains":"default","values":{"rate":0,"passes":0,"fails":3295}},"data_sent":{"type":"counter","contains":"data","values":{"count":1377310,"rate":275300.5131788376}},"http_req_duration":{"type":"trend","contains":"time","values":{"p(50)":5.215209,"p(95)":8.5245456,"p(99)":18.93017893999999,"max":62.826125,"avg":5.990473185128973,"min":3.696667,"med":5.215209}},"http_req_duration{expected_response:true}":{"thresholds":{"max>=0":{"ok":true}},"type":"trend","contains":"time","values":{"avg":5.990473185128973,"min":3.696667,"med":5.215209,"p(50)":5.215209,"p(95)":8.5245456,"p(99)":18.93017893999999,"max":62.826125}},"iteration_duration":{"contains":"time","values":{"p(99)":19.375204999999994,"max":62.891458,"avg":6.06830401305007,"min":3.759125,"med":5.277125,"p(50)":5.277125,"p(95)":8.6376252},"type":"trend"},"http_req_tls_handshaking":{"values":{"p(50)":0,"p(95)":0,"p(99)":0,"max":0,"avg":0,"min":0,"med":0},"type":"trend","contains":"time"},"http_req_receiving":{"contains":"time","values":{"max":0.495083,"avg":0.026285457966616056,"min":0.008625,"med":0.018125,"p(50)":0.018125,"p(95)":0.06477519999999999,"p(99)":0.1371625},"type":"trend"},"checks":{"type":"rate","contains":"default","values":{"rate":1,"passes":6590,"fails":0}},"iterations":{"contains":"default","values":{"count":3295,"rate":658.613667891956},"type":"counter"},"http_req_blocked":{"contains":"time","values":{"avg":0.002571095599393056,"min":0.0005,"med":0.000916,"p(50)":0.000916,"p(95)":0.002833,"p(99)":0.006257499999999997,"max":1.104917},"type":"trend"},"http_reqs":{"type":"counter","contains":"default","values":{"count":3295,"rate":658.613667891956}},"http_req_sending":{"type":"trend","contains":"time","values":{"med":0.002791,"p(50)":0.002791,"p(95)":0.012167,"p(99)":0.040491459999999986,"max":0.184,"avg":0.004774410015174558,"min":0.001625}},"http_req_waiting":{"contains":"time","values":{"min":3.673,"med":5.189625,"p(50)":5.189625,"p(95)":8.479216999999998,"p(99)":18.780699959999993,"max":62.797958,"avg":5.959413317147188},"type":"trend"},"vus":{"type":"gauge","contains":"default","values":{"value":4,"min":4,"max":4}},"data_received":{"type":"counter","contains":"data","values":{"rate":9588756.390838988,"count":47971905}}},"root_group":{"name":"","path":"","id":"d41d8cd98f00b204e9800998ecf8427e","groups":[],"checks":[{"id":"fad9fa412b86fcb03bee97c80dcd61f1","passes":3295,"fails":0,"name":"status 200","path":"::status 200"},{"name":"full page","path":"::full page","id":"736a4affc4111c8285c374c0b4d25aed","passes":3295,"fails":0}]},"options":{"noColor":true,"summaryTrendStats":["avg","min","med","p(50)","p(95)","p(99)","max"],"summaryTimeUnit":""}} \ No newline at end of file diff --git a/evidence/bench/unit-of-work-before/raw/read-5k-c1-r1.json b/evidence/bench/unit-of-work-before/raw/read-5k-c1-r1.json new file mode 100644 index 00000000..cefee1ea --- /dev/null +++ b/evidence/bench/unit-of-work-before/raw/read-5k-c1-r1.json @@ -0,0 +1 @@ +{"root_group":{"name":"","path":"","id":"d41d8cd98f00b204e9800998ecf8427e","groups":[],"checks":[{"name":"status 200","path":"::status 200","id":"fad9fa412b86fcb03bee97c80dcd61f1","passes":2228,"fails":0},{"name":"full page","path":"::full page","id":"736a4affc4111c8285c374c0b4d25aed","passes":2228,"fails":0}]},"options":{"summaryTrendStats":["avg","min","med","p(50)","p(95)","p(99)","max"],"summaryTimeUnit":"","noColor":true},"state":{"isStdOutTTY":false,"isStdErrTTY":false,"testRunDurationMs":5001.965738},"metrics":{"http_req_receiving":{"type":"trend","contains":"time","values":{"avg":0.03563683258527831,"min":0.011542,"med":0.028167,"p(50)":0.028167,"p(95)":0.07769364999999999,"p(99)":0.1147145,"max":0.309416}},"http_req_failed":{"type":"rate","contains":"default","values":{"rate":0,"passes":0,"fails":2228}},"iteration_duration":{"type":"trend","contains":"time","values":{"min":1.626542,"med":2.0358539999999996,"p(50)":2.0358539999999996,"p(95)":3.12250185,"p(99)":4.305317,"max":80.91475,"avg":2.2400195915619383}},"http_req_sending":{"type":"trend","contains":"time","values":{"max":0.326291,"avg":0.006153988330341136,"min":0.00175,"med":0.0041665,"p(50)":0.0041665,"p(95)":0.014818949999999996,"p(99)":0.025863659999999997}},"http_req_waiting":{"type":"trend","contains":"time","values":{"min":1.533625,"med":1.920375,"p(50)":1.920375,"p(95)":2.9227458499999996,"p(99)":3.9958985,"max":80.612167,"avg":2.107480340664276}},"http_req_duration":{"type":"trend","contains":"time","values":{"min":1.564208,"med":1.9531245,"p(50)":1.9531245,"p(95)":2.99771865,"p(99)":4.121174819999999,"max":80.766334,"avg":2.14927116157989}},"checks":{"type":"rate","contains":"default","values":{"rate":1,"passes":4456,"fails":0}},"http_req_duration{expected_response:true}":{"thresholds":{"max>=0":{"ok":true}},"type":"trend","contains":"time","values":{"p(95)":2.99771865,"p(99)":4.121174819999999,"max":80.766334,"avg":2.14927116157989,"min":1.564208,"med":1.9531245,"p(50)":1.9531245}},"http_req_blocked":{"type":"trend","contains":"time","values":{"p(99)":0.00529173,"max":0.534208,"avg":0.0019440228904847405,"min":0.000542,"med":0.001292,"p(50)":0.001292,"p(95)":0.00325}},"http_req_connecting":{"type":"trend","contains":"time","values":{"max":0.124625,"avg":0.00005593581687612208,"min":0,"med":0,"p(50)":0,"p(95)":0,"p(99)":0}},"vus":{"type":"gauge","contains":"default","values":{"value":1,"min":1,"max":1}},"vus_max":{"type":"gauge","contains":"default","values":{"value":1,"min":1,"max":1}},"data_sent":{"type":"counter","contains":"data","values":{"count":931304,"rate":186187.60079159902}},"data_received":{"type":"counter","contains":"data","values":{"count":32437452,"rate":6484940.861064331}},"http_req_tls_handshaking":{"contains":"time","values":{"min":0,"med":0,"p(50)":0,"p(95)":0,"p(99)":0,"max":0,"avg":0},"type":"trend"},"iterations":{"type":"counter","contains":"default","values":{"count":2228,"rate":445.4248822765527}},"http_reqs":{"contains":"default","values":{"count":2228,"rate":445.4248822765527},"type":"counter"}}} \ No newline at end of file diff --git a/evidence/bench/unit-of-work-before/raw/read-5k-c16-r1.json b/evidence/bench/unit-of-work-before/raw/read-5k-c16-r1.json new file mode 100644 index 00000000..0eb19a91 --- /dev/null +++ b/evidence/bench/unit-of-work-before/raw/read-5k-c16-r1.json @@ -0,0 +1 @@ +{"options":{"summaryTimeUnit":"","noColor":true,"summaryTrendStats":["avg","min","med","p(50)","p(95)","p(99)","max"]},"state":{"isStdOutTTY":false,"isStdErrTTY":false,"testRunDurationMs":5015.283336},"metrics":{"iteration_duration":{"type":"trend","contains":"time","values":{"med":23.878833,"p(50)":23.878833,"p(95)":50.81040819999995,"p(99)":76.99555355999999,"max":128.572042,"avg":26.41199930926477,"min":9.207541}},"http_req_duration{expected_response:true}":{"thresholds":{"max>=0":{"ok":true}},"type":"trend","contains":"time","values":{"p(95)":50.60700019999997,"p(99)":76.91052544,"max":128.476833,"avg":26.32275204780749,"min":9.137334,"med":23.794334,"p(50)":23.794334}},"http_req_waiting":{"values":{"p(99)":76.86861144,"max":128.426959,"avg":26.28821623244314,"min":9.108375,"med":23.763625,"p(50)":23.763625,"p(95)":50.55655839999997},"type":"trend","contains":"time"},"http_req_receiving":{"type":"trend","contains":"time","values":{"max":0.356375,"avg":0.02940985262116716,"min":0.00775,"med":0.022917,"p(50)":0.022917,"p(95)":0.06189999999999995,"p(99)":0.12834543999999976}},"vus":{"values":{"value":16,"min":16,"max":16},"type":"gauge","contains":"default"},"http_req_duration":{"type":"trend","contains":"time","values":{"med":23.794334,"p(50)":23.794334,"p(95)":50.60700019999997,"p(99)":76.91052544,"max":128.476833,"avg":26.32275204780749,"min":9.137334}},"http_req_connecting":{"type":"trend","contains":"time","values":{"avg":0.0018773775140125289,"min":0,"med":0,"p(50)":0,"p(95)":0,"p(99)":0,"max":0.593542}},"data_sent":{"type":"counter","contains":"data","values":{"count":1267794,"rate":252786.1169676496}},"vus_max":{"values":{"min":16,"max":16,"value":16},"type":"gauge","contains":"default"},"http_reqs":{"type":"counter","contains":"default","values":{"rate":604.7514759991617,"count":3033}},"http_req_failed":{"type":"rate","contains":"default","values":{"rate":0,"passes":0,"fails":3033}},"http_req_blocked":{"values":{"p(50)":0.001125,"p(95)":0.002625,"p(99)":0.010265439999999999,"max":0.997375,"avg":0.004977574019123037,"min":0.000541,"med":0.001125},"type":"trend","contains":"time"},"data_received":{"type":"counter","contains":"data","values":{"count":44157447,"rate":8804576.739071796}},"http_req_tls_handshaking":{"contains":"time","values":{"med":0,"p(50)":0,"p(95)":0,"p(99)":0,"max":0,"avg":0,"min":0},"type":"trend"},"http_req_sending":{"type":"trend","contains":"time","values":{"avg":0.0051259627431586435,"min":0.001958,"med":0.003833,"p(50)":0.003833,"p(95)":0.011349799999999993,"p(99)":0.021058999999999967,"max":0.182}},"checks":{"type":"rate","contains":"default","values":{"passes":6066,"fails":0,"rate":1}},"iterations":{"type":"counter","contains":"default","values":{"count":3033,"rate":604.7514759991617}}},"root_group":{"path":"","id":"d41d8cd98f00b204e9800998ecf8427e","groups":[],"checks":[{"path":"::status 200","id":"fad9fa412b86fcb03bee97c80dcd61f1","passes":3033,"fails":0,"name":"status 200"},{"name":"full page","path":"::full page","id":"736a4affc4111c8285c374c0b4d25aed","passes":3033,"fails":0}],"name":""}} \ No newline at end of file diff --git a/evidence/bench/unit-of-work-before/raw/read-5k-c4-r1.json b/evidence/bench/unit-of-work-before/raw/read-5k-c4-r1.json new file mode 100644 index 00000000..8ceca7ab --- /dev/null +++ b/evidence/bench/unit-of-work-before/raw/read-5k-c4-r1.json @@ -0,0 +1 @@ +{"options":{"summaryTrendStats":["avg","min","med","p(50)","p(95)","p(99)","max"],"summaryTimeUnit":"","noColor":true},"state":{"isStdErrTTY":false,"testRunDurationMs":5004.963419,"isStdOutTTY":false},"metrics":{"http_req_sending":{"type":"trend","contains":"time","values":{"avg":0.00465384713763708,"min":0.0015,"med":0.002875,"p(50)":0.002875,"p(95)":0.011208,"p(99)":0.030532219999999968,"max":0.432875}},"iterations":{"contains":"default","values":{"count":3284,"rate":656.1486518629039},"type":"counter"},"vus":{"contains":"default","values":{"value":4,"min":4,"max":4},"type":"gauge"},"http_req_duration":{"type":"trend","contains":"time","values":{"avg":6.01513668544458,"min":4.157959,"med":5.418854,"p(50)":5.418854,"p(95)":8.585795549999997,"p(99)":15.028389109999997,"max":44.245083}},"http_req_blocked":{"type":"trend","contains":"time","values":{"p(99)":0.0054800799999999966,"max":0.631083,"avg":0.0020061522533495954,"min":0.0005,"med":0.000917,"p(50)":0.000917,"p(95)":0.002583}},"http_req_receiving":{"type":"trend","contains":"time","values":{"med":0.01925,"p(50)":0.01925,"p(95)":0.06489809999999999,"p(99)":0.12631807999999994,"max":0.540167,"avg":0.027042937576126646,"min":0.006625}},"iteration_duration":{"type":"trend","contains":"time","values":{"p(99)":15.267310859999997,"max":44.328083,"avg":6.090102879110868,"min":4.221208,"med":5.487125000000001,"p(50)":5.487125000000001,"p(95)":8.740737549999997}},"vus_max":{"contains":"default","values":{"value":4,"min":4,"max":4},"type":"gauge"},"http_req_waiting":{"values":{"p(95)":8.5182838,"p(99)":14.989583249999997,"max":44.21025,"avg":5.983439900730812,"min":4.141667,"med":5.392291500000001,"p(50)":5.392291500000001},"type":"trend","contains":"time"},"http_req_duration{expected_response:true}":{"contains":"time","values":{"p(50)":5.418854,"p(95)":8.585795549999997,"p(99)":15.028389109999997,"max":44.245083,"avg":6.01513668544458,"min":4.157959,"med":5.418854},"thresholds":{"max>=0":{"ok":true}},"type":"trend"},"data_received":{"type":"counter","contains":"data","values":{"count":47811756,"rate":9552868.222472018}},"checks":{"type":"rate","contains":"default","values":{"rate":1,"passes":6568,"fails":0}},"http_reqs":{"type":"counter","contains":"default","values":{"count":3284,"rate":656.1486518629039}},"http_req_tls_handshaking":{"values":{"p(99)":0,"max":0,"avg":0,"min":0,"med":0,"p(50)":0,"p(95)":0},"type":"trend","contains":"time"},"http_req_failed":{"type":"rate","contains":"default","values":{"passes":0,"fails":3284,"rate":0}},"data_sent":{"type":"counter","contains":"data","values":{"count":1372712,"rate":274270.1364786938}},"http_req_connecting":{"type":"trend","contains":"time","values":{"min":0,"med":0,"p(50)":0,"p(95)":0,"p(99)":0,"max":0.124875,"avg":0.0001106123629719854}}},"root_group":{"name":"","path":"","id":"d41d8cd98f00b204e9800998ecf8427e","groups":[],"checks":[{"passes":3284,"fails":0,"name":"status 200","path":"::status 200","id":"fad9fa412b86fcb03bee97c80dcd61f1"},{"fails":0,"name":"full page","path":"::full page","id":"736a4affc4111c8285c374c0b4d25aed","passes":3284}]}} \ No newline at end of file diff --git a/evidence/bench/unit-of-work-before/raw/write-10k-c1-r1.json b/evidence/bench/unit-of-work-before/raw/write-10k-c1-r1.json new file mode 100644 index 00000000..d6cc2c98 --- /dev/null +++ b/evidence/bench/unit-of-work-before/raw/write-10k-c1-r1.json @@ -0,0 +1 @@ +{"state":{"isStdOutTTY":false,"isStdErrTTY":false,"testRunDurationMs":2021.613876},"metrics":{"http_req_sending":{"contains":"time","values":{"p(50)":0.003209,"p(95)":0.007051449999999991,"p(99)":0.016355239999999983,"max":0.171125,"avg":0.004454332000000001,"min":0.002166,"med":0.003209},"type":"trend"},"data_received":{"values":{"count":490000,"rate":242380.60779911268},"type":"counter","contains":"data"},"http_req_failed":{"type":"rate","contains":"default","values":{"rate":0,"passes":0,"fails":1000}},"iteration_duration":{"type":"trend","contains":"time","values":{"avg":2.0185759639999983,"min":1.753,"med":1.939479,"p(50)":1.939479,"p(95)":2.41536875,"p(99)":3.1912434199999997,"max":8.462792}},"vus_max":{"type":"gauge","contains":"default","values":{"value":1,"min":1,"max":1}},"vus":{"type":"gauge","contains":"default","values":{"value":1,"min":1,"max":1}},"http_req_duration":{"values":{"p(95)":2.3432568499999995,"p(99)":3.1071454199999997,"max":7.759667,"avg":1.9696032060000013,"min":1.710708,"med":1.8914170000000001,"p(50)":1.8914170000000001},"type":"trend","contains":"time"},"http_req_blocked":{"type":"trend","contains":"time","values":{"p(50)":0.000917,"p(95)":0.00179105,"p(99)":0.0025909199999999927,"max":0.473667,"avg":0.0015324739999999924,"min":0.0005,"med":0.000917}},"iterations":{"contains":"default","values":{"count":1000,"rate":494.6543016308422},"type":"counter"},"http_req_tls_handshaking":{"type":"trend","contains":"time","values":{"med":0,"p(50)":0,"p(95)":0,"p(99)":0,"max":0,"avg":0,"min":0}},"http_req_waiting":{"type":"trend","contains":"time","values":{"min":1.694208,"med":1.8758545,"p(50)":1.8758545,"p(95)":2.315538099999999,"p(99)":3.0497805099999997,"max":7.665541,"avg":1.9512902819999978}},"http_req_connecting":{"values":{"med":0,"p(50)":0,"p(95)":0,"p(99)":0,"max":0.127792,"avg":0.000127792,"min":0},"type":"trend","contains":"time"},"checks":{"type":"rate","contains":"default","values":{"passes":1000,"fails":0,"rate":1}},"data_sent":{"type":"counter","contains":"data","values":{"count":376000,"rate":185990.01741319668}},"http_req_receiving":{"type":"trend","contains":"time","values":{"med":0.012125,"p(50)":0.012125,"p(95)":0.024879199999999997,"p(99)":0.03991992,"max":0.092458,"avg":0.013858591999999942,"min":0.009209}},"http_reqs":{"type":"counter","contains":"default","values":{"count":1000,"rate":494.6543016308422}},"http_req_duration{expected_response:true}":{"type":"trend","contains":"time","values":{"p(50)":1.8914170000000001,"p(95)":2.3432568499999995,"p(99)":3.1071454199999997,"max":7.759667,"avg":1.9696032060000013,"min":1.710708,"med":1.8914170000000001},"thresholds":{"max>=0":{"ok":true}}}},"root_group":{"name":"","path":"","id":"d41d8cd98f00b204e9800998ecf8427e","groups":[],"checks":[{"name":"message 201","path":"::message 201","id":"6445aff337e1ade0bc10402fbac79882","passes":1000,"fails":0}]},"options":{"summaryTrendStats":["avg","min","med","p(50)","p(95)","p(99)","max"],"summaryTimeUnit":"","noColor":true}} \ No newline at end of file diff --git a/evidence/bench/unit-of-work-before/raw/write-10k-c16-r1.json b/evidence/bench/unit-of-work-before/raw/write-10k-c16-r1.json new file mode 100644 index 00000000..1bea4ffa --- /dev/null +++ b/evidence/bench/unit-of-work-before/raw/write-10k-c16-r1.json @@ -0,0 +1 @@ +{"root_group":{"path":"","id":"d41d8cd98f00b204e9800998ecf8427e","groups":[],"checks":[{"id":"6445aff337e1ade0bc10402fbac79882","passes":1000,"fails":0,"name":"message 201","path":"::message 201"}],"name":""},"options":{"summaryTimeUnit":"","noColor":true,"summaryTrendStats":["avg","min","med","p(50)","p(95)","p(99)","max"]},"state":{"isStdOutTTY":false,"isStdErrTTY":false,"testRunDurationMs":1900.4515},"metrics":{"http_req_sending":{"type":"trend","contains":"time","values":{"avg":0.007713278999999991,"min":0.002333,"med":0.004833,"p(50)":0.004833,"p(95)":0.01741905,"p(99)":0.06015582999999997,"max":0.256458}},"http_req_receiving":{"type":"trend","contains":"time","values":{"p(50)":0.015854,"p(95)":0.047,"p(99)":0.07451416999999999,"max":0.1795,"avg":0.020503382000000004,"min":0.005458,"med":0.015854}},"http_req_failed":{"type":"rate","contains":"default","values":{"rate":0,"passes":0,"fails":1000}},"data_sent":{"values":{"count":376000,"rate":197847.7219755411},"type":"counter","contains":"data"},"http_req_duration{expected_response:true}":{"type":"trend","contains":"time","values":{"avg":30.142481124999993,"min":12.528875,"med":27.190708,"p(50)":27.190708,"p(95)":56.23626045,"p(99)":87.50877351,"max":110.388208},"thresholds":{"max>=0":{"ok":true}}},"http_req_duration":{"type":"trend","contains":"time","values":{"min":12.528875,"med":27.190708,"p(50)":27.190708,"p(95)":56.23626045,"p(99)":87.50877351,"max":110.388208,"avg":30.142481124999993}},"http_reqs":{"type":"counter","contains":"default","values":{"count":1000,"rate":526.1907499349497}},"http_req_blocked":{"values":{"p(99)":0.9029430899999998,"max":1.221792,"avg":0.016780967999999993,"min":0.000583,"med":0.00125,"p(50)":0.00125,"p(95)":0.003463149999999996},"type":"trend","contains":"time"},"http_req_tls_handshaking":{"type":"trend","contains":"time","values":{"p(50)":0,"p(95)":0,"p(99)":0,"max":0,"avg":0,"min":0,"med":0}},"vus":{"type":"gauge","contains":"default","values":{"value":16,"min":16,"max":16}},"vus_max":{"type":"gauge","contains":"default","values":{"max":16,"value":16,"min":16}},"iterations":{"type":"counter","contains":"default","values":{"count":1000,"rate":526.1907499349497}},"http_req_connecting":{"type":"trend","contains":"time","values":{"p(50)":0,"p(95)":0,"p(99)":0.11269291999999972,"max":0.280167,"avg":0.0025576670000000004,"min":0,"med":0}},"iteration_duration":{"type":"trend","contains":"time","values":{"med":27.375583,"p(50)":27.375583,"p(95)":56.32066395,"p(99)":87.600088,"max":110.487292,"avg":30.240331432000016,"min":12.586916}},"checks":{"type":"rate","contains":"default","values":{"rate":1,"passes":1000,"fails":0}},"http_req_waiting":{"values":{"avg":30.11426446400001,"min":12.5105,"med":27.171146,"p(50)":27.171146,"p(95)":56.2112128,"p(99)":87.47325934,"max":110.353167},"type":"trend","contains":"time"},"data_received":{"type":"counter","contains":"data","values":{"count":490000,"rate":257833.46746812534}}}} \ No newline at end of file diff --git a/evidence/bench/unit-of-work-before/raw/write-10k-c4-r1.json b/evidence/bench/unit-of-work-before/raw/write-10k-c4-r1.json new file mode 100644 index 00000000..a906c99e --- /dev/null +++ b/evidence/bench/unit-of-work-before/raw/write-10k-c4-r1.json @@ -0,0 +1 @@ +{"root_group":{"groups":[],"checks":[{"fails":0,"name":"message 201","path":"::message 201","id":"6445aff337e1ade0bc10402fbac79882","passes":1000}],"name":"","path":"","id":"d41d8cd98f00b204e9800998ecf8427e"},"options":{"summaryTrendStats":["avg","min","med","p(50)","p(95)","p(99)","max"],"summaryTimeUnit":"","noColor":true},"state":{"isStdOutTTY":false,"isStdErrTTY":false,"testRunDurationMs":1589.382459},"metrics":{"http_reqs":{"type":"counter","contains":"default","values":{"rate":629.1751833156477,"count":1000}},"http_req_blocked":{"type":"trend","contains":"time","values":{"p(99)":0.005208839999999999,"max":0.857708,"avg":0.004010209999999984,"min":0.0005,"med":0.000917,"p(50)":0.000917,"p(95)":0.002375}},"data_received":{"type":"counter","contains":"data","values":{"count":490000,"rate":308295.8398246674}},"http_req_tls_handshaking":{"type":"trend","contains":"time","values":{"avg":0,"min":0,"med":0,"p(50)":0,"p(95)":0,"p(99)":0,"max":0}},"checks":{"type":"rate","contains":"default","values":{"rate":1,"passes":1000,"fails":0}},"iteration_duration":{"type":"trend","contains":"time","values":{"p(50)":5.846125000000001,"p(95)":8.088834799999997,"p(99)":10.23388625,"max":69.224,"avg":6.349634796999996,"min":4.631417,"med":5.846125000000001}},"http_req_duration":{"type":"trend","contains":"time","values":{"min":4.592292,"med":5.7915835,"p(50)":5.7915835,"p(95)":8.02284405,"p(99)":9.853355089999999,"max":69.173459,"avg":6.284986049000003}},"http_req_connecting":{"type":"trend","contains":"time","values":{"max":0.285667,"avg":0.001103625,"min":0,"med":0,"p(50)":0,"p(95)":0,"p(99)":0}},"vus":{"type":"gauge","contains":"default","values":{"min":4,"max":4,"value":4}},"vus_max":{"type":"gauge","contains":"default","values":{"value":4,"min":4,"max":4}},"http_req_waiting":{"values":{"min":4.581584,"med":5.773104,"p(50)":5.773104,"p(95)":8.0024473,"p(99)":9.83730333,"max":69.161709,"avg":6.264457304000002},"type":"trend","contains":"time"},"iterations":{"type":"counter","contains":"default","values":{"count":1000,"rate":629.1751833156477}},"http_req_failed":{"values":{"passes":0,"fails":1000,"rate":0},"type":"rate","contains":"default"},"http_req_duration{expected_response:true}":{"type":"trend","contains":"time","values":{"avg":6.284986049000003,"min":4.592292,"med":5.7915835,"p(50)":5.7915835,"p(95)":8.02284405,"p(99)":9.853355089999999,"max":69.173459},"thresholds":{"max>=0":{"ok":true}}},"http_req_sending":{"values":{"p(95)":0.013752099999999998,"p(99)":0.04218115999999999,"max":0.088208,"avg":0.005368999999999992,"min":0.001875,"med":0.003417,"p(50)":0.003417},"type":"trend","contains":"time"},"http_req_receiving":{"type":"trend","contains":"time","values":{"avg":0.015159744999999985,"min":0.005291,"med":0.0116455,"p(50)":0.0116455,"p(95)":0.03600834999999999,"p(99)":0.07642516999999999,"max":0.1365}},"data_sent":{"type":"counter","contains":"data","values":{"count":376000,"rate":236569.86892668356}}}} \ No newline at end of file diff --git a/evidence/bench/unit-of-work-before/raw/write-1k-c1-r1.json b/evidence/bench/unit-of-work-before/raw/write-1k-c1-r1.json new file mode 100644 index 00000000..41b0b97a --- /dev/null +++ b/evidence/bench/unit-of-work-before/raw/write-1k-c1-r1.json @@ -0,0 +1 @@ +{"root_group":{"name":"","path":"","id":"d41d8cd98f00b204e9800998ecf8427e","groups":[],"checks":[{"path":"::message 201","id":"6445aff337e1ade0bc10402fbac79882","passes":1000,"fails":0,"name":"message 201"}]},"options":{"summaryTimeUnit":"","noColor":true,"summaryTrendStats":["avg","min","med","p(50)","p(95)","p(99)","max"]},"state":{"isStdOutTTY":false,"isStdErrTTY":false,"testRunDurationMs":2456.906293},"metrics":{"iteration_duration":{"type":"trend","contains":"time","values":{"med":2.1066255,"p(50)":2.1066255,"p(95)":3.9687506499999983,"p(99)":5.833210919999999,"max":14.809083,"avg":2.4525510519999973,"min":1.73325}},"http_req_tls_handshaking":{"type":"trend","contains":"time","values":{"p(99)":0,"max":0,"avg":0,"min":0,"med":0,"p(50)":0,"p(95)":0}},"http_req_waiting":{"type":"trend","contains":"time","values":{"avg":2.3536451560000025,"min":1.683541,"med":2.0332915,"p(50)":2.0332915,"p(95)":3.779387799999999,"p(99)":5.57392226,"max":14.631458}},"http_req_connecting":{"type":"trend","contains":"time","values":{"p(50)":0,"p(95)":0,"p(99)":0,"max":0.161542,"avg":0.00016154199999999998,"min":0,"med":0}},"http_req_sending":{"type":"trend","contains":"time","values":{"max":0.161208,"avg":0.006530930999999994,"min":0.002208,"med":0.004125,"p(50)":0.004125,"p(95)":0.015429499999999988,"p(99)":0.02822148999999999}},"http_req_blocked":{"contains":"time","values":{"max":0.66825,"avg":0.002167687999999994,"min":0.000583,"med":0.001166,"p(50)":0.001166,"p(95)":0.002875,"p(99)":0.004917},"type":"trend"},"data_received":{"contains":"data","values":{"count":490000,"rate":199437.80574622023},"type":"counter"},"iterations":{"type":"counter","contains":"default","values":{"count":1000,"rate":407.01593009432696}},"http_req_duration":{"values":{"p(99)":5.662027919999999,"max":14.681958,"avg":2.381875646999998,"min":1.696625,"med":2.053729,"p(50)":2.053729,"p(95)":3.8517351},"type":"trend","contains":"time"},"http_req_receiving":{"type":"trend","contains":"time","values":{"max":0.181625,"avg":0.02169956000000001,"min":0.009458,"med":0.0154375,"p(50)":0.0154375,"p(95)":0.04959964999999999,"p(99)":0.09181416999999994}},"vus":{"type":"gauge","contains":"default","values":{"max":1,"value":1,"min":1}},"http_reqs":{"values":{"count":1000,"rate":407.01593009432696},"type":"counter","contains":"default"},"data_sent":{"type":"counter","contains":"data","values":{"count":376000,"rate":153037.98971546695}},"checks":{"type":"rate","contains":"default","values":{"rate":1,"passes":1000,"fails":0}},"vus_max":{"type":"gauge","contains":"default","values":{"value":1,"min":1,"max":1}},"http_req_duration{expected_response:true}":{"type":"trend","contains":"time","values":{"min":1.696625,"med":2.053729,"p(50)":2.053729,"p(95)":3.8517351,"p(99)":5.662027919999999,"max":14.681958,"avg":2.381875646999998},"thresholds":{"max>=0":{"ok":true}}},"http_req_failed":{"contains":"default","values":{"passes":0,"fails":1000,"rate":0},"type":"rate"}}} \ No newline at end of file diff --git a/evidence/bench/unit-of-work-before/raw/write-1k-c16-r1.json b/evidence/bench/unit-of-work-before/raw/write-1k-c16-r1.json new file mode 100644 index 00000000..9df3d20d --- /dev/null +++ b/evidence/bench/unit-of-work-before/raw/write-1k-c16-r1.json @@ -0,0 +1 @@ +{"state":{"isStdErrTTY":false,"testRunDurationMs":1671.702959,"isStdOutTTY":false},"metrics":{"http_req_duration":{"type":"trend","contains":"time","values":{"max":85.161833,"avg":26.558928253,"min":11.961666,"med":25.079667,"p(50)":25.079667,"p(95)":40.415920849999985,"p(99)":77.28657292}},"http_req_sending":{"type":"trend","contains":"time","values":{"p(50)":0.003791,"p(95)":0.011675299999999993,"p(99)":0.21840148999999995,"max":0.435375,"avg":0.008641250000000019,"min":0.002375,"med":0.003791}},"vus_max":{"type":"gauge","contains":"default","values":{"value":16,"min":16,"max":16}},"iterations":{"type":"counter","contains":"default","values":{"count":1000,"rate":598.1923969304884}},"http_req_receiving":{"type":"trend","contains":"time","values":{"p(99)":0.051051579999999985,"max":0.1265,"avg":0.01675562499999996,"min":0.004708,"med":0.01425,"p(50)":0.01425,"p(95)":0.0343792}},"checks":{"type":"rate","contains":"default","values":{"rate":1,"passes":1000,"fails":0}},"data_sent":{"type":"counter","contains":"data","values":{"count":376000,"rate":224920.34124586364}},"data_received":{"type":"counter","contains":"data","values":{"rate":293114.2744959393,"count":490000}},"http_req_duration{expected_response:true}":{"contains":"time","values":{"p(50)":25.079667,"p(95)":40.415920849999985,"p(99)":77.28657292,"max":85.161833,"avg":26.558928253,"min":11.961666,"med":25.079667},"thresholds":{"max>=0":{"ok":true}},"type":"trend"},"http_req_tls_handshaking":{"contains":"time","values":{"p(50)":0,"p(95)":0,"p(99)":0,"max":0,"avg":0,"min":0,"med":0},"type":"trend"},"vus":{"type":"gauge","contains":"default","values":{"value":16,"min":16,"max":16}},"http_req_blocked":{"type":"trend","contains":"time","values":{"med":0.001,"p(50)":0.001,"p(95)":0.002417,"p(99)":1.01049509,"max":1.710083,"avg":0.01933059000000015,"min":0.000459}},"iteration_duration":{"type":"trend","contains":"time","values":{"med":25.145021,"p(50)":25.145021,"p(95)":40.57707049999999,"p(99)":77.36564084,"max":85.333709,"avg":26.642562094999988,"min":12.025333}},"http_req_waiting":{"type":"trend","contains":"time","values":{"p(95)":40.37399134999998,"p(99)":77.23113791,"max":85.117583,"avg":26.53353137800002,"min":11.941917,"med":25.060375,"p(50)":25.060375}},"http_reqs":{"type":"counter","contains":"default","values":{"count":1000,"rate":598.1923969304884}},"http_req_connecting":{"contains":"time","values":{"p(95)":0,"p(99)":0.09022424999999998,"max":0.447375,"avg":0.002195625,"min":0,"med":0,"p(50)":0},"type":"trend"},"http_req_failed":{"contains":"default","values":{"rate":0,"passes":0,"fails":1000},"type":"rate"}},"root_group":{"id":"d41d8cd98f00b204e9800998ecf8427e","groups":[],"checks":[{"fails":0,"name":"message 201","path":"::message 201","id":"6445aff337e1ade0bc10402fbac79882","passes":1000}],"name":"","path":""},"options":{"summaryTrendStats":["avg","min","med","p(50)","p(95)","p(99)","max"],"summaryTimeUnit":"","noColor":true}} \ No newline at end of file diff --git a/evidence/bench/unit-of-work-before/raw/write-1k-c4-r1.json b/evidence/bench/unit-of-work-before/raw/write-1k-c4-r1.json new file mode 100644 index 00000000..9a269cea --- /dev/null +++ b/evidence/bench/unit-of-work-before/raw/write-1k-c4-r1.json @@ -0,0 +1 @@ +{"root_group":{"name":"","path":"","id":"d41d8cd98f00b204e9800998ecf8427e","groups":[],"checks":[{"name":"message 201","path":"::message 201","id":"6445aff337e1ade0bc10402fbac79882","passes":1000,"fails":0}]},"options":{"summaryTrendStats":["avg","min","med","p(50)","p(95)","p(99)","max"],"summaryTimeUnit":"","noColor":true},"state":{"testRunDurationMs":1634.717626,"isStdOutTTY":false,"isStdErrTTY":false},"metrics":{"iterations":{"type":"counter","contains":"default","values":{"count":1000,"rate":611.7264438182549}},"http_req_sending":{"type":"trend","contains":"time","values":{"p(95)":0.01946939999999999,"p(99)":0.04043058999999999,"max":0.19025,"avg":0.006797146999999998,"min":0.002083,"med":0.00375,"p(50)":0.00375}},"vus_max":{"type":"gauge","contains":"default","values":{"value":4,"min":4,"max":4}},"http_req_receiving":{"contains":"time","values":{"p(50)":0.012458,"p(95)":0.05279315,"p(99)":0.08282892999999997,"max":0.136709,"avg":0.018673963999999967,"min":0.005125,"med":0.012458},"type":"trend"},"http_req_duration{expected_response:true}":{"thresholds":{"max>=0":{"ok":true}},"type":"trend","contains":"time","values":{"p(99)":12.299225829999994,"max":15.930416,"avg":6.453734133999994,"min":4.777416,"med":5.685396,"p(50)":5.685396,"p(95)":10.717775649999998}},"http_req_tls_handshaking":{"values":{"avg":0,"min":0,"med":0,"p(50)":0,"p(95)":0,"p(99)":0,"max":0},"type":"trend","contains":"time"},"vus":{"type":"gauge","contains":"default","values":{"min":4,"max":4,"value":4}},"http_reqs":{"type":"counter","contains":"default","values":{"count":1000,"rate":611.7264438182549}},"http_req_connecting":{"values":{"p(95)":0,"p(99)":0,"max":0.393,"avg":0.000914126,"min":0,"med":0,"p(50)":0},"type":"trend","contains":"time"},"http_req_waiting":{"type":"trend","contains":"time","values":{"avg":6.428263022999998,"min":4.757958,"med":5.663042,"p(50)":5.663042,"p(95)":10.639974699999998,"p(99)":12.242283249999995,"max":15.88825}},"http_req_failed":{"type":"rate","contains":"default","values":{"rate":0,"passes":0,"fails":1000}},"checks":{"type":"rate","contains":"default","values":{"rate":1,"passes":1000,"fails":0}},"http_req_blocked":{"contains":"time","values":{"avg":0.005559838000000025,"min":0.000541,"med":0.001,"p(50)":0.001,"p(95)":0.003625,"p(99)":0.008846749999999988,"max":1.051},"type":"trend"},"data_received":{"values":{"count":490000,"rate":299745.9574709449},"type":"counter","contains":"data"},"data_sent":{"contains":"data","values":{"count":376000,"rate":230009.14287566382},"type":"counter"},"iteration_duration":{"type":"trend","contains":"time","values":{"max":16.075209,"avg":6.530070587,"min":4.819375,"med":5.7436665,"p(50)":5.7436665,"p(95)":10.875543749999999,"p(99)":12.471526079999995}},"http_req_duration":{"type":"trend","contains":"time","values":{"avg":6.453734133999994,"min":4.777416,"med":5.685396,"p(50)":5.685396,"p(95)":10.717775649999998,"p(99)":12.299225829999994,"max":15.930416}}}} \ No newline at end of file diff --git a/evidence/bench/unit-of-work-before/raw/write-5k-c1-r1.json b/evidence/bench/unit-of-work-before/raw/write-5k-c1-r1.json new file mode 100644 index 00000000..7998cf93 --- /dev/null +++ b/evidence/bench/unit-of-work-before/raw/write-5k-c1-r1.json @@ -0,0 +1 @@ +{"metrics":{"iterations":{"type":"counter","contains":"default","values":{"count":1000,"rate":398.37604633991435}},"http_req_sending":{"type":"trend","contains":"time","values":{"p(99)":0.02808482,"max":1.101292,"avg":0.007326698000000011,"min":0.002375,"med":0.004292,"p(50)":0.004292,"p(95)":0.0173771}},"http_req_blocked":{"type":"trend","contains":"time","values":{"avg":0.001941851999999992,"min":0.000583,"med":0.001125,"p(50)":0.001125,"p(95)":0.003083,"p(99)":0.005835659999999999,"max":0.488917}},"data_received":{"type":"counter","contains":"data","values":{"count":490000,"rate":195204.26270655805}},"http_req_failed":{"values":{"rate":0,"passes":0,"fails":1000},"type":"rate","contains":"default"},"http_req_tls_handshaking":{"contains":"time","values":{"max":0,"avg":0,"min":0,"med":0,"p(50)":0,"p(95)":0,"p(99)":0},"type":"trend"},"http_reqs":{"type":"counter","contains":"default","values":{"rate":398.37604633991435,"count":1000}},"checks":{"values":{"rate":1,"passes":1000,"fails":0},"type":"rate","contains":"default"},"vus_max":{"type":"gauge","contains":"default","values":{"value":1,"min":1,"max":1}},"http_req_duration{expected_response:true}":{"thresholds":{"max>=0":{"ok":true}},"type":"trend","contains":"time","values":{"p(95)":3.9619981999999987,"p(99)":7.608621009999999,"max":25.02525,"avg":2.427928313000002,"min":1.713916,"med":2.0728334999999998,"p(50)":2.0728334999999998}},"http_req_duration":{"type":"trend","contains":"time","values":{"p(99)":7.608621009999999,"max":25.02525,"avg":2.427928313000002,"min":1.713916,"med":2.0728334999999998,"p(50)":2.0728334999999998,"p(95)":3.9619981999999987}},"data_sent":{"contains":"data","values":{"count":376000,"rate":149789.3934238078},"type":"counter"},"vus":{"type":"gauge","contains":"default","values":{"value":1,"min":1,"max":1}},"iteration_duration":{"type":"trend","contains":"time","values":{"p(50)":2.128063,"p(95)":4.127093749999999,"p(99)":7.917443089999999,"max":26.058208,"avg":2.506009104999999,"min":1.774292,"med":2.128063}},"http_req_waiting":{"type":"trend","contains":"time","values":{"avg":2.396936735999999,"min":1.699875,"med":2.0524375,"p(50)":2.0524375,"p(95)":3.904655949999999,"p(99)":7.528800589999999,"max":24.933333}},"http_req_receiving":{"type":"trend","contains":"time","values":{"avg":0.023664879000000055,"min":0.009542,"med":0.015875,"p(50)":0.015875,"p(95)":0.0508381,"p(99)":0.07927666999999998,"max":2.337833}},"http_req_connecting":{"type":"trend","contains":"time","values":{"avg":0.000106875,"min":0,"med":0,"p(50)":0,"p(95)":0,"p(99)":0,"max":0.106875}}},"root_group":{"name":"","path":"","id":"d41d8cd98f00b204e9800998ecf8427e","groups":[],"checks":[{"name":"message 201","path":"::message 201","id":"6445aff337e1ade0bc10402fbac79882","passes":1000,"fails":0}]},"options":{"noColor":true,"summaryTrendStats":["avg","min","med","p(50)","p(95)","p(99)","max"],"summaryTimeUnit":""},"state":{"isStdOutTTY":false,"isStdErrTTY":false,"testRunDurationMs":2510.191085}} \ No newline at end of file diff --git a/evidence/bench/unit-of-work-before/raw/write-5k-c16-r1.json b/evidence/bench/unit-of-work-before/raw/write-5k-c16-r1.json new file mode 100644 index 00000000..8511e131 --- /dev/null +++ b/evidence/bench/unit-of-work-before/raw/write-5k-c16-r1.json @@ -0,0 +1 @@ +{"root_group":{"name":"","path":"","id":"d41d8cd98f00b204e9800998ecf8427e","groups":[],"checks":[{"name":"message 201","path":"::message 201","id":"6445aff337e1ade0bc10402fbac79882","passes":1000,"fails":0}]},"options":{"summaryTrendStats":["avg","min","med","p(50)","p(95)","p(99)","max"],"summaryTimeUnit":"","noColor":true},"state":{"isStdOutTTY":false,"isStdErrTTY":false,"testRunDurationMs":2608.563821},"metrics":{"http_reqs":{"type":"counter","contains":"default","values":{"count":1000,"rate":383.35270617095625}},"http_req_blocked":{"type":"trend","contains":"time","values":{"max":0.916834,"avg":0.011096260000000068,"min":0.000542,"med":0.0015,"p(50)":0.0015,"p(95)":0.005502049999999998,"p(99)":0.3768191699999985}},"http_req_receiving":{"type":"trend","contains":"time","values":{"min":0.005,"med":0.021,"p(50)":0.021,"p(95)":0.07484434999999999,"p(99)":0.13909316,"max":1.040542,"avg":0.03188410799999997}},"http_req_sending":{"type":"trend","contains":"time","values":{"max":1.240833,"avg":0.012556742000000008,"min":0.00225,"med":0.006167,"p(50)":0.006167,"p(95)":0.024696149999999976,"p(99)":0.060369669999999966}},"http_req_duration{expected_response:true}":{"type":"trend","contains":"time","values":{"p(50)":32.155103999999994,"p(95)":95.91642680000001,"p(99)":125.38881823999999,"max":159.23275,"avg":41.419282618999944,"min":11.985208,"med":32.155103999999994},"thresholds":{"max>=0":{"ok":true}}},"http_req_connecting":{"type":"trend","contains":"time","values":{"p(95)":0,"p(99)":0.04960341999999998,"max":0.26025,"avg":0.001535375,"min":0,"med":0,"p(50)":0}},"http_req_tls_handshaking":{"type":"trend","contains":"time","values":{"min":0,"med":0,"p(50)":0,"p(95)":0,"p(99)":0,"max":0,"avg":0}},"http_req_failed":{"values":{"rate":0,"passes":0,"fails":1000},"type":"rate","contains":"default"},"http_req_duration":{"type":"trend","contains":"time","values":{"min":11.985208,"med":32.155103999999994,"p(50)":32.155103999999994,"p(95)":95.91642680000001,"p(99)":125.38881823999999,"max":159.23275,"avg":41.419282618999944}},"http_req_waiting":{"values":{"p(95)":95.80526044999999,"p(99)":125.32728891999999,"max":159.197542,"avg":41.37484176899995,"min":11.967916,"med":32.1255625,"p(50)":32.1255625},"type":"trend","contains":"time"},"data_sent":{"type":"counter","contains":"data","values":{"count":376000,"rate":144140.61752027954}},"iterations":{"type":"counter","contains":"default","values":{"count":1000,"rate":383.35270617095625}},"vus_max":{"type":"gauge","contains":"default","values":{"value":16,"min":16,"max":16}},"checks":{"type":"rate","contains":"default","values":{"fails":0,"rate":1,"passes":1000}},"vus":{"type":"gauge","contains":"default","values":{"max":16,"value":16,"min":16}},"data_received":{"type":"counter","contains":"data","values":{"count":490000,"rate":187842.82602376858}},"iteration_duration":{"type":"trend","contains":"time","values":{"p(99)":125.55100273999999,"max":159.352416,"avg":41.535506086000005,"min":12.0395,"med":32.22275,"p(50)":32.22275,"p(95)":96.1073917}}}} \ No newline at end of file diff --git a/evidence/bench/unit-of-work-before/raw/write-5k-c4-r1.json b/evidence/bench/unit-of-work-before/raw/write-5k-c4-r1.json new file mode 100644 index 00000000..f1d2a7a3 --- /dev/null +++ b/evidence/bench/unit-of-work-before/raw/write-5k-c4-r1.json @@ -0,0 +1 @@ +{"root_group":{"name":"","path":"","id":"d41d8cd98f00b204e9800998ecf8427e","groups":[],"checks":[{"path":"::message 201","id":"6445aff337e1ade0bc10402fbac79882","passes":1000,"fails":0,"name":"message 201"}]},"options":{"summaryTrendStats":["avg","min","med","p(50)","p(95)","p(99)","max"],"summaryTimeUnit":"","noColor":true},"state":{"isStdOutTTY":false,"isStdErrTTY":false,"testRunDurationMs":1712.946626},"metrics":{"data_sent":{"type":"counter","contains":"data","values":{"count":376000,"rate":219504.79617570993}},"vus":{"type":"gauge","contains":"default","values":{"max":4,"value":4,"min":4}},"http_req_connecting":{"contains":"time","values":{"max":0.817125,"avg":0.002441042,"min":0,"med":0,"p(50)":0,"p(95)":0,"p(99)":0},"type":"trend"},"http_req_receiving":{"type":"trend","contains":"time","values":{"p(95)":0.04095805,"p(99)":0.08348448999999994,"max":0.305666,"avg":0.01753987599999998,"min":0.005708,"med":0.013125,"p(50)":0.013125}},"vus_max":{"type":"gauge","contains":"default","values":{"min":4,"max":4,"value":4}},"http_reqs":{"type":"counter","contains":"default","values":{"count":1000,"rate":583.7893515311434}},"http_req_failed":{"contains":"default","values":{"rate":0,"passes":0,"fails":1000},"type":"rate"},"iterations":{"values":{"count":1000,"rate":583.7893515311434},"type":"counter","contains":"default"},"http_req_duration{expected_response:true}":{"type":"trend","contains":"time","values":{"max":80.708417,"avg":6.772950257000002,"min":4.159875,"med":6.082229,"p(50)":6.082229,"p(95)":8.975899999999996,"p(99)":15.047881669999999},"thresholds":{"max>=0":{"ok":true}}},"http_req_duration":{"type":"trend","contains":"time","values":{"min":4.159875,"med":6.082229,"p(50)":6.082229,"p(95)":8.975899999999996,"p(99)":15.047881669999999,"max":80.708417,"avg":6.772950257000002}},"http_req_tls_handshaking":{"type":"trend","contains":"time","values":{"med":0,"p(50)":0,"p(95)":0,"p(99)":0,"max":0,"avg":0,"min":0}},"http_req_sending":{"type":"trend","contains":"time","values":{"max":1.162834,"avg":0.007186256000000006,"min":0.002042,"med":0.003666,"p(50)":0.003666,"p(95)":0.012379149999999997,"p(99)":0.028256249999999997}},"http_req_blocked":{"type":"trend","contains":"time","values":{"p(95)":0.002419049999999998,"p(99)":0.004376249999999999,"max":1.595334,"avg":0.006733755000000027,"min":0.0005,"med":0.000917,"p(50)":0.000917}},"checks":{"type":"rate","contains":"default","values":{"rate":1,"passes":1000,"fails":0}},"iteration_duration":{"values":{"avg":6.8403362109999915,"min":4.208792,"med":6.1297085,"p(50)":6.1297085,"p(95)":9.068070199999996,"p(99)":15.198800419999998,"max":80.768959},"type":"trend","contains":"time"},"http_req_waiting":{"type":"trend","contains":"time","values":{"avg":6.748224124999995,"min":4.144166,"med":6.064396,"p(50)":6.064396,"p(95)":8.919716999999997,"p(99)":15.030408749999998,"max":80.68875}},"data_received":{"contains":"data","values":{"count":490000,"rate":286056.7822502603},"type":"counter"}}} \ No newline at end of file diff --git a/evidence/bench/unit-of-work-before/runs.csv b/evidence/bench/unit-of-work-before/runs.csv new file mode 100644 index 00000000..9cf56aeb --- /dev/null +++ b/evidence/bench/unit-of-work-before/runs.csv @@ -0,0 +1,19 @@ +run,scenario,size,concurrency,repeat,duration_s,requests_ok,requests_failed,rps,error_ratio,p50_ms,p95_ms,p99_ms,max_ms,app_cpu_cores,rss_start_mib,rss_end_mib,rss_max_mib,mem_cgroup_end_mib,store_messages_start,store_messages_end,generator_cpu_cores,flags,check_failed,db_cpu_cores,series,cell,attempt,config,replicas,replica_cpus,replica_memory,db_max_connections,step,step_kind,target_rps,sent,missing,dropped_iterations,slo_error_ratio,slo_pass,fail_reason,read_p95_ms,write_p95_ms,me_p95_ms,read_errors,write_errors,me_errors,short_pages,vus_max,generator_throttled_ratio,generator_mem_peak_mib,app_cpu_replica_max,app_cpu_second_max,app_throttled_ratio,app_throttled_ms,app_mem_peak_mib,app_us_per_request,db_throttled_ratio,db_mem_peak_mib,db_us_per_request,lb_cpu_cores,lb_throttled_ratio,cache_cpu_cores,vm_busy_cores,vm_cpu_pressure,db_commits_per_s,db_rollbacks_per_s,db_wal_mib_per_s,db_wal_fsyncs_per_s,db_sessions_new,db_conn_max,db_conn_replica_max,db_aas_cpu,db_aas_wal,db_aas_lock,db_aas_lwlock,db_aas_io,db_aas_other,db_idle_in_tx_mean,pool_busy_share,db_too_many_clients,lb_qtime_ms,lb_ctime_ms,lb_rtime_ms,lb_ttime_ms,lb_scur_max,lb_qcur_max,lb_retries,lb_redispatches,lb_econ,lb_eresp,lb_chkdown,lb_5xx,instances,instance_share_min,instance_share_max,host_swapouts,signs,error_codes,level +1,read,1000,1,1,5.001,2489,0,497.7,0.0,1.856,2.459,2.953,3.887,0.819,125.0,125.0,125.0,113.6,4500,4500,0.127,,0,0.137,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +2,read,1000,4,1,5.003,3295,0,658.6,0.0,5.215,8.525,18.93,62.826,1.001,125.0,125.0,125.0,114.0,4500,4500,0.162,,0,0.184,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +3,read,1000,16,1,5.017,3513,0,700.2,0.0,20.992,39.748,61.908,85.889,1.004,125.0,125.0,125.0,114.1,4500,4500,0.158,,0,0.18,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +4,write,1000,1,1,2.457,1000,0,407.0,0.0,2.054,3.852,5.662,14.682,0.757,125.0,125.0,125.0,114.2,4600,5600,0.104,,0,0.131,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +5,write,1000,4,1,1.635,1000,0,611.7,0.0,5.685,10.718,12.299,15.93,0.99,125.0,125.0,125.0,115.9,5700,6700,0.149,,0,0.216,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +6,write,1000,16,1,1.672,1000,0,598.2,0.0,25.08,40.416,77.287,85.162,1.009,125.0,125.2,125.2,118.3,6800,7800,0.143,,0,0.221,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +7,read,5000,1,1,5.002,2228,0,445.4,0.0,1.953,2.998,4.121,80.766,0.824,125.0,125.0,125.0,115.6,8500,8500,0.131,,0,0.136,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +8,read,5000,4,1,5.005,3284,0,656.1,0.0,5.419,8.586,15.028,44.245,1.002,125.0,125.0,125.0,115.8,8500,8500,0.154,,0,0.188,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +9,read,5000,16,1,5.015,3033,0,604.8,0.0,23.794,50.607,76.911,128.477,1.006,125.0,125.0,125.0,114.1,8500,8500,0.163,,0,0.196,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +10,write,5000,1,1,2.51,1000,0,398.4,0.0,2.073,3.962,7.609,25.025,0.755,125.0,125.0,125.0,115.9,8600,9600,0.106,,0,0.158,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +11,write,5000,4,1,1.713,1000,0,583.8,0.0,6.082,8.976,15.048,80.708,1.001,125.0,125.0,125.0,116.1,9700,10700,0.139,,0,0.194,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +12,write,5000,16,1,2.609,1000,0,383.4,0.0,32.155,95.916,125.389,159.233,0.998,125.1,125.4,125.5,114.4,10800,11800,0.136,,0,0.265,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +13,read,10000,1,1,5.0,2253,0,450.6,0.0,1.854,3.16,6.16,48.953,0.808,125.1,125.1,125.1,118.0,13500,13500,0.125,,0,0.15,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +14,read,10000,4,1,5.004,3164,0,632.2,0.0,5.636,8.469,14.286,55.594,1.002,125.1,125.1,125.2,116.4,13500,13500,0.161,,0,0.192,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +15,read,10000,16,1,5.02,3053,0,608.2,0.0,22.064,56.762,79.454,216.869,1.004,125.2,125.2,125.2,116.0,13500,13500,0.159,,0,0.194,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +16,write,10000,1,1,2.022,1000,0,494.7,0.0,1.891,2.343,3.107,7.76,0.783,125.2,125.2,125.2,115.6,13600,14600,0.1,,0,0.143,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +17,write,10000,4,1,1.589,1000,0,629.2,0.0,5.792,8.023,9.853,69.173,0.994,125.2,125.2,125.2,115.6,14700,15700,0.136,,0,0.188,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +18,write,10000,16,1,1.9,1000,0,526.2,0.0,27.191,56.236,87.509,110.388,1.009,125.2,125.5,125.5,116.9,15800,16800,0.153,,0,0.228,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, diff --git a/evidence/bench/unit-of-work-before/summary.md b/evidence/bench/unit-of-work-before/summary.md new file mode 100644 index 00000000..82f81fbf --- /dev/null +++ b/evidence/bench/unit-of-work-before/summary.md @@ -0,0 +1,167 @@ +# Нагрузочный замер: метка `unit-of-work-before` + +- Статус: **complete** +- Commit: `b2fb88f` +- Профиль `quick`: размеры 1k, 5k, 10k; клиенты 1, 4, 16; повторов 1; чтение 5 с после 2 с прогрева; запись 1000 после 100 +- Лимиты без swap: API 1 CPU / 2g × 1 реплик за HAProxy 1 CPU / 256m, PostgreSQL 4 CPU / 3g, Valkey 2 CPU / 512m; CPU и RSS API — сумма по репликам; значения — медиана (min–max) по повторам +- Посторонние контейнеры в VM во время замера: domains-api-1, domains-bot-1, domains-postgres-1 + +## Сценарий `read` + +| Размер | Клиенты | RPS | p50, мс | p95, мс | p99, мс | max, мс | CPU API, ядер | CPU БД, ядер | RSS конец, МиБ | Сообщений в начале | Пометки | +|---|---|---|---|---|---|---|---|---|---|---|---| +| 1k | 1 | 498 | 1.86 | 2.46 | 2.95 | 3.9 | 0.82 | 0.14 | 125.0 | 4500 | — | +| 1k | 4 | 659 | 5.21 | 8.53 | 18.93 | 62.8 | 1.00 | 0.18 | 125.0 | 4500 | — | +| 1k | 16 | 700 | 20.99 | 39.75 | 61.91 | 85.9 | 1.00 | 0.18 | 125.0 | 4500 | — | +| 5k | 1 | 445 | 1.95 | 3.00 | 4.12 | 80.8 | 0.82 | 0.14 | 125.0 | 8500 | — | +| 5k | 4 | 656 | 5.42 | 8.59 | 15.03 | 44.2 | 1.00 | 0.19 | 125.0 | 8500 | — | +| 5k | 16 | 605 | 23.79 | 50.61 | 76.91 | 128.5 | 1.01 | 0.20 | 125.0 | 8500 | — | +| 10k | 1 | 451 | 1.85 | 3.16 | 6.16 | 49.0 | 0.81 | 0.15 | 125.1 | 13500 | — | +| 10k | 4 | 632 | 5.64 | 8.47 | 14.29 | 55.6 | 1.00 | 0.19 | 125.1 | 13500 | — | +| 10k | 16 | 608 | 22.06 | 56.76 | 79.45 | 216.9 | 1.00 | 0.19 | 125.2 | 13500 | — | + +## Сценарий `write` + +| Размер | Клиенты | RPS | p50, мс | p95, мс | p99, мс | max, мс | CPU API, ядер | CPU БД, ядер | RSS конец, МиБ | Сообщений в начале | Пометки | +|---|---|---|---|---|---|---|---|---|---|---|---| +| 1k | 1 | 407 | 2.05 | 3.85 | 5.66 | 14.7 | 0.76 | 0.13 | 125.0 | 4600 | — | +| 1k | 4 | 612 | 5.68 | 10.72 | 12.30 | 15.9 | 0.99 | 0.22 | 125.0 | 5700 | — | +| 1k | 16 | 598 | 25.08 | 40.42 | 77.29 | 85.2 | 1.01 | 0.22 | 125.2 | 6800 | — | +| 5k | 1 | 398 | 2.07 | 3.96 | 7.61 | 25.0 | 0.76 | 0.16 | 125.0 | 8600 | — | +| 5k | 4 | 584 | 6.08 | 8.98 | 15.05 | 80.7 | 1.00 | 0.19 | 125.0 | 9700 | — | +| 5k | 16 | 383 | 32.16 | 95.92 | 125.39 | 159.2 | 1.00 | 0.27 | 125.4 | 10800 | — | +| 10k | 1 | 495 | 1.89 | 2.34 | 3.11 | 7.8 | 0.78 | 0.14 | 125.2 | 13600 | — | +| 10k | 4 | 629 | 5.79 | 8.02 | 9.85 | 69.2 | 0.99 | 0.19 | 125.2 | 14700 | — | +| 10k | 16 | 526 | 27.19 | 56.24 | 87.51 | 110.4 | 1.01 | 0.23 | 125.5 | 15800 | — | + +## Память и наполнение по размерам + +Объём `messages` — после `VACUUM (ANALYZE)`, до прогонов: в таблице N сообщений читаемого чата и сообщения фоновых чатов (`Сообщений`). + +| Размер | Сообщений | RSS API до, МиБ | RSS API после, МиБ | Байт RSS на сообщение | Таблица, МиБ | Индексы, МиБ | Байт в БД на сообщение | Наполнение, сообщ/с | Курсоров в пуле | Пик RSS за размер, МиБ | +|---|---|---|---|---|---|---|---|---|---|---| +| 1k | 4500 | 121.1 | 124.9 | 895 | 0.8 | 0.6 | 328 | 554 | 9 | 184.6 | +| 5k | 8500 | 121.1 | 124.9 | 473 | 1.5 | 1.1 | 318 | 512 | 49 | 184.5 | +| 10k | 13500 | 121.1 | 125.1 | 313 | 2.3 | 1.9 | 329 | 515 | 99 | 184.5 | + +## Планы запроса истории + +Страница (`limit` профиля) читаемого чата и первого чата каждого фонового уровня. `app` — план запроса приложения (auto_explain). Остальное — тот же запрос с теми же параметрами в psql, в откатываемой транзакции: `psql` — индекс приложения, `generic` — он же с generic plan, `or-cursor` — условие курсора через OR, `no-index` — без индекса, дальше — варианты индекса профиля. Буферы — верхнего узла плана, файлы — `explain-<размер>.txt`. + +| Размер | Чат | Страница | После сообщений | Вариант | Узел | shared hit | read | Строк | Время, мс | План | +|---|---|---|---|---|---|---|---|---|---|---| +| 1k | read 1k | first | 0 | app | Index Scan using ix_messages_chat_id_created_at_id on messages | 38 | 0 | 51 | 0.112 | custom | +| 1k | read 1k | middle | 500 | app | Index Scan using ix_messages_chat_id_created_at_id on messages | 52 | 0 | 51 | 0.109 | custom | +| 1k | read 1k | middle | 500 | psql | Index Scan using ix_messages_chat_id_created_at_id on messages | 52 | 0 | 51 | 0.067 | custom | +| 1k | read 1k | middle | 500 | generic | Index Scan using ix_messages_chat_id_created_at_id on messages | 52 | 0 | 51 | 0.079 | generic | +| 1k | read 1k | middle | 500 | or-cursor | Index Scan using ix_messages_chat_id_created_at_id on messages | 533 | 0 | 51 | 0.132 | custom | +| 1k | read 1k | middle | 500 | no-index | Seq Scan on messages | 100 | 0 | 51 | 0.582 | custom | +| 1k | read 1k | middle | 500 | chat_only | Bitmap Heap Scan on messages | 103 | 0 | 51 | 0.503 | custom | +| 1k | read 1k | middle | 500 | covering | Index Only Scan using bench_variant on messages | 4 | 0 | 51 | 0.051 | custom | +| 1k | read 1k | last | 900 | app | Bitmap Heap Scan on messages | 27 | 0 | 51 | 0.190 | custom | +| 1k | bg 1k | first | 0 | app | Index Scan using ix_messages_chat_id_created_at_id on messages | 43 | 0 | 51 | 0.097 | custom | +| 1k | bg 1k | middle | 500 | app | Index Scan using ix_messages_chat_id_created_at_id on messages | 53 | 0 | 51 | 0.096 | custom | +| 1k | bg 1k | middle | 500 | psql | Index Scan using ix_messages_chat_id_created_at_id on messages | 53 | 0 | 51 | 0.072 | custom | +| 1k | bg 1k | middle | 500 | generic | Index Scan using ix_messages_chat_id_created_at_id on messages | 53 | 0 | 51 | 0.063 | generic | +| 1k | bg 1k | middle | 500 | or-cursor | Index Scan using ix_messages_chat_id_created_at_id on messages | 540 | 0 | 51 | 0.121 | custom | +| 1k | bg 1k | middle | 500 | no-index | Seq Scan on messages | 100 | 0 | 51 | 0.497 | custom | +| 1k | bg 1k | middle | 500 | chat_only | Bitmap Heap Scan on messages | 103 | 0 | 51 | 0.446 | custom | +| 1k | bg 1k | middle | 500 | covering | Index Only Scan using bench_variant on messages | 4 | 0 | 51 | 0.052 | custom | +| 1k | bg 1k | last | 900 | app | Bitmap Heap Scan on messages | 19 | 0 | 51 | 0.145 | custom | +| 1k | bg 100 | first | 0 | app | Bitmap Heap Scan on messages | 73 | 0 | 51 | 0.197 | custom | +| 1k | bg 100 | first | 0 | psql | Bitmap Heap Scan on messages | 73 | 0 | 51 | 0.136 | custom | +| 1k | bg 100 | first | 0 | generic | Index Scan using ix_messages_chat_id_created_at_id on messages | 47 | 0 | 51 | 0.057 | generic | +| 1k | bg 100 | first | 0 | no-index | Seq Scan on messages | 100 | 0 | 51 | 0.206 | custom | +| 1k | bg 100 | first | 0 | chat_only | Bitmap Heap Scan on messages | 72 | 0 | 51 | 0.119 | custom | +| 1k | bg 100 | first | 0 | covering | Index Only Scan using bench_variant on messages | 4 | 0 | 51 | 0.047 | custom | +| 1k | bg 10 | first | 0 | app | Bitmap Heap Scan on messages | 12 | 0 | 10 | 0.036 | custom | +| 1k | bg 10 | first | 0 | psql | Bitmap Heap Scan on messages | 12 | 0 | 10 | 0.031 | custom | +| 1k | bg 10 | first | 0 | generic | Index Scan using ix_messages_chat_id_created_at_id on messages | 12 | 0 | 10 | 0.026 | generic | +| 1k | bg 10 | first | 0 | no-index | Seq Scan on messages | 100 | 0 | 10 | 0.132 | custom | +| 1k | bg 10 | first | 0 | chat_only | Bitmap Heap Scan on messages | 12 | 0 | 10 | 0.030 | custom | +| 1k | bg 10 | first | 0 | covering | Index Only Scan using bench_variant on messages | 3 | 0 | 10 | 0.018 | custom | +| 5k | read 5k | first | 0 | app | Index Scan using ix_messages_chat_id_created_at_id on messages | 27 | 0 | 51 | 0.135 | custom | +| 5k | read 5k | middle | 2500 | app | Index Scan using ix_messages_chat_id_created_at_id on messages | 54 | 0 | 51 | 0.130 | generic | +| 5k | read 5k | middle | 2500 | psql | Index Scan using ix_messages_chat_id_created_at_id on messages | 54 | 0 | 51 | 0.063 | custom | +| 5k | read 5k | middle | 2500 | generic | Index Scan using ix_messages_chat_id_created_at_id on messages | 54 | 0 | 51 | 0.064 | generic | +| 5k | read 5k | middle | 2500 | or-cursor | Index Scan using ix_messages_chat_id_created_at_id on messages | 2555 | 0 | 51 | 0.402 | custom | +| 5k | read 5k | middle | 2500 | no-index | Seq Scan on messages | 186 | 0 | 51 | 2.243 | custom | +| 5k | read 5k | middle | 2500 | chat_only | Seq Scan on messages | 186 | 0 | 51 | 2.017 | custom | +| 5k | read 5k | middle | 2500 | covering | Index Only Scan using bench_variant on messages | 5 | 0 | 51 | 0.047 | custom | +| 5k | read 5k | last | 4900 | app | Index Scan using ix_messages_chat_id_created_at_id on messages | 53 | 0 | 51 | 0.119 | generic | +| 5k | bg 1k | first | 0 | app | Index Scan using ix_messages_chat_id_created_at_id on messages | 47 | 0 | 51 | 0.118 | custom | +| 5k | bg 1k | middle | 500 | app | Index Scan using ix_messages_chat_id_created_at_id on messages | 49 | 0 | 51 | 0.122 | generic | +| 5k | bg 1k | middle | 500 | psql | Index Scan using ix_messages_chat_id_created_at_id on messages | 49 | 0 | 51 | 0.059 | custom | +| 5k | bg 1k | middle | 500 | generic | Index Scan using ix_messages_chat_id_created_at_id on messages | 49 | 0 | 51 | 0.075 | generic | +| 5k | bg 1k | middle | 500 | or-cursor | Index Scan using ix_messages_chat_id_created_at_id on messages | 531 | 0 | 51 | 0.134 | custom | +| 5k | bg 1k | middle | 500 | no-index | Seq Scan on messages | 186 | 0 | 51 | 0.569 | custom | +| 5k | bg 1k | middle | 500 | chat_only | Bitmap Heap Scan on messages | 187 | 0 | 51 | 0.467 | custom | +| 5k | bg 1k | middle | 500 | covering | Index Only Scan using bench_variant on messages | 5 | 0 | 51 | 0.055 | custom | +| 5k | bg 1k | last | 900 | app | Index Scan using ix_messages_chat_id_created_at_id on messages | 51 | 0 | 51 | 0.136 | generic | +| 5k | bg 100 | first | 0 | app | Index Scan using ix_messages_chat_id_created_at_id on messages | 47 | 0 | 51 | 0.168 | custom | +| 5k | bg 100 | first | 0 | psql | Index Scan using ix_messages_chat_id_created_at_id on messages | 47 | 0 | 51 | 0.080 | custom | +| 5k | bg 100 | first | 0 | generic | Index Scan using ix_messages_chat_id_created_at_id on messages | 47 | 0 | 51 | 0.094 | generic | +| 5k | bg 100 | first | 0 | no-index | Seq Scan on messages | 186 | 0 | 51 | 0.362 | custom | +| 5k | bg 100 | first | 0 | chat_only | Bitmap Heap Scan on messages | 83 | 0 | 51 | 0.149 | custom | +| 5k | bg 100 | first | 0 | covering | Index Only Scan using bench_variant on messages | 5 | 0 | 51 | 0.053 | custom | +| 5k | bg 10 | first | 0 | app | Bitmap Heap Scan on messages | 12 | 0 | 10 | 0.088 | custom | +| 5k | bg 10 | first | 0 | psql | Bitmap Heap Scan on messages | 12 | 0 | 10 | 0.049 | custom | +| 5k | bg 10 | first | 0 | generic | Index Scan using ix_messages_chat_id_created_at_id on messages | 12 | 0 | 10 | 0.029 | generic | +| 5k | bg 10 | first | 0 | no-index | Seq Scan on messages | 186 | 0 | 10 | 0.205 | custom | +| 5k | bg 10 | first | 0 | chat_only | Bitmap Heap Scan on messages | 12 | 0 | 10 | 0.026 | custom | +| 5k | bg 10 | first | 0 | covering | Index Only Scan using bench_variant on messages | 4 | 0 | 10 | 0.020 | custom | +| 10k | read 10k | first | 0 | app | Index Scan using ix_messages_chat_id_created_at_id on messages | 18 | 0 | 51 | 0.166 | custom | +| 10k | read 10k | middle | 5000 | app | Index Scan using ix_messages_chat_id_created_at_id on messages | 54 | 0 | 51 | 0.159 | generic | +| 10k | read 10k | middle | 5000 | psql | Index Scan using ix_messages_chat_id_created_at_id on messages | 54 | 0 | 51 | 0.056 | custom | +| 10k | read 10k | middle | 5000 | generic | Index Scan using ix_messages_chat_id_created_at_id on messages | 54 | 0 | 51 | 0.069 | generic | +| 10k | read 10k | middle | 5000 | or-cursor | Index Scan using ix_messages_chat_id_created_at_id on messages | 5077 | 0 | 51 | 0.621 | custom | +| 10k | read 10k | middle | 5000 | no-index | Seq Scan on messages | 294 | 0 | 51 | 3.760 | custom | +| 10k | read 10k | middle | 5000 | chat_only | Seq Scan on messages | 294 | 0 | 51 | 3.726 | custom | +| 10k | read 10k | middle | 5000 | covering | Index Only Scan using bench_variant on messages | 5 | 0 | 51 | 0.051 | custom | +| 10k | read 10k | last | 9900 | app | Index Scan using ix_messages_chat_id_created_at_id on messages | 54 | 0 | 51 | 0.111 | generic | +| 10k | bg 1k | first | 0 | app | Index Scan using ix_messages_chat_id_created_at_id on messages | 47 | 0 | 51 | 0.147 | custom | +| 10k | bg 1k | middle | 500 | app | Index Scan using ix_messages_chat_id_created_at_id on messages | 46 | 0 | 51 | 0.129 | generic | +| 10k | bg 1k | middle | 500 | psql | Index Scan using ix_messages_chat_id_created_at_id on messages | 46 | 0 | 51 | 0.054 | custom | +| 10k | bg 1k | middle | 500 | generic | Index Scan using ix_messages_chat_id_created_at_id on messages | 46 | 0 | 51 | 0.066 | generic | +| 10k | bg 1k | middle | 500 | or-cursor | Index Scan using ix_messages_chat_id_created_at_id on messages | 507 | 0 | 51 | 0.141 | custom | +| 10k | bg 1k | middle | 500 | no-index | Seq Scan on messages | 294 | 0 | 51 | 1.061 | custom | +| 10k | bg 1k | middle | 500 | chat_only | Bitmap Heap Scan on messages | 286 | 0 | 51 | 0.467 | custom | +| 10k | bg 1k | middle | 500 | covering | Index Only Scan using bench_variant on messages | 5 | 0 | 51 | 0.051 | custom | +| 10k | bg 1k | last | 900 | app | Index Scan using ix_messages_chat_id_created_at_id on messages | 47 | 0 | 51 | 0.131 | generic | +| 10k | bg 100 | first | 0 | app | Index Scan using ix_messages_chat_id_created_at_id on messages | 51 | 0 | 51 | 0.157 | custom | +| 10k | bg 100 | first | 0 | psql | Index Scan using ix_messages_chat_id_created_at_id on messages | 51 | 0 | 51 | 0.060 | custom | +| 10k | bg 100 | first | 0 | generic | Index Scan using ix_messages_chat_id_created_at_id on messages | 51 | 0 | 51 | 0.072 | generic | +| 10k | bg 100 | first | 0 | no-index | Seq Scan on messages | 294 | 0 | 51 | 0.415 | custom | +| 10k | bg 100 | first | 0 | chat_only | Bitmap Heap Scan on messages | 95 | 0 | 51 | 0.131 | custom | +| 10k | bg 100 | first | 0 | covering | Index Only Scan using bench_variant on messages | 4 | 0 | 51 | 0.051 | custom | +| 10k | bg 10 | first | 0 | app | Index Scan using ix_messages_chat_id_created_at_id on messages | 12 | 0 | 10 | 0.043 | custom | +| 10k | bg 10 | first | 0 | psql | Index Scan using ix_messages_chat_id_created_at_id on messages | 12 | 0 | 10 | 0.022 | custom | +| 10k | bg 10 | first | 0 | generic | Index Scan using ix_messages_chat_id_created_at_id on messages | 12 | 0 | 10 | 0.026 | generic | +| 10k | bg 10 | first | 0 | no-index | Seq Scan on messages | 294 | 0 | 10 | 0.358 | custom | +| 10k | bg 10 | first | 0 | chat_only | Index Scan using bench_variant on messages | 12 | 0 | 10 | 0.023 | custom | +| 10k | bg 10 | first | 0 | covering | Index Only Scan using bench_variant on messages | 4 | 0 | 10 | 0.019 | custom | + +## Стоимость записи по вариантам индекса + +Вставка порции сообщений во все чаты в пропорции наполнения одной командой, в транзакции, которая откатывается; индекс истории построен заново, перед вставкой `CHECKPOINT`. Значения — медиана (min–max) повторов. «4000 символов» — вставка сообщения максимальной длины из несжимаемого текста. + +| Размер | Вариант | Строк вставки | Индекс, МиБ | Байт индекса на сообщение | мкс на сообщение | WAL байт на сообщение | FPI на 1000 | 4000 символов | +|---|---|---|---|---|---|---|---|---| +| 1k | app | 5000 | 0.5 | 60.9 | 5.57 (4.92–5.86) | 487 (487–499) | 20.2 (11.2–20.2) | ok | +| 1k | chat_only | 5000 | 0.1 | 10.5 | 4.77 (4.73–5.09) | 399 (399–399) | 18.0 (18.0–18.0) | ok | +| 1k | covering | 5000 | 1.2 | 159.6 | 5.36 (5.30–6.96) | 693 (693–693) | 24.2 (24.2–24.2) | index row requires 12072 bytes, maximum size is 8191 | +| 1k | none | 5000 | 0.0 | 0.0 | 4.29 (4.26–4.37) | 314 (314–314) | 16.6 (16.6–16.6) | ok | +| 5k | app | 5000 | 0.7 | 60.4 | 5.05 (4.93–6.68) | 506 (500–506) | 21.8 (17.8–21.8) | ok | +| 5k | chat_only | 5000 | 0.1 | 9.0 | 4.76 (4.70–4.76) | 421 (421–422) | 19.2 (19.2–19.6) | ok | +| 5k | covering | 5000 | 1.8 | 160.4 | 5.81 (5.45–5.87) | 703 (703–703) | 25.0 (25.0–25.2) | index row requires 12072 bytes, maximum size is 8191 | +| 5k | none | 5000 | 0.0 | 0.0 | 4.27 (4.25–4.70) | 336 (336–336) | 17.8 (17.6–17.8) | ok | +| 10k | app | 5000 | 1.0 | 59.5 | 5.12 (5.01–6.31) | 542 (540–557) | 31.4 (19.0–31.6) | ok | +| 10k | chat_only | 5000 | 0.1 | 8.3 | 4.80 (4.72–5.69) | 452 (450–454) | 29.2 (27.6–29.4) | ok | +| 10k | covering | 5000 | 2.6 | 160.4 | 5.59 (5.47–7.14) | 748 (748–749) | 35.4 (34.8–35.4) | index row requires 12072 bytes, maximum size is 8191 | +| 10k | none | 5000 | 0.0 | 0.0 | 4.36 (4.34–4.45) | 365 (365–367) | 27.8 (27.4–27.8) | ok | + +## Кривая наполнения 10k: запись при росте хранилища, 32 клиента + +| Порция | Сообщений после | RPS | p50, мс | p95, мс | p99, мс | max, мс | CPU API, ядер | CPU БД, ядер | RSS, МиБ | Пометки | +|---|---|---|---|---|---|---|---|---|---|---| +| 1 | 13500 | 515 | 56.009 | 121.243 | 188.234 | 417.242 | 0.996 | 0.22 | 125.1 | — | diff --git a/evidence/compare/unit-of-work-before__unit-of-work-after.md b/evidence/compare/unit-of-work-before__unit-of-work-after.md new file mode 100644 index 00000000..08a66e59 --- /dev/null +++ b/evidence/compare/unit-of-work-before__unit-of-work-after.md @@ -0,0 +1,71 @@ +# Сравнение меток: `unit-of-work-before` → `unit-of-work-after` + +- Команда: `make bench_compare BEFORE=unit-of-work-before AFTER=unit-of-work-after AA=unit-of-work-aa` +- «До» и «после» — медиана повторов ячейки, в скобках min–max. Δ RPS — отношение медиан минус единица. +- CPU на запрос — `app_cpu_cores / rps`, медиана по повторам; задержки — медианы по повторам, «до → после». +- Уровень шума — наибольшее по ячейкам сценария изменение медианы RPS между `unit-of-work-aa` и `unit-of-work-before`. Он имеет смысл, только если код приложения в этих метках одинаков; это проверяется по git, команда этого не видит. +- «Эффект» — разбросы повторов не пересекаются и изменение медианы больше уровня шума сценария; иначе «в пределах шума». + +## Метки + +| | `unit-of-work-before` | `unit-of-work-after` | `unit-of-work-aa` | +|---|---|---|---| +| Commit | `b2fb88f` | `6ba74b1` | `b2fb88f` | +| Начало прогона | 2026-10-31T20:32:16+00:00 | 2026-10-31T20:23:07+00:00 | 2026-10-31T20:19:23+00:00 | +| Статус | complete | complete | complete | +| Версии в образе | python 3.12.14, fastapi 0.141.1, starlette 1.7.0, pydantic 2.13.5, uvicorn 0.54.0, sqlalchemy 2.1.1, asyncpg 0.31.0, redis 8.1.0 | python 3.12.14, fastapi 0.141.1, starlette 1.7.0, pydantic 2.13.5, uvicorn 0.54.0, sqlalchemy 2.1.1, asyncpg 0.31.0, redis 8.1.0 | python 3.12.14, fastapi 0.141.1, starlette 1.7.0, pydantic 2.13.5, uvicorn 0.54.0, sqlalchemy 2.1.1, asyncpg 0.31.0, redis 8.1.0 | +| Машина | Apple M3 Pro (6 P + 6 E), ВМ 12 vCPU / 7.7 GiB, Docker 29.9.2 | Apple M3 Pro (6 P + 6 E), ВМ 12 vCPU / 7.7 GiB, Docker 29.9.2 | Apple M3 Pro (6 P + 6 E), ВМ 12 vCPU / 7.7 GiB, Docker 29.9.2 | +| Хост в начале | выгрузок в swap за прогон 0, AC Power | выгрузок в swap за прогон 0, AC Power | выгрузок в swap за прогон 0, AC Power | + +## Замечания + +- `unit-of-work-before`: посторонние контейнеры: domains-api-1, domains-bot-1, domains-postgres-1 +- `unit-of-work-after`: посторонние контейнеры: domains-api-1, domains-bot-1, domains-postgres-1 +- `unit-of-work-aa`: посторонние контейнеры: domains-api-1, domains-bot-1, domains-postgres-1 + +## Уровень шума + +| Сценарий | Наибольшее изменение RPS, `unit-of-work-aa` → `unit-of-work-before` | Ячейка | +|---|---|---| +| read | 14.8% | 5k × 1 | +| write | 34.8% | 5k × 16 | + +## Сценарий `read` + +| Размер | Клиенты | RPS до | RPS после | Δ RPS | Вывод | CPU на запрос, мкс | Δ CPU, мкс | p50, мс | p95, мс | p99, мс | +|---|---|---|---|---|---|---|---|---|---|---| +| 1k | 1 | 498 (498–498) | 417 (417–417) | -16.2% | эффект | 1646 → 1811 | +165 | 1.86 → 2.22 | 2.46 → 2.92 | 2.95 → 3.76 | +| 1k | 4 | 659 (659–659) | 618 (618–618) | -6.1% | в пределах шума | 1520 → 1606 | +86 | 5.21 → 6.08 | 8.53 → 7.63 | 18.93 → 10.92 | +| 1k | 16 | 700 (700–700) | 568 (568–568) | -18.8% | эффект | 1434 → 1767 | +333 | 20.99 → 26.01 | 39.75 → 56.30 | 61.91 → 66.86 | +| 5k | 1 | 445 (445–445) | 431 (431–431) | -3.2% | в пределах шума | 1850 → 1751 | -99 | 1.95 → 2.16 | 3.00 → 2.79 | 4.12 → 3.46 | +| 5k | 4 | 656 (656–656) | 615 (615–615) | -6.2% | в пределах шума | 1527 → 1613 | +86 | 5.42 → 5.97 | 8.59 → 7.60 | 15.03 → 13.78 | +| 5k | 16 | 605 (605–605) | 565 (565–565) | -6.6% | в пределах шума | 1663 → 1775 | +112 | 23.79 → 25.44 | 50.61 → 56.14 | 76.91 → 67.89 | +| 10k | 1 | 451 (451–451) | 417 (417–417) | -7.4% | в пределах шума | 1793 → 1805 | +12 | 1.85 → 2.22 | 3.16 → 2.96 | 6.16 → 4.16 | +| 10k | 4 | 632 (632–632) | 596 (596–596) | -5.7% | в пределах шума | 1585 → 1667 | +82 | 5.64 → 6.01 | 8.47 → 8.84 | 14.29 → 16.64 | +| 10k | 16 | 608 (608–608) | 566 (566–566) | -6.9% | в пределах шума | 1651 → 1771 | +120 | 22.06 → 26.08 | 56.76 → 54.08 | 79.45 → 63.84 | + +Δ RPS по ячейкам: от -18.8% до -3.2%, медиана -6.6%. + +## Сценарий `write` + +| Размер | Клиенты | RPS до | RPS после | Δ RPS | Вывод | CPU на запрос, мкс | Δ CPU, мкс | p50, мс | p95, мс | p99, мс | +|---|---|---|---|---|---|---|---|---|---|---| +| 1k | 1 | 407 (407–407) | 376 (376–376) | -7.7% | в пределах шума | 1860 → 2009 | +149 | 2.05 → 2.40 | 3.85 → 3.63 | 5.66 → 5.18 | +| 1k | 4 | 612 (612–612) | 585 (585–585) | -4.3% | в пределах шума | 1618 → 1682 | +63 | 5.68 → 6.51 | 10.72 → 7.79 | 12.30 → 10.01 | +| 1k | 16 | 598 (598–598) | 518 (518–518) | -13.4% | в пределах шума | 1687 → 1954 | +267 | 25.08 → 28.68 | 40.42 → 42.58 | 77.29 → 77.10 | +| 5k | 1 | 398 (398–398) | 400 (400–400) | +0.4% | в пределах шума | 1895 → 1892 | -3 | 2.07 → 2.33 | 3.96 → 3.11 | 7.61 → 4.17 | +| 5k | 4 | 584 (584–584) | 566 (566–566) | -3.0% | в пределах шума | 1715 → 1735 | +20 | 6.08 → 6.54 | 8.98 → 9.23 | 15.05 → 13.66 | +| 5k | 16 | 383 (383–383) | 527 (527–527) | +37.5% | эффект | 2603 → 1922 | -681 | 32.16 → 27.81 | 95.92 → 44.96 | 125.39 → 74.63 | +| 10k | 1 | 495 (495–495) | 378 (378–378) | -23.5% | в пределах шума | 1583 → 1977 | +394 | 1.89 → 2.41 | 2.34 → 3.45 | 3.11 → 4.91 | +| 10k | 4 | 629 (629–629) | 546 (546–546) | -13.2% | в пределах шума | 1580 → 1837 | +257 | 5.79 → 6.72 | 8.02 → 9.69 | 9.85 → 12.87 | +| 10k | 16 | 526 (526–526) | 515 (515–515) | -2.2% | в пределах шума | 1918 → 1962 | +44 | 27.19 → 29.18 | 56.24 → 44.99 | 87.51 → 66.27 | + +Δ RPS по ячейкам: от -23.5% до +37.5%, медиана -4.3%. + +## Память + +| Размер | Байт RSS на сообщение до | после | RSS после наполнения до, МиБ | после | Байт в БД на сообщение до | после | +|---|---|---|---|---|---|---| +| 1k | 895 | 1430 | 124.9 | 127.6 | 328 | 330 | +| 5k | 473 | 758 | 124.9 | 127.6 | 318 | 321 | +| 10k | 313 | 478 | 125.1 | 127.6 | 329 | 328 | diff --git a/evidence/failover/test-failover.md b/evidence/failover/test-failover.md index 7abcc58b..86194ede 100644 --- a/evidence/failover/test-failover.md +++ b/evidence/failover/test-failover.md @@ -1,21 +1,33 @@ # Отказ одной реплики API -- Команды: `make test-failover ACTION_SCRIPT=scripts/stop-one.sh`, `make replicas`, сдвиг очереди LB одним запросом, `STOP_MODE=kill make test-failover ACTION_SCRIPT=scripts/stop-one.sh`, `make replicas` -- Дата: 2026-10-31, 13:28:58–13:29:36 UTC; оба прогона — код выхода 0 -- Commit: `e2a6427` (ветка `feat/pipeline-reliability`), рабочее дерево без правок кода (добавлены только файлы `evidence/`) +- Команды: `make test-failover ACTION_SCRIPT=scripts/stop-one.sh STOP_MODE=stop STOP_ONE_LOG=<файл>`, `make replicas`, `make test-failover ACTION_SCRIPT=scripts/stop-one.sh STOP_MODE=kill STOP_ONE_LOG=<файл>`, `make replicas`, `make lb_stats` +- Дата: 2026-10-31, 20:41:38–20:42:18 UTC; оба прогона — код выхода 0 +- Commit: `6ba74b1` (ветка `feat/unit-of-work`), рабочее дерево без правок кода (добавлены только файлы `evidence/`) - Стенд: проект compose `mtusi-lab5`, собран `make run_docker` из `HEAD` -- `STOP_ONE_LOG` назвал реплики: первый прогон `TARGET_INSTANCE_ID=e933a5daf6b3`, режим `stop`; второй `TARGET_INSTANCE_ID=d7f1b8c394b9`, режим `kill` +- `STOP_ONE_LOG` назвал реплику: в обоих прогонах `TARGET_INSTANCE_ID=057d8e7efce4`, контейнер `057d8e7efce4…`, остановленный контейнер совпадает с целью; между прогонами `make replicas` вернул реплику ## `stop` ```text -{"observed_instances_before": 2, "successful_writes": 121, "failed_attempts": 0, "first_recovery_seconds": 1.072} +{"observed_instances_before": 2, "successful_writes": 116, "failed_attempts": 0, "first_recovery_seconds": 1.719} PASS: failover preserved confirmed data and existing session. Hook scope needs operator evidence. +2026-10-31T20:41:40Z TARGET_INSTANCE_ID=057d8e7efce4 container=057d8e7efce4c79db09e10ea18dc662a247abe31ec2753d987f7cc8aa1ab365a mode=stop ``` ## `kill` ```text -{"observed_instances_before": 2, "successful_writes": 121, "failed_attempts": 0, "first_recovery_seconds": 0.867} +{"observed_instances_before": 2, "successful_writes": 123, "failed_attempts": 0, "first_recovery_seconds": 0.85} PASS: failover preserved confirmed data and existing session. Hook scope needs operator evidence. +2026-10-31T20:42:00Z TARGET_INSTANCE_ID=057d8e7efce4 container=057d8e7efce4c79db09e10ea18dc662a247abe31ec2753d987f7cc8aa1ab365a mode=kill +``` + +## После `make replicas` + +```text +svname addr status check_status scur stot econ wretr wredis hrsp_5xx +api-1 172.31.0.9:8080 UP L7OK 0 304 0 0 0 0 +api-2 172.31.0.8:8080 UP L7OK 0 61 0 0 5 0 +BACKEND - UP - 0 365 5 0 5 5 +free slots: 6 ``` diff --git a/evidence/relay/process.md b/evidence/relay/process.md index ebbb7387..a8363e48 100644 --- a/evidence/relay/process.md +++ b/evidence/relay/process.md @@ -1,106 +1,50 @@ # Процесс relay - Команда: `python3 .claude/skills/run-mtusi-messenger/driver.py --port 8080 relay-process` -- Дата: 2026-10-31, 16:01:07–16:01:59 UTC; код выхода 0 -- Commit: `399da05` (ветка `feat/pipeline-reliability`), рабочее дерево без правок кода (добавлены только файлы `evidence/`) +- Дата: 2026-10-31, 20:47:32–20:48:29 UTC; код выхода 0 +- Commit: `6ba74b1` (ветка `feat/unit-of-work`), рабочее дерево без правок кода (добавлены только файлы `evidence/`) - Стенд: проект compose `mtusi-lab5`, собран `make run_docker` из `HEAD` - Спеки: `container-run`, `graceful-shutdown`, `service-configuration`, `job-outbox` -- Что нового с `e2a6427`: `docker stop relay` при замороженном брокере с намерением в работе — 1,81 с, код 0, после запуска relay вложение `ready` - Значений секретов в выводе нет, окружение проверяется только по именам +- Вывод сокращён: однотипные строки таблицы «record names …», «default …», «names the field», «hides the value» и «early stop» свёрнуты, все совпали с ожидаемым ```text -Started relay: - poll_interval_seconds: 0.25 - batch_size: 100 - max_published_backlog: 1000 - republish_after_seconds: 300 - failure_pause_seconds: 2 - broker_host: rabbitmq - broker_port: 5672 - broker_queue: messenger.attachment.process.v1 - broker_publish_timeout_seconds: 2 - database_host: postgres - database_port: 5432 - database_name: messenger - database_pool_size: 1 RELAY__BATCH_SIZE=0: exit 2, errors [{'loc': 'relay.batch_size', 'msg': 'Input should be greater than or equal to 1'}] RELAY__MAX_PUBLISHED_BACKLOG=-1: exit 2, errors [{'loc': 'relay.max_published_backlog', 'msg': 'Input should be greater than or equal to 0'}] RELAY__POLL_INTERVAL_SECONDS=abc: exit 2, errors [{'loc': 'relay.poll_interval_seconds', 'msg': 'Input should be a valid number, unable to parse string as a number'}] -docker compose stop relay: 0.2 s -docker stop after 0.3 s: 0.12 s, exit 0, records ['Stopped relay before startup'] -docker stop after 0.2 s: 0.08 s, exit 0, records ['Stopped relay before startup'] -docker stop after 0.4 s: 0.12 s, exit 0, records ['Stopped relay before startup'] +docker compose stop relay: 0.4 s +docker stop after 0.3 s: 0.14 s, exit 0, records ['Stopped relay before startup'] +docker stop after 0.2 s: 0.07 s, exit 0, records ['Stopped relay before startup'] +docker stop after 0.4 s: 0.08 s, exit 0, records ['Stopped relay before startup'] stop frozen broker: docker stop relay took 1.81 s -PID 1 of the relay expected python -m src.relay got python -m src.relay -healthcheck expected NONE got NONE -limit NanoCpus expected 250000000 got 250000000 -limit Memory expected 268435456 got 268435456 -S3__* in the environment expected no got no -S3_* in the environment expected no got no -CACHE__* in the environment expected no got no -VALKEY* in the environment expected no got no -_imaging in mtusi-lab5-api-15 expected no got no -_imaging in mtusi-lab5-api-16 expected no got no -API replicas checked expected yes got yes -_imaging in PID 1 of the relay expected no got no -'Started relay' record expected yes got yes -record names broker_host expected yes got yes -record names broker_port expected yes got yes -record names broker_queue expected yes got yes -record names broker_publish_timeout_seconds expected yes got yes -record names database_host expected yes got yes -record names database_port expected yes got yes -record names database_name expected yes got yes -record names database_pool_size expected yes got yes -default poll_interval_seconds expected 0.25 got 0.25 -default batch_size expected 100.0 got 100.0 -default max_published_backlog expected 1000.0 got 1000.0 -default republish_after_seconds expected 300.0 got 300.0 -default failure_pause_seconds expected 2.0 got 2.0 -RELAY__BATCH_SIZE=0 exit code expected 2 got 2 -RELAY__BATCH_SIZE names the field expected yes got yes -RELAY__BATCH_SIZE hides the value expected yes got yes -RELAY__MAX_PUBLISHED_BACKLOG=-1 exit code expected 2 got 2 -RELAY__MAX_PUBLISHED_BACKLOG names the field expected yes got yes -RELAY__MAX_PUBLISHED_BACKLOG hides the value expected yes got yes -RELAY__POLL_INTERVAL_SECONDS=abc exit code expected 2 got 2 -RELAY__POLL_INTERVAL_SECONDS names the field expected yes got yes -RELAY__POLL_INTERVAL_SECONDS hides the value expected yes got yes -env override container started expected 0 got 0 -env override batch_size expected 7 got 7 -env override poll_interval_seconds expected 1.0 got 1.0 -stop idle: command exit code expected 0 got 0 -stop idle: container exit code expected 0 got 0 -stop idle: under 10 s expected yes got yes -stop idle: last record expected Stopped relay got Stopped relay -stop idle: record exit_code expected 0 got 0 -docker compose start relay expected 0 got 0 -early stop 0.3 s: docker stop expected 0 got 0 -early stop 0.3 s: exit code expected 0 got 0 -early stop 0.3 s: within 1 s expected yes got yes -early stop 0.2 s: docker stop expected 0 got 0 -early stop 0.2 s: exit code expected 0 got 0 -early stop 0.2 s: within 1 s expected yes got yes -early stop 0.4 s: docker stop expected 0 got 0 -early stop 0.4 s: exit code expected 0 got 0 -early stop 0.4 s: within 1 s expected yes got yes -'Stopped relay before startup' seen expected yes got yes -relay running before restart expected yes got yes -scripts/restart.sh expected 0 got 0 -LB ready after restart expected yes got yes -relay StartedAt unchanged expected yes got yes -relay RestartCount expected 0 got 0 -new upload after restart expected 202 got 202 -new upload becomes ready expected yes got yes -stop frozen broker: broker paused expected 0 got 0 -stop frozen broker: upload expected 202 got 202 -stop frozen broker: command exit code expected 0 got 0 -stop frozen broker: under 10 s expected yes got yes -stop frozen broker: container exit code expected 0 got 0 -stop frozen broker: OOM killed expected false got false -stop frozen broker: last record expected Stopped relay got Stopped relay -stop frozen broker: relay back expected 0 got 0 -stop frozen broker: upload after start expected ready got ready +PID 1 of the relay expected python -m src.relay got python -m src.relay +healthcheck expected NONE got NONE +limit NanoCpus expected 250000000 got 250000000 +limit Memory expected 268435456 got 268435456 +S3__*, S3_*, CACHE__*, VALKEY* in the environment expected no got no +_imaging in mtusi-lab5-api-19 expected no got no +_imaging in mtusi-lab5-api-20 expected no got no +_imaging in PID 1 of the relay expected no got no +'Started relay' record, все поля и значения по умолчанию совпало +RELAY__* неверные: exit code 2, names the field, hides the value совпало у трёх +env override batch_size expected 7 got 7 +env override poll_interval_seconds expected 1.0 got 1.0 +stop idle: command, container, record exit_code 0, under 10 s, last record Stopped relay совпало +early stop 0.2, 0.3, 0.4 s: exit 0, within 1 s, 'Stopped relay before startup' совпало +relay running before restart expected yes got yes +scripts/restart.sh expected 0 got 0 +LB ready after restart expected yes got yes +relay StartedAt unchanged expected yes got yes +relay RestartCount expected 0 got 0 +new upload after restart expected 202 got 202 +new upload becomes ready expected yes got yes +stop frozen broker: broker paused expected 0 got 0 +stop frozen broker: upload expected 202 got 202 +stop frozen broker: under 10 s expected yes got yes +stop frozen broker: container exit code expected 0 got 0 +stop frozen broker: OOM killed expected false got false +stop frozen broker: last record expected Stopped relay got Stopped relay +stop frozen broker: upload after start expected ready got ready PASS: the relay process matches the spec worker and relay running at the end: yes ``` diff --git a/evidence/replicas/test-persistence.md b/evidence/replicas/test-persistence.md index 13892fdb..a6df5743 100644 --- a/evidence/replicas/test-persistence.md +++ b/evidence/replicas/test-persistence.md @@ -1,48 +1,27 @@ # Сохранность при рестарте стенда - Команда: `make test-persistence ACTION_SCRIPT=scripts/restart.sh` -- Дата: 2026-10-31, 13:28:32–13:28:58 UTC; код выхода 0 -- Commit: `e2a6427` (ветка `feat/pipeline-reliability`), рабочее дерево без правок кода (добавлены только файлы `evidence/`) +- Дата: 2026-10-31, 20:41:09–20:41:38 UTC; код выхода 0 +- Commit: `6ba74b1` (ветка `feat/unit-of-work`), рабочее дерево без правок кода (добавлены только файлы `evidence/`) - Стенд: проект compose `mtusi-lab5`, собран `make run_docker` из `HEAD` - Что проверяет публичная проверка: данные, прежний токен и с лабы 4 оригинал вложения после hook (`tests/README.md`) -- Что перезапустил hook (сверка `docker inspect` до и после): `api-9`, `api-10`, `haproxy`, `postgres`, `rabbitmq`, `s3`, `valkey` — те же ID контейнеров, новый `StartedAt`, `RestartCount` 0; `relay`, `worker` и `cleaner` hook не трогает, `StartedAt` прежний. Одноразовые `migrate` и `s3-bootstrap` повторяет `start api` (no-op). Volumes не удалялись. Номера реплик `9` и `10` остались от прежней поочерёдной замены: compose нумерует их по возрастанию +- Что перезапустил hook (сверка `docker inspect` до и после): `api-19`, `api-20`, `haproxy`, `postgres`, `rabbitmq`, `s3`, `valkey` — новый `StartedAt`; `relay`, `worker` и `cleaner` hook не трогает, `StartedAt` прежний. Одноразовые `migrate` и `s3-bootstrap` повторяет `start api` (no-op). Volumes не удалялись. Номера реплик остались от прежней поочерёдной замены ```text -python3 tests/resilience.py --mode persistence --action-script "scripts/restart.sh" --base-url "http://localhost:8080" -Executing explicit persistence hook; hook output suppressed to avoid leaking secrets. PASS: persistence preserved confirmed data and existing session. Hook scope needs operator evidence. ``` -## Контейнеры до hook - -```text -/mtusi-lab5-api-10 e933a5daf6b3 2026-10-31T13:26:00.623212387Z rc=0 -/mtusi-lab5-api-9 d7f1b8c394b9 2026-10-31T13:26:53.397829301Z rc=0 -/mtusi-lab5-cleaner-1 9415ac2889c0 2026-10-31T13:20:34.366532625Z rc=0 -/mtusi-lab5-haproxy-1 557201f42028 2026-10-31T13:26:00.690182054Z rc=0 -/mtusi-lab5-migrate-1 16e853e4f79f 2026-10-31T13:25:57.417430928Z rc=0 -/mtusi-lab5-postgres-1 0d7389e206c8 2026-10-31T13:25:38.574109085Z rc=0 -/mtusi-lab5-rabbitmq-1 bd7dd2c37915 2026-10-31T13:26:27.829003386Z rc=0 -/mtusi-lab5-relay-1 45d495d13c79 2026-10-31T13:24:27.565741511Z rc=0 -/mtusi-lab5-s3-1 54c230a7447d 2026-10-31T13:25:53.550943384Z rc=0 -/mtusi-lab5-s3-bootstrap-1 d4b943f39578 2026-10-31T13:25:57.492476428Z rc=0 -/mtusi-lab5-valkey-1 d184ed2f645e 2026-10-31T13:25:38.63768621Z rc=0 -/mtusi-lab5-worker-1 ecbefb38ea10 2026-10-31T13:25:35.752754709Z rc=0 -``` - -## Контейнеры после hook - -```text -/mtusi-lab5-api-10 e933a5daf6b3 2026-10-31T13:28:57.518200469Z rc=0 -/mtusi-lab5-api-9 d7f1b8c394b9 2026-10-31T13:28:57.450241969Z rc=0 -/mtusi-lab5-cleaner-1 9415ac2889c0 2026-10-31T13:20:34.366532625Z rc=0 -/mtusi-lab5-haproxy-1 557201f42028 2026-10-31T13:28:57.588217303Z rc=0 -/mtusi-lab5-migrate-1 16e853e4f79f 2026-10-31T13:28:54.320519301Z rc=0 -/mtusi-lab5-postgres-1 0d7389e206c8 2026-10-31T13:28:35.483173417Z rc=0 -/mtusi-lab5-rabbitmq-1 bd7dd2c37915 2026-10-31T13:28:36.510452751Z rc=0 -/mtusi-lab5-relay-1 45d495d13c79 2026-10-31T13:24:27.565741511Z rc=0 -/mtusi-lab5-s3-1 54c230a7447d 2026-10-31T13:28:50.457374133Z rc=0 -/mtusi-lab5-s3-bootstrap-1 d4b943f39578 2026-10-31T13:28:54.393025259Z rc=0 -/mtusi-lab5-valkey-1 d184ed2f645e 2026-10-31T13:28:35.455023792Z rc=0 -/mtusi-lab5-worker-1 ecbefb38ea10 2026-10-31T13:25:35.752754709Z rc=0 -``` +| Контейнер | `StartedAt` до | `StartedAt` после | +|---|---|---| +| `api-19` | 20:36:51.541 | 20:41:35.251 | +| `api-20` | 20:36:51.475 | 20:41:35.165 | +| `haproxy-1` | 20:36:51.709 | 20:41:35.345 | +| `postgres-1` | 20:36:40.595 | 20:41:11.477 | +| `rabbitmq-1` | 20:36:40.847 | 20:41:12.525 | +| `s3-1` | 20:36:40.723 | 20:41:26.616 | +| `valkey-1` | 20:36:40.953 | 20:41:11.448 | +| `migrate-1` | 20:39:32.831 | 20:41:31.519 | +| `s3-bootstrap-1` | 20:39:32.750 | 20:41:31.601 | +| `relay-1` | 20:36:45.321 | 20:36:45.321 | +| `worker-1` | 20:36:51.621 | 20:36:51.621 | +| `cleaner-1` | 20:36:51.400 | 20:36:51.400 | diff --git a/evidence/rollout/unit-of-work-previous/meta.json b/evidence/rollout/unit-of-work-previous/meta.json new file mode 100644 index 00000000..a9712645 --- /dev/null +++ b/evidence/rollout/unit-of-work-previous/meta.json @@ -0,0 +1,456 @@ +{ + "label": "unit-of-work-previous", + "status": "complete", + "started_at": "2026-10-31T20:29:24+00:00", + "command": "uv run python bench/run.py --profile rollout --from b2fb88f --label unit-of-work-previous", + "git": { + "commit": "6ba74b1", + "dirty": false + }, + "overrides": { + "rollout_from": "b2fb88f" + }, + "host_state": { + "start": { + "swap_used_mib": 7479.62, + "swap_total_mib": 8192.0, + "swapouts": 7156652, + "memory_free_percent": 43, + "power": "AC Power", + "battery_percent": 80 + }, + "end": { + "swap_used_mib": 7367.62, + "swap_total_mib": 8192.0, + "swapouts": 7156652, + "memory_free_percent": 40, + "power": "AC Power", + "battery_percent": 80 + }, + "swapouts_delta": 0, + "slept_seconds": 0 + }, + "host_warnings": [], + "other_containers": [ + "domains-api-1", + "domains-bot-1", + "domains-postgres-1" + ], + "resources": { + "budget": { + "cpus": 6.75, + "memory_gib": 3.0, + "peak_replicas": 3, + "vm_cpus": 12, + "vm_memory_gib": 7.75, + "generator": "no limit" + }, + "mode": "scan", + "interval_s": 1.0, + "containers": { + "6e46ca7c70b7": { + "name": "mtusi-bench-haproxy", + "role": "haproxy" + }, + "d518795230b4": { + "name": "mtusi-bench-api-1", + "role": "api" + }, + "e324fd0a2b33": { + "name": "mtusi-bench-api-2", + "role": "api" + }, + "a4aaf0bb2416": { + "name": "mtusi-bench-postgres", + "role": "postgres" + }, + "0da23abd16b6": { + "name": "mtusi-bench-valkey", + "role": "valkey" + }, + "3ca3a7e9041d": { + "name": "mtusi-bench-k6", + "role": "k6" + }, + "7871c586908b": { + "name": "mtusi-bench-sampler", + "role": "sampler" + }, + "523402ea115d": { + "name": "mtusi-bench-api-4", + "role": "api" + }, + "8df7bccbf1ef": { + "name": "mtusi-bench-api-3", + "role": "api" + }, + "2b7f7e323ffe": { + "name": "mtusi-bench-migrate-1", + "role": "migrate" + } + }, + "unmapped": 3 + }, + "app_image": { + "tag": "mtusi-messenger:bench", + "id": "sha256:6c2c1c3e526be20978912b877ac07b6788e3665d28b5cee341359d86e7291490", + "versions": { + "python": "3.12.14", + "fastapi": "0.141.1", + "starlette": "1.7.0", + "pydantic": "2.13.5", + "uvicorn": "0.54.0", + "sqlalchemy": "2.1.1", + "asyncpg": "0.31.0", + "redis": "8.1.0" + } + }, + "generator": { + "image": "grafana/k6:2.3.0@sha256:9c2dee7f8ed74d317e4027c06a10f169b625638189de8d4555d0b3486a5aeb34", + "version": "k6 v2.3.0 (commit/e088784614, go1.27.1, linux/arm64)" + }, + "docker": { + "server": "29.9.2", + "vm_os": "Docker Desktop", + "kernel": "7.0.14-linuxkit", + "vm_cpus": 12, + "vm_memory_gib": 7.7, + "cgroup": "2", + "logging_driver": "local" + }, + "host": { + "os": "macOS 26.7.1", + "machine": "Apple M3 Pro", + "memory_gib": 18.0, + "performance_cores": 6, + "efficiency_cores": 6 + }, + "profile": { + "name": "rollout", + "sizes": [ + 1000 + ], + "concurrency": [], + "repeats": 0, + "read_warmup_s": 0, + "read_measure_s": 0, + "write_warmup": 0, + "write_measure": 0, + "prefill_chunk": 25000, + "prefill_vus": 8, + "text_length": 64, + "page_limit": 50, + "walk_limit": 100, + "cursor_pool": 1000, + "members": 10, + "seed": 20260930, + "warmup_seed_shift": 1000003, + "generator_cpu_limit": 4.0, + "cpus": "1", + "memory": "512m", + "db_cpus": "2", + "db_memory": "1g", + "cache_cpus": "0.5", + "cache_memory": "128m", + "session_ttl_seconds": 21600, + "background": [], + "index_variants": [ + [ + "chat_only", + "(chat_id)" + ], + [ + "covering", + "(chat_id, created_at, id) INCLUDE (sender_id, text)" + ] + ], + "write_probe_rows": 20000, + "write_probe_repeats": 3, + "restore": false, + "restore_jobs": 4, + "restore_write_load": 5000, + "restore_write_vus": 10, + "replicas": 2, + "lb_cpus": "1", + "lb_memory": "256m", + "failover_modes": [], + "failover_write_rate": 100, + "failover_read_rate": 100, + "failover_before_s": 0, + "failover_down_s": 0, + "failover_after_s": 0, + "failover_success": 0.99, + "failover_pre_vus": 600, + "failover_max_vus": 1500, + "rollout_from": "b2fb88f", + "rollout_before_s": 15, + "rollout_budget_s": 90, + "rollout_after_s": 15, + "sample_resources": true, + "uploads_variants": [], + "uploads_before": "", + "uploads_success_codes": [ + [ + "before", + 201 + ], + [ + "unlimited", + 202 + ], + [ + "limited", + 202 + ] + ], + "uploads_sizes": [], + "uploads_clients": [], + "uploads_ramp_s": 3, + "uploads_window_s": 20, + "uploads_unlimited_env": [ + [ + "UPLOADS__MAX_CONCURRENT", + "1000" + ], + [ + "UPLOADS__MAX_WAITING", + "0" + ] + ], + "uploads_sample_interval_s": 0.2, + "s3_cpus": "1", + "s3_memory": "512m", + "broker_cpus": "1", + "broker_memory": "512m", + "relay_cpus": "0.25", + "relay_memory": "256m", + "worker_cpus": "1", + "worker_memory": "1g", + "cleaner_cpus": "0.25", + "cleaner_memory": "256m", + "reconcile_stages": [], + "reconcile_before": "", + "reconcile_s4_clean": 0, + "reconcile_s4_candidates": [], + "reconcile_s4_max_changes": 100, + "reconcile_grace_s": 30, + "reconcile_fresh_wait_s": 2, + "reconcile_fast_cpus": "1", + "reconcile_default_rate": 2000, + "reconcile_background": [ + [ + "download", + 300 + ], + [ + "write", + 50 + ], + [ + "read", + 50 + ] + ], + "reconcile_downloads": 5000, + "reconcile_bg_max_vus": 600, + "reconcile_quiet_s": 30, + "reconcile_fill_processes": 3, + "reconcile_fill_threads": 24, + "reconcile_sample_interval_s": 0.5, + "reconcile_metrics_port": 9327, + "reconcile_h1_stages": [], + "reconcile_h2_stages": [], + "reconcile_h3_stages": [], + "reconcile_s4_base": "", + "db_max_connections": 100, + "series": "", + "configs": [], + "write_chats": 1, + "mix": [], + "fixed_rps": [], + "ladder_base": 100, + "step_factor": 1.25, + "start_rps_per_replica": 300, + "bisect_steps": 2, + "max_steps": 12, + "first_warmup_s": 15, + "step_warmup_s": 5, + "step_measure_s": 20, + "cooldown_s": 10, + "slo_p95_ms": 200, + "slo_error_ratio": 0.01, + "abort_error_ratio": 0.5, + "abort_p95_ms": 2000, + "request_timeout_s": 15, + "prevus_per_rps": 0.05, + "vus_per_rps": 0.2, + "generator_cpus": "", + "generator_memory": "", + "sampler_cpus": "0.25", + "sampler_memory": "128m", + "sample_interval_s": 1.0, + "order_seed": 20261011 + }, + "sizes": [], + "rollout": { + "from_commit": "b2fb88f", + "new_image": "sha256:6c2c1c3e526be20978912b877ac07b6788e3665d28b5cee341359d86e7291490", + "old_image": "sha256:841b272667f6920eb0a82b09d0755118c639a2b457ae463d4e9e0d1782c42fe8", + "containers_before": [ + { + "name": "mtusi-bench-api-1", + "instance": "d518795230b4", + "tag": "mtusi-messenger:bench", + "image": "sha256:6e9ea882b3619744e709b45152da5d451dd802239d877f8786262416e855d94e", + "running": true + }, + { + "name": "mtusi-bench-api-2", + "instance": "e324fd0a2b33", + "tag": "mtusi-messenger:bench", + "image": "sha256:6e9ea882b3619744e709b45152da5d451dd802239d877f8786262416e855d94e", + "running": true + } + ], + "revision_before": "d3f9a6b2c1e7", + "containers_after": [ + { + "name": "mtusi-bench-api-3", + "instance": "8df7bccbf1ef", + "tag": "mtusi-messenger:bench", + "image": "sha256:ffb64b282745a60d60ccf70fa8114d057abd6157970d88d31ae1c42cbac241cb", + "running": true + }, + { + "name": "mtusi-bench-api-4", + "instance": "523402ea115d", + "tag": "mtusi-messenger:bench", + "image": "sha256:ffb64b282745a60d60ccf70fa8114d057abd6157970d88d31ae1c42cbac241cb", + "running": true + } + ], + "revision_after": "d3f9a6b2c1e7", + "tag_after": "sha256:8945a70678e6d48681ec7a55ee772c926713ebd4b63c38cc52748a66b158238a", + "script_start_at": "2026-10-31T20:29:58.301+00:00" + }, + "limits": { + "api": { + "nano_cpus": 1000000000, + "memory": 536870912, + "memory_swap": 536870912, + "published_ports": {}, + "healthcheck": [ + "NONE" + ], + "log_driver": "local" + }, + "postgres": { + "nano_cpus": 2000000000, + "memory": 1073741824, + "memory_swap": 1073741824, + "published_ports": {}, + "healthcheck": [ + "CMD-SHELL", + "pg_isready -h 127.0.0.1 -U \"$POSTGRES_USER\" -d \"$POSTGRES_DB\"" + ], + "log_driver": "local" + }, + "valkey": { + "nano_cpus": 500000000, + "memory": 134217728, + "memory_swap": 134217728, + "published_ports": {}, + "healthcheck": [ + "CMD-SHELL", + "test \"$(valkey-cli -p \"$VALKEY_PORT\" ping)\" = PONG" + ], + "log_driver": "local" + }, + "haproxy": { + "nano_cpus": 1000000000, + "memory": 268435456, + "memory_swap": 268435456, + "published_ports": {}, + "healthcheck": [ + "CMD", + "bash", + "-c", + "exec 3<>/dev/tcp/127.0.0.1/8404 && printf 'GET /lb/ready HTTP/1.0\\r\\n\\r\\n' >&3 && head -n 1 <&3 | grep -q ' 200 '" + ], + "log_driver": "local" + }, + "k6": { + "nano_cpus": 0, + "memory": 0, + "memory_swap": 0, + "published_ports": {}, + "healthcheck": null, + "log_driver": "local" + }, + "api_replicas": 2, + "max_connections": 100, + "sampler": { + "nano_cpus": 250000000, + "memory": 134217728, + "memory_swap": 134217728, + "published_ports": {}, + "healthcheck": null, + "log_driver": "local" + } + }, + "stand": { + "api_tcp_rmem": "4096 131072 524288", + "postgres": { + "image": "postgres:18.6-trixie@sha256:5a5a84b19854a9ffaa54082c166ff4ec27473a361e496e5ea167f298f2da9722", + "id": "sha256:f4fcd2b983483177b15d72d94fb3614736211554f7cac5c2cc54a05c75110b90", + "version": "18.6 (Debian 18.6-1.pgdg13+2)", + "settings": { + "autovacuum": "on", + "checkpoint_timeout": "5min", + "effective_cache_size": "4GB", + "fsync": "on", + "jit": "on", + "maintenance_work_mem": "64MB", + "max_connections": "100", + "max_wal_size": "1GB", + "plan_cache_mode": "auto", + "random_page_cost": "4", + "shared_buffers": "128MB", + "shared_preload_libraries": "auto_explain", + "synchronous_commit": "on", + "wal_level": "replica", + "work_mem": "4MB" + } + }, + "valkey": { + "image": "valkey/valkey:9.1.2-trixie@sha256:418652cfb58ef879d4978c33553735d7147016032d5aefaa14c828e611eb9dfd", + "id": "sha256:5a6ac3cceea0d4cebe48911dfa5f393f49feea86a2c55c5ac6b0ba733a1713b6", + "version": "9.1.2", + "maxmemory": "67108864", + "maxmemory-clients": "0", + "maxmemory-eviction-tenacity": "10", + "maxmemory-policy": "allkeys-lru", + "maxmemory-samples": "5" + }, + "haproxy": { + "image": "haproxy:3.4.6-trixie@sha256:e273915691a8eab3f105bf3e39fd4c29a4ecf334e33421903b5589d25e14db26", + "id": "sha256:a92cbb5d7b4ba27898706659bde5039cc86e4ebee44f243d410f268200f7406f", + "version": "HAProxy version 3.4.6-56332c5 2026/09/28 - https://haproxy.org/" + }, + "app_env": { + "APP__PORT": "8080", + "APP__RUN_MODE": "docker", + "AUTH__SESSION_TTL_SECONDS": "21600", + "CACHE__HOST": "valkey", + "CACHE__PORT": "6379", + "DATABASE__HOST": "postgres", + "DATABASE__NAME": "bench", + "DATABASE__PORT": "5432", + "DATABASE__USER": "bench", + "S3__BUCKET": "bench", + "S3__HOST": "s3", + "S3__PORT": "8333" + } + }, + "finished_at": "2026-10-31T20:31:47+00:00" +} diff --git a/evidence/rollout/unit-of-work-previous/prefill.csv b/evidence/rollout/unit-of-work-previous/prefill.csv new file mode 100644 index 00000000..d729abdb --- /dev/null +++ b/evidence/rollout/unit-of-work-previous/prefill.csv @@ -0,0 +1,2 @@ +size,chunk,messages_before,messages_after,duration_s,requests_ok,requests_failed,rps,error_ratio,p50_ms,p95_ms,p99_ms,max_ms,app_cpu_cores,rss_end_mib,mem_cgroup_end_mib,generator_cpu_cores,flags,db_cpu_cores,cell,attempt +1000,1,0,1000,1.179,1000,0,848.2,0.0,7.31,12.173,77.494,91.021,1.885,245.6,223.7,0.231,,0.366,, diff --git a/evidence/rollout/unit-of-work-previous/progress.json b/evidence/rollout/unit-of-work-previous/progress.json new file mode 100644 index 00000000..c063d44b --- /dev/null +++ b/evidence/rollout/unit-of-work-previous/progress.json @@ -0,0 +1,12 @@ +{ + "label": "unit-of-work-previous", + "profile": "rollout", + "stage": "done", + "size": 1000, + "runs_done": 1, + "runs_total": 1, + "elapsed_s": 142, + "eta_s": 0, + "warnings": [], + "updated_at": "2026-10-31T20:31:47+00:00" +} diff --git a/evidence/rollout/unit-of-work-previous/raw/prefill-1k-01.json b/evidence/rollout/unit-of-work-previous/raw/prefill-1k-01.json new file mode 100644 index 00000000..1f33d824 --- /dev/null +++ b/evidence/rollout/unit-of-work-previous/raw/prefill-1k-01.json @@ -0,0 +1 @@ +{"root_group":{"name":"","path":"","id":"d41d8cd98f00b204e9800998ecf8427e","groups":[],"checks":[{"name":"message 201","path":"::message 201","id":"6445aff337e1ade0bc10402fbac79882","passes":1000,"fails":0}]},"options":{"summaryTrendStats":["avg","min","med","p(50)","p(95)","p(99)","max"],"summaryTimeUnit":"","noColor":true},"state":{"isStdOutTTY":false,"isStdErrTTY":false,"testRunDurationMs":1178.951375},"metrics":{"http_req_failed":{"type":"rate","contains":"default","values":{"rate":0,"passes":0,"fails":1000}},"http_req_blocked":{"values":{"avg":0.009608123000000017,"min":0.0005,"med":0.001084,"p(50)":0.001084,"p(95)":0.002419099999999998,"p(99)":0.013730999999999941,"max":1.61675},"type":"trend","contains":"time"},"http_req_connecting":{"type":"trend","contains":"time","values":{"p(99)":0,"max":1.060417,"avg":0.002938209,"min":0,"med":0,"p(50)":0,"p(95)":0}},"iteration_duration":{"type":"trend","contains":"time","values":{"p(95)":12.304733649999996,"p(99)":79.08318750000001,"max":91.091417,"avg":9.406549538000007,"min":2.256209,"med":7.3947085,"p(50)":7.3947085}},"checks":{"type":"rate","contains":"default","values":{"rate":1,"passes":1000,"fails":0}},"http_req_waiting":{"contains":"time","values":{"min":2.183625,"med":7.2717715,"p(50)":7.2717715,"p(95)":12.12013685,"p(99)":77.10405759,"max":90.993209,"avg":9.298104869000007},"type":"trend"},"data_received":{"type":"counter","contains":"data","values":{"count":490000,"rate":415623.5875292143}},"http_req_duration{expected_response:true}":{"type":"trend","contains":"time","values":{"med":7.3103750000000005,"p(50)":7.3103750000000005,"p(95)":12.172860399999996,"p(99)":77.49409542000001,"max":91.02075,"avg":9.326408914999991,"min":2.203667},"thresholds":{"max>=0":{"ok":true}}},"http_reqs":{"type":"counter","contains":"default","values":{"count":1000,"rate":848.2114031208454}},"http_req_tls_handshaking":{"type":"trend","contains":"time","values":{"p(50)":0,"p(95)":0,"p(99)":0,"max":0,"avg":0,"min":0,"med":0}},"http_req_duration":{"type":"trend","contains":"time","values":{"p(99)":77.49409542000001,"max":91.02075,"avg":9.326408914999991,"min":2.203667,"med":7.3103750000000005,"p(50)":7.3103750000000005,"p(95)":12.172860399999996}},"iterations":{"type":"counter","contains":"default","values":{"count":1000,"rate":848.2114031208454}},"data_sent":{"type":"counter","contains":"data","values":{"count":376000,"rate":318927.48757343786}},"vus":{"type":"gauge","contains":"default","values":{"value":8,"min":8,"max":8}},"http_req_sending":{"type":"trend","contains":"time","values":{"avg":0.00872038100000001,"min":0.002208,"med":0.004375,"p(50)":0.004375,"p(95)":0.013340199999999995,"p(99)":0.0529737499999998,"max":1.132417}},"http_req_receiving":{"values":{"p(50)":0.015958,"p(95)":0.04062705,"p(99)":0.06404582999999996,"max":0.275708,"avg":0.019583664999999997,"min":0.004709,"med":0.015958},"type":"trend","contains":"time"},"vus_max":{"type":"gauge","contains":"default","values":{"value":8,"min":8,"max":8}}}} \ No newline at end of file diff --git a/evidence/rollout/unit-of-work-previous/raw/rollout-k6.json b/evidence/rollout/unit-of-work-previous/raw/rollout-k6.json new file mode 100644 index 00000000..62c5e548 --- /dev/null +++ b/evidence/rollout/unit-of-work-previous/raw/rollout-k6.json @@ -0,0 +1 @@ +{"root_group":{"path":"","id":"d41d8cd98f00b204e9800998ecf8427e","groups":[],"checks":[],"name":""},"options":{"summaryTimeUnit":"","noColor":true,"summaryTrendStats":["avg","min","med","p(50)","p(95)","p(99)","max"]},"state":{"isStdOutTTY":false,"isStdErrTTY":false,"testRunDurationMs":120008.675833},"metrics":{"http_req_duration":{"type":"trend","contains":"time","values":{"p(99)":55.405154999999816,"max":272.543208,"avg":5.589999047912664,"min":1.938708,"med":3.9749165,"p(50)":3.9749165,"p(95)":7.2866997}},"http_req_blocked":{"type":"trend","contains":"time","values":{"avg":0.014369418381801276,"min":0.001125,"med":0.003542,"p(50)":0.003542,"p(95)":0.0985916499999993,"p(99)":0.18607674999999987,"max":7.01825}},"iterations{scenario:read}":{"type":"counter","contains":"default","values":{"count":12001,"rate":100.00110339272624},"thresholds":{"count>=0":{"ok":true}}},"iterations{scenario:write}":{"thresholds":{"count>=0":{"ok":true}},"type":"counter","contains":"default","values":{"rate":100.00110339272624,"count":12001}},"http_req_sending":{"type":"trend","contains":"time","values":{"min":0.003666,"med":0.01625,"p(50)":0.01625,"p(95)":0.032663949999999956,"p(99)":0.06262457999999999,"max":2.829125,"avg":0.019276979585034583}},"http_req_receiving":{"type":"trend","contains":"time","values":{"p(95)":0.097417,"p(99)":0.16216407999999993,"max":9.397667,"avg":0.04715750383301359,"min":0.005917,"med":0.037083,"p(50)":0.037083}},"http_req_failed":{"type":"rate","contains":"default","values":{"rate":0,"passes":0,"fails":24002}},"http_req_duration{expected_response:true}":{"type":"trend","contains":"time","values":{"med":3.9749165,"p(50)":3.9749165,"p(95)":7.2866997,"p(99)":55.405154999999816,"max":272.543208,"avg":5.589999047912664,"min":1.938708},"thresholds":{"max>=0":{"ok":true}}},"http_req_tls_handshaking":{"contains":"time","values":{"min":0,"med":0,"p(50)":0,"p(95)":0,"p(99)":0,"max":0,"avg":0},"type":"trend"},"http_req_connecting":{"type":"trend","contains":"time","values":{"min":0,"med":0,"p(50)":0,"p(95)":0,"p(99)":0.13137374999999996,"max":6.983625,"avg":0.006733627197733516}},"iterations":{"type":"counter","contains":"default","values":{"count":24002,"rate":200.00220678545247}},"http_req_waiting":{"contains":"time","values":{"max":272.448875,"avg":5.523564564494631,"min":1.896,"med":3.9176875,"p(50)":3.9176875,"p(95)":7.197924699999994,"p(99)":55.34025041999981},"type":"trend"},"http_reqs":{"type":"counter","contains":"default","values":{"count":24002,"rate":200.00220678545247}},"data_received":{"type":"counter","contains":"data","values":{"count":180603049,"rate":1504916.6049571373}},"vus":{"type":"gauge","contains":"default","values":{"value":2,"min":0,"max":5}},"data_sent":{"type":"counter","contains":"data","values":{"count":9277664,"rate":77308.27738579903}},"iteration_duration":{"type":"trend","contains":"time","values":{"avg":5.893075289100891,"min":2.101375,"med":4.2385415,"p(50)":4.2385415,"p(95)":7.776464249999997,"p(99)":55.67621082999984,"max":272.932375}},"vus_max":{"type":"gauge","contains":"default","values":{"value":1200,"min":1200,"max":1200}}}} \ No newline at end of file diff --git a/evidence/rollout/unit-of-work-previous/raw/rollout-lb.log b/evidence/rollout/unit-of-work-previous/raw/rollout-lb.log new file mode 100644 index 00000000..80833ca9 --- /dev/null +++ b/evidence/rollout/unit-of-work-previous/raw/rollout-lb.log @@ -0,0 +1,12 @@ +2026-10-31T20:30:02.762307553Z Server api/api-3 ('api') is DOWN/READY (resolves again). +2026-10-31T20:30:02.762309803Z Server api/api-3 administratively READY thanks to valid DNS answer. +2026-10-31T20:30:04.496083221Z Server api/api-3 is UP, reason: Layer7 check passed, code: 200, check duration: 1ms. 3 active and 0 backup servers online. 0 sessions requeued, 0 total in queue. +2026-10-31T20:30:05.051190971Z Server api/api-2 enters drain state. 2 active and 0 backup servers online. 0 sessions requeued, 0 total in queue. +2026-10-31T20:30:05.229468013Z Server api/api-2 is going DOWN for maintenance. 2 active and 0 backup servers left. 0 sessions active, 0 requeued, 0 remaining in queue. +2026-10-31T20:30:06.857799430Z Server api/api-2 is leaving forced maintenance but remains in maintenance. +2026-10-31T20:30:07.770255000Z Server api/api-2 ('api') is DOWN/READY (resolves again). +2026-10-31T20:30:07.770255791Z Server api/api-2 administratively READY thanks to valid DNS answer. +2026-10-31T20:30:08.623276167Z Server api/api-2 is UP, reason: Layer7 check passed, code: 200, check duration: 18ms. 3 active and 0 backup servers online. 0 sessions requeued, 0 total in queue. +2026-10-31T20:30:08.961053083Z Server api/api-1 enters drain state. 2 active and 0 backup servers online. 0 sessions requeued, 0 total in queue. +2026-10-31T20:30:09.114689084Z Server api/api-1 is going DOWN for maintenance. 2 active and 0 backup servers left. 0 sessions active, 0 requeued, 0 remaining in queue. +2026-10-31T20:30:10.103711667Z Server api/api-1 is leaving forced maintenance but remains in maintenance. diff --git a/evidence/rollout/unit-of-work-previous/raw/rollout-script.log b/evidence/rollout/unit-of-work-previous/raw/rollout-script.log new file mode 100644 index 00000000..a6835736 --- /dev/null +++ b/evidence/rollout/unit-of-work-previous/raw/rollout-script.log @@ -0,0 +1,18 @@ +20:29:58 rolling-update: start: 2 replicas d518795230b4 e324fd0a2b33, image mtusi-messenger:bench from working tree +20:29:59 rolling-update: build done in 1s +20:30:02 rolling-update: migrate done in 3s +20:30:02 rolling-update: replica 1/2: started new 8df7bccbf1ef +20:30:04 rolling-update: replica 1/2: new 8df7bccbf1ef addr 192.168.48.8 slot api-3 UP in 2s +20:30:05 rolling-update: replica 1/2: drain old d518795230b4 addr 192.168.48.4 slot api-2 +20:30:05 rolling-update: replica 1/2: old d518795230b4 idle after 0s +20:30:05 rolling-update: replica 1/2: maint slot api-2, stopping old d518795230b4 +20:30:05 rolling-update: replica 1/2: removed old d518795230b4 (stop 0s, exit 0) +20:30:06 rolling-update: replica 1/2: slot api-2 ready +20:30:07 rolling-update: replica 2/2: started new 523402ea115d +20:30:08 rolling-update: replica 2/2: new 523402ea115d addr 192.168.48.4 slot api-2 UP in 2s +20:30:08 rolling-update: replica 2/2: drain old e324fd0a2b33 addr 192.168.48.5 slot api-1 +20:30:09 rolling-update: replica 2/2: old e324fd0a2b33 idle after 1s +20:30:09 rolling-update: replica 2/2: maint slot api-1, stopping old e324fd0a2b33 +20:30:09 rolling-update: replica 2/2: removed old e324fd0a2b33 (stop 0s, exit 0) +20:30:10 rolling-update: replica 2/2: slot api-1 ready +20:30:10 rolling-update: done: 2 replicas 8df7bccbf1ef 523402ea115d UP in 12s diff --git a/evidence/rollout/unit-of-work-previous/replicas.csv b/evidence/rollout/unit-of-work-previous/replicas.csv new file mode 100644 index 00000000..90b21997 --- /dev/null +++ b/evidence/rollout/unit-of-work-previous/replicas.csv @@ -0,0 +1,3 @@ +step,new_instance,new_slot,old_instance,old_slot,new_created_s,new_up_s,ready_s,drain_s,drain_timeout,stop_s,old_removed_s,slot_ready_s,replace_s,errors,after_drain +1,8df7bccbf1ef,api-3,d518795230b4,api-2,2.56,4.8,2.11,0.18,False,0.58,6.27,7.17,3.72,0,0 +2,523402ea115d,api-2,e324fd0a2b33,api-1,7.38,8.93,1.4,0.15,False,0.62,10.2,10.41,2.83,0,0 diff --git a/evidence/rollout/unit-of-work-previous/resources.csv b/evidence/rollout/unit-of-work-previous/resources.csv new file mode 100644 index 00000000..4052e1ca --- /dev/null +++ b/evidence/rollout/unit-of-work-previous/resources.csv @@ -0,0 +1,49 @@ +phase,mode,window,start_s,end_s,seconds,role,instance,present_s,cpu_mean_cores,cpu_max_cores,cpu_seconds,throttled_ratio,pressure_share,mem_peak_mib,ok_rps,us_per_ok_request,flags +rollout,rollout,before,-14.44,-1.39,13.05,api-old,d518795230b4,13.05,0.3093,0.3692,4.035,0.0,0.0013,122.0,199.9,1547.3, +rollout,rollout,before,-14.44,-1.39,13.05,api-old,e324fd0a2b33,13.05,0.3037,0.4405,3.962,0.0,0.0012,121.2,199.9,1519.3, +rollout,rollout,before,-14.44,-1.39,13.05,api-new,8df7bccbf1ef,0.0,0.0,,0.0,,0.0,,199.9,,absent +rollout,rollout,before,-14.44,-1.39,13.05,api-new,523402ea115d,0.0,0.0,,0.0,,0.0,,199.9,,absent +rollout,rollout,before,-14.44,-1.39,13.05,api-total,,13.05,0.613,0.8097,7.997,0.0,0.0025,243.2,199.9,3066.5, +rollout,rollout,before,-14.44,-1.39,13.05,migrate,2b7f7e323ffe,0.0,0.0,,0.0,,0.0,,199.9,,absent +rollout,rollout,before,-14.44,-1.39,13.05,postgres,a4aaf0bb2416,13.05,0.0956,0.1567,1.247,0.0,0.0008,186.7,199.9,478.2, +rollout,rollout,before,-14.44,-1.39,13.05,haproxy,6e46ca7c70b7,13.05,0.0344,0.0475,0.448,0.0,0.0006,33.6,199.9,172.1, +rollout,rollout,before,-14.44,-1.39,13.05,valkey,0da23abd16b6,13.05,0.0104,0.0356,0.135,0.0,0.0006,12.5,199.9,52.0, +rollout,rollout,before,-14.44,-1.39,13.05,k6,3ca3a7e9041d,13.05,0.1444,0.3698,1.884,,0.002,365.5,199.9,722.4, +rollout,rollout,before,-14.44,-1.39,13.05,sampler,7871c586908b,13.05,0.0043,0.0071,0.057,0.0,0.0,1.7,199.9,21.5, +rollout,rollout,before,-14.44,-1.39,13.05,vm,,13.05,1.1696,1.7825,15.258,,0.0055,,199.9,5850.9, +rollout,rollout,prepare,-1.39,0.0,1.39,api-old,d518795230b4,1.39,0.3381,0.461,0.47,0.0,0.0008,123.7,199.9,, +rollout,rollout,prepare,-1.39,0.0,1.39,api-old,e324fd0a2b33,1.39,0.3359,0.4655,0.467,0.0,0.0008,122.9,199.9,, +rollout,rollout,prepare,-1.39,0.0,1.39,api-new,8df7bccbf1ef,0.0,0.0,,0.0,,0.0,,199.9,,absent +rollout,rollout,prepare,-1.39,0.0,1.39,api-new,523402ea115d,0.0,0.0,,0.0,,0.0,,199.9,,absent +rollout,rollout,prepare,-1.39,0.0,1.39,api-total,,1.39,0.674,0.9266,0.937,0.0,0.0016,246.6,199.9,, +rollout,rollout,prepare,-1.39,0.0,1.39,migrate,2b7f7e323ffe,0.0,0.0,,0.0,,0.0,,199.9,,absent +rollout,rollout,prepare,-1.39,0.0,1.39,postgres,a4aaf0bb2416,1.39,0.1321,0.2136,0.184,0.0,0.0013,186.7,199.9,, +rollout,rollout,prepare,-1.39,0.0,1.39,haproxy,6e46ca7c70b7,1.39,0.0584,0.0646,0.081,0.0,0.0005,33.9,199.9,, +rollout,rollout,prepare,-1.39,0.0,1.39,valkey,0da23abd16b6,1.39,0.0113,0.0305,0.016,0.0,0.0003,12.0,199.9,, +rollout,rollout,prepare,-1.39,0.0,1.39,k6,3ca3a7e9041d,1.39,0.1077,0.1666,0.15,,0.0024,365.9,199.9,, +rollout,rollout,prepare,-1.39,0.0,1.39,sampler,7871c586908b,1.39,0.0035,0.0046,0.005,0.0,0.0,1.5,199.9,, +rollout,rollout,prepare,-1.39,0.0,1.39,vm,,1.39,2.2254,3.9232,3.095,,0.0281,,199.9,, +rollout,rollout,during,0.0,10.2,10.2,api-old,d518795230b4,5.83,0.1938,0.4898,1.978,0.0,0.0008,124.9,200.1,,partial +rollout,rollout,during,0.0,10.2,10.2,api-old,e324fd0a2b33,9.88,0.3416,0.4655,3.486,0.0,0.0014,125.6,200.1,, +rollout,rollout,during,0.0,10.2,10.2,api-new,8df7bccbf1ef,7.51,0.3416,1.1464,3.486,0.0273,0.0036,153.2,200.1,,partial +rollout,rollout,during,0.0,10.2,10.2,api-new,523402ea115d,2.68,0.1815,1.1679,1.852,0.1091,0.0068,107.3,200.1,,partial +rollout,rollout,during,0.0,10.2,10.2,api-total,,10.2,1.0585,2.0117,10.802,0.0195,0.0125,402.3,200.1,, +rollout,rollout,during,0.0,10.2,10.2,migrate,2b7f7e323ffe,1.56,0.0799,0.5755,0.815,0.9375,0.0693,63.7,200.1,,partial +rollout,rollout,during,0.0,10.2,10.2,postgres,a4aaf0bb2416,10.2,0.1503,0.3688,1.534,0.0,0.0019,188.9,200.1,, +rollout,rollout,during,0.0,10.2,10.2,haproxy,6e46ca7c70b7,10.2,0.069,0.1386,0.704,0.0,0.001,34.9,200.1,, +rollout,rollout,during,0.0,10.2,10.2,valkey,0da23abd16b6,10.2,0.0164,0.0483,0.167,0.0,0.002,12.5,200.1,, +rollout,rollout,during,0.0,10.2,10.2,k6,3ca3a7e9041d,10.2,0.1246,0.1871,1.272,,0.003,371.5,200.1,, +rollout,rollout,during,0.0,10.2,10.2,sampler,7871c586908b,10.2,0.0045,0.0057,0.046,0.0,0.0007,2.0,200.1,, +rollout,rollout,during,0.0,10.2,10.2,vm,,10.2,2.4915,3.9232,25.425,,0.0692,,200.1,, +rollout,rollout,after,10.2,103.56,93.36,api-old,d518795230b4,0.0,0.0,,0.0,,0.0,,200.0,,absent +rollout,rollout,after,10.2,103.56,93.36,api-old,e324fd0a2b33,0.0,0.0,,0.0,,0.0,,200.0,,absent +rollout,rollout,after,10.2,103.56,93.36,api-new,8df7bccbf1ef,93.36,0.3372,0.5978,31.478,0.0,0.0016,127.5,200.0,1686.0, +rollout,rollout,after,10.2,103.56,93.36,api-new,523402ea115d,93.36,0.3424,0.5749,31.969,0.0,0.0015,127.4,200.0,1712.0, +rollout,rollout,after,10.2,103.56,93.36,api-total,,93.36,0.6796,1.1008,63.447,0.0,0.0031,254.4,200.0,3398.0, +rollout,rollout,after,10.2,103.56,93.36,migrate,2b7f7e323ffe,0.0,0.0,,0.0,,0.0,,200.0,,absent +rollout,rollout,after,10.2,103.56,93.36,postgres,a4aaf0bb2416,93.36,0.1121,0.2444,10.464,0.0,0.0009,200.9,200.0,560.5, +rollout,rollout,after,10.2,103.56,93.36,haproxy,6e46ca7c70b7,93.36,0.0293,0.0933,2.732,0.0,0.0005,37.0,200.0,146.5, +rollout,rollout,after,10.2,103.56,93.36,valkey,0da23abd16b6,93.36,0.0116,0.038,1.08,0.0,0.0004,13.2,200.0,58.0, +rollout,rollout,after,10.2,103.56,93.36,k6,3ca3a7e9041d,93.36,0.1179,0.6957,11.011,,0.0015,455.2,200.0,589.5, +rollout,rollout,after,10.2,103.56,93.36,sampler,7871c586908b,93.36,0.004,0.0068,0.375,0.0,0.0,1.9,200.0,20.0, +rollout,rollout,after,10.2,103.56,93.36,vm,,93.36,1.261,3.249,117.721,,0.0057,,200.0,6305.0, diff --git a/evidence/rollout/unit-of-work-previous/rollout.csv b/evidence/rollout/unit-of-work-previous/rollout.csv new file mode 100644 index 00000000..adb01553 --- /dev/null +++ b/evidence/rollout/unit-of-work-previous/rollout.csv @@ -0,0 +1,2 @@ +label,from_commit,replicas,revision_before,revision_after,build_s,migrate_s,rollout_s,script_exit,requests,errors_before,codes_before,errors_during,codes_during,errors_after,codes_after,min_success,seconds_below,ok_rps_before,ok_rps_during_min,p95_before_ms,p95_during_max_ms,first_new_s,last_old_s,old_after_drain,writes,writes_failed,retried_ok,write_chat_messages,distinct_texts,dropped_iterations,flags +unit-of-work-previous,b2fb88f,2,d3f9a6b2c1e7,d3f9a6b2c1e7,1,3,10.2,0,24002,0,,0,,0,,1.0,0,200.0,200,7,180,4.82,9.26,0,12001,0,0,12001,12001,0, diff --git a/evidence/rollout/unit-of-work-previous/samples.csv b/evidence/rollout/unit-of-work-previous/samples.csv new file mode 100644 index 00000000..20f414ed --- /dev/null +++ b/evidence/rollout/unit-of-work-previous/samples.csv @@ -0,0 +1,970 @@ +phase,window,t_s,role,instance,cpu_cores,throttled_ms,pressure_ms,mem_mib +rollout,warmup,-16.3,api-old,d518795230b4,0.0637,0.0,0.81,107.5 +rollout,warmup,-16.3,api-old,e324fd0a2b33,0.0629,0.0,0.28,107.8 +rollout,warmup,-16.3,postgres,a4aaf0bb2416,0.0466,0.0,0.36,162.5 +rollout,warmup,-16.3,haproxy,6e46ca7c70b7,0.0086,0.0,0.13,19.3 +rollout,warmup,-16.3,valkey,0da23abd16b6,0.0029,0.0,0.09,11.9 +rollout,warmup,-16.3,k6,3ca3a7e9041d,0.6744,0.0,2.85,218.8 +rollout,warmup,-16.3,sampler,7871c586908b,0.004,0.0,0.18,2.1 +rollout,warmup,-16.3,vm,,1.8652,,18.63, +rollout,warmup,-15.29,api-old,d518795230b4,0.2876,0.0,0.96,108.8 +rollout,warmup,-15.29,api-old,e324fd0a2b33,0.2839,0.0,0.74,107.8 +rollout,warmup,-15.29,postgres,a4aaf0bb2416,0.108,0.0,0.54,168.2 +rollout,warmup,-15.29,haproxy,6e46ca7c70b7,0.0345,0.0,0.36,20.3 +rollout,warmup,-15.29,valkey,0da23abd16b6,0.0073,0.0,0.52,12.2 +rollout,warmup,-15.29,k6,3ca3a7e9041d,0.121,0.0,1.32,239.4 +rollout,warmup,-15.29,sampler,7871c586908b,0.0055,0.0,0.05,1.5 +rollout,warmup,-15.29,vm,,1.0146,,3.08, +rollout,before,-14.29,api-old,d518795230b4,0.3166,0.0,0.76,109.5 +rollout,before,-14.29,api-old,e324fd0a2b33,0.3105,0.0,1.37,109.8 +rollout,before,-14.29,postgres,a4aaf0bb2416,0.1241,0.0,0.59,167.7 +rollout,before,-14.29,haproxy,6e46ca7c70b7,0.0385,0.0,0.31,23.0 +rollout,before,-14.29,valkey,0da23abd16b6,0.0356,0.0,0.31,12.2 +rollout,before,-14.29,k6,3ca3a7e9041d,0.142,0.0,1.24,261.3 +rollout,before,-14.29,sampler,7871c586908b,0.0071,0.0,0.18,1.6 +rollout,before,-14.29,vm,,1.3114,,5.24, +rollout,before,-13.28,api-old,d518795230b4,0.2716,0.0,1.48,111.2 +rollout,before,-13.28,api-old,e324fd0a2b33,0.2701,0.0,2.38,111.6 +rollout,before,-13.28,postgres,a4aaf0bb2416,0.0802,0.0,0.74,168.5 +rollout,before,-13.28,haproxy,6e46ca7c70b7,0.0364,0.0,1.19,24.6 +rollout,before,-13.28,valkey,0da23abd16b6,0.0076,0.0,2.78,12.2 +rollout,before,-13.28,k6,3ca3a7e9041d,0.345,0.0,3.83,276.7 +rollout,before,-13.28,sampler,7871c586908b,0.0061,0.0,0.12,1.5 +rollout,before,-13.28,vm,,1.2077,,8.46, +rollout,before,-12.27,api-old,d518795230b4,0.2902,0.0,0.83,113.6 +rollout,before,-12.27,api-old,e324fd0a2b33,0.2886,0.0,0.49,113.3 +rollout,before,-12.27,postgres,a4aaf0bb2416,0.0837,0.0,0.56,169.2 +rollout,before,-12.27,haproxy,6e46ca7c70b7,0.0475,0.0,0.27,27.1 +rollout,before,-12.27,valkey,0da23abd16b6,0.0079,0.0,0.3,12.2 +rollout,before,-12.27,k6,3ca3a7e9041d,0.1292,0.0,1.04,277.9 +rollout,before,-12.27,sampler,7871c586908b,0.0042,0.0,0.02,1.5 +rollout,before,-12.27,vm,,1.0941,,3.33, +rollout,before,-11.27,api-old,d518795230b4,0.2874,0.0,1.69,115.0 +rollout,before,-11.27,api-old,e324fd0a2b33,0.2842,0.0,0.63,114.6 +rollout,before,-11.27,postgres,a4aaf0bb2416,0.0828,0.0,0.61,169.4 +rollout,before,-11.27,haproxy,6e46ca7c70b7,0.0353,0.0,0.6,29.0 +rollout,before,-11.27,valkey,0da23abd16b6,0.0079,0.0,0.35,12.2 +rollout,before,-11.27,k6,3ca3a7e9041d,0.1259,0.0,1.25,280.9 +rollout,before,-11.27,sampler,7871c586908b,0.0039,0.0,0.02,1.7 +rollout,before,-11.27,vm,,1.0547,,3.43, +rollout,before,-10.26,api-old,d518795230b4,0.3101,0.0,1.29,116.5 +rollout,before,-10.26,api-old,e324fd0a2b33,0.3097,0.0,0.85,116.2 +rollout,before,-10.26,postgres,a4aaf0bb2416,0.0874,0.0,0.85,169.5 +rollout,before,-10.26,haproxy,6e46ca7c70b7,0.0353,0.0,0.35,30.1 +rollout,before,-10.26,valkey,0da23abd16b6,0.0078,0.0,0.47,11.9 +rollout,before,-10.26,k6,3ca3a7e9041d,0.1269,0.0,1.12,295.8 +rollout,before,-10.26,sampler,7871c586908b,0.0048,0.0,0.02,1.4 +rollout,before,-10.26,vm,,1.0557,,2.86, +rollout,before,-9.25,api-old,d518795230b4,0.3692,0.0,0.74,117.4 +rollout,before,-9.25,api-old,e324fd0a2b33,0.4405,0.0,2.04,117.5 +rollout,before,-9.25,postgres,a4aaf0bb2416,0.1567,0.0,0.48,177.1 +rollout,before,-9.25,haproxy,6e46ca7c70b7,0.0279,0.0,1.53,30.9 +rollout,before,-9.25,valkey,0da23abd16b6,0.0224,0.0,0.21,12.5 +rollout,before,-9.25,k6,3ca3a7e9041d,0.112,0.0,1.65,304.1 +rollout,before,-9.25,sampler,7871c586908b,0.0057,0.0,0.02,1.5 +rollout,before,-9.25,vm,,1.4789,,6.57, +rollout,before,-8.25,api-old,d518795230b4,0.3692,0.0,1.49,118.3 +rollout,before,-8.25,api-old,e324fd0a2b33,0.2775,0.0,1.02,117.9 +rollout,before,-8.25,postgres,a4aaf0bb2416,0.1061,0.0,0.69,185.9 +rollout,before,-8.25,haproxy,6e46ca7c70b7,0.0271,0.0,0.26,31.1 +rollout,before,-8.25,valkey,0da23abd16b6,0.0075,0.0,0.44,12.0 +rollout,before,-8.25,k6,3ca3a7e9041d,0.0917,0.0,1.01,314.3 +rollout,before,-8.25,sampler,7871c586908b,0.0049,0.0,0.03,1.3 +rollout,before,-8.25,vm,,1.0428,,2.74, +rollout,before,-7.24,api-old,d518795230b4,0.2961,0.0,0.59,118.9 +rollout,before,-7.24,api-old,e324fd0a2b33,0.2865,0.0,1.08,118.7 +rollout,before,-7.24,postgres,a4aaf0bb2416,0.0854,0.0,0.63,186.0 +rollout,before,-7.24,haproxy,6e46ca7c70b7,0.041,0.0,0.49,31.3 +rollout,before,-7.24,valkey,0da23abd16b6,0.0077,0.0,0.24,11.9 +rollout,before,-7.24,k6,3ca3a7e9041d,0.0977,0.0,1.28,322.3 +rollout,before,-7.24,sampler,7871c586908b,0.0042,0.0,0.02,1.6 +rollout,before,-7.24,vm,,0.985,,3.41, +rollout,before,-6.24,api-old,d518795230b4,0.3329,0.0,1.1,119.9 +rollout,before,-6.24,api-old,e324fd0a2b33,0.3211,0.0,1.32,119.8 +rollout,before,-6.24,postgres,a4aaf0bb2416,0.0987,0.0,0.96,185.9 +rollout,before,-6.24,haproxy,6e46ca7c70b7,0.0329,0.0,1.02,32.1 +rollout,before,-6.24,valkey,0da23abd16b6,0.0089,0.0,1.66,12.2 +rollout,before,-6.24,k6,3ca3a7e9041d,0.1063,0.0,6.52,330.2 +rollout,before,-6.24,sampler,7871c586908b,0.0035,0.0,0.01,1.5 +rollout,before,-6.24,vm,,1.7825,,18.4, +rollout,before,-5.23,api-old,d518795230b4,0.2888,0.0,1.74,120.4 +rollout,before,-5.23,api-old,e324fd0a2b33,0.284,0.0,1.1,120.1 +rollout,before,-5.23,postgres,a4aaf0bb2416,0.0819,0.0,0.59,186.4 +rollout,before,-5.23,haproxy,6e46ca7c70b7,0.0289,0.0,0.5,32.8 +rollout,before,-5.23,valkey,0da23abd16b6,0.0079,0.0,0.47,11.7 +rollout,before,-5.23,k6,3ca3a7e9041d,0.0845,0.0,1.1,338.3 +rollout,before,-5.23,sampler,7871c586908b,0.0035,0.0,0.02,1.4 +rollout,before,-5.23,vm,,0.9761,,2.72, +rollout,before,-4.23,api-old,d518795230b4,0.3003,0.0,1.48,121.1 +rollout,before,-4.23,api-old,e324fd0a2b33,0.2995,0.0,0.72,120.5 +rollout,before,-4.23,postgres,a4aaf0bb2416,0.1153,0.0,0.61,185.7 +rollout,before,-4.23,haproxy,6e46ca7c70b7,0.03,0.0,0.41,33.3 +rollout,before,-4.23,valkey,0da23abd16b6,0.0204,0.0,0.19,12.1 +rollout,before,-4.23,k6,3ca3a7e9041d,0.097,0.0,1.13,346.7 +rollout,before,-4.23,sampler,7871c586908b,0.0035,0.0,0.01,1.5 +rollout,before,-4.23,vm,,1.1751,,3.91, +rollout,before,-3.22,api-old,d518795230b4,0.2921,0.0,1.06,121.7 +rollout,before,-3.22,api-old,e324fd0a2b33,0.2851,0.0,0.92,121.0 +rollout,before,-3.22,postgres,a4aaf0bb2416,0.0848,0.0,0.67,186.6 +rollout,before,-3.22,haproxy,6e46ca7c70b7,0.0273,0.0,0.4,33.6 +rollout,before,-3.22,valkey,0da23abd16b6,0.0082,0.0,0.23,12.3 +rollout,before,-3.22,k6,3ca3a7e9041d,0.0836,0.0,1.04,355.1 +rollout,before,-3.22,sampler,7871c586908b,0.0039,0.0,0.03,1.5 +rollout,before,-3.22,vm,,0.9252,,2.67, +rollout,before,-2.22,api-old,d518795230b4,0.2965,0.0,1.59,122.0 +rollout,before,-2.22,api-old,e324fd0a2b33,0.2883,0.0,2.37,121.2 +rollout,before,-2.22,postgres,a4aaf0bb2416,0.0842,0.0,1.99,186.7 +rollout,before,-2.22,haproxy,6e46ca7c70b7,0.038,0.0,0.28,33.0 +rollout,before,-2.22,valkey,0da23abd16b6,0.008,0.0,0.4,12.0 +rollout,before,-2.22,k6,3ca3a7e9041d,0.3698,0.0,3.52,365.5 +rollout,before,-2.22,sampler,7871c586908b,0.004,0.0,0.02,1.5 +rollout,before,-2.22,vm,,1.2642,,8.04, +rollout,prepare,-1.21,api-old,d518795230b4,0.3168,0.0,1.29,122.3 +rollout,prepare,-1.21,api-old,e324fd0a2b33,0.3136,0.0,1.14,121.7 +rollout,prepare,-1.21,postgres,a4aaf0bb2416,0.0906,0.0,0.64,186.6 +rollout,prepare,-1.21,haproxy,6e46ca7c70b7,0.0391,0.0,0.47,33.8 +rollout,prepare,-1.21,valkey,0da23abd16b6,0.0087,0.0,0.35,12.0 +rollout,prepare,-1.21,k6,3ca3a7e9041d,0.1,0.0,1.13,365.0 +rollout,prepare,-1.21,sampler,7871c586908b,0.0036,0.0,0.16,1.5 +rollout,prepare,-1.21,vm,,1.1343,,4.54, +rollout,prepare,-0.21,api-old,d518795230b4,0.3161,0.0,0.61,123.7 +rollout,prepare,-0.21,api-old,e324fd0a2b33,0.3127,0.0,0.49,122.9 +rollout,prepare,-0.21,postgres,a4aaf0bb2416,0.1223,0.0,1.08,186.7 +rollout,prepare,-0.21,haproxy,6e46ca7c70b7,0.0646,0.0,0.4,33.9 +rollout,prepare,-0.21,valkey,0da23abd16b6,0.0077,0.0,0.13,12.0 +rollout,prepare,-0.21,k6,3ca3a7e9041d,0.0967,0.0,1.47,365.9 +rollout,prepare,-0.21,sampler,7871c586908b,0.0033,0.0,0.01,1.5 +rollout,prepare,-0.21,vm,,2.0615,,18.42, +rollout,during,0.79,api-old,d518795230b4,0.461,0.0,1.5,123.4 +rollout,during,0.79,api-old,e324fd0a2b33,0.4655,0.0,1.66,123.3 +rollout,during,0.79,migrate,2b7f7e323ffe,0.5755,424.19,255.19,17.4 +rollout,during,0.79,postgres,a4aaf0bb2416,0.2136,0.0,2.75,187.2 +rollout,during,0.79,haproxy,6e46ca7c70b7,0.0449,0.0,1.32,34.0 +rollout,during,0.79,valkey,0da23abd16b6,0.0305,0.0,0.85,11.7 +rollout,during,0.79,k6,3ca3a7e9041d,0.1666,0.0,7.78,365.5 +rollout,during,0.79,sampler,7871c586908b,0.0046,0.0,0.03,1.5 +rollout,during,0.79,vm,,3.9232,,93.96, +rollout,during,1.8,api-old,d518795230b4,0.2866,0.0,0.99,123.1 +rollout,during,1.8,api-old,e324fd0a2b33,0.2796,0.0,0.56,123.3 +rollout,during,1.8,migrate,2b7f7e323ffe,0.4936,968.5,562.36,63.7 +rollout,during,1.8,postgres,a4aaf0bb2416,0.081,0.0,0.62,187.4 +rollout,during,1.8,haproxy,6e46ca7c70b7,0.0263,0.0,0.34,33.8 +rollout,during,1.8,valkey,0da23abd16b6,0.0066,0.0,0.4,12.0 +rollout,during,1.8,k6,3ca3a7e9041d,0.1058,0.0,0.93,364.3 +rollout,during,1.8,sampler,7871c586908b,0.0046,0.0,0.03,1.5 +rollout,during,1.8,vm,,1.5893,,360.72, +rollout,during,2.81,api-old,d518795230b4,0.3299,0.0,0.89,124.9 +rollout,during,2.81,api-old,e324fd0a2b33,0.3263,0.0,0.84,123.7 +rollout,during,2.81,api-new,8df7bccbf1ef,1.1464,0.0,0.65,11.2 +rollout,during,2.81,postgres,a4aaf0bb2416,0.1038,0.0,1.26,186.8 +rollout,during,2.81,haproxy,6e46ca7c70b7,0.0435,0.0,0.59,34.7 +rollout,during,2.81,valkey,0da23abd16b6,0.0084,0.0,0.25,12.0 +rollout,during,2.81,k6,3ca3a7e9041d,0.1143,0.0,2.52,365.5 +rollout,during,2.81,sampler,7871c586908b,0.0044,0.0,0.04,1.5 +rollout,during,2.81,vm,,2.8167,,84.1, +rollout,during,3.81,api-old,d518795230b4,0.4898,0.0,4.02,124.9 +rollout,during,3.81,api-old,e324fd0a2b33,0.4588,0.0,1.49,124.2 +rollout,during,3.81,api-new,8df7bccbf1ef,1.0291,0.0,1.87,153.2 +rollout,during,3.81,postgres,a4aaf0bb2416,0.1151,0.0,2.59,187.3 +rollout,during,3.81,haproxy,6e46ca7c70b7,0.0756,0.0,1.96,34.8 +rollout,during,3.81,valkey,0da23abd16b6,0.0101,0.0,1.04,12.0 +rollout,during,3.81,k6,3ca3a7e9041d,0.1203,0.0,5.97,364.9 +rollout,during,3.81,sampler,7871c586908b,0.0038,0.0,0.02,1.5 +rollout,during,3.81,vm,,3.3801,,27.04, +rollout,during,4.82,api-old,d518795230b4,0.2908,0.0,0.82,124.5 +rollout,during,4.82,api-old,e324fd0a2b33,0.2867,0.0,0.91,124.8 +rollout,during,4.82,api-new,8df7bccbf1ef,0.1576,122.08,30.38,103.6 +rollout,during,4.82,postgres,a4aaf0bb2416,0.0858,0.0,0.55,188.9 +rollout,during,4.82,haproxy,6e46ca7c70b7,0.0444,0.0,0.41,34.9 +rollout,during,4.82,valkey,0da23abd16b6,0.0069,0.0,0.23,12.0 +rollout,during,4.82,k6,3ca3a7e9041d,0.1025,0.0,1.1,365.0 +rollout,during,4.82,sampler,7871c586908b,0.0044,0.0,0.06,1.5 +rollout,during,4.82,vm,,1.2395,,17.33, +rollout,during,5.83,api-old,d518795230b4,0.2048,0.0,0.42,119.3 +rollout,during,5.83,api-old,e324fd0a2b33,0.343,0.0,0.67,124.3 +rollout,during,5.83,api-new,8df7bccbf1ef,0.5545,0.0,0.45,107.3 +rollout,during,5.83,postgres,a4aaf0bb2416,0.3688,0.0,1.36,185.4 +rollout,during,5.83,haproxy,6e46ca7c70b7,0.1386,0.0,0.68,31.1 +rollout,during,5.83,valkey,0da23abd16b6,0.0483,0.0,0.5,12.0 +rollout,during,5.83,k6,3ca3a7e9041d,0.1871,0.0,2.42,365.0 +rollout,during,5.83,sampler,7871c586908b,0.0057,0.0,0.02,1.5 +rollout,during,5.83,vm,,2.6641,,15.01, +rollout,during,6.83,api-old,e324fd0a2b33,0.3361,0.0,0.92,124.9 +rollout,during,6.83,api-new,8df7bccbf1ef,0.4074,0.0,1.09,109.0 +rollout,during,6.83,postgres,a4aaf0bb2416,0.1088,0.0,1.09,185.5 +rollout,during,6.83,haproxy,6e46ca7c70b7,0.0557,0.0,0.68,31.7 +rollout,during,6.83,valkey,0da23abd16b6,0.0088,0.0,1.35,12.5 +rollout,during,6.83,k6,3ca3a7e9041d,0.1178,0.0,2.18,364.8 +rollout,during,6.83,sampler,7871c586908b,0.0037,0.0,0.02,1.5 +rollout,during,6.83,vm,,2.4452,,18.5, +rollout,during,7.84,api-old,e324fd0a2b33,0.4175,0.0,2.76,125.0 +rollout,during,7.84,api-new,523402ea115d,1.1679,0.0,22.95,17.2 +rollout,during,7.84,api-new,8df7bccbf1ef,0.4263,0.0,1.01,110.9 +rollout,during,7.84,postgres,a4aaf0bb2416,0.1781,0.0,7.87,186.6 +rollout,during,7.84,haproxy,6e46ca7c70b7,0.0942,0.0,2.26,32.3 +rollout,during,7.84,valkey,0da23abd16b6,0.0102,0.0,0.65,12.2 +rollout,during,7.84,k6,3ca3a7e9041d,0.1506,0.0,6.08,365.5 +rollout,during,7.84,sampler,7871c586908b,0.0047,0.0,1.08,2.0 +rollout,during,7.84,vm,,3.0409,,45.14, +rollout,during,8.88,api-old,e324fd0a2b33,0.291,0.0,1.15,125.6 +rollout,during,8.88,api-new,523402ea115d,0.9189,92.65,57.84,104.5 +rollout,during,8.88,api-new,8df7bccbf1ef,0.3207,0.0,0.79,112.8 +rollout,during,8.88,postgres,a4aaf0bb2416,0.0917,0.0,0.66,188.0 +rollout,during,8.88,haproxy,6e46ca7c70b7,0.0518,0.0,0.29,32.1 +rollout,during,8.88,valkey,0da23abd16b6,0.0226,0.0,13.81,12.0 +rollout,during,8.88,k6,3ca3a7e9041d,0.0946,0.0,1.02,364.9 +rollout,during,8.88,sampler,7871c586908b,0.0047,0.0,2.6,1.3 +rollout,during,8.88,vm,,2.1016,,34.01, +rollout,during,9.88,api-old,e324fd0a2b33,0.3481,0.0,3.22,118.2 +rollout,during,9.88,api-new,523402ea115d,0.3482,0.0,1.31,107.3 +rollout,during,9.88,api-new,8df7bccbf1ef,0.2865,0.0,0.49,114.0 +rollout,during,9.88,postgres,a4aaf0bb2416,0.1422,0.0,0.56,161.2 +rollout,during,9.88,haproxy,6e46ca7c70b7,0.1034,0.0,0.44,27.8 +rollout,during,9.88,valkey,0da23abd16b6,0.0079,0.0,0.24,12.0 +rollout,during,9.88,k6,3ca3a7e9041d,0.0905,0.0,0.84,371.5 +rollout,during,9.88,sampler,7871c586908b,0.0042,0.0,2.0,1.7 +rollout,during,9.88,vm,,1.7919,,12.64, +rollout,after,10.89,api-new,523402ea115d,0.5749,0.0,0.64,110.0 +rollout,after,10.89,api-new,8df7bccbf1ef,0.4382,0.0,1.0,115.4 +rollout,after,10.89,postgres,a4aaf0bb2416,0.2444,0.0,2.77,186.7 +rollout,after,10.89,haproxy,6e46ca7c70b7,0.0933,0.0,4.28,29.4 +rollout,after,10.89,valkey,0da23abd16b6,0.0353,0.0,0.53,12.9 +rollout,after,10.89,k6,3ca3a7e9041d,0.1431,0.0,5.25,379.3 +rollout,after,10.89,sampler,7871c586908b,0.0045,0.0,2.45,1.5 +rollout,after,10.89,vm,,3.249,,37.95, +rollout,after,11.9,api-new,523402ea115d,0.2997,0.0,6.73,111.1 +rollout,after,11.9,api-new,8df7bccbf1ef,0.2982,0.0,6.03,116.7 +rollout,after,11.9,postgres,a4aaf0bb2416,0.0961,0.0,0.77,186.9 +rollout,after,11.9,haproxy,6e46ca7c70b7,0.0322,0.0,0.96,29.9 +rollout,after,11.9,valkey,0da23abd16b6,0.0072,0.0,0.53,12.5 +rollout,after,11.9,k6,3ca3a7e9041d,0.4469,0.0,3.17,399.7 +rollout,after,11.9,sampler,7871c586908b,0.0033,0.0,0.02,1.6 +rollout,after,11.9,vm,,1.373,,8.63, +rollout,after,12.9,api-new,523402ea115d,0.2895,0.0,0.84,112.7 +rollout,after,12.9,api-new,8df7bccbf1ef,0.2887,0.0,1.06,117.3 +rollout,after,12.9,postgres,a4aaf0bb2416,0.0892,0.0,1.08,187.6 +rollout,after,12.9,haproxy,6e46ca7c70b7,0.0421,0.0,0.43,31.0 +rollout,after,12.9,valkey,0da23abd16b6,0.0072,0.0,0.3,12.7 +rollout,after,12.9,k6,3ca3a7e9041d,0.0794,0.0,1.72,400.1 +rollout,after,12.9,sampler,7871c586908b,0.0035,0.0,0.02,1.3 +rollout,after,12.9,vm,,1.1743,,6.52, +rollout,after,13.91,api-new,523402ea115d,0.3205,0.0,1.7,114.8 +rollout,after,13.91,api-new,8df7bccbf1ef,0.3212,0.0,1.69,118.8 +rollout,after,13.91,postgres,a4aaf0bb2416,0.102,0.0,1.14,187.3 +rollout,after,13.91,haproxy,6e46ca7c70b7,0.0348,0.0,0.51,31.8 +rollout,after,13.91,valkey,0da23abd16b6,0.008,0.0,0.33,12.2 +rollout,after,13.91,k6,3ca3a7e9041d,0.0966,0.0,1.47,400.2 +rollout,after,13.91,sampler,7871c586908b,0.0033,0.0,0.02,1.2 +rollout,after,13.91,vm,,1.583,,12.78, +rollout,after,14.91,api-new,523402ea115d,0.3005,0.0,1.04,116.2 +rollout,after,14.91,api-new,8df7bccbf1ef,0.3,0.0,1.29,120.1 +rollout,after,14.91,postgres,a4aaf0bb2416,0.0933,0.0,0.51,187.5 +rollout,after,14.91,haproxy,6e46ca7c70b7,0.0306,0.0,0.3,31.6 +rollout,after,14.91,valkey,0da23abd16b6,0.0068,0.0,0.35,12.0 +rollout,after,14.91,k6,3ca3a7e9041d,0.0813,0.0,0.98,400.4 +rollout,after,14.91,sampler,7871c586908b,0.0042,0.0,0.01,1.5 +rollout,after,14.91,vm,,1.066,,4.86, +rollout,after,15.92,api-new,523402ea115d,0.3247,0.0,0.93,116.9 +rollout,after,15.92,api-new,8df7bccbf1ef,0.3944,0.0,0.84,120.7 +rollout,after,15.92,postgres,a4aaf0bb2416,0.1302,0.0,0.72,187.7 +rollout,after,15.92,haproxy,6e46ca7c70b7,0.0291,0.0,0.36,32.2 +rollout,after,15.92,valkey,0da23abd16b6,0.0198,0.0,0.22,12.1 +rollout,after,15.92,k6,3ca3a7e9041d,0.0953,0.0,1.02,401.0 +rollout,after,15.92,sampler,7871c586908b,0.0037,0.0,0.01,1.5 +rollout,after,15.92,vm,,1.3031,,4.58, +rollout,after,16.92,api-new,523402ea115d,0.3044,0.0,0.96,118.2 +rollout,after,16.92,api-new,8df7bccbf1ef,0.301,0.0,2.03,121.3 +rollout,after,16.92,postgres,a4aaf0bb2416,0.0917,0.0,0.63,188.0 +rollout,after,16.92,haproxy,6e46ca7c70b7,0.0277,0.0,0.42,32.4 +rollout,after,16.92,valkey,0da23abd16b6,0.0071,0.0,0.2,12.2 +rollout,after,16.92,k6,3ca3a7e9041d,0.0845,0.0,0.97,400.6 +rollout,after,16.92,sampler,7871c586908b,0.0038,0.0,0.02,1.4 +rollout,after,16.92,vm,,0.9954,,2.73, +rollout,after,17.93,api-new,523402ea115d,0.3379,0.0,0.85,117.9 +rollout,after,17.93,api-new,8df7bccbf1ef,0.3323,0.0,0.45,121.8 +rollout,after,17.93,postgres,a4aaf0bb2416,0.1031,0.0,0.53,188.3 +rollout,after,17.93,haproxy,6e46ca7c70b7,0.0416,0.0,0.23,33.0 +rollout,after,17.93,valkey,0da23abd16b6,0.0076,0.0,0.28,12.0 +rollout,after,17.93,k6,3ca3a7e9041d,0.0896,0.0,0.83,400.0 +rollout,after,17.93,sampler,7871c586908b,0.005,0.0,0.02,1.7 +rollout,after,17.93,vm,,1.1341,,3.29, +rollout,after,18.93,api-new,523402ea115d,0.3886,0.0,1.2,119.2 +rollout,after,18.93,api-new,8df7bccbf1ef,0.3025,0.0,1.86,121.8 +rollout,after,18.93,postgres,a4aaf0bb2416,0.0922,0.0,0.73,187.7 +rollout,after,18.93,haproxy,6e46ca7c70b7,0.0265,0.0,0.34,33.4 +rollout,after,18.93,valkey,0da23abd16b6,0.0073,0.0,0.31,12.0 +rollout,after,18.93,k6,3ca3a7e9041d,0.0769,0.0,0.97,400.1 +rollout,after,18.93,sampler,7871c586908b,0.0046,0.0,0.02,1.5 +rollout,after,18.93,vm,,1.0939,,2.54, +rollout,after,19.94,api-new,523402ea115d,0.3349,0.0,1.45,119.9 +rollout,after,19.94,api-new,8df7bccbf1ef,0.3299,0.0,0.73,121.8 +rollout,after,19.94,postgres,a4aaf0bb2416,0.1296,0.0,0.64,190.6 +rollout,after,19.94,haproxy,6e46ca7c70b7,0.0309,0.0,0.31,33.4 +rollout,after,19.94,valkey,0da23abd16b6,0.0085,0.0,0.25,12.0 +rollout,after,19.94,k6,3ca3a7e9041d,0.092,0.0,1.02,400.2 +rollout,after,19.94,sampler,7871c586908b,0.0053,0.0,0.02,1.5 +rollout,after,19.94,vm,,1.1332,,2.91, +rollout,after,20.95,api-new,523402ea115d,0.3116,0.0,1.53,119.8 +rollout,after,20.95,api-new,8df7bccbf1ef,0.3103,0.0,2.1,122.7 +rollout,after,20.95,postgres,a4aaf0bb2416,0.1362,0.0,0.7,190.8 +rollout,after,20.95,haproxy,6e46ca7c70b7,0.0272,0.0,0.35,33.5 +rollout,after,20.95,valkey,0da23abd16b6,0.0259,0.0,0.18,12.8 +rollout,after,20.95,k6,3ca3a7e9041d,0.0918,0.0,0.99,400.1 +rollout,after,20.95,sampler,7871c586908b,0.0061,0.0,0.02,1.5 +rollout,after,20.95,vm,,1.1217,,3.38, +rollout,after,21.95,api-new,523402ea115d,0.3039,0.0,1.22,121.2 +rollout,after,21.95,api-new,8df7bccbf1ef,0.3012,0.0,1.74,123.3 +rollout,after,21.95,postgres,a4aaf0bb2416,0.0963,0.0,0.74,191.0 +rollout,after,21.95,haproxy,6e46ca7c70b7,0.0278,0.0,0.22,34.2 +rollout,after,21.95,valkey,0da23abd16b6,0.0076,0.0,0.23,12.2 +rollout,after,21.95,k6,3ca3a7e9041d,0.0814,0.0,0.82,400.5 +rollout,after,21.95,sampler,7871c586908b,0.0036,0.0,0.02,1.3 +rollout,after,21.95,vm,,1.0151,,2.79, +rollout,after,22.96,api-new,523402ea115d,0.3278,0.0,0.55,121.8 +rollout,after,22.96,api-new,8df7bccbf1ef,0.3269,0.0,1.13,123.9 +rollout,after,22.96,postgres,a4aaf0bb2416,0.1008,0.0,0.71,191.7 +rollout,after,22.96,haproxy,6e46ca7c70b7,0.0456,0.0,0.65,34.2 +rollout,after,22.96,valkey,0da23abd16b6,0.0079,0.0,0.21,12.2 +rollout,after,22.96,k6,3ca3a7e9041d,0.1001,0.0,1.06,400.2 +rollout,after,22.96,sampler,7871c586908b,0.0031,0.0,0.01,1.6 +rollout,after,22.96,vm,,1.1553,,3.5, +rollout,after,23.96,api-new,523402ea115d,0.3901,0.0,1.6,122.4 +rollout,after,23.96,api-new,8df7bccbf1ef,0.3677,0.0,1.38,124.5 +rollout,after,23.96,postgres,a4aaf0bb2416,0.1141,0.0,2.38,192.0 +rollout,after,23.96,haproxy,6e46ca7c70b7,0.0396,0.0,1.07,34.6 +rollout,after,23.96,valkey,0da23abd16b6,0.0225,0.0,0.58,12.5 +rollout,after,23.96,k6,3ca3a7e9041d,0.1236,0.0,2.54,399.8 +rollout,after,23.96,sampler,7871c586908b,0.0032,0.0,0.02,1.5 +rollout,after,23.96,vm,,1.8331,,16.41, +rollout,after,24.96,api-new,523402ea115d,0.32,0.0,1.19,121.8 +rollout,after,24.96,api-new,8df7bccbf1ef,0.3153,0.0,0.98,124.2 +rollout,after,24.96,postgres,a4aaf0bb2416,0.0953,0.0,0.62,191.7 +rollout,after,24.96,haproxy,6e46ca7c70b7,0.0243,0.0,0.29,34.7 +rollout,after,24.96,valkey,0da23abd16b6,0.0073,0.0,0.24,11.7 +rollout,after,24.96,k6,3ca3a7e9041d,0.1058,0.0,1.34,400.5 +rollout,after,24.96,sampler,7871c586908b,0.0036,0.0,0.01,1.6 +rollout,after,24.96,vm,,1.1055,,3.38, +rollout,after,25.97,api-new,523402ea115d,0.353,0.0,1.54,122.6 +rollout,after,25.97,api-new,8df7bccbf1ef,0.3551,0.0,0.95,124.3 +rollout,after,25.97,postgres,a4aaf0bb2416,0.159,0.0,0.72,191.6 +rollout,after,25.97,haproxy,6e46ca7c70b7,0.0319,0.0,0.3,34.4 +rollout,after,25.97,valkey,0da23abd16b6,0.021,0.0,0.17,12.2 +rollout,after,25.97,k6,3ca3a7e9041d,0.1563,0.0,1.19,400.3 +rollout,after,25.97,sampler,7871c586908b,0.0068,0.0,0.18,1.5 +rollout,after,25.97,vm,,1.3628,,4.72, +rollout,after,26.98,api-new,523402ea115d,0.523,0.0,2.67,123.1 +rollout,after,26.98,api-new,8df7bccbf1ef,0.5094,0.0,6.56,124.7 +rollout,after,26.98,postgres,a4aaf0bb2416,0.1627,0.0,2.8,192.3 +rollout,after,26.98,haproxy,6e46ca7c70b7,0.0561,0.0,0.95,34.6 +rollout,after,26.98,valkey,0da23abd16b6,0.0135,0.0,1.3,12.5 +rollout,after,26.98,k6,3ca3a7e9041d,0.6957,0.0,16.81,400.9 +rollout,after,26.98,sampler,7871c586908b,0.0052,0.0,0.03,1.3 +rollout,after,26.98,vm,,2.8752,,33.44, +rollout,after,27.98,api-new,523402ea115d,0.3202,0.0,1.51,123.2 +rollout,after,27.98,api-new,8df7bccbf1ef,0.32,0.0,0.85,124.3 +rollout,after,27.98,postgres,a4aaf0bb2416,0.0981,0.0,0.56,192.3 +rollout,after,27.98,haproxy,6e46ca7c70b7,0.0406,0.0,0.53,34.4 +rollout,after,27.98,valkey,0da23abd16b6,0.0073,0.0,0.19,12.2 +rollout,after,27.98,k6,3ca3a7e9041d,0.0879,0.0,0.89,400.2 +rollout,after,27.98,sampler,7871c586908b,0.0036,0.0,0.01,1.5 +rollout,after,27.98,vm,,1.0443,,3.56, +rollout,after,28.99,api-new,523402ea115d,0.5031,0.0,1.98,123.7 +rollout,after,28.99,api-new,8df7bccbf1ef,0.5978,0.0,2.5,125.9 +rollout,after,28.99,postgres,a4aaf0bb2416,0.1641,0.0,0.98,192.1 +rollout,after,28.99,haproxy,6e46ca7c70b7,0.0446,0.0,0.72,34.8 +rollout,after,28.99,valkey,0da23abd16b6,0.0129,0.0,0.38,11.9 +rollout,after,28.99,k6,3ca3a7e9041d,0.1682,0.0,1.73,400.5 +rollout,after,28.99,sampler,7871c586908b,0.0054,0.0,0.02,1.5 +rollout,after,28.99,vm,,1.8083,,4.97, +rollout,after,30.0,api-new,523402ea115d,0.3703,0.0,2.31,124.2 +rollout,after,30.0,api-new,8df7bccbf1ef,0.3625,0.0,2.64,125.0 +rollout,after,30.0,postgres,a4aaf0bb2416,0.119,0.0,0.73,192.4 +rollout,after,30.0,haproxy,6e46ca7c70b7,0.0376,0.0,0.21,34.7 +rollout,after,30.0,valkey,0da23abd16b6,0.0084,0.0,0.3,12.4 +rollout,after,30.0,k6,3ca3a7e9041d,0.1303,0.0,0.97,400.1 +rollout,after,30.0,sampler,7871c586908b,0.0061,0.0,0.02,1.4 +rollout,after,30.0,vm,,1.2713,,3.55, +rollout,after,31.0,api-new,523402ea115d,0.3257,0.0,1.05,123.3 +rollout,after,31.0,api-new,8df7bccbf1ef,0.3197,0.0,1.35,125.0 +rollout,after,31.0,postgres,a4aaf0bb2416,0.1445,0.0,0.68,192.0 +rollout,after,31.0,haproxy,6e46ca7c70b7,0.0281,0.0,0.31,34.7 +rollout,after,31.0,valkey,0da23abd16b6,0.0319,0.0,0.2,12.5 +rollout,after,31.0,k6,3ca3a7e9041d,0.1186,0.0,1.01,400.6 +rollout,after,31.0,sampler,7871c586908b,0.0042,0.0,0.03,1.3 +rollout,after,31.0,vm,,1.222,,3.4, +rollout,after,32.01,api-new,523402ea115d,0.4466,0.0,1.4,124.4 +rollout,after,32.01,api-new,8df7bccbf1ef,0.3431,0.0,0.98,126.0 +rollout,after,32.01,postgres,a4aaf0bb2416,0.0993,0.0,0.73,192.2 +rollout,after,32.01,haproxy,6e46ca7c70b7,0.0271,0.0,0.52,34.9 +rollout,after,32.01,valkey,0da23abd16b6,0.0075,0.0,0.27,11.9 +rollout,after,32.01,k6,3ca3a7e9041d,0.1184,0.0,0.99,400.4 +rollout,after,32.01,sampler,7871c586908b,0.0039,0.0,0.02,1.5 +rollout,after,32.01,vm,,1.2551,,2.77, +rollout,after,33.01,api-new,523402ea115d,0.3499,0.0,1.07,124.2 +rollout,after,33.01,api-new,8df7bccbf1ef,0.345,0.0,1.23,125.9 +rollout,after,33.01,postgres,a4aaf0bb2416,0.1012,0.0,0.73,192.5 +rollout,after,33.01,haproxy,6e46ca7c70b7,0.0421,0.0,0.5,35.1 +rollout,after,33.01,valkey,0da23abd16b6,0.0075,0.0,0.25,11.9 +rollout,after,33.01,k6,3ca3a7e9041d,0.1064,0.0,1.04,399.9 +rollout,after,33.01,sampler,7871c586908b,0.0031,0.0,0.01,1.3 +rollout,after,33.01,vm,,1.2347,,4.23, +rollout,after,34.01,api-new,523402ea115d,0.4259,0.0,2.1,124.9 +rollout,after,34.01,api-new,8df7bccbf1ef,0.4254,0.0,2.64,125.4 +rollout,after,34.01,postgres,a4aaf0bb2416,0.1291,0.0,2.48,192.9 +rollout,after,34.01,haproxy,6e46ca7c70b7,0.0346,0.0,1.04,35.4 +rollout,after,34.01,valkey,0da23abd16b6,0.0094,0.0,0.41,12.2 +rollout,after,34.01,k6,3ca3a7e9041d,0.1258,0.0,3.99,400.2 +rollout,after,34.01,sampler,7871c586908b,0.0037,0.0,0.02,1.3 +rollout,after,34.01,vm,,2.2411,,26.62, +rollout,after,35.02,api-new,523402ea115d,0.345,0.0,1.45,124.1 +rollout,after,35.02,api-new,8df7bccbf1ef,0.3394,0.0,1.38,125.4 +rollout,after,35.02,postgres,a4aaf0bb2416,0.1025,0.0,0.76,193.0 +rollout,after,35.02,haproxy,6e46ca7c70b7,0.0267,0.0,0.52,35.4 +rollout,after,35.02,valkey,0da23abd16b6,0.0079,0.0,0.26,12.2 +rollout,after,35.02,k6,3ca3a7e9041d,0.1138,0.0,1.03,400.1 +rollout,after,35.02,sampler,7871c586908b,0.0036,0.0,0.01,1.4 +rollout,after,35.02,vm,,1.1248,,2.82, +rollout,after,36.02,api-new,523402ea115d,0.3512,0.0,1.3,124.9 +rollout,after,36.02,api-new,8df7bccbf1ef,0.3497,0.0,2.04,125.9 +rollout,after,36.02,postgres,a4aaf0bb2416,0.1421,0.0,0.72,193.2 +rollout,after,36.02,haproxy,6e46ca7c70b7,0.0268,0.0,0.62,35.8 +rollout,after,36.02,valkey,0da23abd16b6,0.021,0.0,0.34,13.0 +rollout,after,36.02,k6,3ca3a7e9041d,0.107,0.0,1.1,400.4 +rollout,after,36.02,sampler,7871c586908b,0.0041,0.0,0.03,1.5 +rollout,after,36.02,vm,,1.2545,,4.24, +rollout,after,37.03,api-new,523402ea115d,0.3238,0.0,1.82,124.8 +rollout,after,37.03,api-new,8df7bccbf1ef,0.3177,0.0,2.28,125.6 +rollout,after,37.03,postgres,a4aaf0bb2416,0.0981,0.0,1.01,193.0 +rollout,after,37.03,haproxy,6e46ca7c70b7,0.0248,0.0,0.26,35.3 +rollout,after,37.03,valkey,0da23abd16b6,0.0077,0.0,0.45,12.2 +rollout,after,37.03,k6,3ca3a7e9041d,0.0876,0.0,1.07,400.7 +rollout,after,37.03,sampler,7871c586908b,0.0038,0.0,0.01,1.6 +rollout,after,37.03,vm,,1.0849,,3.23, +rollout,after,38.03,api-new,523402ea115d,0.3286,0.0,2.19,124.6 +rollout,after,38.03,api-new,8df7bccbf1ef,0.3258,0.0,0.85,125.5 +rollout,after,38.03,postgres,a4aaf0bb2416,0.1009,0.0,0.88,193.0 +rollout,after,38.03,haproxy,6e46ca7c70b7,0.0379,0.0,0.37,35.5 +rollout,after,38.03,valkey,0da23abd16b6,0.008,0.0,0.37,12.0 +rollout,after,38.03,k6,3ca3a7e9041d,0.0873,0.0,0.99,400.4 +rollout,after,38.03,sampler,7871c586908b,0.0032,0.0,0.02,1.7 +rollout,after,38.03,vm,,1.1554,,3.2, +rollout,after,39.04,api-new,523402ea115d,0.3183,0.0,1.35,125.2 +rollout,after,39.04,api-new,8df7bccbf1ef,0.3171,0.0,1.44,125.7 +rollout,after,39.04,postgres,a4aaf0bb2416,0.0998,0.0,0.97,193.8 +rollout,after,39.04,haproxy,6e46ca7c70b7,0.025,0.0,0.27,35.8 +rollout,after,39.04,valkey,0da23abd16b6,0.0076,0.0,0.38,12.0 +rollout,after,39.04,k6,3ca3a7e9041d,0.083,0.0,0.88,400.3 +rollout,after,39.04,sampler,7871c586908b,0.0039,0.0,0.02,1.6 +rollout,after,39.04,vm,,1.0058,,2.77, +rollout,after,40.04,api-new,523402ea115d,0.3368,0.0,1.56,124.9 +rollout,after,40.04,api-new,8df7bccbf1ef,0.3308,0.0,1.6,126.2 +rollout,after,40.04,postgres,a4aaf0bb2416,0.1135,0.0,0.61,194.2 +rollout,after,40.04,haproxy,6e46ca7c70b7,0.0256,0.0,0.27,35.6 +rollout,after,40.04,valkey,0da23abd16b6,0.0079,0.0,0.14,12.5 +rollout,after,40.04,k6,3ca3a7e9041d,0.0962,0.0,0.87,400.5 +rollout,after,40.04,sampler,7871c586908b,0.0055,0.0,0.02,1.4 +rollout,after,40.04,vm,,1.0929,,3.13, +rollout,after,41.05,api-new,523402ea115d,0.3281,0.0,1.22,124.6 +rollout,after,41.05,api-new,8df7bccbf1ef,0.3257,0.0,1.41,126.3 +rollout,after,41.05,postgres,a4aaf0bb2416,0.138,0.0,0.7,194.5 +rollout,after,41.05,haproxy,6e46ca7c70b7,0.0265,0.0,0.27,35.5 +rollout,after,41.05,valkey,0da23abd16b6,0.0293,0.0,0.26,12.5 +rollout,after,41.05,k6,3ca3a7e9041d,0.1052,0.0,1.08,400.4 +rollout,after,41.05,sampler,7871c586908b,0.0045,0.0,0.02,1.5 +rollout,after,41.05,vm,,1.2433,,4.05, +rollout,after,42.05,api-new,523402ea115d,0.3498,0.0,3.99,125.7 +rollout,after,42.05,api-new,8df7bccbf1ef,0.3452,0.0,2.41,126.3 +rollout,after,42.05,postgres,a4aaf0bb2416,0.1059,0.0,2.44,194.5 +rollout,after,42.05,haproxy,6e46ca7c70b7,0.025,0.0,0.47,35.6 +rollout,after,42.05,valkey,0da23abd16b6,0.0086,0.0,1.54,12.4 +rollout,after,42.05,k6,3ca3a7e9041d,0.5228,0.0,7.55,400.7 +rollout,after,42.05,sampler,7871c586908b,0.0037,0.0,0.04,1.6 +rollout,after,42.05,vm,,1.5823,,12.28, +rollout,after,43.06,api-new,523402ea115d,0.3047,0.0,0.76,125.5 +rollout,after,43.06,api-new,8df7bccbf1ef,0.3838,0.0,1.03,126.4 +rollout,after,43.06,postgres,a4aaf0bb2416,0.0916,0.0,0.85,195.0 +rollout,after,43.06,haproxy,6e46ca7c70b7,0.0353,0.0,0.35,35.4 +rollout,after,43.06,valkey,0da23abd16b6,0.0073,0.0,0.45,12.0 +rollout,after,43.06,k6,3ca3a7e9041d,0.0861,0.0,1.01,400.9 +rollout,after,43.06,sampler,7871c586908b,0.0036,0.0,0.02,1.6 +rollout,after,43.06,vm,,1.1408,,2.95, +rollout,after,44.07,api-new,523402ea115d,0.3494,0.0,1.53,125.6 +rollout,after,44.07,api-new,8df7bccbf1ef,0.3466,0.0,0.85,126.5 +rollout,after,44.07,postgres,a4aaf0bb2416,0.1076,0.0,1.46,194.5 +rollout,after,44.07,haproxy,6e46ca7c70b7,0.0246,0.0,0.51,36.5 +rollout,after,44.07,valkey,0da23abd16b6,0.0082,0.0,0.79,12.2 +rollout,after,44.07,k6,3ca3a7e9041d,0.0943,0.0,1.37,400.6 +rollout,after,44.07,sampler,7871c586908b,0.0036,0.0,0.02,1.5 +rollout,after,44.07,vm,,1.8022,,15.32, +rollout,after,45.07,api-new,523402ea115d,0.3349,0.0,1.0,125.2 +rollout,after,45.07,api-new,8df7bccbf1ef,0.3309,0.0,2.35,126.4 +rollout,after,45.07,postgres,a4aaf0bb2416,0.1052,0.0,0.66,194.6 +rollout,after,45.07,haproxy,6e46ca7c70b7,0.0251,0.0,0.49,36.1 +rollout,after,45.07,valkey,0da23abd16b6,0.0079,0.0,0.37,12.0 +rollout,after,45.07,k6,3ca3a7e9041d,0.0962,0.0,1.03,400.4 +rollout,after,45.07,sampler,7871c586908b,0.0041,0.0,0.02,1.6 +rollout,after,45.07,vm,,1.1351,,3.02, +rollout,after,46.08,api-new,523402ea115d,0.3353,0.0,2.24,125.2 +rollout,after,46.08,api-new,8df7bccbf1ef,0.3285,0.0,1.26,126.3 +rollout,after,46.08,postgres,a4aaf0bb2416,0.129,0.0,0.73,194.5 +rollout,after,46.08,haproxy,6e46ca7c70b7,0.0236,0.0,0.72,35.6 +rollout,after,46.08,valkey,0da23abd16b6,0.0215,0.0,0.33,11.9 +rollout,after,46.08,k6,3ca3a7e9041d,0.0961,0.0,0.98,400.6 +rollout,after,46.08,sampler,7871c586908b,0.0045,0.0,0.02,1.5 +rollout,after,46.08,vm,,1.2431,,4.12, +rollout,after,47.08,api-new,523402ea115d,0.4096,0.0,0.35,125.9 +rollout,after,47.08,api-new,8df7bccbf1ef,0.3136,0.0,1.18,126.2 +rollout,after,47.08,postgres,a4aaf0bb2416,0.0943,0.0,0.64,195.1 +rollout,after,47.08,haproxy,6e46ca7c70b7,0.0231,0.0,0.22,35.9 +rollout,after,47.08,valkey,0da23abd16b6,0.0076,0.0,0.35,12.3 +rollout,after,47.08,k6,3ca3a7e9041d,0.0992,0.0,0.92,400.4 +rollout,after,47.08,sampler,7871c586908b,0.0037,0.0,0.02,1.4 +rollout,after,47.08,vm,,1.1638,,2.75, +rollout,after,48.09,api-new,523402ea115d,0.3214,0.0,0.97,125.8 +rollout,after,48.09,api-new,8df7bccbf1ef,0.321,0.0,1.79,126.4 +rollout,after,48.09,postgres,a4aaf0bb2416,0.0987,0.0,0.78,195.1 +rollout,after,48.09,haproxy,6e46ca7c70b7,0.0339,0.0,0.35,35.8 +rollout,after,48.09,valkey,0da23abd16b6,0.0081,0.0,0.52,12.3 +rollout,after,48.09,k6,3ca3a7e9041d,0.0996,0.0,0.98,400.9 +rollout,after,48.09,sampler,7871c586908b,0.0035,0.0,0.02,1.6 +rollout,after,48.09,vm,,1.0551,,2.99, +rollout,after,49.09,api-new,523402ea115d,0.3136,0.0,0.8,125.7 +rollout,after,49.09,api-new,8df7bccbf1ef,0.3148,0.0,1.85,126.0 +rollout,after,49.09,postgres,a4aaf0bb2416,0.097,0.0,0.73,195.4 +rollout,after,49.09,haproxy,6e46ca7c70b7,0.0227,0.0,0.26,36.0 +rollout,after,49.09,valkey,0da23abd16b6,0.0076,0.0,0.37,12.1 +rollout,after,49.09,k6,3ca3a7e9041d,0.0824,0.0,0.9,400.6 +rollout,after,49.09,sampler,7871c586908b,0.0036,0.0,0.01,1.8 +rollout,after,49.09,vm,,1.0256,,2.72, +rollout,after,50.09,api-new,523402ea115d,0.348,0.0,1.44,125.9 +rollout,after,50.09,api-new,8df7bccbf1ef,0.3489,0.0,2.14,126.0 +rollout,after,50.09,postgres,a4aaf0bb2416,0.1141,0.0,0.99,195.5 +rollout,after,50.09,haproxy,6e46ca7c70b7,0.0268,0.0,0.32,35.2 +rollout,after,50.09,valkey,0da23abd16b6,0.0086,0.0,0.27,12.0 +rollout,after,50.09,k6,3ca3a7e9041d,0.0968,0.0,0.87,401.1 +rollout,after,50.09,sampler,7871c586908b,0.0051,0.0,0.04,1.7 +rollout,after,50.09,vm,,1.1343,,2.89, +rollout,after,51.1,api-new,523402ea115d,0.3015,0.0,0.74,126.0 +rollout,after,51.1,api-new,8df7bccbf1ef,0.3018,0.0,1.13,126.5 +rollout,after,51.1,postgres,a4aaf0bb2416,0.1281,0.0,0.61,195.5 +rollout,after,51.1,haproxy,6e46ca7c70b7,0.0222,0.0,0.27,35.8 +rollout,after,51.1,valkey,0da23abd16b6,0.0244,0.0,0.39,12.6 +rollout,after,51.1,k6,3ca3a7e9041d,0.0821,0.0,0.95,401.4 +rollout,after,51.1,sampler,7871c586908b,0.0048,0.0,0.01,1.5 +rollout,after,51.1,vm,,1.1228,,3.81, +rollout,after,52.11,api-new,523402ea115d,0.3307,0.0,1.51,125.8 +rollout,after,52.11,api-new,8df7bccbf1ef,0.3319,0.0,0.94,126.7 +rollout,after,52.11,postgres,a4aaf0bb2416,0.1016,0.0,0.82,195.6 +rollout,after,52.11,haproxy,6e46ca7c70b7,0.0252,0.0,0.62,35.3 +rollout,after,52.11,valkey,0da23abd16b6,0.0086,0.0,0.31,12.1 +rollout,after,52.11,k6,3ca3a7e9041d,0.0938,0.0,1.05,400.9 +rollout,after,52.11,sampler,7871c586908b,0.0038,0.0,0.02,1.6 +rollout,after,52.11,vm,,1.1049,,2.74, +rollout,after,53.11,api-new,523402ea115d,0.3225,0.0,0.97,125.6 +rollout,after,53.11,api-new,8df7bccbf1ef,0.3226,0.0,1.62,126.3 +rollout,after,53.11,postgres,a4aaf0bb2416,0.0997,0.0,0.81,195.6 +rollout,after,53.11,haproxy,6e46ca7c70b7,0.0368,0.0,0.39,36.4 +rollout,after,53.11,valkey,0da23abd16b6,0.008,0.0,0.47,11.7 +rollout,after,53.11,k6,3ca3a7e9041d,0.0871,0.0,1.06,400.5 +rollout,after,53.11,sampler,7871c586908b,0.0035,0.0,0.01,1.7 +rollout,after,53.11,vm,,1.0952,,3.11, +rollout,after,54.11,api-new,523402ea115d,0.3562,0.0,1.01,125.9 +rollout,after,54.11,api-new,8df7bccbf1ef,0.3612,0.0,0.86,127.0 +rollout,after,54.11,postgres,a4aaf0bb2416,0.1141,0.0,1.18,195.4 +rollout,after,54.11,haproxy,6e46ca7c70b7,0.0263,0.0,0.95,35.9 +rollout,after,54.11,valkey,0da23abd16b6,0.0088,0.0,0.63,12.5 +rollout,after,54.11,k6,3ca3a7e9041d,0.0998,0.0,1.85,401.2 +rollout,after,54.11,sampler,7871c586908b,0.0037,0.0,0.02,1.5 +rollout,after,54.11,vm,,1.7532,,14.52, +rollout,after,55.12,api-new,523402ea115d,0.3285,0.0,1.6,126.0 +rollout,after,55.12,api-new,8df7bccbf1ef,0.3255,0.0,1.13,126.6 +rollout,after,55.12,postgres,a4aaf0bb2416,0.1006,0.0,0.64,195.5 +rollout,after,55.12,haproxy,6e46ca7c70b7,0.0243,0.0,0.44,35.6 +rollout,after,55.12,valkey,0da23abd16b6,0.0079,0.0,0.4,12.2 +rollout,after,55.12,k6,3ca3a7e9041d,0.092,0.0,1.04,400.6 +rollout,after,55.12,sampler,7871c586908b,0.0038,0.0,0.01,1.6 +rollout,after,55.12,vm,,1.0653,,3.39, +rollout,after,56.12,api-new,523402ea115d,0.3156,0.0,1.32,125.9 +rollout,after,56.12,api-new,8df7bccbf1ef,0.3106,0.0,0.97,126.2 +rollout,after,56.12,postgres,a4aaf0bb2416,0.1404,0.0,0.74,195.5 +rollout,after,56.12,haproxy,6e46ca7c70b7,0.023,0.0,0.37,36.1 +rollout,after,56.12,valkey,0da23abd16b6,0.0261,0.0,0.25,12.2 +rollout,after,56.12,k6,3ca3a7e9041d,0.0924,0.0,1.11,400.4 +rollout,after,56.12,sampler,7871c586908b,0.0038,0.0,0.01,1.3 +rollout,after,56.12,vm,,1.2044,,4.1, +rollout,after,57.13,api-new,523402ea115d,0.327,0.0,1.13,126.2 +rollout,after,57.13,api-new,8df7bccbf1ef,0.3204,0.0,1.72,126.3 +rollout,after,57.13,postgres,a4aaf0bb2416,0.1015,0.0,0.81,196.3 +rollout,after,57.13,haproxy,6e46ca7c70b7,0.0251,0.0,0.26,35.2 +rollout,after,57.13,valkey,0da23abd16b6,0.0078,0.0,0.3,12.0 +rollout,after,57.13,k6,3ca3a7e9041d,0.0954,0.0,1.05,400.6 +rollout,after,57.13,sampler,7871c586908b,0.0036,0.0,0.09,1.7 +rollout,after,57.13,vm,,1.0854,,2.76, +rollout,after,58.13,api-new,523402ea115d,0.3245,0.0,1.37,126.0 +rollout,after,58.13,api-new,8df7bccbf1ef,0.3251,0.0,1.31,126.2 +rollout,after,58.13,postgres,a4aaf0bb2416,0.0992,0.0,0.7,196.7 +rollout,after,58.13,haproxy,6e46ca7c70b7,0.0352,0.0,0.35,37.0 +rollout,after,58.13,valkey,0da23abd16b6,0.008,0.0,0.49,12.0 +rollout,after,58.13,k6,3ca3a7e9041d,0.0888,0.0,0.91,402.9 +rollout,after,58.13,sampler,7871c586908b,0.0032,0.0,0.01,1.9 +rollout,after,58.13,vm,,1.1056,,3.04, +rollout,after,59.14,api-new,523402ea115d,0.318,0.0,1.46,125.6 +rollout,after,59.14,api-new,8df7bccbf1ef,0.3844,0.0,0.88,126.6 +rollout,after,59.14,postgres,a4aaf0bb2416,0.0974,0.0,0.61,196.7 +rollout,after,59.14,haproxy,6e46ca7c70b7,0.0234,0.0,0.32,36.3 +rollout,after,59.14,valkey,0da23abd16b6,0.0078,0.0,0.33,12.2 +rollout,after,59.14,k6,3ca3a7e9041d,0.0835,0.0,0.95,411.3 +rollout,after,59.14,sampler,7871c586908b,0.0035,0.0,0.09,1.6 +rollout,after,59.14,vm,,1.0958,,2.71, +rollout,after,60.14,api-new,523402ea115d,0.3206,0.0,1.21,126.0 +rollout,after,60.14,api-new,8df7bccbf1ef,0.3179,0.0,0.85,127.0 +rollout,after,60.14,postgres,a4aaf0bb2416,0.1522,0.0,0.53,196.1 +rollout,after,60.14,haproxy,6e46ca7c70b7,0.022,0.0,0.35,36.2 +rollout,after,60.14,valkey,0da23abd16b6,0.0074,0.0,0.17,12.2 +rollout,after,60.14,k6,3ca3a7e9041d,0.082,0.0,1.0,419.6 +rollout,after,60.14,sampler,7871c586908b,0.0035,0.0,0.01,1.5 +rollout,after,60.14,vm,,1.1344,,2.65, +rollout,after,61.14,api-new,523402ea115d,0.3307,0.0,0.7,126.3 +rollout,after,61.14,api-new,8df7bccbf1ef,0.3278,0.0,1.04,126.7 +rollout,after,61.14,postgres,a4aaf0bb2416,0.1357,0.0,0.89,196.2 +rollout,after,61.14,haproxy,6e46ca7c70b7,0.0235,0.0,0.38,35.5 +rollout,after,61.14,valkey,0da23abd16b6,0.0196,0.0,0.71,12.6 +rollout,after,61.14,k6,3ca3a7e9041d,0.083,0.0,1.6,427.2 +rollout,after,61.14,sampler,7871c586908b,0.0037,0.0,0.02,1.6 +rollout,after,61.14,vm,,1.3243,,8.64, +rollout,after,62.15,api-new,523402ea115d,0.3344,0.0,1.61,126.0 +rollout,after,62.15,api-new,8df7bccbf1ef,0.3346,0.0,2.07,126.7 +rollout,after,62.15,postgres,a4aaf0bb2416,0.1047,0.0,0.71,196.1 +rollout,after,62.15,haproxy,6e46ca7c70b7,0.0249,0.0,0.52,35.8 +rollout,after,62.15,valkey,0da23abd16b6,0.008,0.0,0.4,11.9 +rollout,after,62.15,k6,3ca3a7e9041d,0.0858,0.0,1.14,438.0 +rollout,after,62.15,sampler,7871c586908b,0.0034,0.0,0.01,1.5 +rollout,after,62.15,vm,,1.1054,,3.18, +rollout,after,63.15,api-new,523402ea115d,0.4469,0.0,5.07,126.8 +rollout,after,63.15,api-new,8df7bccbf1ef,0.3445,0.0,3.13,127.2 +rollout,after,63.15,postgres,a4aaf0bb2416,0.107,0.0,1.89,196.1 +rollout,after,63.15,haproxy,6e46ca7c70b7,0.0248,0.0,1.4,35.7 +rollout,after,63.15,valkey,0da23abd16b6,0.0084,0.0,0.21,12.0 +rollout,after,63.15,k6,3ca3a7e9041d,0.3731,0.0,5.48,453.6 +rollout,after,63.15,sampler,7871c586908b,0.0034,0.0,0.01,1.5 +rollout,after,63.15,vm,,1.5441,,9.45, +rollout,after,64.16,api-new,523402ea115d,0.4448,0.0,1.4,126.5 +rollout,after,64.16,api-new,8df7bccbf1ef,0.4243,0.0,1.44,126.8 +rollout,after,64.16,postgres,a4aaf0bb2416,0.1296,0.0,1.32,196.4 +rollout,after,64.16,haproxy,6e46ca7c70b7,0.0447,0.0,0.61,35.2 +rollout,after,64.16,valkey,0da23abd16b6,0.0097,0.0,0.4,12.9 +rollout,after,64.16,k6,3ca3a7e9041d,0.118,0.0,3.82,454.5 +rollout,after,64.16,sampler,7871c586908b,0.0042,0.0,0.03,1.3 +rollout,after,64.16,vm,,1.9915,,21.15, +rollout,after,65.16,api-new,523402ea115d,0.3336,0.0,1.16,126.5 +rollout,after,65.16,api-new,8df7bccbf1ef,0.3235,0.0,1.93,126.6 +rollout,after,65.16,postgres,a4aaf0bb2416,0.1034,0.0,0.61,196.5 +rollout,after,65.16,haproxy,6e46ca7c70b7,0.0258,0.0,0.77,36.0 +rollout,after,65.16,valkey,0da23abd16b6,0.0076,0.0,0.35,13.0 +rollout,after,65.16,k6,3ca3a7e9041d,0.1007,0.0,1.33,454.3 +rollout,after,65.16,sampler,7871c586908b,0.0044,0.0,0.13,1.6 +rollout,after,65.16,vm,,1.0932,,3.38, +rollout,after,66.17,api-new,523402ea115d,0.3067,0.0,1.3,126.5 +rollout,after,66.17,api-new,8df7bccbf1ef,0.2998,0.0,1.01,126.6 +rollout,after,66.17,postgres,a4aaf0bb2416,0.1304,0.0,0.69,196.8 +rollout,after,66.17,haproxy,6e46ca7c70b7,0.0226,0.0,0.45,35.9 +rollout,after,66.17,valkey,0da23abd16b6,0.0205,0.0,0.34,12.8 +rollout,after,66.17,k6,3ca3a7e9041d,0.1031,0.0,0.99,454.4 +rollout,after,66.17,sampler,7871c586908b,0.0045,0.0,0.01,1.5 +rollout,after,66.17,vm,,1.2531,,3.96, +rollout,after,67.17,api-new,523402ea115d,0.3283,0.0,1.5,126.9 +rollout,after,67.17,api-new,8df7bccbf1ef,0.3259,0.0,1.24,127.1 +rollout,after,67.17,postgres,a4aaf0bb2416,0.1007,0.0,0.74,197.0 +rollout,after,67.17,haproxy,6e46ca7c70b7,0.0253,0.0,0.69,36.3 +rollout,after,67.17,valkey,0da23abd16b6,0.0079,0.0,0.28,12.1 +rollout,after,67.17,k6,3ca3a7e9041d,0.1065,0.0,1.21,454.5 +rollout,after,67.17,sampler,7871c586908b,0.0039,0.0,0.02,1.4 +rollout,after,67.17,vm,,1.1049,,3.08, +rollout,after,68.18,api-new,523402ea115d,0.3205,0.0,1.79,126.8 +rollout,after,68.18,api-new,8df7bccbf1ef,0.3171,0.0,2.17,126.8 +rollout,after,68.18,postgres,a4aaf0bb2416,0.0983,0.0,0.78,196.4 +rollout,after,68.18,haproxy,6e46ca7c70b7,0.024,0.0,0.5,36.3 +rollout,after,68.18,valkey,0da23abd16b6,0.008,0.0,0.31,12.6 +rollout,after,68.18,k6,3ca3a7e9041d,0.1012,0.0,0.93,454.0 +rollout,after,68.18,sampler,7871c586908b,0.0034,0.0,0.01,1.5 +rollout,after,68.18,vm,,1.0256,,3.06, +rollout,after,69.18,api-new,523402ea115d,0.3033,0.0,1.48,126.9 +rollout,after,69.18,api-new,8df7bccbf1ef,0.3022,0.0,1.78,126.6 +rollout,after,69.18,postgres,a4aaf0bb2416,0.0943,0.0,1.03,196.6 +rollout,after,69.18,haproxy,6e46ca7c70b7,0.0325,0.0,0.4,36.1 +rollout,after,69.18,valkey,0da23abd16b6,0.0075,0.0,0.41,12.1 +rollout,after,69.18,k6,3ca3a7e9041d,0.0883,0.0,0.92,454.4 +rollout,after,69.18,sampler,7871c586908b,0.0037,0.0,0.01,1.6 +rollout,after,69.18,vm,,1.0551,,3.0, +rollout,after,70.19,api-new,523402ea115d,0.3275,0.0,1.13,126.9 +rollout,after,70.19,api-new,8df7bccbf1ef,0.3218,0.0,1.11,126.3 +rollout,after,70.19,postgres,a4aaf0bb2416,0.1011,0.0,0.71,196.6 +rollout,after,70.19,haproxy,6e46ca7c70b7,0.024,0.0,0.36,35.8 +rollout,after,70.19,valkey,0da23abd16b6,0.0081,0.0,0.28,12.4 +rollout,after,70.19,k6,3ca3a7e9041d,0.0874,0.0,0.93,454.4 +rollout,after,70.19,sampler,7871c586908b,0.0036,0.0,0.02,1.7 +rollout,after,70.19,vm,,1.0754,,2.82, +rollout,after,71.19,api-new,523402ea115d,0.2936,0.0,0.74,126.5 +rollout,after,71.19,api-new,8df7bccbf1ef,0.2935,0.0,1.31,127.0 +rollout,after,71.19,postgres,a4aaf0bb2416,0.1289,0.0,0.74,197.5 +rollout,after,71.19,haproxy,6e46ca7c70b7,0.0208,0.0,0.32,36.2 +rollout,after,71.19,valkey,0da23abd16b6,0.0223,0.0,0.32,13.2 +rollout,after,71.19,k6,3ca3a7e9041d,0.079,0.0,1.05,454.2 +rollout,after,71.19,sampler,7871c586908b,0.0041,0.0,0.01,1.6 +rollout,after,71.19,vm,,1.0955,,3.45, +rollout,after,72.2,api-new,523402ea115d,0.3342,0.0,1.89,126.5 +rollout,after,72.2,api-new,8df7bccbf1ef,0.3296,0.0,1.41,126.6 +rollout,after,72.2,postgres,a4aaf0bb2416,0.1043,0.0,0.79,197.2 +rollout,after,72.2,haproxy,6e46ca7c70b7,0.0236,0.0,0.61,36.2 +rollout,after,72.2,valkey,0da23abd16b6,0.0085,0.0,0.4,12.2 +rollout,after,72.2,k6,3ca3a7e9041d,0.0893,0.0,0.82,454.4 +rollout,after,72.2,sampler,7871c586908b,0.0039,0.0,0.03,1.7 +rollout,after,72.2,vm,,1.1142,,2.75, +rollout,after,73.2,api-new,523402ea115d,0.331,0.0,1.34,126.4 +rollout,after,73.2,api-new,8df7bccbf1ef,0.3275,0.0,1.99,126.3 +rollout,after,73.2,postgres,a4aaf0bb2416,0.1019,0.0,0.8,198.0 +rollout,after,73.2,haproxy,6e46ca7c70b7,0.0243,0.0,0.28,36.7 +rollout,after,73.2,valkey,0da23abd16b6,0.0082,0.0,0.41,11.7 +rollout,after,73.2,k6,3ca3a7e9041d,0.0864,0.0,1.02,454.4 +rollout,after,73.2,sampler,7871c586908b,0.0032,0.0,0.01,1.6 +rollout,after,73.2,vm,,1.0355,,3.04, +rollout,after,74.2,api-new,523402ea115d,0.387,0.0,2.07,126.9 +rollout,after,74.2,api-new,8df7bccbf1ef,0.371,0.0,1.43,126.8 +rollout,after,74.2,postgres,a4aaf0bb2416,0.1161,0.0,1.25,197.9 +rollout,after,74.2,haproxy,6e46ca7c70b7,0.0391,0.0,0.52,36.1 +rollout,after,74.2,valkey,0da23abd16b6,0.0091,0.0,0.39,12.2 +rollout,after,74.2,k6,3ca3a7e9041d,0.0947,0.0,1.57,454.2 +rollout,after,74.2,sampler,7871c586908b,0.0038,0.0,0.03,1.6 +rollout,after,74.2,vm,,1.9107,,16.71, +rollout,after,75.21,api-new,523402ea115d,0.3229,0.0,1.6,127.0 +rollout,after,75.21,api-new,8df7bccbf1ef,0.3945,0.0,1.23,127.3 +rollout,after,75.21,postgres,a4aaf0bb2416,0.0972,0.0,0.7,197.7 +rollout,after,75.21,haproxy,6e46ca7c70b7,0.0227,0.0,0.34,36.2 +rollout,after,75.21,valkey,0da23abd16b6,0.0075,0.0,0.3,12.2 +rollout,after,75.21,k6,3ca3a7e9041d,0.0882,0.0,0.92,454.6 +rollout,after,75.21,sampler,7871c586908b,0.0039,0.0,0.01,1.6 +rollout,after,75.21,vm,,1.1348,,3.18, +rollout,after,76.21,api-new,523402ea115d,0.3026,0.0,1.37,126.3 +rollout,after,76.21,api-new,8df7bccbf1ef,0.3027,0.0,1.23,127.0 +rollout,after,76.21,postgres,a4aaf0bb2416,0.1184,0.0,0.66,197.6 +rollout,after,76.21,haproxy,6e46ca7c70b7,0.0213,0.0,0.47,36.2 +rollout,after,76.21,valkey,0da23abd16b6,0.0185,0.0,0.4,12.5 +rollout,after,76.21,k6,3ca3a7e9041d,0.0824,0.0,0.97,454.2 +rollout,after,76.21,sampler,7871c586908b,0.0046,0.0,0.03,1.7 +rollout,after,76.21,vm,,1.105,,3.73, +rollout,after,77.22,api-new,523402ea115d,0.3168,0.0,1.17,126.6 +rollout,after,77.22,api-new,8df7bccbf1ef,0.3167,0.0,1.92,126.9 +rollout,after,77.22,postgres,a4aaf0bb2416,0.1003,0.0,0.81,198.1 +rollout,after,77.22,haproxy,6e46ca7c70b7,0.0237,0.0,0.26,36.4 +rollout,after,77.22,valkey,0da23abd16b6,0.0078,0.0,0.39,12.0 +rollout,after,77.22,k6,3ca3a7e9041d,0.0952,0.0,0.94,454.5 +rollout,after,77.22,sampler,7871c586908b,0.0041,0.0,0.01,1.6 +rollout,after,77.22,vm,,1.0543,,2.93, +rollout,after,78.22,api-new,523402ea115d,0.3138,0.0,1.22,127.0 +rollout,after,78.22,api-new,8df7bccbf1ef,0.3127,0.0,0.96,126.2 +rollout,after,78.22,postgres,a4aaf0bb2416,0.1006,0.0,0.75,197.1 +rollout,after,78.22,haproxy,6e46ca7c70b7,0.022,0.0,0.56,36.2 +rollout,after,78.22,valkey,0da23abd16b6,0.0079,0.0,0.23,12.2 +rollout,after,78.22,k6,3ca3a7e9041d,0.0868,0.0,0.96,454.2 +rollout,after,78.22,sampler,7871c586908b,0.0042,0.0,0.02,1.8 +rollout,after,78.22,vm,,1.065,,2.76, +rollout,after,79.23,api-new,523402ea115d,0.3952,0.0,0.88,126.7 +rollout,after,79.23,api-new,8df7bccbf1ef,0.3217,0.0,1.64,126.4 +rollout,after,79.23,postgres,a4aaf0bb2416,0.0991,0.0,1.23,197.7 +rollout,after,79.23,haproxy,6e46ca7c70b7,0.0362,0.0,0.24,36.3 +rollout,after,79.23,valkey,0da23abd16b6,0.0083,0.0,0.36,12.5 +rollout,after,79.23,k6,3ca3a7e9041d,0.0841,0.0,0.89,454.7 +rollout,after,79.23,sampler,7871c586908b,0.0039,0.0,0.01,1.7 +rollout,after,79.23,vm,,1.1842,,2.98, +rollout,after,80.23,api-new,523402ea115d,0.3169,0.0,1.51,126.7 +rollout,after,80.23,api-new,8df7bccbf1ef,0.3115,0.0,0.95,126.6 +rollout,after,80.23,postgres,a4aaf0bb2416,0.1054,0.0,0.66,198.0 +rollout,after,80.23,haproxy,6e46ca7c70b7,0.0229,0.0,0.5,36.4 +rollout,after,80.23,valkey,0da23abd16b6,0.0077,0.0,0.54,12.2 +rollout,after,80.23,k6,3ca3a7e9041d,0.0849,0.0,1.12,454.2 +rollout,after,80.23,sampler,7871c586908b,0.0044,0.0,0.02,1.6 +rollout,after,80.23,vm,,1.0345,,2.79, +rollout,after,81.24,api-new,523402ea115d,0.3364,0.0,0.72,127.1 +rollout,after,81.24,api-new,8df7bccbf1ef,0.331,0.0,1.25,127.1 +rollout,after,81.24,postgres,a4aaf0bb2416,0.1291,0.0,0.87,198.2 +rollout,after,81.24,haproxy,6e46ca7c70b7,0.0253,0.0,0.22,36.5 +rollout,after,81.24,valkey,0da23abd16b6,0.0212,0.0,0.37,12.1 +rollout,after,81.24,k6,3ca3a7e9041d,0.0918,0.0,0.9,454.6 +rollout,after,81.24,sampler,7871c586908b,0.0045,0.0,0.01,1.6 +rollout,after,81.24,vm,,1.2129,,3.37, +rollout,after,82.24,api-new,523402ea115d,0.3428,0.0,1.38,126.9 +rollout,after,82.24,api-new,8df7bccbf1ef,0.3384,0.0,1.14,126.8 +rollout,after,82.24,postgres,a4aaf0bb2416,0.1042,0.0,0.92,198.6 +rollout,after,82.24,haproxy,6e46ca7c70b7,0.0253,0.0,0.46,36.0 +rollout,after,82.24,valkey,0da23abd16b6,0.0084,0.0,0.19,11.8 +rollout,after,82.24,k6,3ca3a7e9041d,0.0878,0.0,0.78,454.7 +rollout,after,82.24,sampler,7871c586908b,0.0038,0.0,0.03,1.4 +rollout,after,82.24,vm,,1.105,,2.73, +rollout,after,83.25,api-new,523402ea115d,0.3231,0.0,1.05,126.5 +rollout,after,83.25,api-new,8df7bccbf1ef,0.3184,0.0,0.93,126.5 +rollout,after,83.25,postgres,a4aaf0bb2416,0.0984,0.0,0.98,198.8 +rollout,after,83.25,haproxy,6e46ca7c70b7,0.0231,0.0,0.24,36.2 +rollout,after,83.25,valkey,0da23abd16b6,0.0078,0.0,0.33,12.1 +rollout,after,83.25,k6,3ca3a7e9041d,0.0819,0.0,0.92,454.5 +rollout,after,83.25,sampler,7871c586908b,0.0036,0.0,0.01,1.9 +rollout,after,83.25,vm,,1.0555,,3.31, +rollout,after,84.25,api-new,523402ea115d,0.3625,0.0,3.34,127.0 +rollout,after,84.25,api-new,8df7bccbf1ef,0.3547,0.0,2.91,127.3 +rollout,after,84.25,postgres,a4aaf0bb2416,0.1094,0.0,2.23,199.0 +rollout,after,84.25,haproxy,6e46ca7c70b7,0.0382,0.0,2.09,36.3 +rollout,after,84.25,valkey,0da23abd16b6,0.0083,0.0,0.36,12.2 +rollout,after,84.25,k6,3ca3a7e9041d,0.4046,0.0,3.95,454.5 +rollout,after,84.25,sampler,7871c586908b,0.0046,0.0,0.03,1.6 +rollout,after,84.25,vm,,2.0013,,20.62, +rollout,after,85.26,api-new,523402ea115d,0.3432,0.0,1.81,126.6 +rollout,after,85.26,api-new,8df7bccbf1ef,0.3374,0.0,2.25,126.4 +rollout,after,85.26,postgres,a4aaf0bb2416,0.106,0.0,0.73,198.7 +rollout,after,85.26,haproxy,6e46ca7c70b7,0.0256,0.0,0.65,36.0 +rollout,after,85.26,valkey,0da23abd16b6,0.0081,0.0,0.35,12.5 +rollout,after,85.26,k6,3ca3a7e9041d,0.1012,0.0,1.17,454.8 +rollout,after,85.26,sampler,7871c586908b,0.0057,0.0,0.04,1.4 +rollout,after,85.26,vm,,1.1121,,2.89, +rollout,after,86.27,api-new,523402ea115d,0.3976,0.0,1.76,126.9 +rollout,after,86.27,api-new,8df7bccbf1ef,0.3905,0.0,1.26,126.6 +rollout,after,86.27,postgres,a4aaf0bb2416,0.1807,0.0,0.78,198.9 +rollout,after,86.27,haproxy,6e46ca7c70b7,0.0301,0.0,0.77,36.3 +rollout,after,86.27,valkey,0da23abd16b6,0.038,0.0,0.43,12.3 +rollout,after,86.27,k6,3ca3a7e9041d,0.1386,0.0,1.36,454.5 +rollout,after,86.27,sampler,7871c586908b,0.0043,0.0,0.02,1.6 +rollout,after,86.27,vm,,1.4922,,5.14, +rollout,after,87.27,api-new,523402ea115d,0.3174,0.0,2.18,126.8 +rollout,after,87.27,api-new,8df7bccbf1ef,0.3143,0.0,1.63,126.3 +rollout,after,87.27,postgres,a4aaf0bb2416,0.0991,0.0,0.83,199.4 +rollout,after,87.27,haproxy,6e46ca7c70b7,0.0243,0.0,0.23,36.0 +rollout,after,87.27,valkey,0da23abd16b6,0.0078,0.0,0.47,12.1 +rollout,after,87.27,k6,3ca3a7e9041d,0.1055,0.0,1.05,455.0 +rollout,after,87.27,sampler,7871c586908b,0.0031,0.0,0.01,1.7 +rollout,after,87.27,vm,,1.0958,,2.75, +rollout,after,88.27,api-new,523402ea115d,0.3207,0.0,1.38,127.1 +rollout,after,88.27,api-new,8df7bccbf1ef,0.3161,0.0,0.82,125.9 +rollout,after,88.27,postgres,a4aaf0bb2416,0.095,0.0,0.77,199.1 +rollout,after,88.27,haproxy,6e46ca7c70b7,0.0225,0.0,0.51,36.3 +rollout,after,88.27,valkey,0da23abd16b6,0.0073,0.0,0.28,12.1 +rollout,after,88.27,k6,3ca3a7e9041d,0.1099,0.0,0.94,454.3 +rollout,after,88.27,sampler,7871c586908b,0.0035,0.0,0.01,1.8 +rollout,after,88.27,vm,,1.1157,,2.84, +rollout,after,89.28,api-new,523402ea115d,0.305,0.0,0.78,126.7 +rollout,after,89.28,api-new,8df7bccbf1ef,0.3007,0.0,1.4,127.1 +rollout,after,89.28,postgres,a4aaf0bb2416,0.0958,0.0,0.73,199.6 +rollout,after,89.28,haproxy,6e46ca7c70b7,0.0372,0.0,0.4,35.9 +rollout,after,89.28,valkey,0da23abd16b6,0.0073,0.0,0.24,12.0 +rollout,after,89.28,k6,3ca3a7e9041d,0.0912,0.0,0.88,455.2 +rollout,after,89.28,sampler,7871c586908b,0.0035,0.0,0.02,1.6 +rollout,after,89.28,vm,,1.0755,,2.92, +rollout,after,90.28,api-new,523402ea115d,0.3145,0.0,1.46,127.3 +rollout,after,90.28,api-new,8df7bccbf1ef,0.3092,0.0,1.56,126.8 +rollout,after,90.28,postgres,a4aaf0bb2416,0.0989,0.0,0.95,199.3 +rollout,after,90.28,haproxy,6e46ca7c70b7,0.0221,0.0,0.35,35.7 +rollout,after,90.28,valkey,0da23abd16b6,0.0075,0.0,0.31,12.2 +rollout,after,90.28,k6,3ca3a7e9041d,0.0896,0.0,0.94,454.5 +rollout,after,90.28,sampler,7871c586908b,0.0034,0.0,0.01,1.7 +rollout,after,90.28,vm,,1.0552,,2.69, +rollout,after,91.29,api-new,523402ea115d,0.3155,0.0,2.12,127.1 +rollout,after,91.29,api-new,8df7bccbf1ef,0.4076,0.0,1.41,127.0 +rollout,after,91.29,postgres,a4aaf0bb2416,0.1261,0.0,0.75,199.9 +rollout,after,91.29,haproxy,6e46ca7c70b7,0.0223,0.0,0.26,36.0 +rollout,after,91.29,valkey,0da23abd16b6,0.0199,0.0,0.48,12.1 +rollout,after,91.29,k6,3ca3a7e9041d,0.0881,0.0,0.83,454.6 +rollout,after,91.29,sampler,7871c586908b,0.0036,0.0,0.04,1.3 +rollout,after,91.29,vm,,1.2347,,3.4, +rollout,after,92.29,api-new,523402ea115d,0.341,0.0,1.3,126.8 +rollout,after,92.29,api-new,8df7bccbf1ef,0.3394,0.0,1.83,126.8 +rollout,after,92.29,postgres,a4aaf0bb2416,0.1042,0.0,0.73,199.7 +rollout,after,92.29,haproxy,6e46ca7c70b7,0.0254,0.0,0.63,36.2 +rollout,after,92.29,valkey,0da23abd16b6,0.0084,0.0,0.36,12.3 +rollout,after,92.29,k6,3ca3a7e9041d,0.0898,0.0,1.17,454.5 +rollout,after,92.29,sampler,7871c586908b,0.0032,0.0,0.01,1.5 +rollout,after,92.29,vm,,1.1049,,3.23, +rollout,after,93.29,api-new,523402ea115d,0.3331,0.0,1.87,126.8 +rollout,after,93.29,api-new,8df7bccbf1ef,0.3306,0.0,0.93,126.8 +rollout,after,93.29,postgres,a4aaf0bb2416,0.1024,0.0,0.79,199.8 +rollout,after,93.29,haproxy,6e46ca7c70b7,0.0238,0.0,0.57,35.8 +rollout,after,93.29,valkey,0da23abd16b6,0.0084,0.0,0.38,12.0 +rollout,after,93.29,k6,3ca3a7e9041d,0.0854,0.0,1.1,454.4 +rollout,after,93.29,sampler,7871c586908b,0.0033,0.0,0.02,1.7 +rollout,after,93.29,vm,,1.0759,,3.52, +rollout,after,94.3,api-new,523402ea115d,0.3653,0.0,3.5,126.5 +rollout,after,94.3,api-new,8df7bccbf1ef,0.3549,0.0,2.97,127.5 +rollout,after,94.3,postgres,a4aaf0bb2416,0.1081,0.0,3.54,199.8 +rollout,after,94.3,haproxy,6e46ca7c70b7,0.0361,0.0,1.0,36.0 +rollout,after,94.3,valkey,0da23abd16b6,0.0079,0.0,0.24,12.0 +rollout,after,94.3,k6,3ca3a7e9041d,0.0922,0.0,2.36,454.9 +rollout,after,94.3,sampler,7871c586908b,0.0032,0.0,0.01,1.6 +rollout,after,94.3,vm,,1.9723,,26.58, +rollout,after,95.3,api-new,523402ea115d,0.3893,0.0,1.97,126.6 +rollout,after,95.3,api-new,8df7bccbf1ef,0.3504,0.0,1.65,126.2 +rollout,after,95.3,postgres,a4aaf0bb2416,0.1019,0.0,0.76,200.1 +rollout,after,95.3,haproxy,6e46ca7c70b7,0.0239,0.0,0.67,35.9 +rollout,after,95.3,valkey,0da23abd16b6,0.0077,0.0,0.37,12.0 +rollout,after,95.3,k6,3ca3a7e9041d,0.1098,0.0,1.04,455.2 +rollout,after,95.3,sampler,7871c586908b,0.0045,0.0,0.03,1.4 +rollout,after,95.3,vm,,1.2348,,3.92, +rollout,after,96.31,api-new,523402ea115d,0.417,0.0,1.32,127.4 +rollout,after,96.31,api-new,8df7bccbf1ef,0.3227,0.0,1.06,126.8 +rollout,after,96.31,postgres,a4aaf0bb2416,0.1339,0.0,0.69,200.5 +rollout,after,96.31,haproxy,6e46ca7c70b7,0.0245,0.0,0.48,35.9 +rollout,after,96.31,valkey,0da23abd16b6,0.0337,0.0,0.26,12.8 +rollout,after,96.31,k6,3ca3a7e9041d,0.1012,0.0,1.08,454.7 +rollout,after,96.31,sampler,7871c586908b,0.0044,0.0,0.02,1.6 +rollout,after,96.31,vm,,1.2512,,4.35, +rollout,after,97.31,api-new,523402ea115d,0.339,0.0,1.18,127.2 +rollout,after,97.31,api-new,8df7bccbf1ef,0.3437,0.0,2.3,127.1 +rollout,after,97.31,postgres,a4aaf0bb2416,0.1041,0.0,1.01,200.3 +rollout,after,97.31,haproxy,6e46ca7c70b7,0.0248,0.0,0.4,36.3 +rollout,after,97.31,valkey,0da23abd16b6,0.008,0.0,0.34,12.3 +rollout,after,97.31,k6,3ca3a7e9041d,0.0996,0.0,0.99,455.2 +rollout,after,97.31,sampler,7871c586908b,0.0045,0.0,0.01,1.8 +rollout,after,97.31,vm,,1.1444,,3.06, +rollout,after,98.32,api-new,523402ea115d,0.3318,0.0,1.07,127.1 +rollout,after,98.32,api-new,8df7bccbf1ef,0.3304,0.0,1.76,127.0 +rollout,after,98.32,postgres,a4aaf0bb2416,0.1004,0.0,0.83,200.1 +rollout,after,98.32,haproxy,6e46ca7c70b7,0.025,0.0,0.23,35.7 +rollout,after,98.32,valkey,0da23abd16b6,0.0079,0.0,0.5,12.0 +rollout,after,98.32,k6,3ca3a7e9041d,0.1026,0.0,1.04,454.9 +rollout,after,98.32,sampler,7871c586908b,0.0045,0.0,0.02,1.4 +rollout,after,98.32,vm,,1.1336,,3.02, +rollout,after,99.33,api-new,523402ea115d,0.3159,0.0,1.33,127.4 +rollout,after,99.33,api-new,8df7bccbf1ef,0.3163,0.0,1.57,126.5 +rollout,after,99.33,postgres,a4aaf0bb2416,0.0973,0.0,1.11,200.3 +rollout,after,99.33,haproxy,6e46ca7c70b7,0.0346,0.0,0.29,35.8 +rollout,after,99.33,valkey,0da23abd16b6,0.0076,0.0,0.4,12.0 +rollout,after,99.33,k6,3ca3a7e9041d,0.09,0.0,0.94,454.7 +rollout,after,99.33,sampler,7871c586908b,0.0043,0.0,0.03,1.5 +rollout,after,99.33,vm,,1.0551,,3.2, +rollout,after,100.33,api-new,523402ea115d,0.3329,0.0,2.15,126.9 +rollout,after,100.33,api-new,8df7bccbf1ef,0.3339,0.0,1.4,127.0 +rollout,after,100.33,postgres,a4aaf0bb2416,0.1093,0.0,0.69,200.0 +rollout,after,100.33,haproxy,6e46ca7c70b7,0.0249,0.0,0.54,35.8 +rollout,after,100.33,valkey,0da23abd16b6,0.0082,0.0,0.3,12.0 +rollout,after,100.33,k6,3ca3a7e9041d,0.0928,0.0,1.01,454.9 +rollout,after,100.33,sampler,7871c586908b,0.0044,0.0,0.03,1.8 +rollout,after,100.33,vm,,1.0545,,2.94, +rollout,after,101.34,api-new,523402ea115d,0.3233,0.0,1.31,126.9 +rollout,after,101.34,api-new,8df7bccbf1ef,0.3251,0.0,1.35,126.9 +rollout,after,101.34,postgres,a4aaf0bb2416,0.1396,0.0,0.74,200.3 +rollout,after,101.34,haproxy,6e46ca7c70b7,0.0233,0.0,0.51,35.7 +rollout,after,101.34,valkey,0da23abd16b6,0.0243,0.0,0.32,12.8 +rollout,after,101.34,k6,3ca3a7e9041d,0.0953,0.0,1.02,455.0 +rollout,after,101.34,sampler,7871c586908b,0.0041,0.0,0.02,1.6 +rollout,after,101.34,vm,,1.2036,,3.53, +rollout,after,102.34,api-new,523402ea115d,0.3115,0.0,2.01,126.6 +rollout,after,102.34,api-new,8df7bccbf1ef,0.308,0.0,1.08,126.5 +rollout,after,102.34,postgres,a4aaf0bb2416,0.097,0.0,0.85,200.9 +rollout,after,102.34,haproxy,6e46ca7c70b7,0.0215,0.0,0.37,36.2 +rollout,after,102.34,valkey,0da23abd16b6,0.0074,0.0,0.29,12.1 +rollout,after,102.34,k6,3ca3a7e9041d,0.0841,0.0,0.92,454.7 +rollout,after,102.34,sampler,7871c586908b,0.0035,0.0,0.01,1.6 +rollout,after,102.34,vm,,1.0458,,2.79, +rollout,after,103.34,api-new,523402ea115d,0.3127,0.0,1.02,127.0 +rollout,after,103.34,api-new,8df7bccbf1ef,0.3158,0.0,1.71,126.3 +rollout,after,103.34,postgres,a4aaf0bb2416,0.101,0.0,0.92,200.4 +rollout,after,103.34,haproxy,6e46ca7c70b7,0.0229,0.0,0.29,36.5 +rollout,after,103.34,valkey,0da23abd16b6,0.0082,0.0,0.44,12.2 +rollout,after,103.34,k6,3ca3a7e9041d,0.0857,0.0,0.9,454.3 +rollout,after,103.34,sampler,7871c586908b,0.0039,0.0,0.03,1.7 +rollout,after,103.34,vm,,1.0656,,2.66, diff --git a/evidence/rollout/unit-of-work-previous/summary.md b/evidence/rollout/unit-of-work-previous/summary.md new file mode 100644 index 00000000..72ca2366 --- /dev/null +++ b/evidence/rollout/unit-of-work-previous/summary.md @@ -0,0 +1,96 @@ +# Поочерёдная замена реплик под нагрузкой: метка `unit-of-work-previous` + +- Статус: **complete** +- Commit: `6ba74b1` +- Профиль `rollout`: 2 реплики за HAProxy; замена с образа commit `b2fb88f` на образ текущего checkout (`scripts/rolling-update.sh`); 100 записей с ключом и 100 чтений страницы истории в секунду (k6, постоянная интенсивность); окна: 15 с до запуска скрипта, бюджет замены 90 с, ещё 15 с; порог доли успешных 99% +- Лимиты без swap: API 1 CPU / 512m на реплику, HAProxy 1 CPU / 256m, PostgreSQL 2 CPU / 1g, Valkey 0.5 CPU / 128m, сэмплер 0.25 CPU / 128m, k6 без лимита +- Посторонние контейнеры в VM во время замера: domains-api-1, domains-bot-1, domains-postgres-1 + +Время — секунды на часах ВМ Docker от начала замены (создание контейнера миграции). Шаги — события Docker (создание и старт новой реплики, SIGTERM, выход и удаление старой) и журнал HAProxy (`UP` новой, `drain` и `maint` старой, возврат слота в `ready`). Ответы — отметки k6 при отправке; «старые» и «новые» — по `X-Instance-Id` контейнеров до и после замены. Окно замены — от начала до удаления последней старой реплики. Сверка — после повтора неуспешных записей с тем же ключом: сообщений в чате записи и разных текстов столько, сколько отправлено ключей. + +| Замена, с | Сборка / миграция, с | Ревизия до → после | Ошибки до / во время / после | Мин. доля успешных | Секунд ниже порога | Успешных в секунду: до / мин. во время | p95: до / макс. во время, мс | Первый ответ новой / последний старой, с | Ответов старых после дренажа | Повтор записей | Сообщений = ключей | Пометки | +|---|---|---|---|---|---|---|---|---|---|---|---|---| +| 10.2 | 1 / 3 | `d3f9a6b2c1e7` → `d3f9a6b2c1e7` | 0 / 0 / 0 | 1 | 0 | 200 / 200 | 7 / 180 | 4.82 / 9.26 | 0 | 0 → 0 | 12001 = 12001 | — | + +## Шаги по репликам + +| Шаг | Новая (слот) | Старая (слот) | Новая создана, с | Новая `UP`, с | Старт → `UP`, с | Дренаж, с | Остановка, с | Старая удалена, с | Слот `ready`, с | Замена целиком, с | Ошибок за шаг | Ответов старой после дренажа | +|---|---|---|---|---|---|---|---|---|---|---|---|---| +| 1 | `8df7bccbf1ef` (api-3) | `d518795230b4` (api-2) | 2.56 | 4.8 | 2.11 | 0.18 | 0.58 | 6.27 | 7.17 | 3.72 | 0 | 0 | +| 2 | `523402ea115d` (api-2) | `e324fd0a2b33` (api-1) | 7.38 | 8.93 | 1.4 | 0.15 | 0.62 | 10.2 | 10.41 | 2.83 | 0 | 0 | + +## Ресурсы по окнам замены + +Ресурсы — сэмплер `bench/sampler.sh` в режиме `scan` (свой контейнер без сети, лимит 0,25 CPU / 128 МиБ): раз в секунду счётчики cgroup каждого контейнера стенда, k6 и самого сэмплера и `/proc/stat` ВМ, на тех же часах ВМ, что шкала. Ячейка — среднее CPU за окно (CPU-секунды / длина окна, ядер) / наибольшее посекундное: CPU интервала между отсчётами / его длина по всем интервалам, задевающим окно, включая граничный (у заморозки — только с CPU в окне); строка граничного интервала в `samples.csv` помечена соседним окном (окно строки — по концу интервала, у заморозки — по концу незамороженной части); пик памяти cgroup (`memory.current`, с кэшем файлов) по отсчётам, МиБ; «(N с)» — сколько секунд окна контейнер существовал, если меньше окна; «нет» — контейнера не было ни в одном отсчёте. API всего — сумма по репликам, пик — наибольшая сумма памяти на одном отсчёте. ВМ — занятые ядра ВМ Docker целиком (в них и k6, и сэмплер). Полные значения — `resources.csv`, посекундные — `samples.csv`. + +Окна (секунды от начала замены): до — от первого запроса + 2 с (разгон k6) до первого обращения скрипта к стенду (`exec_start` в событиях проекта, кроме проверок здоровья контейнеров); подготовка — проверки скрипта и сборка образа до создания контейнера миграции; замена — до удаления последней старой реплики; после — до отправки последнего запроса. Старые и новые реплики — каждая отдельно со своим `X-Instance-Id`; на пике замены работают три реплики. + +| Компонент | до (-14.44…-1.39 с) | подготовка (-1.39…0 с) | замена (0…10.2 с) | после (10.2…103.56 с) | +|---|---|---|---|---| +| старая `d518795230b4` | 0.31 / 0.37; 122 | 0.34 / 0.46; 124 | 0.19 / 0.49; 125 (5.83 с) | 0.00 / — (0 с) | +| старая `e324fd0a2b33` | 0.30 / 0.44; 121 | 0.34 / 0.47; 123 | 0.34 / 0.47; 126 | 0.00 / — (0 с) | +| новая `8df7bccbf1ef` | 0.00 / — (0 с) | 0.00 / — (0 с) | 0.34 / 1.15; 153 (7.51 с) | 0.34 / 0.60; 128 | +| новая `523402ea115d` | 0.00 / — (0 с) | 0.00 / — (0 с) | 0.18 / 1.17; 107 (2.68 с) | 0.34 / 0.57; 127 | +| API всего | 0.61 / 0.81; 243 | 0.67 / 0.93; 247 | 1.06 / 2.01; 402 | 0.68 / 1.10; 254 | +| миграция `2b7f7e323ffe` | 0.00 / — (0 с) | 0.00 / — (0 с) | 0.08 / 0.58; 64 (1.56 с) | 0.00 / — (0 с) | +| PostgreSQL `a4aaf0bb2416` | 0.10 / 0.16; 187 | 0.13 / 0.21; 187 | 0.15 / 0.37; 189 | 0.11 / 0.24; 201 | +| HAProxy `6e46ca7c70b7` | 0.03 / 0.05; 34 | 0.06 / 0.06; 34 | 0.07 / 0.14; 35 | 0.03 / 0.09; 37 | +| Valkey `0da23abd16b6` | 0.01 / 0.04; 12 | 0.01 / 0.03; 12 | 0.02 / 0.05; 12 | 0.01 / 0.04; 13 | +| k6 `3ca3a7e9041d` | 0.14 / 0.37; 366 | 0.11 / 0.17; 366 | 0.12 / 0.19; 372 | 0.12 / 0.70; 455 | +| сэмплер `7871c586908b` | 0.00 / 0.01; 2 | 0.00 / 0.00; 2 | 0.00 / 0.01; 2 | 0.00 / 0.01; 2 | +| ВМ | 1.17 / 1.78 | 2.23 / 3.92 | 2.49 / 3.92 | 1.26 / 3.25 | + +### CPU на успешный запрос до и после замены, мкс + +CPU компонента × 10⁶ / успешных в секунду в окнах до и после: две реплики одной версии, скрипт не работает. В подготовке и замене CPU на запрос не считается: CPU там идёт на сборку образа, миграцию, запуск третьей реплики, дренаж и остановку старой — цену процедуры, а не запросов; там — только абсолютные числа выше. Смесь (50 % записи, 50 % чтения страницы чата из 1 000 сообщений) другая, чем у серий трека 1: с их CPU на запрос числа напрямую не сравниваются. + +| Компонент | до | после | +|---|---|---| +| API всего | 3066 | 3398 | +| PostgreSQL | 478 | 560 | +| HAProxy | 172 | 146 | +| Valkey | 52 | 58 | +| k6 | 722 | 590 | +| сэмплер | 22 | 20 | +| ВМ | 5851 | 6305 | + +Успешных в секунду по окнам: до 199.9, подготовка 199.9, замена 200.1, после 200.0. + +## Контейнеры `api` до замены + +| Контейнер | `X-Instance-Id` | Образ (тег) | Конфигурация образа | +|---|---|---|---| +| mtusi-bench-api-1 | `d518795230b4` | `mtusi-messenger:bench` | `sha256:6e9ea882b361…` | +| mtusi-bench-api-2 | `e324fd0a2b33` | `mtusi-messenger:bench` | `sha256:6e9ea882b361…` | + +## Контейнеры `api` после замены + +| Контейнер | `X-Instance-Id` | Образ (тег) | Конфигурация образа | +|---|---|---|---| +| mtusi-bench-api-3 | `8df7bccbf1ef` | `mtusi-messenger:bench` | `sha256:ffb64b282745…` | +| mtusi-bench-api-4 | `523402ea115d` | `mtusi-messenger:bench` | `sha256:ffb64b282745…` | + +## Шкала вокруг замены + +Полная шкала — `timeline.csv`. + +| с от начала | Записи ok / ош | Чтения ok / ош | Коды ошибок | Доля успешных | p50 / p95, мс | Старые / новые ok | Ответы реплик | +|---|---|---|---|---|---|---|---| +| -3 | 100 / 0 | 100 / 0 | — | 1 | 3 / 5 | 200 / 0 | d518795230b4:100 e324fd0a2b33:100 | +| -2 | 100 / 0 | 100 / 0 | — | 1 | 4 / 5 | 200 / 0 | d518795230b4:100 e324fd0a2b33:100 | +| -1 | 100 / 0 | 100 / 0 | — | 1 | 4 / 10 | 200 / 0 | d518795230b4:100 e324fd0a2b33:100 | +| 0 | 100 / 0 | 100 / 0 | — | 1 | 5 / 13 | 200 / 0 | d518795230b4:100 e324fd0a2b33:100 | +| 1 | 100 / 0 | 100 / 0 | — | 1 | 3 / 4 | 200 / 0 | d518795230b4:100 e324fd0a2b33:100 | +| 2 | 100 / 0 | 100 / 0 | — | 1 | 4 / 40 | 200 / 0 | d518795230b4:100 e324fd0a2b33:100 | +| 3 | 100 / 0 | 100 / 0 | — | 1 | 4 / 93 | 200 / 0 | d518795230b4:100 e324fd0a2b33:100 | +| 4 | 100 / 0 | 100 / 0 | — | 1 | 3 / 141 | 188 / 12 | 8df7bccbf1ef:12 d518795230b4:94 e324fd0a2b33:94 | +| 5 | 100 / 0 | 100 / 0 | — | 1 | 5 / 23 | 112 / 88 | 8df7bccbf1ef:88 d518795230b4:24 e324fd0a2b33:88 | +| 6 | 100 / 0 | 100 / 0 | — | 1 | 4 / 9 | 100 / 100 | 8df7bccbf1ef:100 e324fd0a2b33:100 | +| 7 | 100 / 0 | 100 / 0 | — | 1 | 5 / 24 | 100 / 100 | 8df7bccbf1ef:100 e324fd0a2b33:100 | +| 8 | 100 / 0 | 100 / 0 | — | 1 | 4 / 5 | 98 / 102 | 523402ea115d:4 8df7bccbf1ef:98 e324fd0a2b33:98 | +| 9 | 100 / 0 | 100 / 0 | — | 1 | 4 / 16 | 18 / 182 | 523402ea115d:91 8df7bccbf1ef:91 e324fd0a2b33:18 | +| 10 | 100 / 0 | 100 / 0 | — | 1 | 5 / 180 | 0 / 200 | 523402ea115d:100 8df7bccbf1ef:100 | +| 11 | 100 / 0 | 100 / 0 | — | 1 | 4 / 6 | 0 / 200 | 523402ea115d:100 8df7bccbf1ef:100 | +| 12 | 100 / 0 | 100 / 0 | — | 1 | 4 / 5 | 0 / 200 | 523402ea115d:100 8df7bccbf1ef:100 | +| 13 | 100 / 0 | 100 / 0 | — | 1 | 4 / 8 | 0 / 200 | 523402ea115d:100 8df7bccbf1ef:100 | +| 14 | 100 / 0 | 100 / 0 | — | 1 | 4 / 6 | 0 / 200 | 523402ea115d:100 8df7bccbf1ef:100 | diff --git a/evidence/rollout/unit-of-work-previous/timeline.csv b/evidence/rollout/unit-of-work-previous/timeline.csv new file mode 100644 index 00000000..ed52df41 --- /dev/null +++ b/evidence/rollout/unit-of-work-previous/timeline.csv @@ -0,0 +1,122 @@ +second,writes_ok,writes_failed,reads_ok,reads_failed,codes,success,p50_ms,p95_ms,old_ok,new_ok,instances +-17,44,0,44,0,,1.0,4,12,88,0,d518795230b4:44 e324fd0a2b33:44 +-16,100,0,100,0,,1.0,4,8,200,0,d518795230b4:100 e324fd0a2b33:100 +-15,100,0,100,0,,1.0,4,5,200,0,d518795230b4:100 e324fd0a2b33:100 +-14,100,0,100,0,,1.0,4,5,200,0,d518795230b4:100 e324fd0a2b33:100 +-13,100,0,100,0,,1.0,4,5,200,0,d518795230b4:100 e324fd0a2b33:100 +-12,100,0,100,0,,1.0,4,5,200,0,d518795230b4:100 e324fd0a2b33:100 +-11,100,0,100,0,,1.0,4,7,200,0,d518795230b4:100 e324fd0a2b33:100 +-10,100,0,100,0,,1.0,4,146,200,0,d518795230b4:100 e324fd0a2b33:100 +-9,100,0,100,0,,1.0,3,5,200,0,d518795230b4:100 e324fd0a2b33:100 +-8,100,0,100,0,,1.0,3,5,200,0,d518795230b4:100 e324fd0a2b33:100 +-7,100,0,100,0,,1.0,3,8,200,0,d518795230b4:100 e324fd0a2b33:100 +-6,100,0,100,0,,1.0,4,5,200,0,d518795230b4:100 e324fd0a2b33:100 +-5,100,0,100,0,,1.0,3,5,200,0,d518795230b4:100 e324fd0a2b33:100 +-4,100,0,100,0,,1.0,4,5,200,0,d518795230b4:100 e324fd0a2b33:100 +-3,100,0,100,0,,1.0,3,5,200,0,d518795230b4:100 e324fd0a2b33:100 +-2,100,0,100,0,,1.0,4,5,200,0,d518795230b4:100 e324fd0a2b33:100 +-1,100,0,100,0,,1.0,4,10,200,0,d518795230b4:100 e324fd0a2b33:100 +0,100,0,100,0,,1.0,5,13,200,0,d518795230b4:100 e324fd0a2b33:100 +1,100,0,100,0,,1.0,3,4,200,0,d518795230b4:100 e324fd0a2b33:100 +2,100,0,100,0,,1.0,4,40,200,0,d518795230b4:100 e324fd0a2b33:100 +3,100,0,100,0,,1.0,4,93,200,0,d518795230b4:100 e324fd0a2b33:100 +4,100,0,100,0,,1.0,3,141,188,12,8df7bccbf1ef:12 d518795230b4:94 e324fd0a2b33:94 +5,100,0,100,0,,1.0,5,23,112,88,8df7bccbf1ef:88 d518795230b4:24 e324fd0a2b33:88 +6,100,0,100,0,,1.0,4,9,100,100,8df7bccbf1ef:100 e324fd0a2b33:100 +7,100,0,100,0,,1.0,5,24,100,100,8df7bccbf1ef:100 e324fd0a2b33:100 +8,100,0,100,0,,1.0,4,5,98,102,523402ea115d:4 8df7bccbf1ef:98 e324fd0a2b33:98 +9,100,0,100,0,,1.0,4,16,18,182,523402ea115d:91 8df7bccbf1ef:91 e324fd0a2b33:18 +10,100,0,100,0,,1.0,5,180,0,200,523402ea115d:100 8df7bccbf1ef:100 +11,100,0,100,0,,1.0,4,6,0,200,523402ea115d:100 8df7bccbf1ef:100 +12,100,0,100,0,,1.0,4,5,0,200,523402ea115d:100 8df7bccbf1ef:100 +13,100,0,100,0,,1.0,4,8,0,200,523402ea115d:100 8df7bccbf1ef:100 +14,100,0,100,0,,1.0,4,6,0,200,523402ea115d:100 8df7bccbf1ef:100 +15,100,0,100,0,,1.0,4,17,0,200,523402ea115d:100 8df7bccbf1ef:100 +16,100,0,100,0,,1.0,4,5,0,200,523402ea115d:100 8df7bccbf1ef:100 +17,100,0,100,0,,1.0,4,6,0,200,523402ea115d:100 8df7bccbf1ef:100 +18,100,0,100,0,,1.0,4,5,0,200,523402ea115d:100 8df7bccbf1ef:100 +19,100,0,100,0,,1.0,4,7,0,200,523402ea115d:100 8df7bccbf1ef:100 +20,100,0,100,0,,1.0,4,5,0,200,523402ea115d:100 8df7bccbf1ef:100 +21,100,0,100,0,,1.0,4,5,0,200,523402ea115d:100 8df7bccbf1ef:100 +22,100,0,100,0,,1.0,4,6,0,200,523402ea115d:100 8df7bccbf1ef:100 +23,100,0,100,0,,1.0,4,25,0,200,523402ea115d:100 8df7bccbf1ef:100 +24,100,0,100,0,,1.0,4,7,0,200,523402ea115d:100 8df7bccbf1ef:100 +25,100,0,100,0,,1.0,4,10,0,200,523402ea115d:100 8df7bccbf1ef:100 +26,100,0,100,0,,1.0,5,30,0,200,523402ea115d:100 8df7bccbf1ef:100 +27,100,0,100,0,,1.0,4,5,0,200,523402ea115d:100 8df7bccbf1ef:100 +28,100,0,100,0,,1.0,7,120,0,200,523402ea115d:100 8df7bccbf1ef:100 +29,100,0,100,0,,1.0,4,7,0,200,523402ea115d:100 8df7bccbf1ef:100 +30,100,0,100,0,,1.0,4,6,0,200,523402ea115d:100 8df7bccbf1ef:100 +31,100,0,100,0,,1.0,4,55,0,200,523402ea115d:100 8df7bccbf1ef:100 +32,100,0,100,0,,1.0,4,6,0,200,523402ea115d:100 8df7bccbf1ef:100 +33,100,0,100,0,,1.0,5,21,0,200,523402ea115d:100 8df7bccbf1ef:100 +34,100,0,100,0,,1.0,4,6,0,200,523402ea115d:100 8df7bccbf1ef:100 +35,100,0,100,0,,1.0,4,7,0,200,523402ea115d:100 8df7bccbf1ef:100 +36,100,0,100,0,,1.0,4,5,0,200,523402ea115d:100 8df7bccbf1ef:100 +37,100,0,100,0,,1.0,4,6,0,200,523402ea115d:100 8df7bccbf1ef:100 +38,100,0,100,0,,1.0,4,5,0,200,523402ea115d:100 8df7bccbf1ef:100 +39,100,0,100,0,,1.0,4,6,0,200,523402ea115d:100 8df7bccbf1ef:100 +40,100,0,100,0,,1.0,4,7,0,200,523402ea115d:100 8df7bccbf1ef:100 +41,100,0,100,0,,1.0,4,8,0,200,523402ea115d:100 8df7bccbf1ef:100 +42,100,0,100,0,,1.0,4,25,0,200,523402ea115d:100 8df7bccbf1ef:100 +43,100,0,100,0,,1.0,4,9,0,200,523402ea115d:100 8df7bccbf1ef:100 +44,100,0,100,0,,1.0,4,6,0,200,523402ea115d:100 8df7bccbf1ef:100 +45,100,0,100,0,,1.0,4,7,0,200,523402ea115d:100 8df7bccbf1ef:100 +46,100,0,100,0,,1.0,4,50,0,200,523402ea115d:100 8df7bccbf1ef:100 +47,100,0,100,0,,1.0,4,5,0,200,523402ea115d:100 8df7bccbf1ef:100 +48,100,0,100,0,,1.0,4,5,0,200,523402ea115d:100 8df7bccbf1ef:100 +49,100,0,100,0,,1.0,4,8,0,200,523402ea115d:100 8df7bccbf1ef:100 +50,100,0,100,0,,1.0,4,5,0,200,523402ea115d:100 8df7bccbf1ef:100 +51,100,0,100,0,,1.0,4,6,0,200,523402ea115d:100 8df7bccbf1ef:100 +52,100,0,100,0,,1.0,4,5,0,200,523402ea115d:100 8df7bccbf1ef:100 +53,100,0,100,0,,1.0,4,11,0,200,523402ea115d:100 8df7bccbf1ef:100 +54,100,0,100,0,,1.0,4,6,0,200,523402ea115d:100 8df7bccbf1ef:100 +55,100,0,100,0,,1.0,4,6,0,200,523402ea115d:100 8df7bccbf1ef:100 +56,100,0,100,0,,1.0,4,5,0,200,523402ea115d:100 8df7bccbf1ef:100 +57,100,0,100,0,,1.0,4,5,0,200,523402ea115d:100 8df7bccbf1ef:100 +58,100,0,100,0,,1.0,4,9,0,200,523402ea115d:100 8df7bccbf1ef:100 +59,100,0,100,0,,1.0,4,6,0,200,523402ea115d:100 8df7bccbf1ef:100 +60,100,0,100,0,,1.0,4,5,0,200,523402ea115d:100 8df7bccbf1ef:100 +61,100,0,100,0,,1.0,4,6,0,200,523402ea115d:100 8df7bccbf1ef:100 +62,100,0,100,0,,1.0,4,67,0,200,523402ea115d:100 8df7bccbf1ef:100 +63,100,0,100,0,,1.0,4,73,0,200,523402ea115d:100 8df7bccbf1ef:100 +64,100,0,100,0,,1.0,4,6,0,200,523402ea115d:100 8df7bccbf1ef:100 +65,100,0,100,0,,1.0,4,6,0,200,523402ea115d:100 8df7bccbf1ef:100 +66,100,0,100,0,,1.0,4,5,0,200,523402ea115d:100 8df7bccbf1ef:100 +67,100,0,100,0,,1.0,4,5,0,200,523402ea115d:100 8df7bccbf1ef:100 +68,100,0,100,0,,1.0,4,5,0,200,523402ea115d:100 8df7bccbf1ef:100 +69,100,0,100,0,,1.0,4,6,0,200,523402ea115d:100 8df7bccbf1ef:100 +70,100,0,100,0,,1.0,3,5,0,200,523402ea115d:100 8df7bccbf1ef:100 +71,100,0,100,0,,1.0,4,6,0,200,523402ea115d:100 8df7bccbf1ef:100 +72,100,0,100,0,,1.0,4,5,0,200,523402ea115d:100 8df7bccbf1ef:100 +73,100,0,100,0,,1.0,4,9,0,200,523402ea115d:100 8df7bccbf1ef:100 +74,100,0,100,0,,1.0,4,17,0,200,523402ea115d:100 8df7bccbf1ef:100 +75,100,0,100,0,,1.0,4,6,0,200,523402ea115d:100 8df7bccbf1ef:100 +76,100,0,100,0,,1.0,4,5,0,200,523402ea115d:100 8df7bccbf1ef:100 +77,100,0,100,0,,1.0,4,5,0,200,523402ea115d:100 8df7bccbf1ef:100 +78,100,0,100,0,,1.0,4,5,0,200,523402ea115d:100 8df7bccbf1ef:100 +79,100,0,100,0,,1.0,4,8,0,200,523402ea115d:100 8df7bccbf1ef:100 +80,100,0,100,0,,1.0,4,6,0,200,523402ea115d:100 8df7bccbf1ef:100 +81,100,0,100,0,,1.0,4,5,0,200,523402ea115d:100 8df7bccbf1ef:100 +82,100,0,100,0,,1.0,4,5,0,200,523402ea115d:100 8df7bccbf1ef:100 +83,100,0,100,0,,1.0,4,13,0,200,523402ea115d:100 8df7bccbf1ef:100 +84,100,0,100,0,,1.0,4,5,0,200,523402ea115d:100 8df7bccbf1ef:100 +85,100,0,100,0,,1.0,5,9,0,200,523402ea115d:100 8df7bccbf1ef:100 +86,100,0,100,0,,1.0,4,5,0,200,523402ea115d:100 8df7bccbf1ef:100 +87,100,0,100,0,,1.0,4,5,0,200,523402ea115d:100 8df7bccbf1ef:100 +88,100,0,100,0,,1.0,4,5,0,200,523402ea115d:100 8df7bccbf1ef:100 +89,100,0,100,0,,1.0,4,6,0,200,523402ea115d:100 8df7bccbf1ef:100 +90,100,0,100,0,,1.0,4,42,0,200,523402ea115d:100 8df7bccbf1ef:100 +91,100,0,100,0,,1.0,4,6,0,200,523402ea115d:100 8df7bccbf1ef:100 +92,100,0,100,0,,1.0,4,5,0,200,523402ea115d:100 8df7bccbf1ef:100 +93,100,0,100,0,,1.0,4,13,0,200,523402ea115d:100 8df7bccbf1ef:100 +94,100,0,100,0,,1.0,4,7,0,200,523402ea115d:100 8df7bccbf1ef:100 +95,100,0,100,0,,1.0,4,118,0,200,523402ea115d:100 8df7bccbf1ef:100 +96,100,0,100,0,,1.0,4,6,0,200,523402ea115d:100 8df7bccbf1ef:100 +97,100,0,100,0,,1.0,4,6,0,200,523402ea115d:100 8df7bccbf1ef:100 +98,100,0,100,0,,1.0,4,5,0,200,523402ea115d:100 8df7bccbf1ef:100 +99,100,0,100,0,,1.0,4,6,0,200,523402ea115d:100 8df7bccbf1ef:100 +100,100,0,100,0,,1.0,4,6,0,200,523402ea115d:100 8df7bccbf1ef:100 +101,100,0,100,0,,1.0,4,5,0,200,523402ea115d:100 8df7bccbf1ef:100 +102,100,0,100,0,,1.0,4,5,0,200,523402ea115d:100 8df7bccbf1ef:100 +103,57,0,57,0,,1.0,4,5,0,114,523402ea115d:57 8df7bccbf1ef:57 diff --git a/evidence/rollout/unit-of-work/meta.json b/evidence/rollout/unit-of-work/meta.json new file mode 100644 index 00000000..c42033bf --- /dev/null +++ b/evidence/rollout/unit-of-work/meta.json @@ -0,0 +1,454 @@ +{ + "label": "unit-of-work", + "status": "complete", + "started_at": "2026-10-31T20:27:00+00:00", + "command": "uv run python bench/run.py --profile rollout --label unit-of-work", + "git": { + "commit": "6ba74b1", + "dirty": false + }, + "overrides": {}, + "host_state": { + "start": { + "swap_used_mib": 7599.62, + "swap_total_mib": 8192.0, + "swapouts": 7156652, + "memory_free_percent": 43, + "power": "AC Power", + "battery_percent": 80 + }, + "end": { + "swap_used_mib": 7479.62, + "swap_total_mib": 8192.0, + "swapouts": 7156652, + "memory_free_percent": 43, + "power": "AC Power", + "battery_percent": 80 + }, + "swapouts_delta": 0, + "slept_seconds": 0 + }, + "host_warnings": [], + "other_containers": [ + "domains-api-1", + "domains-bot-1", + "domains-postgres-1" + ], + "resources": { + "budget": { + "cpus": 6.75, + "memory_gib": 3.0, + "peak_replicas": 3, + "vm_cpus": 12, + "vm_memory_gib": 7.75, + "generator": "no limit" + }, + "mode": "scan", + "interval_s": 1.0, + "containers": { + "e128ee930c06": { + "name": "mtusi-bench-haproxy", + "role": "haproxy" + }, + "81247d9d1f35": { + "name": "mtusi-bench-api-1", + "role": "api" + }, + "9b70bf3317f6": { + "name": "mtusi-bench-api-2", + "role": "api" + }, + "c03720a13dc2": { + "name": "mtusi-bench-postgres", + "role": "postgres" + }, + "0147a03cc244": { + "name": "mtusi-bench-valkey", + "role": "valkey" + }, + "448a7e633a22": { + "name": "mtusi-bench-k6", + "role": "k6" + }, + "e76d1214732b": { + "name": "mtusi-bench-sampler", + "role": "sampler" + }, + "f6bff6eaee6c": { + "name": "mtusi-bench-api-4", + "role": "api" + }, + "342603d12120": { + "name": "mtusi-bench-api-3", + "role": "api" + }, + "e5c77588635a": { + "name": "mtusi-bench-migrate-1", + "role": "migrate" + } + }, + "unmapped": 3 + }, + "app_image": { + "tag": "mtusi-messenger:bench", + "id": "sha256:9276afa8faa5df5078c449ba4c16d733dec9cf760832164bb4db5e9ed2b519e3", + "versions": { + "python": "3.12.14", + "fastapi": "0.141.1", + "starlette": "1.7.0", + "pydantic": "2.13.5", + "uvicorn": "0.54.0", + "sqlalchemy": "2.1.1", + "asyncpg": "0.31.0", + "redis": "8.1.0" + } + }, + "generator": { + "image": "grafana/k6:2.3.0@sha256:9c2dee7f8ed74d317e4027c06a10f169b625638189de8d4555d0b3486a5aeb34", + "version": "k6 v2.3.0 (commit/e088784614, go1.27.1, linux/arm64)" + }, + "docker": { + "server": "29.9.2", + "vm_os": "Docker Desktop", + "kernel": "7.0.14-linuxkit", + "vm_cpus": 12, + "vm_memory_gib": 7.7, + "cgroup": "2", + "logging_driver": "local" + }, + "host": { + "os": "macOS 26.7.1", + "machine": "Apple M3 Pro", + "memory_gib": 18.0, + "performance_cores": 6, + "efficiency_cores": 6 + }, + "profile": { + "name": "rollout", + "sizes": [ + 1000 + ], + "concurrency": [], + "repeats": 0, + "read_warmup_s": 0, + "read_measure_s": 0, + "write_warmup": 0, + "write_measure": 0, + "prefill_chunk": 25000, + "prefill_vus": 8, + "text_length": 64, + "page_limit": 50, + "walk_limit": 100, + "cursor_pool": 1000, + "members": 10, + "seed": 20260930, + "warmup_seed_shift": 1000003, + "generator_cpu_limit": 4.0, + "cpus": "1", + "memory": "512m", + "db_cpus": "2", + "db_memory": "1g", + "cache_cpus": "0.5", + "cache_memory": "128m", + "session_ttl_seconds": 21600, + "background": [], + "index_variants": [ + [ + "chat_only", + "(chat_id)" + ], + [ + "covering", + "(chat_id, created_at, id) INCLUDE (sender_id, text)" + ] + ], + "write_probe_rows": 20000, + "write_probe_repeats": 3, + "restore": false, + "restore_jobs": 4, + "restore_write_load": 5000, + "restore_write_vus": 10, + "replicas": 2, + "lb_cpus": "1", + "lb_memory": "256m", + "failover_modes": [], + "failover_write_rate": 100, + "failover_read_rate": 100, + "failover_before_s": 0, + "failover_down_s": 0, + "failover_after_s": 0, + "failover_success": 0.99, + "failover_pre_vus": 600, + "failover_max_vus": 1500, + "rollout_from": "7f38948", + "rollout_before_s": 15, + "rollout_budget_s": 90, + "rollout_after_s": 15, + "sample_resources": true, + "uploads_variants": [], + "uploads_before": "", + "uploads_success_codes": [ + [ + "before", + 201 + ], + [ + "unlimited", + 202 + ], + [ + "limited", + 202 + ] + ], + "uploads_sizes": [], + "uploads_clients": [], + "uploads_ramp_s": 3, + "uploads_window_s": 20, + "uploads_unlimited_env": [ + [ + "UPLOADS__MAX_CONCURRENT", + "1000" + ], + [ + "UPLOADS__MAX_WAITING", + "0" + ] + ], + "uploads_sample_interval_s": 0.2, + "s3_cpus": "1", + "s3_memory": "512m", + "broker_cpus": "1", + "broker_memory": "512m", + "relay_cpus": "0.25", + "relay_memory": "256m", + "worker_cpus": "1", + "worker_memory": "1g", + "cleaner_cpus": "0.25", + "cleaner_memory": "256m", + "reconcile_stages": [], + "reconcile_before": "", + "reconcile_s4_clean": 0, + "reconcile_s4_candidates": [], + "reconcile_s4_max_changes": 100, + "reconcile_grace_s": 30, + "reconcile_fresh_wait_s": 2, + "reconcile_fast_cpus": "1", + "reconcile_default_rate": 2000, + "reconcile_background": [ + [ + "download", + 300 + ], + [ + "write", + 50 + ], + [ + "read", + 50 + ] + ], + "reconcile_downloads": 5000, + "reconcile_bg_max_vus": 600, + "reconcile_quiet_s": 30, + "reconcile_fill_processes": 3, + "reconcile_fill_threads": 24, + "reconcile_sample_interval_s": 0.5, + "reconcile_metrics_port": 9327, + "reconcile_h1_stages": [], + "reconcile_h2_stages": [], + "reconcile_h3_stages": [], + "reconcile_s4_base": "", + "db_max_connections": 100, + "series": "", + "configs": [], + "write_chats": 1, + "mix": [], + "fixed_rps": [], + "ladder_base": 100, + "step_factor": 1.25, + "start_rps_per_replica": 300, + "bisect_steps": 2, + "max_steps": 12, + "first_warmup_s": 15, + "step_warmup_s": 5, + "step_measure_s": 20, + "cooldown_s": 10, + "slo_p95_ms": 200, + "slo_error_ratio": 0.01, + "abort_error_ratio": 0.5, + "abort_p95_ms": 2000, + "request_timeout_s": 15, + "prevus_per_rps": 0.05, + "vus_per_rps": 0.2, + "generator_cpus": "", + "generator_memory": "", + "sampler_cpus": "0.25", + "sampler_memory": "128m", + "sample_interval_s": 1.0, + "order_seed": 20261011 + }, + "sizes": [], + "rollout": { + "from_commit": "7f38948", + "new_image": "sha256:9276afa8faa5df5078c449ba4c16d733dec9cf760832164bb4db5e9ed2b519e3", + "old_image": "sha256:273cb181bfbc0d4c59002dde1ead49dd3d87bea7c7b6414937d329ab12431e4e", + "containers_before": [ + { + "name": "mtusi-bench-api-1", + "instance": "81247d9d1f35", + "tag": "mtusi-messenger:bench", + "image": "sha256:de2a95419621711070afe18d54d2b043175fb55bc4b941d170b1cd748120f56f", + "running": true + }, + { + "name": "mtusi-bench-api-2", + "instance": "9b70bf3317f6", + "tag": "mtusi-messenger:bench", + "image": "sha256:de2a95419621711070afe18d54d2b043175fb55bc4b941d170b1cd748120f56f", + "running": true + } + ], + "revision_before": "a1d4c7e90b23", + "containers_after": [ + { + "name": "mtusi-bench-api-3", + "instance": "342603d12120", + "tag": "mtusi-messenger:bench", + "image": "sha256:ffb64b282745a60d60ccf70fa8114d057abd6157970d88d31ae1c42cbac241cb", + "running": true + }, + { + "name": "mtusi-bench-api-4", + "instance": "f6bff6eaee6c", + "tag": "mtusi-messenger:bench", + "image": "sha256:ffb64b282745a60d60ccf70fa8114d057abd6157970d88d31ae1c42cbac241cb", + "running": true + } + ], + "revision_after": "d3f9a6b2c1e7", + "tag_after": "sha256:b609f9671d533b7f38ab2676bd0492cfb4aeda4200bd4374e148ec40a201529e", + "script_start_at": "2026-10-31T20:27:34.438+00:00" + }, + "limits": { + "api": { + "nano_cpus": 1000000000, + "memory": 536870912, + "memory_swap": 536870912, + "published_ports": {}, + "healthcheck": [ + "NONE" + ], + "log_driver": "local" + }, + "postgres": { + "nano_cpus": 2000000000, + "memory": 1073741824, + "memory_swap": 1073741824, + "published_ports": {}, + "healthcheck": [ + "CMD-SHELL", + "pg_isready -h 127.0.0.1 -U \"$POSTGRES_USER\" -d \"$POSTGRES_DB\"" + ], + "log_driver": "local" + }, + "valkey": { + "nano_cpus": 500000000, + "memory": 134217728, + "memory_swap": 134217728, + "published_ports": {}, + "healthcheck": [ + "CMD-SHELL", + "test \"$(valkey-cli -p \"$VALKEY_PORT\" ping)\" = PONG" + ], + "log_driver": "local" + }, + "haproxy": { + "nano_cpus": 1000000000, + "memory": 268435456, + "memory_swap": 268435456, + "published_ports": {}, + "healthcheck": [ + "CMD", + "bash", + "-c", + "exec 3<>/dev/tcp/127.0.0.1/8404 && printf 'GET /lb/ready HTTP/1.0\\r\\n\\r\\n' >&3 && head -n 1 <&3 | grep -q ' 200 '" + ], + "log_driver": "local" + }, + "k6": { + "nano_cpus": 0, + "memory": 0, + "memory_swap": 0, + "published_ports": {}, + "healthcheck": null, + "log_driver": "local" + }, + "api_replicas": 2, + "max_connections": 100, + "sampler": { + "nano_cpus": 250000000, + "memory": 134217728, + "memory_swap": 134217728, + "published_ports": {}, + "healthcheck": null, + "log_driver": "local" + } + }, + "stand": { + "api_tcp_rmem": "4096 131072 524288", + "postgres": { + "image": "postgres:18.6-trixie@sha256:5a5a84b19854a9ffaa54082c166ff4ec27473a361e496e5ea167f298f2da9722", + "id": "sha256:f4fcd2b983483177b15d72d94fb3614736211554f7cac5c2cc54a05c75110b90", + "version": "18.6 (Debian 18.6-1.pgdg13+2)", + "settings": { + "autovacuum": "on", + "checkpoint_timeout": "5min", + "effective_cache_size": "4GB", + "fsync": "on", + "jit": "on", + "maintenance_work_mem": "64MB", + "max_connections": "100", + "max_wal_size": "1GB", + "plan_cache_mode": "auto", + "random_page_cost": "4", + "shared_buffers": "128MB", + "shared_preload_libraries": "auto_explain", + "synchronous_commit": "on", + "wal_level": "replica", + "work_mem": "4MB" + } + }, + "valkey": { + "image": "valkey/valkey:9.1.2-trixie@sha256:418652cfb58ef879d4978c33553735d7147016032d5aefaa14c828e611eb9dfd", + "id": "sha256:5a6ac3cceea0d4cebe48911dfa5f393f49feea86a2c55c5ac6b0ba733a1713b6", + "version": "9.1.2", + "maxmemory": "67108864", + "maxmemory-clients": "0", + "maxmemory-eviction-tenacity": "10", + "maxmemory-policy": "allkeys-lru", + "maxmemory-samples": "5" + }, + "haproxy": { + "image": "haproxy:3.4.6-trixie@sha256:e273915691a8eab3f105bf3e39fd4c29a4ecf334e33421903b5589d25e14db26", + "id": "sha256:a92cbb5d7b4ba27898706659bde5039cc86e4ebee44f243d410f268200f7406f", + "version": "HAProxy version 3.4.6-56332c5 2026/09/28 - https://haproxy.org/" + }, + "app_env": { + "APP__PORT": "8080", + "APP__RUN_MODE": "docker", + "AUTH__SESSION_TTL_SECONDS": "21600", + "CACHE__HOST": "valkey", + "CACHE__PORT": "6379", + "DATABASE__HOST": "postgres", + "DATABASE__NAME": "bench", + "DATABASE__PORT": "5432", + "DATABASE__USER": "bench", + "S3__BUCKET": "bench", + "S3__HOST": "s3", + "S3__PORT": "8333" + } + }, + "finished_at": "2026-10-31T20:29:23+00:00" +} diff --git a/evidence/rollout/unit-of-work/prefill.csv b/evidence/rollout/unit-of-work/prefill.csv new file mode 100644 index 00000000..83e42735 --- /dev/null +++ b/evidence/rollout/unit-of-work/prefill.csv @@ -0,0 +1,2 @@ +size,chunk,messages_before,messages_after,duration_s,requests_ok,requests_failed,rps,error_ratio,p50_ms,p95_ms,p99_ms,max_ms,app_cpu_cores,rss_end_mib,mem_cgroup_end_mib,generator_cpu_cores,flags,db_cpu_cores,cell,attempt +1000,1,0,1000,1.159,1000,0,862.7,0.0,7.042,21.764,55.545,64.202,1.89,249.2,231.2,0.223,,0.34,, diff --git a/evidence/rollout/unit-of-work/progress.json b/evidence/rollout/unit-of-work/progress.json new file mode 100644 index 00000000..db069e61 --- /dev/null +++ b/evidence/rollout/unit-of-work/progress.json @@ -0,0 +1,12 @@ +{ + "label": "unit-of-work", + "profile": "rollout", + "stage": "done", + "size": 1000, + "runs_done": 1, + "runs_total": 1, + "elapsed_s": 143, + "eta_s": 0, + "warnings": [], + "updated_at": "2026-10-31T20:29:23+00:00" +} diff --git a/evidence/rollout/unit-of-work/raw/prefill-1k-01.json b/evidence/rollout/unit-of-work/raw/prefill-1k-01.json new file mode 100644 index 00000000..a5c3afdc --- /dev/null +++ b/evidence/rollout/unit-of-work/raw/prefill-1k-01.json @@ -0,0 +1 @@ +{"metrics":{"data_sent":{"type":"counter","contains":"data","values":{"count":376000,"rate":324363.2256219191}},"checks":{"type":"rate","contains":"default","values":{"rate":1,"passes":1000,"fails":0}},"iterations":{"contains":"default","values":{"count":1000,"rate":862.6681532497847},"type":"counter"},"vus_max":{"type":"gauge","contains":"default","values":{"value":8,"min":8,"max":8}},"http_req_duration{expected_response:true}":{"type":"trend","contains":"time","values":{"med":7.0423545,"p(50)":7.0423545,"p(95)":21.763506899999996,"p(99)":55.54536941,"max":64.201958,"avg":9.169882344999994,"min":1.854875},"thresholds":{"max>=0":{"ok":true}}},"http_req_blocked":{"type":"trend","contains":"time","values":{"avg":0.005967582000000011,"min":0.0005,"med":0.001125,"p(50)":0.001125,"p(95)":0.00258305,"p(99)":0.010360919999999975,"max":0.808833}},"data_received":{"type":"counter","contains":"data","values":{"count":490000,"rate":422707.39509239455}},"http_req_duration":{"values":{"p(50)":7.0423545,"p(95)":21.763506899999996,"p(99)":55.54536941,"max":64.201958,"avg":9.169882344999994,"min":1.854875,"med":7.0423545},"type":"trend","contains":"time"},"http_req_connecting":{"values":{"avg":0.001005667,"min":0,"med":0,"p(50)":0,"p(95)":0,"p(99)":0,"max":0.210167},"type":"trend","contains":"time"},"http_req_sending":{"type":"trend","contains":"time","values":{"max":0.078417,"avg":0.005737015,"min":0.002,"med":0.004167,"p(50)":0.004167,"p(95)":0.011752099999999998,"p(99)":0.03272133999999999}},"vus":{"type":"gauge","contains":"default","values":{"min":8,"max":8,"value":8}},"http_req_receiving":{"contains":"time","values":{"max":0.110375,"avg":0.018693111,"min":0.005333,"med":0.015292,"p(50)":0.015292,"p(95)":0.038791,"p(99)":0.07104490999999999},"type":"trend"},"http_req_tls_handshaking":{"values":{"avg":0,"min":0,"med":0,"p(50)":0,"p(95)":0,"p(99)":0,"max":0},"type":"trend","contains":"time"},"http_req_failed":{"type":"rate","contains":"default","values":{"rate":0,"passes":0,"fails":1000}},"http_req_waiting":{"type":"trend","contains":"time","values":{"max":64.179,"avg":9.145452219000004,"min":1.839625,"med":7.020271,"p(50)":7.020271,"p(95)":21.744127049999996,"p(99)":55.49298417}},"iteration_duration":{"values":{"p(95)":21.871183349999995,"p(99)":56.152852419999995,"max":64.275458,"avg":9.245683425000003,"min":1.895708,"med":7.103854,"p(50)":7.103854},"type":"trend","contains":"time"},"http_reqs":{"type":"counter","contains":"default","values":{"count":1000,"rate":862.6681532497847}}},"root_group":{"id":"d41d8cd98f00b204e9800998ecf8427e","groups":[],"checks":[{"path":"::message 201","id":"6445aff337e1ade0bc10402fbac79882","passes":1000,"fails":0,"name":"message 201"}],"name":"","path":""},"options":{"summaryTrendStats":["avg","min","med","p(50)","p(95)","p(99)","max"],"summaryTimeUnit":"","noColor":true},"state":{"isStdOutTTY":false,"isStdErrTTY":false,"testRunDurationMs":1159.194293}} \ No newline at end of file diff --git a/evidence/rollout/unit-of-work/raw/rollout-k6.json b/evidence/rollout/unit-of-work/raw/rollout-k6.json new file mode 100644 index 00000000..1cd3c829 --- /dev/null +++ b/evidence/rollout/unit-of-work/raw/rollout-k6.json @@ -0,0 +1 @@ +{"state":{"isStdOutTTY":false,"isStdErrTTY":false,"testRunDurationMs":120005.944083},"metrics":{"http_req_sending":{"type":"trend","contains":"time","values":{"p(99)":0.037959,"max":1.397542,"avg":0.015451118328403011,"min":0.003542,"med":0.014,"p(50)":0.014,"p(95)":0.026125}},"data_received":{"type":"counter","contains":"data","values":{"count":180588490,"rate":1504829.543069126}},"http_req_duration{expected_response:true}":{"contains":"time","values":{"p(95)":6.148166,"p(99)":31.636916,"max":238.268292,"avg":4.920249051331195,"min":1.94,"med":3.722291,"p(50)":3.722291},"thresholds":{"max>=0":{"ok":true}},"type":"trend"},"http_req_failed":{"type":"rate","contains":"default","values":{"rate":0,"passes":0,"fails":24001}},"http_req_duration":{"type":"trend","contains":"time","values":{"med":3.722291,"p(50)":3.722291,"p(95)":6.148166,"p(99)":31.636916,"max":238.268292,"avg":4.920249051331195,"min":1.94}},"http_req_tls_handshaking":{"values":{"avg":0,"min":0,"med":0,"p(50)":0,"p(95)":0,"p(99)":0,"max":0},"type":"trend","contains":"time"},"iterations{scenario:read}":{"contains":"default","values":{"count":12000,"rate":99.9950468428498},"thresholds":{"count>=0":{"ok":true}},"type":"counter"},"iteration_duration":{"type":"trend","contains":"time","values":{"avg":5.300515486438068,"min":2.143709,"med":3.960833,"p(50)":3.960833,"p(95)":6.62375,"p(99)":41.06975,"max":242.507375}},"vus":{"contains":"default","values":{"value":0,"min":0,"max":4},"type":"gauge"},"http_req_connecting":{"type":"trend","contains":"time","values":{"avg":0.006686058330902882,"min":0,"med":0,"p(50)":0,"p(95)":0,"p(99)":0.135041,"max":6.128834}},"vus_max":{"contains":"default","values":{"min":1200,"max":1200,"value":1200},"type":"gauge"},"iterations{scenario:write}":{"type":"counter","contains":"default","values":{"count":12001,"rate":100.00337976342004},"thresholds":{"count>=0":{"ok":true}}},"http_reqs":{"type":"counter","contains":"default","values":{"count":24001,"rate":199.99842660626985}},"http_req_blocked":{"type":"trend","contains":"time","values":{"avg":0.01258392146160544,"min":0.000917,"med":0.003208,"p(50)":0.003208,"p(95)":0.081375,"p(99)":0.177167,"max":6.17425}},"data_sent":{"type":"counter","contains":"data","values":{"count":9277246,"rate":77306.55402855342}},"http_req_waiting":{"type":"trend","contains":"time","values":{"avg":4.86480699150036,"min":1.901209,"med":3.669709,"p(50)":3.669709,"p(95)":6.070833,"p(99)":31.59725,"max":238.171875}},"iterations":{"type":"counter","contains":"default","values":{"count":24001,"rate":199.99842660626985}},"http_req_receiving":{"type":"trend","contains":"time","values":{"avg":0.03999094150243742,"min":0.006125,"med":0.03175,"p(50)":0.03175,"p(95)":0.088291,"p(99)":0.131708,"max":3.064375}}},"root_group":{"name":"","path":"","id":"d41d8cd98f00b204e9800998ecf8427e","groups":[],"checks":[]},"options":{"summaryTrendStats":["avg","min","med","p(50)","p(95)","p(99)","max"],"summaryTimeUnit":"","noColor":true}} \ No newline at end of file diff --git a/evidence/rollout/unit-of-work/raw/rollout-lb.log b/evidence/rollout/unit-of-work/raw/rollout-lb.log new file mode 100644 index 00000000..5023e6fc --- /dev/null +++ b/evidence/rollout/unit-of-work/raw/rollout-lb.log @@ -0,0 +1,12 @@ +2026-10-31T20:27:38.564208167Z Server api/api-3 ('api') is DOWN/READY (resolves again). +2026-10-31T20:27:38.564212042Z Server api/api-3 administratively READY thanks to valid DNS answer. +2026-10-31T20:27:40.307160917Z Server api/api-3 is UP, reason: Layer7 check passed, code: 200, check duration: 1ms. 3 active and 0 backup servers online. 0 sessions requeued, 0 total in queue. +2026-10-31T20:27:40.778017876Z Server api/api-2 enters drain state. 2 active and 0 backup servers online. 0 sessions requeued, 0 total in queue. +2026-10-31T20:27:40.932450293Z Server api/api-2 is going DOWN for maintenance. 2 active and 0 backup servers left. 0 sessions active, 0 requeued, 0 remaining in queue. +2026-10-31T20:27:41.803305335Z Server api/api-2 is leaving forced maintenance but remains in maintenance. +2026-10-31T20:27:42.568847460Z Server api/api-2 ('api') is DOWN/READY (resolves again). +2026-10-31T20:27:42.568848460Z Server api/api-2 administratively READY thanks to valid DNS answer. +2026-10-31T20:27:43.341579919Z Server api/api-2 is UP, reason: Layer7 check passed, code: 200, check duration: 24ms. 3 active and 0 backup servers online. 0 sessions requeued, 0 total in queue. +2026-10-31T20:27:43.813209336Z Server api/api-1 enters drain state. 2 active and 0 backup servers online. 0 sessions requeued, 0 total in queue. +2026-10-31T20:27:43.964245669Z Server api/api-1 is going DOWN for maintenance. 2 active and 0 backup servers left. 0 sessions active, 0 requeued, 0 remaining in queue. +2026-10-31T20:27:45.828012295Z Server api/api-1 is leaving forced maintenance but remains in maintenance. diff --git a/evidence/rollout/unit-of-work/raw/rollout-script.log b/evidence/rollout/unit-of-work/raw/rollout-script.log new file mode 100644 index 00000000..1a1e2506 --- /dev/null +++ b/evidence/rollout/unit-of-work/raw/rollout-script.log @@ -0,0 +1,18 @@ +20:27:35 rolling-update: start: 2 replicas 81247d9d1f35 9b70bf3317f6, image mtusi-messenger:bench from working tree +20:27:35 rolling-update: build done in 0s +20:27:37 rolling-update: migrate done in 2s +20:27:38 rolling-update: replica 1/2: started new 342603d12120 +20:27:40 rolling-update: replica 1/2: new 342603d12120 addr 192.168.48.8 slot api-3 UP in 2s +20:27:40 rolling-update: replica 1/2: drain old 81247d9d1f35 addr 192.168.48.4 slot api-2 +20:27:40 rolling-update: replica 1/2: old 81247d9d1f35 idle after 0s +20:27:40 rolling-update: replica 1/2: maint slot api-2, stopping old 81247d9d1f35 +20:27:41 rolling-update: replica 1/2: removed old 81247d9d1f35 (stop 1s, exit 0) +20:27:41 rolling-update: replica 1/2: slot api-2 ready +20:27:42 rolling-update: replica 2/2: started new f6bff6eaee6c +20:27:43 rolling-update: replica 2/2: new f6bff6eaee6c addr 192.168.48.4 slot api-2 UP in 2s +20:27:43 rolling-update: replica 2/2: drain old 9b70bf3317f6 addr 192.168.48.5 slot api-1 +20:27:43 rolling-update: replica 2/2: old 9b70bf3317f6 idle after 0s +20:27:43 rolling-update: replica 2/2: maint slot api-1, stopping old 9b70bf3317f6 +20:27:44 rolling-update: replica 2/2: removed old 9b70bf3317f6 (stop 1s, exit 0) +20:27:45 rolling-update: replica 2/2: slot api-1 ready +20:27:46 rolling-update: done: 2 replicas 342603d12120 f6bff6eaee6c UP in 11s diff --git a/evidence/rollout/unit-of-work/replicas.csv b/evidence/rollout/unit-of-work/replicas.csv new file mode 100644 index 00000000..8d70add0 --- /dev/null +++ b/evidence/rollout/unit-of-work/replicas.csv @@ -0,0 +1,3 @@ +step,new_instance,new_slot,old_instance,old_slot,new_created_s,new_up_s,ready_s,drain_s,drain_timeout,stop_s,old_removed_s,slot_ready_s,replace_s,errors,after_drain +1,342603d12120,api-3,81247d9d1f35,api-2,2.29,4.44,2.01,0.15,False,0.51,5.74,5.93,3.45,0,0 +2,f6bff6eaee6c,api-2,9b70bf3317f6,api-1,6.16,7.47,1.18,0.15,False,0.42,8.68,9.96,2.52,0,0 diff --git a/evidence/rollout/unit-of-work/resources.csv b/evidence/rollout/unit-of-work/resources.csv new file mode 100644 index 00000000..e47b999a --- /dev/null +++ b/evidence/rollout/unit-of-work/resources.csv @@ -0,0 +1,49 @@ +phase,mode,window,start_s,end_s,seconds,role,instance,present_s,cpu_mean_cores,cpu_max_cores,cpu_seconds,throttled_ratio,pressure_share,mem_peak_mib,ok_rps,us_per_ok_request,flags +rollout,rollout,before,-14.48,-1.43,13.05,api-old,81247d9d1f35,13.05,0.308,0.3493,4.019,0.0,0.0015,124.1,200.0,1540.0, +rollout,rollout,before,-14.48,-1.43,13.05,api-old,9b70bf3317f6,13.05,0.3098,0.3742,4.043,0.0,0.0015,123.7,200.0,1549.0, +rollout,rollout,before,-14.48,-1.43,13.05,api-new,342603d12120,0.0,0.0,,0.0,,0.0,,200.0,,absent +rollout,rollout,before,-14.48,-1.43,13.05,api-new,f6bff6eaee6c,0.0,0.0,,0.0,,0.0,,200.0,,absent +rollout,rollout,before,-14.48,-1.43,13.05,api-total,,13.05,0.6178,0.6698,8.063,0.0,0.003,247.8,200.0,3089.0, +rollout,rollout,before,-14.48,-1.43,13.05,migrate,e5c77588635a,0.0,0.0,,0.0,,0.0,,200.0,,absent +rollout,rollout,before,-14.48,-1.43,13.05,postgres,c03720a13dc2,13.05,0.0986,0.1516,1.287,0.0,0.0009,182.5,200.0,493.0, +rollout,rollout,before,-14.48,-1.43,13.05,haproxy,e128ee930c06,13.05,0.0355,0.0539,0.464,0.0,0.0005,33.9,200.0,177.5, +rollout,rollout,before,-14.48,-1.43,13.05,valkey,0147a03cc244,13.05,0.0123,0.045,0.16,0.0,0.0004,13.0,200.0,61.5, +rollout,rollout,before,-14.48,-1.43,13.05,k6,448a7e633a22,13.05,0.1215,0.2955,1.585,,0.0017,345.0,200.0,607.5, +rollout,rollout,before,-14.48,-1.43,13.05,sampler,e76d1214732b,13.05,0.0038,0.0046,0.05,0.0,0.0003,1.8,200.0,19.0, +rollout,rollout,before,-14.48,-1.43,13.05,vm,,13.05,1.2073,1.8315,15.755,,0.0068,,200.0,6036.5, +rollout,rollout,prepare,-1.43,0.0,1.43,api-old,81247d9d1f35,1.43,0.335,0.3431,0.48,0.0,0.001,124.7,199.8,, +rollout,rollout,prepare,-1.43,0.0,1.43,api-old,9b70bf3317f6,1.43,0.3355,0.3399,0.48,0.0,0.0011,124.7,199.8,, +rollout,rollout,prepare,-1.43,0.0,1.43,api-new,342603d12120,0.0,0.0,,0.0,,0.0,,199.8,,absent +rollout,rollout,prepare,-1.43,0.0,1.43,api-new,f6bff6eaee6c,0.0,0.0,,0.0,,0.0,,199.8,,absent +rollout,rollout,prepare,-1.43,0.0,1.43,api-total,,1.43,0.6705,0.683,0.96,0.0,0.0021,249.4,199.8,, +rollout,rollout,prepare,-1.43,0.0,1.43,migrate,e5c77588635a,0.0,0.0,,0.0,,0.0,,199.8,,absent +rollout,rollout,prepare,-1.43,0.0,1.43,postgres,c03720a13dc2,1.43,0.1545,0.1749,0.221,0.0,0.0008,182.8,199.8,, +rollout,rollout,prepare,-1.43,0.0,1.43,haproxy,e128ee930c06,1.43,0.0604,0.0687,0.087,0.0,0.0006,34.2,199.8,, +rollout,rollout,prepare,-1.43,0.0,1.43,valkey,0147a03cc244,1.43,0.0186,0.023,0.027,0.0,0.0004,13.0,199.8,, +rollout,rollout,prepare,-1.43,0.0,1.43,k6,448a7e633a22,1.43,0.1134,0.1216,0.162,,0.0026,344.7,199.8,, +rollout,rollout,prepare,-1.43,0.0,1.43,sampler,e76d1214732b,1.43,0.004,0.0041,0.006,0.0,0.0,1.5,199.8,, +rollout,rollout,prepare,-1.43,0.0,1.43,vm,,1.43,2.1387,3.3188,3.061,,0.0304,,199.8,, +rollout,rollout,during,0.0,8.68,8.68,api-old,81247d9d1f35,4.81,0.1785,0.4495,1.549,0.0,0.0006,126.8,200.1,,partial +rollout,rollout,during,0.0,8.68,8.68,api-old,9b70bf3317f6,7.82,0.2873,0.366,2.492,0.0,0.0009,127.0,200.1,,partial +rollout,rollout,during,0.0,8.68,8.68,api-new,342603d12120,6.25,0.3297,1.0457,2.86,0.0342,0.0036,111.0,200.1,,partial +rollout,rollout,during,0.0,8.68,8.68,api-new,f6bff6eaee6c,2.38,0.1976,1.0312,1.714,0.1226,0.0046,107.1,200.1,,partial +rollout,rollout,during,0.0,8.68,8.68,api-total,,8.68,0.9931,1.879,8.616,0.0239,0.0096,359.0,200.1,, +rollout,rollout,during,0.0,8.68,8.68,migrate,e5c77588635a,1.64,0.0993,0.5678,0.861,0.9412,0.0969,72.1,200.1,,partial +rollout,rollout,during,0.0,8.68,8.68,postgres,c03720a13dc2,8.68,0.135,0.1992,1.171,0.0,0.0015,209.9,200.1,, +rollout,rollout,during,0.0,8.68,8.68,haproxy,e128ee930c06,8.68,0.0637,0.101,0.553,0.0,0.0007,35.0,200.1,, +rollout,rollout,during,0.0,8.68,8.68,valkey,0147a03cc244,8.68,0.0105,0.0245,0.091,0.0,0.0008,12.8,200.1,, +rollout,rollout,during,0.0,8.68,8.68,k6,448a7e633a22,8.68,0.144,0.4546,1.249,,0.0031,399.8,200.1,, +rollout,rollout,during,0.0,8.68,8.68,sampler,e76d1214732b,8.68,0.0041,0.0054,0.036,0.0,0.0003,1.8,200.1,, +rollout,rollout,during,0.0,8.68,8.68,vm,,8.68,2.5743,3.5411,22.334,,0.0812,,200.1,, +rollout,rollout,after,8.68,103.51,94.84,api-old,81247d9d1f35,0.0,0.0,,0.0,,0.0,,200.0,,absent +rollout,rollout,after,8.68,103.51,94.84,api-old,9b70bf3317f6,0.0,0.0,,0.0,,0.0,,200.0,,absent +rollout,rollout,after,8.68,103.51,94.84,api-new,342603d12120,94.84,0.3115,0.403,29.546,0.0,0.0014,127.5,200.0,1557.5, +rollout,rollout,after,8.68,103.51,94.84,api-new,f6bff6eaee6c,94.84,0.311,0.4376,29.498,0.0,0.0014,127.5,200.0,1555.0, +rollout,rollout,after,8.68,103.51,94.84,api-total,,94.84,0.6226,0.8356,59.044,0.0,0.0028,254.3,200.0,3113.0, +rollout,rollout,after,8.68,103.51,94.84,migrate,e5c77588635a,0.0,0.0,,0.0,,0.0,,200.0,,absent +rollout,rollout,after,8.68,103.51,94.84,postgres,c03720a13dc2,94.84,0.1047,0.1781,9.928,0.0,0.0008,206.7,200.0,523.5, +rollout,rollout,after,8.68,103.51,94.84,haproxy,e128ee930c06,94.84,0.0265,0.101,2.512,0.0,0.0005,36.7,200.0,132.5, +rollout,rollout,after,8.68,103.51,94.84,valkey,0147a03cc244,94.84,0.0103,0.0247,0.977,0.0,0.0004,13.3,200.0,51.5, +rollout,rollout,after,8.68,103.51,94.84,k6,448a7e633a22,94.84,0.0977,0.3681,9.266,,0.0013,455.4,200.0,488.5, +rollout,rollout,after,8.68,103.51,94.84,sampler,e76d1214732b,94.84,0.0038,0.0088,0.364,0.0,0.0,1.9,200.0,19.0, +rollout,rollout,after,8.68,103.51,94.84,vm,,94.84,1.1422,2.9652,108.324,,0.0049,,200.0,5711.0, diff --git a/evidence/rollout/unit-of-work/rollout.csv b/evidence/rollout/unit-of-work/rollout.csv new file mode 100644 index 00000000..78290124 --- /dev/null +++ b/evidence/rollout/unit-of-work/rollout.csv @@ -0,0 +1,2 @@ +label,from_commit,replicas,revision_before,revision_after,build_s,migrate_s,rollout_s,script_exit,requests,errors_before,codes_before,errors_during,codes_during,errors_after,codes_after,min_success,seconds_below,ok_rps_before,ok_rps_during_min,p95_before_ms,p95_during_max_ms,first_new_s,last_old_s,old_after_drain,writes,writes_failed,retried_ok,write_chat_messages,distinct_texts,dropped_iterations,flags +unit-of-work,7f38948,2,a1d4c7e90b23,d3f9a6b2c1e7,0,2,8.68,0,24001,0,,0,,0,,1.0,0,200.0,200,6,161,4.45,7.92,0,12001,0,0,12001,12001,0, diff --git a/evidence/rollout/unit-of-work/samples.csv b/evidence/rollout/unit-of-work/samples.csv new file mode 100644 index 00000000..a96693f6 --- /dev/null +++ b/evidence/rollout/unit-of-work/samples.csv @@ -0,0 +1,968 @@ +phase,window,t_s,role,instance,cpu_cores,throttled_ms,pressure_ms,mem_mib +rollout,warmup,-16.3,api-old,81247d9d1f35,0.0694,0.0,0.39,109.6 +rollout,warmup,-16.3,api-old,9b70bf3317f6,0.0695,0.0,0.39,108.5 +rollout,warmup,-16.3,postgres,c03720a13dc2,0.0607,0.0,0.27,164.1 +rollout,warmup,-16.3,haproxy,e128ee930c06,0.0087,0.0,1.66,18.9 +rollout,warmup,-16.3,valkey,0147a03cc244,0.0022,0.0,0.15,12.2 +rollout,warmup,-16.3,k6,448a7e633a22,0.7978,0.0,4.61,220.8 +rollout,warmup,-16.3,sampler,e76d1214732b,0.0037,0.0,0.05,2.6 +rollout,warmup,-16.3,vm,,1.4481,,10.88, +rollout,warmup,-15.3,api-old,81247d9d1f35,0.2578,0.0,1.2,110.8 +rollout,warmup,-15.3,api-old,9b70bf3317f6,0.2548,0.0,0.44,110.0 +rollout,warmup,-15.3,postgres,c03720a13dc2,0.1222,0.0,0.62,168.0 +rollout,warmup,-15.3,haproxy,e128ee930c06,0.0312,0.0,0.28,20.7 +rollout,warmup,-15.3,valkey,0147a03cc244,0.0195,0.0,0.48,12.4 +rollout,warmup,-15.3,k6,448a7e633a22,0.1161,0.0,1.03,229.9 +rollout,warmup,-15.3,sampler,e76d1214732b,0.004,0.0,0.16,1.5 +rollout,warmup,-15.3,vm,,1.0159,,3.71, +rollout,before,-14.29,api-old,81247d9d1f35,0.2896,0.0,1.19,112.6 +rollout,before,-14.29,api-old,9b70bf3317f6,0.2871,0.0,0.72,111.5 +rollout,before,-14.29,postgres,c03720a13dc2,0.0871,0.0,0.54,168.1 +rollout,before,-14.29,haproxy,e128ee930c06,0.036,0.0,0.6,23.1 +rollout,before,-14.29,valkey,0147a03cc244,0.0077,0.0,0.24,12.2 +rollout,before,-14.29,k6,448a7e633a22,0.1326,0.0,1.1,244.9 +rollout,before,-14.29,sampler,e76d1214732b,0.0036,0.0,0.01,1.5 +rollout,before,-14.29,vm,,1.0354,,3.21, +rollout,before,-13.29,api-old,81247d9d1f35,0.2783,0.0,0.5,113.6 +rollout,before,-13.29,api-old,9b70bf3317f6,0.2766,0.0,0.53,113.7 +rollout,before,-13.29,postgres,c03720a13dc2,0.0812,0.0,0.52,167.9 +rollout,before,-13.29,haproxy,e128ee930c06,0.034,0.0,0.46,24.9 +rollout,before,-13.29,valkey,0147a03cc244,0.0074,0.0,0.28,11.7 +rollout,before,-13.29,k6,448a7e633a22,0.1218,0.0,1.05,264.1 +rollout,before,-13.29,sampler,e76d1214732b,0.0038,0.0,0.01,1.6 +rollout,before,-13.29,vm,,1.0348,,2.93, +rollout,before,-12.28,api-old,81247d9d1f35,0.3267,0.0,1.21,115.7 +rollout,before,-12.28,api-old,9b70bf3317f6,0.3249,0.0,1.13,115.4 +rollout,before,-12.28,postgres,c03720a13dc2,0.0976,0.0,1.52,168.3 +rollout,before,-12.28,haproxy,e128ee930c06,0.0539,0.0,0.86,26.9 +rollout,before,-12.28,valkey,0147a03cc244,0.0087,0.0,0.34,12.2 +rollout,before,-12.28,k6,448a7e633a22,0.1466,0.0,2.87,283.0 +rollout,before,-12.28,sampler,e76d1214732b,0.0035,0.0,0.01,1.5 +rollout,before,-12.28,vm,,1.8315,,20.03, +rollout,before,-11.28,api-old,81247d9d1f35,0.2856,0.0,0.6,117.2 +rollout,before,-11.28,api-old,9b70bf3317f6,0.2885,0.0,1.11,116.1 +rollout,before,-11.28,postgres,c03720a13dc2,0.0846,0.0,0.6,168.5 +rollout,before,-11.28,haproxy,e128ee930c06,0.0353,0.0,0.57,28.8 +rollout,before,-11.28,valkey,0147a03cc244,0.0077,0.0,0.37,11.9 +rollout,before,-11.28,k6,448a7e633a22,0.1327,0.0,1.18,305.1 +rollout,before,-11.28,sampler,e76d1214732b,0.0036,0.0,0.01,1.4 +rollout,before,-11.28,vm,,1.0451,,2.95, +rollout,before,-10.27,api-old,81247d9d1f35,0.3493,0.0,3.88,118.6 +rollout,before,-10.27,api-old,9b70bf3317f6,0.3204,0.0,1.83,118.3 +rollout,before,-10.27,postgres,c03720a13dc2,0.1516,0.0,1.9,168.7 +rollout,before,-10.27,haproxy,e128ee930c06,0.0382,0.0,0.87,30.6 +rollout,before,-10.27,valkey,0147a03cc244,0.045,0.0,0.95,13.0 +rollout,before,-10.27,k6,448a7e633a22,0.132,0.0,1.68,321.3 +rollout,before,-10.27,sampler,e76d1214732b,0.0034,0.0,1.93,1.8 +rollout,before,-10.27,vm,,1.3527,,11.45, +rollout,before,-9.27,api-old,81247d9d1f35,0.3452,0.0,1.25,118.7 +rollout,before,-9.27,api-old,9b70bf3317f6,0.3146,0.0,0.67,119.5 +rollout,before,-9.27,postgres,c03720a13dc2,0.0922,0.0,0.59,173.0 +rollout,before,-9.27,haproxy,e128ee930c06,0.028,0.0,0.32,30.3 +rollout,before,-9.27,valkey,0147a03cc244,0.0078,0.0,0.33,12.2 +rollout,before,-9.27,k6,448a7e633a22,0.0799,0.0,1.2,329.8 +rollout,before,-9.27,sampler,e76d1214732b,0.0046,0.0,0.01,1.7 +rollout,before,-9.27,vm,,0.9944,,2.91, +rollout,before,-8.26,api-old,81247d9d1f35,0.2948,0.0,2.52,119.2 +rollout,before,-8.26,api-old,9b70bf3317f6,0.3742,0.0,4.57,119.4 +rollout,before,-8.26,postgres,c03720a13dc2,0.1104,0.0,0.72,181.1 +rollout,before,-8.26,haproxy,e128ee930c06,0.0269,0.0,0.48,30.9 +rollout,before,-8.26,valkey,0147a03cc244,0.0079,0.0,0.53,12.2 +rollout,before,-8.26,k6,448a7e633a22,0.2955,0.0,1.97,345.0 +rollout,before,-8.26,sampler,e76d1214732b,0.0041,0.0,0.02,1.7 +rollout,before,-8.26,vm,,1.3915,,8.14, +rollout,before,-7.26,api-old,81247d9d1f35,0.2856,0.0,0.79,120.7 +rollout,before,-7.26,api-old,9b70bf3317f6,0.2888,0.0,0.47,120.3 +rollout,before,-7.26,postgres,c03720a13dc2,0.0836,0.0,0.53,181.7 +rollout,before,-7.26,haproxy,e128ee930c06,0.0385,0.0,0.26,31.1 +rollout,before,-7.26,valkey,0147a03cc244,0.0076,0.0,0.51,11.9 +rollout,before,-7.26,k6,448a7e633a22,0.0843,0.0,1.1,344.5 +rollout,before,-7.26,sampler,e76d1214732b,0.0035,0.0,0.02,1.5 +rollout,before,-7.26,vm,,1.0258,,5.68, +rollout,before,-6.25,api-old,81247d9d1f35,0.3047,0.0,1.54,121.0 +rollout,before,-6.25,api-old,9b70bf3317f6,0.3058,0.0,1.77,120.7 +rollout,before,-6.25,postgres,c03720a13dc2,0.0894,0.0,0.66,181.8 +rollout,before,-6.25,haproxy,e128ee930c06,0.0314,0.0,0.57,31.8 +rollout,before,-6.25,valkey,0147a03cc244,0.0083,0.0,0.31,11.9 +rollout,before,-6.25,k6,448a7e633a22,0.092,0.0,1.09,344.6 +rollout,before,-6.25,sampler,e76d1214732b,0.0039,0.0,0.02,1.6 +rollout,before,-6.25,vm,,1.0255,,2.85, +rollout,before,-5.25,api-old,81247d9d1f35,0.2891,0.0,0.78,122.3 +rollout,before,-5.25,api-old,9b70bf3317f6,0.2875,0.0,0.53,122.2 +rollout,before,-5.25,postgres,c03720a13dc2,0.1171,0.0,0.77,181.4 +rollout,before,-5.25,haproxy,e128ee930c06,0.0295,0.0,0.41,32.9 +rollout,before,-5.25,valkey,0147a03cc244,0.0265,0.0,0.34,12.9 +rollout,before,-5.25,k6,448a7e633a22,0.0869,0.0,1.19,344.3 +rollout,before,-5.25,sampler,e76d1214732b,0.0035,0.0,0.52,1.4 +rollout,before,-5.25,vm,,1.0235,,3.51, +rollout,before,-4.24,api-old,81247d9d1f35,0.2936,0.0,1.3,123.1 +rollout,before,-4.24,api-old,9b70bf3317f6,0.2869,0.0,1.22,122.8 +rollout,before,-4.24,postgres,c03720a13dc2,0.086,0.0,0.67,182.5 +rollout,before,-4.24,haproxy,e128ee930c06,0.0278,0.0,0.55,33.1 +rollout,before,-4.24,valkey,0147a03cc244,0.0078,0.0,0.51,12.1 +rollout,before,-4.24,k6,448a7e633a22,0.0881,0.0,1.12,344.4 +rollout,before,-4.24,sampler,e76d1214732b,0.0042,0.0,0.01,1.6 +rollout,before,-4.24,vm,,0.9852,,2.88, +rollout,before,-3.23,api-old,81247d9d1f35,0.3181,0.0,2.02,122.9 +rollout,before,-3.23,api-old,9b70bf3317f6,0.3171,0.0,1.13,122.9 +rollout,before,-3.23,postgres,c03720a13dc2,0.0941,0.0,0.81,182.3 +rollout,before,-3.23,haproxy,e128ee930c06,0.0288,0.0,0.49,33.1 +rollout,before,-3.23,valkey,0147a03cc244,0.0085,0.0,0.49,12.0 +rollout,before,-3.23,k6,448a7e633a22,0.1019,0.0,1.1,344.6 +rollout,before,-3.23,sampler,e76d1214732b,0.0039,0.0,0.02,1.6 +rollout,before,-3.23,vm,,1.0231,,2.79, +rollout,before,-2.23,api-old,81247d9d1f35,0.3188,0.0,1.43,124.1 +rollout,before,-2.23,api-old,9b70bf3317f6,0.3265,0.0,3.76,123.7 +rollout,before,-2.23,postgres,c03720a13dc2,0.1017,0.0,1.32,182.3 +rollout,before,-2.23,haproxy,e128ee930c06,0.0418,0.0,0.67,33.9 +rollout,before,-2.23,valkey,0147a03cc244,0.0081,0.0,0.4,12.2 +rollout,before,-2.23,k6,448a7e633a22,0.1053,0.0,5.17,344.8 +rollout,before,-2.23,sampler,e76d1214732b,0.0038,0.0,0.67,1.6 +rollout,before,-2.23,vm,,1.7824,,18.47, +rollout,prepare,-1.22,api-old,81247d9d1f35,0.3198,0.0,1.03,124.0 +rollout,prepare,-1.22,api-old,9b70bf3317f6,0.3228,0.0,0.83,124.0 +rollout,prepare,-1.22,postgres,c03720a13dc2,0.0932,0.0,0.57,182.8 +rollout,prepare,-1.22,haproxy,e128ee930c06,0.0509,0.0,0.54,33.8 +rollout,prepare,-1.22,valkey,0147a03cc244,0.0082,0.0,0.36,12.2 +rollout,prepare,-1.22,k6,448a7e633a22,0.1067,0.0,1.23,344.5 +rollout,prepare,-1.22,sampler,e76d1214732b,0.0037,0.0,0.04,1.5 +rollout,prepare,-1.22,vm,,1.2137,,4.29, +rollout,prepare,-0.22,api-old,81247d9d1f35,0.3364,0.0,1.03,124.7 +rollout,prepare,-0.22,api-old,9b70bf3317f6,0.3372,0.0,1.16,124.7 +rollout,prepare,-0.22,postgres,c03720a13dc2,0.1749,0.0,0.77,182.3 +rollout,prepare,-0.22,haproxy,e128ee930c06,0.0687,0.0,0.69,34.2 +rollout,prepare,-0.22,valkey,0147a03cc244,0.023,0.0,0.4,13.0 +rollout,prepare,-0.22,k6,448a7e633a22,0.113,0.0,2.27,344.7 +rollout,prepare,-0.22,sampler,e76d1214732b,0.0041,0.0,0.03,1.3 +rollout,prepare,-0.22,vm,,2.0713,,19.44, +rollout,during,0.79,api-old,81247d9d1f35,0.3431,0.0,0.81,125.6 +rollout,during,0.79,api-old,9b70bf3317f6,0.3399,0.0,1.18,125.2 +rollout,during,0.79,migrate,e5c77588635a,0.5678,413.68,455.7,26.2 +rollout,during,0.79,postgres,c03720a13dc2,0.1188,0.0,1.12,182.9 +rollout,during,0.79,haproxy,e128ee930c06,0.0315,0.0,0.56,34.7 +rollout,during,0.79,valkey,0147a03cc244,0.0086,0.0,0.16,12.2 +rollout,during,0.79,k6,448a7e633a22,0.1216,0.0,5.1,344.4 +rollout,during,0.79,sampler,e76d1214732b,0.0036,0.0,0.01,1.5 +rollout,during,0.79,vm,,3.3188,,105.05, +rollout,during,1.79,api-old,81247d9d1f35,0.2554,0.0,1.22,125.6 +rollout,during,1.79,api-old,9b70bf3317f6,0.2525,0.0,1.25,125.1 +rollout,during,1.79,migrate,e5c77588635a,0.4966,1128.1,547.74,72.1 +rollout,during,1.79,postgres,c03720a13dc2,0.0858,0.0,0.5,185.0 +rollout,during,1.79,haproxy,e128ee930c06,0.0222,0.0,0.48,34.6 +rollout,during,1.79,valkey,0147a03cc244,0.0064,0.0,0.4,11.7 +rollout,during,1.79,k6,448a7e633a22,0.0882,0.0,0.96,352.9 +rollout,during,1.79,sampler,e76d1214732b,0.0033,0.0,0.01,1.6 +rollout,during,1.79,vm,,1.4334,,407.23, +rollout,during,2.8,api-old,81247d9d1f35,0.4495,0.0,1.71,126.7 +rollout,during,2.8,api-old,9b70bf3317f6,0.344,0.0,0.64,125.9 +rollout,during,2.8,api-new,342603d12120,1.0457,0.0,1.02,22.9 +rollout,during,2.8,postgres,c03720a13dc2,0.1315,0.0,1.03,186.7 +rollout,during,2.8,haproxy,e128ee930c06,0.0548,0.0,0.74,34.0 +rollout,during,2.8,valkey,0147a03cc244,0.0099,0.0,1.2,11.9 +rollout,during,2.8,k6,448a7e633a22,0.1133,0.0,2.97,360.9 +rollout,during,2.8,sampler,e76d1214732b,0.0041,0.0,0.04,1.5 +rollout,during,2.8,vm,,3.2666,,38.21, +rollout,during,3.8,api-old,81247d9d1f35,0.3018,0.0,1.03,126.8 +rollout,during,3.8,api-old,9b70bf3317f6,0.2957,0.0,0.82,126.5 +rollout,during,3.8,api-new,342603d12120,0.788,223.66,16.06,104.3 +rollout,during,3.8,postgres,c03720a13dc2,0.099,0.0,0.44,187.8 +rollout,during,3.8,haproxy,e128ee930c06,0.0456,0.0,0.51,34.8 +rollout,during,3.8,valkey,0147a03cc244,0.0073,0.0,0.12,12.2 +rollout,during,3.8,k6,448a7e633a22,0.0936,0.0,1.07,371.1 +rollout,during,3.8,sampler,e76d1214732b,0.005,0.0,0.03,1.5 +rollout,during,3.8,vm,,1.9987,,28.8, +rollout,during,4.81,api-old,81247d9d1f35,0.2663,0.0,0.49,126.4 +rollout,during,4.81,api-old,9b70bf3317f6,0.3412,0.0,1.25,126.0 +rollout,during,4.81,api-new,342603d12120,0.143,0.0,0.3,106.6 +rollout,during,4.81,postgres,c03720a13dc2,0.157,0.0,0.61,199.7 +rollout,during,4.81,haproxy,e128ee930c06,0.0744,0.0,0.44,35.0 +rollout,during,4.81,valkey,0147a03cc244,0.0245,0.0,0.31,12.8 +rollout,during,4.81,k6,448a7e633a22,0.0929,0.0,1.06,379.3 +rollout,during,4.81,sampler,e76d1214732b,0.0043,0.0,0.02,1.3 +rollout,during,4.81,vm,,1.571,,6.95, +rollout,during,5.81,api-old,9b70bf3317f6,0.3312,0.0,0.68,127.0 +rollout,during,5.81,api-new,342603d12120,0.404,0.0,2.78,108.4 +rollout,during,5.81,postgres,c03720a13dc2,0.1302,0.0,1.06,163.5 +rollout,during,5.81,haproxy,e128ee930c06,0.0841,0.0,0.39,31.9 +rollout,during,5.81,valkey,0147a03cc244,0.009,0.0,0.47,11.9 +rollout,during,5.81,k6,448a7e633a22,0.1048,0.0,1.97,387.8 +rollout,during,5.81,sampler,e76d1214732b,0.0044,0.0,2.15,1.8 +rollout,during,5.81,vm,,2.6774,,24.87, +rollout,during,6.82,api-old,9b70bf3317f6,0.366,0.0,1.26,126.6 +rollout,during,6.82,api-new,342603d12120,0.4818,0.0,9.69,110.1 +rollout,during,6.82,api-new,f6bff6eaee6c,1.0312,5.74,6.07,36.3 +rollout,during,6.82,postgres,c03720a13dc2,0.1992,0.0,5.76,187.6 +rollout,during,6.82,haproxy,e128ee930c06,0.0724,0.0,0.92,31.4 +rollout,during,6.82,valkey,0147a03cc244,0.0105,0.0,2.11,12.2 +rollout,during,6.82,k6,448a7e633a22,0.4546,0.0,8.69,399.8 +rollout,during,6.82,sampler,e76d1214732b,0.0034,0.0,0.02,1.5 +rollout,during,6.82,vm,,3.5411,,41.98, +rollout,during,7.82,api-old,9b70bf3317f6,0.2821,0.0,0.84,126.8 +rollout,during,7.82,api-new,342603d12120,0.3005,0.0,0.53,111.0 +rollout,during,7.82,api-new,f6bff6eaee6c,0.8007,160.17,35.21,107.1 +rollout,during,7.82,postgres,c03720a13dc2,0.1484,0.0,1.21,209.9 +rollout,during,7.82,haproxy,e128ee930c06,0.0863,0.0,0.86,32.0 +rollout,during,7.82,valkey,0147a03cc244,0.0082,0.0,1.18,12.5 +rollout,during,7.82,k6,448a7e633a22,0.0981,0.0,2.42,399.7 +rollout,during,7.82,sampler,e76d1214732b,0.0035,0.0,0.02,1.5 +rollout,during,7.82,vm,,2.6161,,44.83, +rollout,after,8.83,api-new,342603d12120,0.403,0.0,1.07,112.7 +rollout,after,8.83,api-new,f6bff6eaee6c,0.4326,0.0,1.53,108.6 +rollout,after,8.83,postgres,c03720a13dc2,0.1422,0.0,1.48,171.0 +rollout,after,8.83,haproxy,e128ee930c06,0.101,0.0,1.02,28.7 +rollout,after,8.83,valkey,0147a03cc244,0.0098,0.0,0.99,11.7 +rollout,after,8.83,k6,448a7e633a22,0.119,0.0,3.87,400.3 +rollout,after,8.83,sampler,e76d1214732b,0.0054,0.0,0.15,1.5 +rollout,after,8.83,vm,,2.9652,,30.27, +rollout,after,9.84,api-new,342603d12120,0.2978,0.0,1.09,115.5 +rollout,after,9.84,api-new,f6bff6eaee6c,0.3652,0.0,1.16,110.0 +rollout,after,9.84,postgres,c03720a13dc2,0.1781,0.0,0.68,187.6 +rollout,after,9.84,haproxy,e128ee930c06,0.0528,0.0,0.41,29.2 +rollout,after,9.84,valkey,0147a03cc244,0.019,0.0,0.33,12.5 +rollout,after,9.84,k6,448a7e633a22,0.0927,0.0,0.99,400.0 +rollout,after,9.84,sampler,e76d1214732b,0.0044,0.0,0.14,1.5 +rollout,after,9.84,vm,,1.3677,,5.99, +rollout,after,10.84,api-new,342603d12120,0.3023,0.0,1.29,115.9 +rollout,after,10.84,api-new,f6bff6eaee6c,0.3033,0.0,1.42,111.3 +rollout,after,10.84,postgres,c03720a13dc2,0.0949,0.0,0.72,187.6 +rollout,after,10.84,haproxy,e128ee930c06,0.0718,0.0,0.37,30.1 +rollout,after,10.84,valkey,0147a03cc244,0.0069,0.0,0.26,12.2 +rollout,after,10.84,k6,448a7e633a22,0.0886,0.0,1.03,399.9 +rollout,after,10.84,sampler,e76d1214732b,0.0042,0.0,0.02,1.5 +rollout,after,10.84,vm,,1.2843,,9.13, +rollout,after,11.85,api-new,342603d12120,0.3088,0.0,0.91,117.1 +rollout,after,11.85,api-new,f6bff6eaee6c,0.3043,0.0,1.87,113.6 +rollout,after,11.85,postgres,c03720a13dc2,0.1013,0.0,0.6,187.4 +rollout,after,11.85,haproxy,e128ee930c06,0.0334,0.0,0.68,30.9 +rollout,after,11.85,valkey,0147a03cc244,0.0086,0.0,0.15,12.7 +rollout,after,11.85,k6,448a7e633a22,0.0929,0.0,0.92,400.0 +rollout,after,11.85,sampler,e76d1214732b,0.0044,0.0,0.01,1.6 +rollout,after,11.85,vm,,1.0248,,3.8, +rollout,after,12.85,api-new,342603d12120,0.2814,0.0,1.53,118.4 +rollout,after,12.85,api-new,f6bff6eaee6c,0.2821,0.0,1.22,114.8 +rollout,after,12.85,postgres,c03720a13dc2,0.0908,0.0,0.76,187.6 +rollout,after,12.85,haproxy,e128ee930c06,0.0449,0.0,0.23,31.1 +rollout,after,12.85,valkey,0147a03cc244,0.0071,0.0,0.56,12.0 +rollout,after,12.85,k6,448a7e633a22,0.0747,0.0,0.98,399.6 +rollout,after,12.85,sampler,e76d1214732b,0.0039,0.0,0.16,1.6 +rollout,after,12.85,vm,,1.0036,,3.02, +rollout,after,13.86,api-new,342603d12120,0.3037,0.0,1.15,119.3 +rollout,after,13.86,api-new,f6bff6eaee6c,0.2977,0.0,1.73,115.9 +rollout,after,13.86,postgres,c03720a13dc2,0.0964,0.0,0.68,187.3 +rollout,after,13.86,haproxy,e128ee930c06,0.0307,0.0,0.27,32.0 +rollout,after,13.86,valkey,0147a03cc244,0.0077,0.0,0.27,11.7 +rollout,after,13.86,k6,448a7e633a22,0.0885,0.0,0.94,400.5 +rollout,after,13.86,sampler,e76d1214732b,0.0037,0.0,0.01,1.4 +rollout,after,13.86,vm,,1.0153,,2.69, +rollout,after,14.86,api-new,342603d12120,0.3872,0.0,1.29,119.4 +rollout,after,14.86,api-new,f6bff6eaee6c,0.2907,0.0,1.01,117.0 +rollout,after,14.86,postgres,c03720a13dc2,0.124,0.0,0.62,187.7 +rollout,after,14.86,haproxy,e128ee930c06,0.0262,0.0,0.32,32.5 +rollout,after,14.86,valkey,0147a03cc244,0.0217,0.0,0.28,13.1 +rollout,after,14.86,k6,448a7e633a22,0.0939,0.0,0.96,399.7 +rollout,after,14.86,sampler,e76d1214732b,0.0034,0.0,0.02,1.4 +rollout,after,14.86,vm,,1.1743,,2.96, +rollout,after,15.87,api-new,342603d12120,0.3134,0.0,0.83,120.4 +rollout,after,15.87,api-new,f6bff6eaee6c,0.3124,0.0,2.23,117.9 +rollout,after,15.87,postgres,c03720a13dc2,0.0987,0.0,0.97,187.8 +rollout,after,15.87,haproxy,e128ee930c06,0.0286,0.0,0.73,32.8 +rollout,after,15.87,valkey,0147a03cc244,0.0075,0.0,0.22,12.6 +rollout,after,15.87,k6,448a7e633a22,0.0881,0.0,1.0,400.6 +rollout,after,15.87,sampler,e76d1214732b,0.0031,0.0,0.02,1.6 +rollout,after,15.87,vm,,1.056,,2.81, +rollout,after,16.87,api-new,342603d12120,0.3043,0.0,1.24,121.0 +rollout,after,16.87,api-new,f6bff6eaee6c,0.3071,0.0,1.51,118.4 +rollout,after,16.87,postgres,c03720a13dc2,0.0943,0.0,0.79,188.6 +rollout,after,16.87,haproxy,e128ee930c06,0.0269,0.0,0.29,33.1 +rollout,after,16.87,valkey,0147a03cc244,0.007,0.0,0.36,12.4 +rollout,after,16.87,k6,448a7e633a22,0.0895,0.0,0.86,400.5 +rollout,after,16.87,sampler,e76d1214732b,0.004,0.0,0.01,1.6 +rollout,after,16.87,vm,,1.035,,2.75, +rollout,after,17.88,api-new,342603d12120,0.3246,0.0,0.99,121.5 +rollout,after,17.88,api-new,f6bff6eaee6c,0.3805,0.0,0.78,119.8 +rollout,after,17.88,postgres,c03720a13dc2,0.1004,0.0,1.25,188.3 +rollout,after,17.88,haproxy,e128ee930c06,0.0389,0.0,0.4,32.9 +rollout,after,17.88,valkey,0147a03cc244,0.0078,0.0,1.35,12.2 +rollout,after,17.88,k6,448a7e633a22,0.0886,0.0,1.85,400.2 +rollout,after,17.88,sampler,e76d1214732b,0.0045,0.0,0.02,1.5 +rollout,after,17.88,vm,,1.7316,,16.17, +rollout,after,18.88,api-new,342603d12120,0.3189,0.0,1.83,121.5 +rollout,after,18.88,api-new,f6bff6eaee6c,0.3191,0.0,1.7,119.8 +rollout,after,18.88,postgres,c03720a13dc2,0.0996,0.0,0.9,188.4 +rollout,after,18.88,haproxy,e128ee930c06,0.0277,0.0,0.38,33.7 +rollout,after,18.88,valkey,0147a03cc244,0.008,0.0,0.27,12.4 +rollout,after,18.88,k6,448a7e633a22,0.0927,0.0,1.09,399.7 +rollout,after,18.88,sampler,e76d1214732b,0.0041,0.0,0.01,1.5 +rollout,after,18.88,vm,,1.1036,,2.7, +rollout,after,19.89,api-new,342603d12120,0.3049,0.0,1.14,122.6 +rollout,after,19.89,api-new,f6bff6eaee6c,0.3015,0.0,1.3,120.6 +rollout,after,19.89,postgres,c03720a13dc2,0.154,0.0,0.79,191.3 +rollout,after,19.89,haproxy,e128ee930c06,0.0267,0.0,0.53,33.9 +rollout,after,19.89,valkey,0147a03cc244,0.0194,0.0,0.31,12.9 +rollout,after,19.89,k6,448a7e633a22,0.0868,0.0,1.04,400.2 +rollout,after,19.89,sampler,e76d1214732b,0.0033,0.0,0.01,1.5 +rollout,after,19.89,vm,,1.1946,,3.92, +rollout,after,20.89,api-new,342603d12120,0.2953,0.0,1.05,122.2 +rollout,after,20.89,api-new,f6bff6eaee6c,0.2894,0.0,1.55,120.8 +rollout,after,20.89,postgres,c03720a13dc2,0.0935,0.0,0.87,191.1 +rollout,after,20.89,haproxy,e128ee930c06,0.0258,0.0,0.55,33.9 +rollout,after,20.89,valkey,0147a03cc244,0.0075,0.0,0.37,12.7 +rollout,after,20.89,k6,448a7e633a22,0.086,0.0,0.94,400.5 +rollout,after,20.89,sampler,e76d1214732b,0.0038,0.0,0.02,1.6 +rollout,after,20.89,vm,,0.9758,,3.01, +rollout,after,21.9,api-new,342603d12120,0.3058,0.0,4.95,122.8 +rollout,after,21.9,api-new,f6bff6eaee6c,0.2991,0.0,2.01,121.0 +rollout,after,21.9,postgres,c03720a13dc2,0.096,0.0,1.32,191.7 +rollout,after,21.9,haproxy,e128ee930c06,0.0249,0.0,1.2,34.1 +rollout,after,21.9,valkey,0147a03cc244,0.008,0.0,0.3,12.9 +rollout,after,21.9,k6,448a7e633a22,0.353,0.0,2.64,402.7 +rollout,after,21.9,sampler,e76d1214732b,0.0041,0.0,0.04,1.3 +rollout,after,21.9,vm,,1.3141,,8.91, +rollout,after,22.9,api-new,342603d12120,0.2879,0.0,1.53,122.8 +rollout,after,22.9,api-new,f6bff6eaee6c,0.2863,0.0,1.55,121.2 +rollout,after,22.9,postgres,c03720a13dc2,0.0911,0.0,0.77,192.0 +rollout,after,22.9,haproxy,e128ee930c06,0.0386,0.0,0.36,34.0 +rollout,after,22.9,valkey,0147a03cc244,0.0076,0.0,0.35,12.9 +rollout,after,22.9,k6,448a7e633a22,0.0822,0.0,0.92,402.4 +rollout,after,22.9,sampler,e76d1214732b,0.0038,0.0,0.01,1.7 +rollout,after,22.9,vm,,1.0346,,3.09, +rollout,after,23.91,api-new,342603d12120,0.307,0.0,1.74,123.7 +rollout,after,23.91,api-new,f6bff6eaee6c,0.3047,0.0,2.21,122.1 +rollout,after,23.91,postgres,c03720a13dc2,0.0967,0.0,0.89,191.5 +rollout,after,23.91,haproxy,e128ee930c06,0.0252,0.0,0.44,34.3 +rollout,after,23.91,valkey,0147a03cc244,0.0076,0.0,0.29,12.0 +rollout,after,23.91,k6,448a7e633a22,0.0837,0.0,1.0,402.6 +rollout,after,23.91,sampler,e76d1214732b,0.0035,0.0,0.02,1.7 +rollout,after,23.91,vm,,1.0554,,2.72, +rollout,after,24.91,api-new,342603d12120,0.2974,0.0,1.66,124.2 +rollout,after,24.91,api-new,f6bff6eaee6c,0.2935,0.0,1.63,122.1 +rollout,after,24.91,postgres,c03720a13dc2,0.1241,0.0,0.99,191.2 +rollout,after,24.91,haproxy,e128ee930c06,0.0238,0.0,0.24,34.6 +rollout,after,24.91,valkey,0147a03cc244,0.0215,0.0,0.31,12.1 +rollout,after,24.91,k6,448a7e633a22,0.0827,0.0,0.91,402.1 +rollout,after,24.91,sampler,e76d1214732b,0.003,0.0,0.01,1.6 +rollout,after,24.91,vm,,1.0952,,3.55, +rollout,after,25.91,api-new,342603d12120,0.2936,0.0,0.89,123.9 +rollout,after,25.91,api-new,f6bff6eaee6c,0.2906,0.0,1.3,122.9 +rollout,after,25.91,postgres,c03720a13dc2,0.0928,0.0,0.84,191.5 +rollout,after,25.91,haproxy,e128ee930c06,0.0228,0.0,0.99,34.2 +rollout,after,25.91,valkey,0147a03cc244,0.0072,0.0,0.47,12.1 +rollout,after,25.91,k6,448a7e633a22,0.0799,0.0,1.01,402.2 +rollout,after,25.91,sampler,e76d1214732b,0.0031,0.0,0.01,1.5 +rollout,after,25.91,vm,,1.0067,,2.64, +rollout,after,26.92,api-new,342603d12120,0.3043,0.0,1.62,125.1 +rollout,after,26.92,api-new,f6bff6eaee6c,0.3033,0.0,1.08,122.7 +rollout,after,26.92,postgres,c03720a13dc2,0.0969,0.0,0.77,191.6 +rollout,after,26.92,haproxy,e128ee930c06,0.0233,0.0,0.28,35.0 +rollout,after,26.92,valkey,0147a03cc244,0.0076,0.0,0.4,12.0 +rollout,after,26.92,k6,448a7e633a22,0.0832,0.0,0.98,402.3 +rollout,after,26.92,sampler,e76d1214732b,0.0038,0.0,0.09,1.7 +rollout,after,26.92,vm,,1.2851,,5.64, +rollout,after,27.92,api-new,342603d12120,0.3455,0.0,0.8,124.7 +rollout,after,27.92,api-new,f6bff6eaee6c,0.2915,0.0,0.71,123.5 +rollout,after,27.92,postgres,c03720a13dc2,0.0902,0.0,0.78,192.2 +rollout,after,27.92,haproxy,e128ee930c06,0.0322,0.0,0.56,34.8 +rollout,after,27.92,valkey,0147a03cc244,0.007,0.0,0.47,12.4 +rollout,after,27.92,k6,448a7e633a22,0.0728,0.0,1.56,402.4 +rollout,after,27.92,sampler,e76d1214732b,0.0041,0.0,0.02,1.3 +rollout,after,27.92,vm,,1.4228,,9.9, +rollout,after,28.93,api-new,342603d12120,0.3205,0.0,1.95,125.2 +rollout,after,28.93,api-new,f6bff6eaee6c,0.3201,0.0,2.15,123.5 +rollout,after,28.93,postgres,c03720a13dc2,0.111,0.0,0.76,192.6 +rollout,after,28.93,haproxy,e128ee930c06,0.0287,0.0,1.0,35.3 +rollout,after,28.93,valkey,0147a03cc244,0.0104,0.0,0.27,11.7 +rollout,after,28.93,k6,448a7e633a22,0.0863,0.0,1.12,402.4 +rollout,after,28.93,sampler,e76d1214732b,0.005,0.0,0.01,1.7 +rollout,after,28.93,vm,,1.094,,3.13, +rollout,after,29.93,api-new,342603d12120,0.3028,0.0,1.63,124.8 +rollout,after,29.93,api-new,f6bff6eaee6c,0.3011,0.0,1.55,123.6 +rollout,after,29.93,postgres,c03720a13dc2,0.1292,0.0,0.68,192.8 +rollout,after,29.93,haproxy,e128ee930c06,0.0244,0.0,0.57,34.5 +rollout,after,29.93,valkey,0147a03cc244,0.0206,0.0,0.34,12.9 +rollout,after,29.93,k6,448a7e633a22,0.085,0.0,1.1,402.4 +rollout,after,29.93,sampler,e76d1214732b,0.0039,0.0,0.01,1.4 +rollout,after,29.93,vm,,1.1929,,3.92, +rollout,after,30.94,api-new,342603d12120,0.2947,0.0,1.39,124.4 +rollout,after,30.94,api-new,f6bff6eaee6c,0.3787,0.0,1.56,124.8 +rollout,after,30.94,postgres,c03720a13dc2,0.0895,0.0,0.74,192.5 +rollout,after,30.94,haproxy,e128ee930c06,0.0223,0.0,0.4,35.1 +rollout,after,30.94,valkey,0147a03cc244,0.0076,0.0,0.4,12.3 +rollout,after,30.94,k6,448a7e633a22,0.0776,0.0,1.01,402.5 +rollout,after,30.94,sampler,e76d1214732b,0.0035,0.0,0.02,1.7 +rollout,after,30.94,vm,,1.046,,2.48, +rollout,after,31.94,api-new,342603d12120,0.3011,0.0,1.01,124.6 +rollout,after,31.94,api-new,f6bff6eaee6c,0.3,0.0,1.18,124.7 +rollout,after,31.94,postgres,c03720a13dc2,0.0959,0.0,0.79,192.7 +rollout,after,31.94,haproxy,e128ee930c06,0.0225,0.0,0.44,35.1 +rollout,after,31.94,valkey,0147a03cc244,0.0075,0.0,0.43,11.7 +rollout,after,31.94,k6,448a7e633a22,0.0825,0.0,1.06,403.1 +rollout,after,31.94,sampler,e76d1214732b,0.0033,0.0,0.01,1.4 +rollout,after,31.94,vm,,1.0061,,2.95, +rollout,after,32.95,api-new,342603d12120,0.2937,0.0,1.47,125.3 +rollout,after,32.95,api-new,f6bff6eaee6c,0.2942,0.0,0.92,124.8 +rollout,after,32.95,postgres,c03720a13dc2,0.0957,0.0,0.85,192.5 +rollout,after,32.95,haproxy,e128ee930c06,0.0342,0.0,0.33,35.6 +rollout,after,32.95,valkey,0147a03cc244,0.0073,0.0,0.38,12.2 +rollout,after,32.95,k6,448a7e633a22,0.0783,0.0,1.08,402.7 +rollout,after,32.95,sampler,e76d1214732b,0.0039,0.0,0.02,1.7 +rollout,after,32.95,vm,,1.016,,3.0, +rollout,after,33.95,api-new,342603d12120,0.312,0.0,1.78,124.5 +rollout,after,33.95,api-new,f6bff6eaee6c,0.3072,0.0,0.75,124.9 +rollout,after,33.95,postgres,c03720a13dc2,0.0979,0.0,1.13,192.1 +rollout,after,33.95,haproxy,e128ee930c06,0.0239,0.0,0.55,35.5 +rollout,after,33.95,valkey,0147a03cc244,0.0076,0.0,0.23,12.2 +rollout,after,33.95,k6,448a7e633a22,0.0798,0.0,0.95,402.6 +rollout,after,33.95,sampler,e76d1214732b,0.0037,0.0,0.01,1.6 +rollout,after,33.95,vm,,1.0448,,2.81, +rollout,after,34.95,api-new,342603d12120,0.307,0.0,1.36,124.6 +rollout,after,34.95,api-new,f6bff6eaee6c,0.3045,0.0,1.31,125.1 +rollout,after,34.95,postgres,c03720a13dc2,0.1326,0.0,0.81,193.1 +rollout,after,34.95,haproxy,e128ee930c06,0.0227,0.0,0.24,35.5 +rollout,after,34.95,valkey,0147a03cc244,0.0184,0.0,0.37,12.5 +rollout,after,34.95,k6,448a7e633a22,0.0809,0.0,0.79,402.3 +rollout,after,34.95,sampler,e76d1214732b,0.0034,0.0,0.02,1.6 +rollout,after,34.95,vm,,1.1454,,3.17, +rollout,after,35.96,api-new,342603d12120,0.2958,0.0,1.27,125.5 +rollout,after,35.96,api-new,f6bff6eaee6c,0.2954,0.0,1.31,124.4 +rollout,after,35.96,postgres,c03720a13dc2,0.0926,0.0,1.4,193.6 +rollout,after,35.96,haproxy,e128ee930c06,0.0226,0.0,1.47,35.2 +rollout,after,35.96,valkey,0147a03cc244,0.0074,0.0,0.59,12.0 +rollout,after,35.96,k6,448a7e633a22,0.3103,0.0,4.98,402.6 +rollout,after,35.96,sampler,e76d1214732b,0.0029,0.0,0.01,1.5 +rollout,after,35.96,vm,,1.1955,,7.66, +rollout,after,36.96,api-new,342603d12120,0.2882,0.0,1.28,125.3 +rollout,after,36.96,api-new,f6bff6eaee6c,0.2851,0.0,2.03,125.3 +rollout,after,36.96,postgres,c03720a13dc2,0.0908,0.0,0.62,193.9 +rollout,after,36.96,haproxy,e128ee930c06,0.0207,0.0,0.28,35.4 +rollout,after,36.96,valkey,0147a03cc244,0.0071,0.0,0.59,12.0 +rollout,after,36.96,k6,448a7e633a22,0.0757,0.0,1.09,402.5 +rollout,after,36.96,sampler,e76d1214732b,0.0038,0.0,0.01,1.6 +rollout,after,36.96,vm,,0.9558,,2.72, +rollout,after,37.97,api-new,342603d12120,0.3207,0.0,1.91,125.5 +rollout,after,37.97,api-new,f6bff6eaee6c,0.314,0.0,1.13,125.6 +rollout,after,37.97,postgres,c03720a13dc2,0.1021,0.0,0.87,193.3 +rollout,after,37.97,haproxy,e128ee930c06,0.0382,0.0,1.08,35.8 +rollout,after,37.97,valkey,0147a03cc244,0.0082,0.0,0.18,12.7 +rollout,after,37.97,k6,448a7e633a22,0.0867,0.0,1.71,402.7 +rollout,after,37.97,sampler,e76d1214732b,0.0035,0.0,0.03,1.6 +rollout,after,37.97,vm,,1.6028,,17.21, +rollout,after,38.97,api-new,342603d12120,0.3053,0.0,1.72,126.1 +rollout,after,38.97,api-new,f6bff6eaee6c,0.3069,0.0,1.35,125.4 +rollout,after,38.97,postgres,c03720a13dc2,0.0967,0.0,0.69,193.2 +rollout,after,38.97,haproxy,e128ee930c06,0.0224,0.0,0.48,35.7 +rollout,after,38.97,valkey,0147a03cc244,0.0072,0.0,0.47,12.0 +rollout,after,38.97,k6,448a7e633a22,0.0836,0.0,1.01,402.7 +rollout,after,38.97,sampler,e76d1214732b,0.0037,0.0,0.02,1.5 +rollout,after,38.97,vm,,1.0057,,3.25, +rollout,after,39.98,api-new,342603d12120,0.3004,0.0,1.18,125.8 +rollout,after,39.98,api-new,f6bff6eaee6c,0.2969,0.0,1.15,125.1 +rollout,after,39.98,postgres,c03720a13dc2,0.1273,0.0,0.55,195.0 +rollout,after,39.98,haproxy,e128ee930c06,0.0212,0.0,0.36,35.9 +rollout,after,39.98,valkey,0147a03cc244,0.0187,0.0,0.23,13.2 +rollout,after,39.98,k6,448a7e633a22,0.0842,0.0,1.15,402.4 +rollout,after,39.98,sampler,e76d1214732b,0.0037,0.0,0.01,1.6 +rollout,after,39.98,vm,,1.125,,4.59, +rollout,after,40.98,api-new,342603d12120,0.2881,0.0,1.75,125.2 +rollout,after,40.98,api-new,f6bff6eaee6c,0.286,0.0,1.47,124.9 +rollout,after,40.98,postgres,c03720a13dc2,0.0894,0.0,0.6,194.8 +rollout,after,40.98,haproxy,e128ee930c06,0.0198,0.0,0.4,35.8 +rollout,after,40.98,valkey,0147a03cc244,0.007,0.0,0.27,12.7 +rollout,after,40.98,k6,448a7e633a22,0.0818,0.0,1.03,402.2 +rollout,after,40.98,sampler,e76d1214732b,0.0034,0.0,0.01,1.5 +rollout,after,40.98,vm,,0.9464,,4.0, +rollout,after,41.98,api-new,342603d12120,0.3108,0.0,0.71,125.8 +rollout,after,41.98,api-new,f6bff6eaee6c,0.3128,0.0,1.07,125.2 +rollout,after,41.98,postgres,c03720a13dc2,0.0972,0.0,0.56,194.9 +rollout,after,41.98,haproxy,e128ee930c06,0.0221,0.0,0.61,35.7 +rollout,after,41.98,valkey,0147a03cc244,0.0077,0.0,0.29,12.6 +rollout,after,41.98,k6,448a7e633a22,0.0883,0.0,0.95,402.4 +rollout,after,41.98,sampler,e76d1214732b,0.0042,0.0,0.02,1.5 +rollout,after,41.98,vm,,1.0158,,4.0, +rollout,after,42.99,api-new,342603d12120,0.3801,0.0,0.99,126.2 +rollout,after,42.99,api-new,f6bff6eaee6c,0.3012,0.0,1.09,125.3 +rollout,after,42.99,postgres,c03720a13dc2,0.0947,0.0,0.7,195.1 +rollout,after,42.99,haproxy,e128ee930c06,0.0318,0.0,0.26,36.4 +rollout,after,42.99,valkey,0147a03cc244,0.0077,0.0,0.37,12.2 +rollout,after,42.99,k6,448a7e633a22,0.0801,0.0,0.88,402.6 +rollout,after,42.99,sampler,e76d1214732b,0.0035,0.0,0.01,1.6 +rollout,after,42.99,vm,,1.084,,2.79, +rollout,after,43.99,api-new,342603d12120,0.2959,0.0,0.58,125.6 +rollout,after,43.99,api-new,f6bff6eaee6c,0.2921,0.0,1.1,125.4 +rollout,after,43.99,postgres,c03720a13dc2,0.0909,0.0,0.55,195.4 +rollout,after,43.99,haproxy,e128ee930c06,0.0202,0.0,0.6,36.1 +rollout,after,43.99,valkey,0147a03cc244,0.007,0.0,0.32,11.9 +rollout,after,43.99,k6,448a7e633a22,0.0771,0.0,1.01,402.6 +rollout,after,43.99,sampler,e76d1214732b,0.0041,0.0,0.02,1.6 +rollout,after,43.99,vm,,0.9068,,2.88, +rollout,after,45.0,api-new,342603d12120,0.3074,0.0,1.34,126.1 +rollout,after,45.0,api-new,f6bff6eaee6c,0.3006,0.0,1.83,125.5 +rollout,after,45.0,postgres,c03720a13dc2,0.1222,0.0,0.66,195.5 +rollout,after,45.0,haproxy,e128ee930c06,0.0223,0.0,0.32,35.7 +rollout,after,45.0,valkey,0147a03cc244,0.0206,0.0,0.31,13.0 +rollout,after,45.0,k6,448a7e633a22,0.0805,0.0,0.82,403.0 +rollout,after,45.0,sampler,e76d1214732b,0.0032,0.0,0.01,1.6 +rollout,after,45.0,vm,,1.1047,,3.34, +rollout,after,46.0,api-new,342603d12120,0.2981,0.0,1.51,125.8 +rollout,after,46.0,api-new,f6bff6eaee6c,0.2973,0.0,0.82,125.1 +rollout,after,46.0,postgres,c03720a13dc2,0.0949,0.0,0.81,195.5 +rollout,after,46.0,haproxy,e128ee930c06,0.0213,0.0,0.75,35.5 +rollout,after,46.0,valkey,0147a03cc244,0.0075,0.0,0.27,12.7 +rollout,after,46.0,k6,448a7e633a22,0.0761,0.0,0.97,402.7 +rollout,after,46.0,sampler,e76d1214732b,0.0037,0.0,0.01,1.5 +rollout,after,46.0,vm,,0.986,,2.62, +rollout,after,47.01,api-new,342603d12120,0.2996,0.0,1.56,125.8 +rollout,after,47.01,api-new,f6bff6eaee6c,0.3675,0.0,1.14,126.1 +rollout,after,47.01,postgres,c03720a13dc2,0.094,0.0,0.81,195.0 +rollout,after,47.01,haproxy,e128ee930c06,0.0214,0.0,0.76,36.2 +rollout,after,47.01,valkey,0147a03cc244,0.0079,0.0,0.33,12.9 +rollout,after,47.01,k6,448a7e633a22,0.0734,0.0,1.0,402.7 +rollout,after,47.01,sampler,e76d1214732b,0.004,0.0,0.03,1.8 +rollout,after,47.01,vm,,1.1346,,2.92, +rollout,after,48.01,api-new,342603d12120,0.3314,0.0,0.98,126.6 +rollout,after,48.01,api-new,f6bff6eaee6c,0.3278,0.0,0.6,126.5 +rollout,after,48.01,postgres,c03720a13dc2,0.1032,0.0,0.81,196.0 +rollout,after,48.01,haproxy,e128ee930c06,0.0342,0.0,0.53,36.0 +rollout,after,48.01,valkey,0147a03cc244,0.0081,0.0,0.38,12.3 +rollout,after,48.01,k6,448a7e633a22,0.0821,0.0,1.82,402.3 +rollout,after,48.01,sampler,e76d1214732b,0.0041,0.0,0.02,1.6 +rollout,after,48.01,vm,,1.5927,,11.95, +rollout,after,49.02,api-new,342603d12120,0.3226,0.0,1.29,126.3 +rollout,after,49.02,api-new,f6bff6eaee6c,0.3157,0.0,1.68,126.7 +rollout,after,49.02,postgres,c03720a13dc2,0.1042,0.0,0.72,195.9 +rollout,after,49.02,haproxy,e128ee930c06,0.0235,0.0,0.57,36.0 +rollout,after,49.02,valkey,0147a03cc244,0.0083,0.0,0.41,12.0 +rollout,after,49.02,k6,448a7e633a22,0.0856,0.0,1.13,403.0 +rollout,after,49.02,sampler,e76d1214732b,0.0046,0.0,0.21,1.7 +rollout,after,49.02,vm,,1.0941,,3.08, +rollout,after,50.02,api-new,342603d12120,0.3069,0.0,1.19,125.9 +rollout,after,50.02,api-new,f6bff6eaee6c,0.3031,0.0,1.96,126.9 +rollout,after,50.02,postgres,c03720a13dc2,0.1261,0.0,0.6,196.6 +rollout,after,50.02,haproxy,e128ee930c06,0.022,0.0,0.45,36.0 +rollout,after,50.02,valkey,0147a03cc244,0.0187,0.0,0.47,12.8 +rollout,after,50.02,k6,448a7e633a22,0.0809,0.0,1.17,402.4 +rollout,after,50.02,sampler,e76d1214732b,0.0035,0.0,0.01,1.4 +rollout,after,50.02,vm,,1.1343,,4.5, +rollout,after,51.03,api-new,342603d12120,0.3006,0.0,1.47,125.8 +rollout,after,51.03,api-new,f6bff6eaee6c,0.2985,0.0,1.41,126.2 +rollout,after,51.03,postgres,c03720a13dc2,0.0953,0.0,0.99,195.6 +rollout,after,51.03,haproxy,e128ee930c06,0.0209,0.0,0.86,36.0 +rollout,after,51.03,valkey,0147a03cc244,0.0075,0.0,0.62,12.5 +rollout,after,51.03,k6,448a7e633a22,0.0784,0.0,0.89,402.6 +rollout,after,51.03,sampler,e76d1214732b,0.0034,0.0,0.02,1.7 +rollout,after,51.03,vm,,0.9962,,2.62, +rollout,after,52.03,api-new,342603d12120,0.3015,0.0,0.53,126.0 +rollout,after,52.03,api-new,f6bff6eaee6c,0.299,0.0,1.02,125.6 +rollout,after,52.03,postgres,c03720a13dc2,0.0959,0.0,0.8,196.3 +rollout,after,52.03,haproxy,e128ee930c06,0.021,0.0,0.53,35.6 +rollout,after,52.03,valkey,0147a03cc244,0.0077,0.0,0.36,11.8 +rollout,after,52.03,k6,448a7e633a22,0.0785,0.0,1.05,403.2 +rollout,after,52.03,sampler,e76d1214732b,0.0036,0.0,0.02,1.5 +rollout,after,52.03,vm,,1.0258,,2.73, +rollout,after,53.03,api-new,342603d12120,0.3046,0.0,1.01,126.3 +rollout,after,53.03,api-new,f6bff6eaee6c,0.3053,0.0,1.31,126.2 +rollout,after,53.03,postgres,c03720a13dc2,0.0976,0.0,0.85,195.7 +rollout,after,53.03,haproxy,e128ee930c06,0.0355,0.0,0.23,36.3 +rollout,after,53.03,valkey,0147a03cc244,0.0079,0.0,0.36,12.2 +rollout,after,53.03,k6,448a7e633a22,0.0784,0.0,0.86,409.4 +rollout,after,53.03,sampler,e76d1214732b,0.0041,0.0,0.02,1.6 +rollout,after,53.03,vm,,1.0647,,3.25, +rollout,after,54.04,api-new,342603d12120,0.3096,0.0,1.12,126.3 +rollout,after,54.04,api-new,f6bff6eaee6c,0.3117,0.0,0.87,125.8 +rollout,after,54.04,postgres,c03720a13dc2,0.0984,0.0,0.95,195.5 +rollout,after,54.04,haproxy,e128ee930c06,0.0222,0.0,0.47,35.7 +rollout,after,54.04,valkey,0147a03cc244,0.0081,0.0,0.25,12.2 +rollout,after,54.04,k6,448a7e633a22,0.0778,0.0,1.3,417.0 +rollout,after,54.04,sampler,e76d1214732b,0.0038,0.0,0.01,1.7 +rollout,after,54.04,vm,,1.0248,,3.47, +rollout,after,55.04,api-new,342603d12120,0.2996,0.0,1.17,126.0 +rollout,after,55.04,api-new,f6bff6eaee6c,0.2968,0.0,1.01,126.0 +rollout,after,55.04,postgres,c03720a13dc2,0.1213,0.0,0.78,197.1 +rollout,after,55.04,haproxy,e128ee930c06,0.0213,0.0,0.37,36.4 +rollout,after,55.04,valkey,0147a03cc244,0.0208,0.0,0.38,12.7 +rollout,after,55.04,k6,448a7e633a22,0.0719,0.0,0.99,425.2 +rollout,after,55.04,sampler,e76d1214732b,0.0034,0.0,0.01,1.6 +rollout,after,55.04,vm,,1.0852,,3.19, +rollout,after,56.05,api-new,342603d12120,0.2975,0.0,2.08,126.5 +rollout,after,56.05,api-new,f6bff6eaee6c,0.2986,0.0,1.84,126.1 +rollout,after,56.05,postgres,c03720a13dc2,0.0942,0.0,1.51,196.4 +rollout,after,56.05,haproxy,e128ee930c06,0.0201,0.0,1.29,36.0 +rollout,after,56.05,valkey,0147a03cc244,0.0072,0.0,0.63,12.4 +rollout,after,56.05,k6,448a7e633a22,0.3056,0.0,4.97,438.0 +rollout,after,56.05,sampler,e76d1214732b,0.0031,0.0,0.01,1.5 +rollout,after,56.05,vm,,1.1657,,8.52, +rollout,after,57.05,api-new,342603d12120,0.3073,0.0,2.0,126.9 +rollout,after,57.05,api-new,f6bff6eaee6c,0.3054,0.0,1.85,126.0 +rollout,after,57.05,postgres,c03720a13dc2,0.0994,0.0,0.91,196.7 +rollout,after,57.05,haproxy,e128ee930c06,0.0211,0.0,0.46,36.2 +rollout,after,57.05,valkey,0147a03cc244,0.0078,0.0,0.37,12.0 +rollout,after,57.05,k6,448a7e633a22,0.0848,0.0,0.9,437.5 +rollout,after,57.05,sampler,e76d1214732b,0.0032,0.0,0.01,1.6 +rollout,after,57.05,vm,,1.0155,,2.96, +rollout,after,58.06,api-new,342603d12120,0.3777,0.0,1.18,126.7 +rollout,after,58.06,api-new,f6bff6eaee6c,0.3704,0.0,1.26,127.0 +rollout,after,58.06,postgres,c03720a13dc2,0.1242,0.0,1.45,196.9 +rollout,after,58.06,haproxy,e128ee930c06,0.0431,0.0,0.88,35.9 +rollout,after,58.06,valkey,0147a03cc244,0.0105,0.0,1.56,11.7 +rollout,after,58.06,k6,448a7e633a22,0.115,0.0,2.61,437.0 +rollout,after,58.06,sampler,e76d1214732b,0.0041,0.0,0.01,1.6 +rollout,after,58.06,vm,,1.9718,,18.63, +rollout,after,59.06,api-new,342603d12120,0.3015,0.0,1.47,126.1 +rollout,after,59.06,api-new,f6bff6eaee6c,0.3025,0.0,1.69,125.8 +rollout,after,59.06,postgres,c03720a13dc2,0.0964,0.0,0.8,196.8 +rollout,after,59.06,haproxy,e128ee930c06,0.0213,0.0,0.34,36.1 +rollout,after,59.06,valkey,0147a03cc244,0.0076,0.0,0.34,12.2 +rollout,after,59.06,k6,448a7e633a22,0.0925,0.0,1.26,437.5 +rollout,after,59.06,sampler,e76d1214732b,0.0038,0.0,0.01,1.8 +rollout,after,59.06,vm,,1.0055,,3.08, +rollout,after,60.07,api-new,342603d12120,0.3398,0.0,0.91,126.9 +rollout,after,60.07,api-new,f6bff6eaee6c,0.2823,0.0,0.89,126.1 +rollout,after,60.07,postgres,c03720a13dc2,0.1635,0.0,0.65,206.7 +rollout,after,60.07,haproxy,e128ee930c06,0.0199,0.0,0.41,35.7 +rollout,after,60.07,valkey,0147a03cc244,0.0206,0.0,0.29,13.0 +rollout,after,60.07,k6,448a7e633a22,0.0786,0.0,1.04,437.2 +rollout,after,60.07,sampler,e76d1214732b,0.0037,0.0,0.01,1.7 +rollout,after,60.07,vm,,1.135,,3.58, +rollout,after,61.07,api-new,342603d12120,0.2982,0.0,1.28,126.4 +rollout,after,61.07,api-new,f6bff6eaee6c,0.2956,0.0,1.7,126.0 +rollout,after,61.07,postgres,c03720a13dc2,0.1035,0.0,0.79,197.1 +rollout,after,61.07,haproxy,e128ee930c06,0.0208,0.0,0.48,36.5 +rollout,after,61.07,valkey,0147a03cc244,0.0076,0.0,0.4,12.2 +rollout,after,61.07,k6,448a7e633a22,0.0813,0.0,0.82,437.7 +rollout,after,61.07,sampler,e76d1214732b,0.0036,0.0,0.01,1.6 +rollout,after,61.07,vm,,0.9353,,2.75, +rollout,after,62.08,api-new,342603d12120,0.3065,0.0,1.61,126.8 +rollout,after,62.08,api-new,f6bff6eaee6c,0.3096,0.0,0.72,126.1 +rollout,after,62.08,postgres,c03720a13dc2,0.101,0.0,0.65,196.9 +rollout,after,62.08,haproxy,e128ee930c06,0.0222,0.0,0.45,36.3 +rollout,after,62.08,valkey,0147a03cc244,0.0078,0.0,0.28,12.2 +rollout,after,62.08,k6,448a7e633a22,0.0826,0.0,1.1,438.0 +rollout,after,62.08,sampler,e76d1214732b,0.0046,0.0,0.02,1.6 +rollout,after,62.08,vm,,1.0351,,2.73, +rollout,after,63.08,api-new,342603d12120,0.2946,0.0,1.43,126.5 +rollout,after,63.08,api-new,f6bff6eaee6c,0.2898,0.0,1.58,126.2 +rollout,after,63.08,postgres,c03720a13dc2,0.093,0.0,0.9,197.0 +rollout,after,63.08,haproxy,e128ee930c06,0.0332,0.0,0.45,36.3 +rollout,after,63.08,valkey,0147a03cc244,0.0073,0.0,0.29,12.4 +rollout,after,63.08,k6,448a7e633a22,0.0755,0.0,0.97,437.9 +rollout,after,63.08,sampler,e76d1214732b,0.004,0.0,0.01,1.8 +rollout,after,63.08,vm,,0.9744,,2.79, +rollout,after,64.09,api-new,342603d12120,0.3195,0.0,1.28,126.6 +rollout,after,64.09,api-new,f6bff6eaee6c,0.3961,0.0,1.77,126.7 +rollout,after,64.09,postgres,c03720a13dc2,0.0972,0.0,0.54,196.8 +rollout,after,64.09,haproxy,e128ee930c06,0.0216,0.0,0.43,36.1 +rollout,after,64.09,valkey,0147a03cc244,0.0078,0.0,0.25,12.4 +rollout,after,64.09,k6,448a7e633a22,0.0817,0.0,1.0,438.1 +rollout,after,64.09,sampler,e76d1214732b,0.0042,0.0,0.33,1.8 +rollout,after,64.09,vm,,1.1236,,3.87, +rollout,after,65.09,api-new,342603d12120,0.3046,0.0,1.27,125.8 +rollout,after,65.09,api-new,f6bff6eaee6c,0.3056,0.0,0.89,127.1 +rollout,after,65.09,postgres,c03720a13dc2,0.1083,0.0,0.94,203.9 +rollout,after,65.09,haproxy,e128ee930c06,0.0212,0.0,0.17,36.4 +rollout,after,65.09,valkey,0147a03cc244,0.0218,0.0,0.36,13.0 +rollout,after,65.09,k6,448a7e633a22,0.0806,0.0,0.84,437.3 +rollout,after,65.09,sampler,e76d1214732b,0.0035,0.0,0.21,1.6 +rollout,after,65.09,vm,,1.1149,,3.68, +rollout,after,66.1,api-new,342603d12120,0.3006,0.0,0.76,126.0 +rollout,after,66.1,api-new,f6bff6eaee6c,0.2934,0.0,1.42,127.1 +rollout,after,66.1,postgres,c03720a13dc2,0.1147,0.0,0.75,197.1 +rollout,after,66.1,haproxy,e128ee930c06,0.0207,0.0,0.43,35.9 +rollout,after,66.1,valkey,0147a03cc244,0.0076,0.0,0.28,12.7 +rollout,after,66.1,k6,448a7e633a22,0.078,0.0,0.9,437.6 +rollout,after,66.1,sampler,e76d1214732b,0.004,0.0,0.02,1.4 +rollout,after,66.1,vm,,1.0241,,2.89, +rollout,after,67.1,api-new,342603d12120,0.3081,0.0,1.95,126.5 +rollout,after,67.1,api-new,f6bff6eaee6c,0.3035,0.0,2.05,126.7 +rollout,after,67.1,postgres,c03720a13dc2,0.0976,0.0,1.34,196.9 +rollout,after,67.1,haproxy,e128ee930c06,0.0213,0.0,0.51,35.7 +rollout,after,67.1,valkey,0147a03cc244,0.0079,0.0,0.53,12.3 +rollout,after,67.1,k6,448a7e633a22,0.0796,0.0,0.98,437.3 +rollout,after,67.1,sampler,e76d1214732b,0.0038,0.0,0.01,1.6 +rollout,after,67.1,vm,,0.9851,,2.85, +rollout,after,68.11,api-new,342603d12120,0.3195,0.0,1.48,127.2 +rollout,after,68.11,api-new,f6bff6eaee6c,0.3155,0.0,2.01,126.9 +rollout,after,68.11,postgres,c03720a13dc2,0.1013,0.0,0.78,197.2 +rollout,after,68.11,haproxy,e128ee930c06,0.0328,0.0,0.35,36.1 +rollout,after,68.11,valkey,0147a03cc244,0.0081,0.0,0.82,12.2 +rollout,after,68.11,k6,448a7e633a22,0.0815,0.0,1.69,437.8 +rollout,after,68.11,sampler,e76d1214732b,0.0039,0.0,0.02,1.7 +rollout,after,68.11,vm,,1.6617,,14.62, +rollout,after,69.11,api-new,342603d12120,0.3321,0.0,1.78,126.6 +rollout,after,69.11,api-new,f6bff6eaee6c,0.3275,0.0,1.91,127.1 +rollout,after,69.11,postgres,c03720a13dc2,0.1059,0.0,0.75,197.6 +rollout,after,69.11,haproxy,e128ee930c06,0.0232,0.0,0.41,36.1 +rollout,after,69.11,valkey,0147a03cc244,0.008,0.0,0.29,12.0 +rollout,after,69.11,k6,448a7e633a22,0.0809,0.0,1.06,438.2 +rollout,after,69.11,sampler,e76d1214732b,0.0042,0.0,0.01,1.8 +rollout,after,69.11,vm,,1.1021,,3.11, +rollout,after,70.12,api-new,342603d12120,0.3129,0.0,0.84,126.9 +rollout,after,70.12,api-new,f6bff6eaee6c,0.3135,0.0,0.97,126.8 +rollout,after,70.12,postgres,c03720a13dc2,0.1016,0.0,0.71,199.2 +rollout,after,70.12,haproxy,e128ee930c06,0.0229,0.0,0.45,36.1 +rollout,after,70.12,valkey,0147a03cc244,0.019,0.0,0.31,13.1 +rollout,after,70.12,k6,448a7e633a22,0.0807,0.0,1.02,437.8 +rollout,after,70.12,sampler,e76d1214732b,0.0045,0.0,0.03,1.3 +rollout,after,70.12,vm,,1.1142,,3.72, +rollout,after,71.12,api-new,342603d12120,0.2955,0.0,1.49,126.2 +rollout,after,71.12,api-new,f6bff6eaee6c,0.2983,0.0,1.57,126.3 +rollout,after,71.12,postgres,c03720a13dc2,0.1209,0.0,0.8,197.5 +rollout,after,71.12,haproxy,e128ee930c06,0.0209,0.0,0.36,35.8 +rollout,after,71.12,valkey,0147a03cc244,0.0073,0.0,0.44,13.1 +rollout,after,71.12,k6,448a7e633a22,0.0787,0.0,0.95,437.6 +rollout,after,71.12,sampler,e76d1214732b,0.004,0.0,0.09,1.5 +rollout,after,71.12,vm,,1.0346,,2.84, +rollout,after,72.13,api-new,342603d12120,0.3125,0.0,2.04,126.4 +rollout,after,72.13,api-new,f6bff6eaee6c,0.3083,0.0,2.2,126.5 +rollout,after,72.13,postgres,c03720a13dc2,0.0997,0.0,0.64,197.9 +rollout,after,72.13,haproxy,e128ee930c06,0.0226,0.0,0.41,35.3 +rollout,after,72.13,valkey,0147a03cc244,0.0081,0.0,0.34,12.4 +rollout,after,72.13,k6,448a7e633a22,0.0837,0.0,1.09,437.7 +rollout,after,72.13,sampler,e76d1214732b,0.0035,0.0,0.01,1.9 +rollout,after,72.13,vm,,1.0547,,2.83, +rollout,after,73.13,api-new,342603d12120,0.2899,0.0,1.57,126.5 +rollout,after,73.13,api-new,f6bff6eaee6c,0.2905,0.0,1.85,127.0 +rollout,after,73.13,postgres,c03720a13dc2,0.0916,0.0,0.81,198.2 +rollout,after,73.13,haproxy,e128ee930c06,0.032,0.0,0.22,35.8 +rollout,after,73.13,valkey,0147a03cc244,0.007,0.0,0.55,11.9 +rollout,after,73.13,k6,448a7e633a22,0.0779,0.0,0.92,438.1 +rollout,after,73.13,sampler,e76d1214732b,0.0039,0.0,0.01,1.6 +rollout,after,73.13,vm,,1.0058,,3.03, +rollout,after,74.14,api-new,342603d12120,0.3098,0.0,2.15,126.7 +rollout,after,74.14,api-new,f6bff6eaee6c,0.3029,0.0,1.4,126.9 +rollout,after,74.14,postgres,c03720a13dc2,0.0955,0.0,0.67,198.0 +rollout,after,74.14,haproxy,e128ee930c06,0.0211,0.0,0.91,36.5 +rollout,after,74.14,valkey,0147a03cc244,0.0077,0.0,0.38,11.9 +rollout,after,74.14,k6,448a7e633a22,0.0872,0.0,1.05,437.5 +rollout,after,74.14,sampler,e76d1214732b,0.0041,0.0,0.02,1.8 +rollout,after,74.14,vm,,1.0345,,2.74, +rollout,after,75.14,api-new,342603d12120,0.2996,0.0,1.83,126.3 +rollout,after,75.14,api-new,f6bff6eaee6c,0.2983,0.0,1.15,126.2 +rollout,after,75.14,postgres,c03720a13dc2,0.0953,0.0,0.92,198.3 +rollout,after,75.14,haproxy,e128ee930c06,0.0207,0.0,0.24,36.7 +rollout,after,75.14,valkey,0147a03cc244,0.0198,0.0,0.24,12.5 +rollout,after,75.14,k6,448a7e633a22,0.077,0.0,0.9,438.1 +rollout,after,75.14,sampler,e76d1214732b,0.0042,0.0,0.02,1.7 +rollout,after,75.14,vm,,1.0253,,3.02, +rollout,after,76.15,api-new,342603d12120,0.3154,0.0,5.37,126.2 +rollout,after,76.15,api-new,f6bff6eaee6c,0.3107,0.0,1.06,126.1 +rollout,after,76.15,postgres,c03720a13dc2,0.1239,0.0,0.96,198.7 +rollout,after,76.15,haproxy,e128ee930c06,0.0225,0.0,0.9,35.7 +rollout,after,76.15,valkey,0147a03cc244,0.0077,0.0,0.7,12.5 +rollout,after,76.15,k6,448a7e633a22,0.3629,0.0,3.85,454.6 +rollout,after,76.15,sampler,e76d1214732b,0.0036,0.0,0.01,1.6 +rollout,after,76.15,vm,,1.3733,,9.29, +rollout,after,77.15,api-new,342603d12120,0.3673,0.0,1.9,126.9 +rollout,after,77.15,api-new,f6bff6eaee6c,0.2881,0.0,1.33,126.6 +rollout,after,77.15,postgres,c03720a13dc2,0.089,0.0,0.68,198.8 +rollout,after,77.15,haproxy,e128ee930c06,0.0192,0.0,0.3,36.1 +rollout,after,77.15,valkey,0147a03cc244,0.007,0.0,0.19,12.2 +rollout,after,77.15,k6,448a7e633a22,0.076,0.0,0.97,454.4 +rollout,after,77.15,sampler,e76d1214732b,0.0038,0.0,0.01,1.6 +rollout,after,77.15,vm,,1.0155,,2.44, +rollout,after,78.16,api-new,342603d12120,0.3385,0.0,0.98,127.5 +rollout,after,78.16,api-new,f6bff6eaee6c,0.345,0.0,1.39,126.8 +rollout,after,78.16,postgres,c03720a13dc2,0.1253,0.0,1.06,198.9 +rollout,after,78.16,haproxy,e128ee930c06,0.0361,0.0,1.72,35.7 +rollout,after,78.16,valkey,0147a03cc244,0.0089,0.0,0.28,12.0 +rollout,after,78.16,k6,448a7e633a22,0.0978,0.0,1.64,454.3 +rollout,after,78.16,sampler,e76d1214732b,0.004,0.0,0.03,1.6 +rollout,after,78.16,vm,,1.821,,17.27, +rollout,after,79.16,api-new,342603d12120,0.3246,0.0,2.17,127.3 +rollout,after,79.16,api-new,f6bff6eaee6c,0.3229,0.0,1.16,126.8 +rollout,after,79.16,postgres,c03720a13dc2,0.1021,0.0,0.87,199.0 +rollout,after,79.16,haproxy,e128ee930c06,0.0229,0.0,0.61,35.8 +rollout,after,79.16,valkey,0147a03cc244,0.0085,0.0,0.43,12.2 +rollout,after,79.16,k6,448a7e633a22,0.0932,0.0,1.06,454.2 +rollout,after,79.16,sampler,e76d1214732b,0.0047,0.0,0.02,1.7 +rollout,after,79.16,vm,,1.0841,,2.8, +rollout,after,80.17,api-new,342603d12120,0.3325,0.0,1.34,126.8 +rollout,after,80.17,api-new,f6bff6eaee6c,0.4376,0.0,1.19,126.9 +rollout,after,80.17,postgres,c03720a13dc2,0.1131,0.0,0.76,199.2 +rollout,after,80.17,haproxy,e128ee930c06,0.0248,0.0,0.53,36.6 +rollout,after,80.17,valkey,0147a03cc244,0.0194,0.0,0.4,12.3 +rollout,after,80.17,k6,448a7e633a22,0.0947,0.0,1.18,454.4 +rollout,after,80.17,sampler,e76d1214732b,0.0042,0.0,0.01,1.6 +rollout,after,80.17,vm,,1.3226,,4.31, +rollout,after,81.17,api-new,342603d12120,0.3014,0.0,1.61,127.1 +rollout,after,81.17,api-new,f6bff6eaee6c,0.2971,0.0,1.23,126.7 +rollout,after,81.17,postgres,c03720a13dc2,0.1208,0.0,0.75,199.5 +rollout,after,81.17,haproxy,e128ee930c06,0.0206,0.0,0.3,36.0 +rollout,after,81.17,valkey,0147a03cc244,0.0074,0.0,0.34,12.4 +rollout,after,81.17,k6,448a7e633a22,0.0853,0.0,1.03,454.9 +rollout,after,81.17,sampler,e76d1214732b,0.0036,0.0,0.01,1.8 +rollout,after,81.17,vm,,1.0542,,3.39, +rollout,after,82.18,api-new,342603d12120,0.3474,0.0,1.14,126.8 +rollout,after,82.18,api-new,f6bff6eaee6c,0.3486,0.0,2.12,127.3 +rollout,after,82.18,postgres,c03720a13dc2,0.1058,0.0,0.76,199.4 +rollout,after,82.18,haproxy,e128ee930c06,0.0253,0.0,0.43,35.8 +rollout,after,82.18,valkey,0147a03cc244,0.008,0.0,0.45,11.7 +rollout,after,82.18,k6,448a7e633a22,0.1057,0.0,1.69,454.1 +rollout,after,82.18,sampler,e76d1214732b,0.0038,0.0,0.01,1.7 +rollout,after,82.18,vm,,1.1849,,3.29, +rollout,after,83.18,api-new,342603d12120,0.3026,0.0,2.01,126.7 +rollout,after,83.18,api-new,f6bff6eaee6c,0.3036,0.0,1.05,126.4 +rollout,after,83.18,postgres,c03720a13dc2,0.0934,0.0,0.97,198.9 +rollout,after,83.18,haproxy,e128ee930c06,0.0352,0.0,0.28,36.3 +rollout,after,83.18,valkey,0147a03cc244,0.0075,0.0,0.29,12.0 +rollout,after,83.18,k6,448a7e633a22,0.0843,0.0,0.76,454.3 +rollout,after,83.18,sampler,e76d1214732b,0.0036,0.0,0.01,1.6 +rollout,after,83.18,vm,,1.0555,,3.02, +rollout,after,84.19,api-new,342603d12120,0.3359,0.0,0.85,126.8 +rollout,after,84.19,api-new,f6bff6eaee6c,0.3346,0.0,0.92,127.2 +rollout,after,84.19,postgres,c03720a13dc2,0.1046,0.0,1.14,199.9 +rollout,after,84.19,haproxy,e128ee930c06,0.0237,0.0,0.38,36.1 +rollout,after,84.19,valkey,0147a03cc244,0.008,0.0,0.32,12.0 +rollout,after,84.19,k6,448a7e633a22,0.1005,0.0,1.1,454.3 +rollout,after,84.19,sampler,e76d1214732b,0.0037,0.0,0.03,1.5 +rollout,after,84.19,vm,,1.1352,,2.88, +rollout,after,85.19,api-new,342603d12120,0.3054,0.0,1.07,127.2 +rollout,after,85.19,api-new,f6bff6eaee6c,0.3048,0.0,1.77,126.6 +rollout,after,85.19,postgres,c03720a13dc2,0.0981,0.0,0.95,200.5 +rollout,after,85.19,haproxy,e128ee930c06,0.0223,0.0,0.15,35.9 +rollout,after,85.19,valkey,0147a03cc244,0.0239,0.0,0.4,12.8 +rollout,after,85.19,k6,448a7e633a22,0.0791,0.0,0.92,455.0 +rollout,after,85.19,sampler,e76d1214732b,0.0034,0.0,0.01,1.6 +rollout,after,85.19,vm,,1.0853,,2.99, +rollout,after,86.2,api-new,342603d12120,0.2991,0.0,1.2,126.5 +rollout,after,86.2,api-new,f6bff6eaee6c,0.2985,0.0,1.99,126.5 +rollout,after,86.2,postgres,c03720a13dc2,0.1241,0.0,0.83,199.7 +rollout,after,86.2,haproxy,e128ee930c06,0.0213,0.0,0.51,36.3 +rollout,after,86.2,valkey,0147a03cc244,0.0076,0.0,0.31,12.3 +rollout,after,86.2,k6,448a7e633a22,0.0802,0.0,1.17,454.1 +rollout,after,86.2,sampler,e76d1214732b,0.0036,0.0,0.02,1.6 +rollout,after,86.2,vm,,1.0354,,3.13, +rollout,after,87.2,api-new,342603d12120,0.3072,0.0,1.6,126.5 +rollout,after,87.2,api-new,f6bff6eaee6c,0.3072,0.0,1.1,127.1 +rollout,after,87.2,postgres,c03720a13dc2,0.0977,0.0,1.16,200.5 +rollout,after,87.2,haproxy,e128ee930c06,0.0214,0.0,0.35,36.2 +rollout,after,87.2,valkey,0147a03cc244,0.008,0.0,0.35,12.2 +rollout,after,87.2,k6,448a7e633a22,0.08,0.0,0.74,454.5 +rollout,after,87.2,sampler,e76d1214732b,0.0033,0.0,0.01,1.7 +rollout,after,87.2,vm,,1.0359,,2.63, +rollout,after,88.2,api-new,342603d12120,0.3212,0.0,1.07,126.7 +rollout,after,88.2,api-new,f6bff6eaee6c,0.3239,0.0,0.81,127.0 +rollout,after,88.2,postgres,c03720a13dc2,0.1032,0.0,1.27,200.6 +rollout,after,88.2,haproxy,e128ee930c06,0.0379,0.0,0.71,35.9 +rollout,after,88.2,valkey,0147a03cc244,0.0077,0.0,0.3,11.9 +rollout,after,88.2,k6,448a7e633a22,0.0852,0.0,2.76,454.6 +rollout,after,88.2,sampler,e76d1214732b,0.003,0.0,0.02,1.4 +rollout,after,88.2,vm,,1.7028,,18.85, +rollout,after,89.21,api-new,342603d12120,0.3047,0.0,1.78,126.3 +rollout,after,89.21,api-new,f6bff6eaee6c,0.3023,0.0,1.56,126.4 +rollout,after,89.21,postgres,c03720a13dc2,0.0951,0.0,1.01,200.1 +rollout,after,89.21,haproxy,e128ee930c06,0.0212,0.0,0.42,36.4 +rollout,after,89.21,valkey,0147a03cc244,0.0076,0.0,0.44,12.2 +rollout,after,89.21,k6,448a7e633a22,0.0796,0.0,0.98,454.3 +rollout,after,89.21,sampler,e76d1214732b,0.0033,0.0,0.01,1.8 +rollout,after,89.21,vm,,1.0559,,2.96, +rollout,after,90.21,api-new,342603d12120,0.3047,0.0,1.45,126.6 +rollout,after,90.21,api-new,f6bff6eaee6c,0.3068,0.0,0.54,126.7 +rollout,after,90.21,postgres,c03720a13dc2,0.0988,0.0,0.78,200.5 +rollout,after,90.21,haproxy,e128ee930c06,0.0209,0.0,0.52,36.5 +rollout,after,90.21,valkey,0147a03cc244,0.0215,0.0,0.62,12.5 +rollout,after,90.21,k6,448a7e633a22,0.0789,0.0,1.03,454.0 +rollout,after,90.21,sampler,e76d1214732b,0.0031,0.0,0.01,1.6 +rollout,after,90.21,vm,,1.0854,,3.53, +rollout,after,91.22,api-new,342603d12120,0.3006,0.0,0.94,126.6 +rollout,after,91.22,api-new,f6bff6eaee6c,0.3003,0.0,1.84,127.1 +rollout,after,91.22,postgres,c03720a13dc2,0.1204,0.0,0.69,200.4 +rollout,after,91.22,haproxy,e128ee930c06,0.0203,0.0,0.3,36.0 +rollout,after,91.22,valkey,0147a03cc244,0.0073,0.0,0.61,12.0 +rollout,after,91.22,k6,448a7e633a22,0.0773,0.0,1.06,454.7 +rollout,after,91.22,sampler,e76d1214732b,0.004,0.0,0.03,1.5 +rollout,after,91.22,vm,,1.0261,,3.06, +rollout,after,92.22,api-new,342603d12120,0.3032,0.0,1.13,126.6 +rollout,after,92.22,api-new,f6bff6eaee6c,0.3003,0.0,1.2,126.5 +rollout,after,92.22,postgres,c03720a13dc2,0.1001,0.0,0.8,200.4 +rollout,after,92.22,haproxy,e128ee930c06,0.0211,0.0,0.49,36.2 +rollout,after,92.22,valkey,0147a03cc244,0.0081,0.0,0.25,12.2 +rollout,after,92.22,k6,448a7e633a22,0.0793,0.0,1.01,454.7 +rollout,after,92.22,sampler,e76d1214732b,0.004,0.0,0.02,1.7 +rollout,after,92.22,vm,,0.9847,,2.52, +rollout,after,93.23,api-new,342603d12120,0.3755,0.0,1.3,126.8 +rollout,after,93.23,api-new,f6bff6eaee6c,0.3014,0.0,1.37,127.5 +rollout,after,93.23,postgres,c03720a13dc2,0.0933,0.0,0.8,200.7 +rollout,after,93.23,haproxy,e128ee930c06,0.0337,0.0,0.45,36.6 +rollout,after,93.23,valkey,0147a03cc244,0.0073,0.0,0.44,11.7 +rollout,after,93.23,k6,448a7e633a22,0.0785,0.0,0.9,455.4 +rollout,after,93.23,sampler,e76d1214732b,0.0043,0.0,0.01,1.8 +rollout,after,93.23,vm,,1.0948,,2.83, +rollout,after,94.23,api-new,342603d12120,0.3099,0.0,1.6,126.8 +rollout,after,94.23,api-new,f6bff6eaee6c,0.3063,0.0,1.96,126.8 +rollout,after,94.23,postgres,c03720a13dc2,0.0976,0.0,0.68,201.0 +rollout,after,94.23,haproxy,e128ee930c06,0.0225,0.0,0.39,35.9 +rollout,after,94.23,valkey,0147a03cc244,0.0075,0.0,0.32,12.0 +rollout,after,94.23,k6,448a7e633a22,0.0806,0.0,1.12,454.6 +rollout,after,94.23,sampler,e76d1214732b,0.004,0.0,0.01,1.4 +rollout,after,94.23,vm,,0.9949,,2.88, +rollout,after,95.24,api-new,342603d12120,0.3113,0.0,0.73,126.8 +rollout,after,95.24,api-new,f6bff6eaee6c,0.3085,0.0,1.22,126.5 +rollout,after,95.24,postgres,c03720a13dc2,0.0982,0.0,0.96,201.2 +rollout,after,95.24,haproxy,e128ee930c06,0.0225,0.0,0.55,35.8 +rollout,after,95.24,valkey,0147a03cc244,0.0216,0.0,0.36,13.3 +rollout,after,95.24,k6,448a7e633a22,0.084,0.0,0.96,453.9 +rollout,after,95.24,sampler,e76d1214732b,0.0043,0.0,0.03,1.5 +rollout,after,95.24,vm,,1.075,,2.93, +rollout,after,96.24,api-new,342603d12120,0.307,0.0,1.9,127.1 +rollout,after,96.24,api-new,f6bff6eaee6c,0.3886,0.0,1.0,126.6 +rollout,after,96.24,postgres,c03720a13dc2,0.1153,0.0,0.6,201.3 +rollout,after,96.24,haproxy,e128ee930c06,0.0206,0.0,0.5,35.9 +rollout,after,96.24,valkey,0147a03cc244,0.0071,0.0,0.28,12.3 +rollout,after,96.24,k6,448a7e633a22,0.0824,0.0,1.09,455.2 +rollout,after,96.24,sampler,e76d1214732b,0.0036,0.0,0.01,1.7 +rollout,after,96.24,vm,,1.1143,,3.31, +rollout,after,97.24,api-new,342603d12120,0.3188,0.0,2.46,127.3 +rollout,after,97.24,api-new,f6bff6eaee6c,0.3114,0.0,2.66,126.5 +rollout,after,97.24,postgres,c03720a13dc2,0.0955,0.0,1.06,201.1 +rollout,after,97.24,haproxy,e128ee930c06,0.0214,0.0,0.64,36.0 +rollout,after,97.24,valkey,0147a03cc244,0.0074,0.0,0.63,12.2 +rollout,after,97.24,k6,448a7e633a22,0.3681,0.0,5.06,454.9 +rollout,after,97.24,sampler,e76d1214732b,0.0037,0.0,0.02,1.6 +rollout,after,97.24,vm,,1.3147,,9.56, +rollout,after,98.25,api-new,342603d12120,0.3362,0.0,0.89,126.7 +rollout,after,98.25,api-new,f6bff6eaee6c,0.3463,0.0,1.24,127.2 +rollout,after,98.25,postgres,c03720a13dc2,0.1104,0.0,1.18,201.8 +rollout,after,98.25,haproxy,e128ee930c06,0.0383,0.0,0.55,36.2 +rollout,after,98.25,valkey,0147a03cc244,0.0087,0.0,0.37,12.5 +rollout,after,98.25,k6,448a7e633a22,0.1063,0.0,3.17,454.7 +rollout,after,98.25,sampler,e76d1214732b,0.004,0.0,0.01,1.6 +rollout,after,98.25,vm,,1.955,,23.06, +rollout,after,99.26,api-new,342603d12120,0.3053,0.0,1.41,127.0 +rollout,after,99.26,api-new,f6bff6eaee6c,0.302,0.0,1.57,126.9 +rollout,after,99.26,postgres,c03720a13dc2,0.1017,0.0,0.68,201.0 +rollout,after,99.26,haproxy,e128ee930c06,0.0217,0.0,0.28,36.2 +rollout,after,99.26,valkey,0147a03cc244,0.0072,0.0,0.34,12.0 +rollout,after,99.26,k6,448a7e633a22,0.0876,0.0,0.97,454.8 +rollout,after,99.26,sampler,e76d1214732b,0.0052,0.0,0.02,1.7 +rollout,after,99.26,vm,,1.0945,,3.51, +rollout,after,100.26,api-new,342603d12120,0.3162,0.0,1.09,127.2 +rollout,after,100.26,api-new,f6bff6eaee6c,0.3152,0.0,1.58,126.9 +rollout,after,100.26,postgres,c03720a13dc2,0.1008,0.0,0.77,201.4 +rollout,after,100.26,haproxy,e128ee930c06,0.0224,0.0,0.4,35.6 +rollout,after,100.26,valkey,0147a03cc244,0.0247,0.0,0.22,12.8 +rollout,after,100.26,k6,448a7e633a22,0.0964,0.0,1.13,455.3 +rollout,after,100.26,sampler,e76d1214732b,0.0048,0.0,0.02,1.7 +rollout,after,100.26,vm,,1.1129,,4.61, +rollout,after,101.27,api-new,342603d12120,0.3038,0.0,1.25,127.0 +rollout,after,101.27,api-new,f6bff6eaee6c,0.2987,0.0,1.27,126.2 +rollout,after,101.27,postgres,c03720a13dc2,0.1243,0.0,0.8,201.2 +rollout,after,101.27,haproxy,e128ee930c06,0.0216,0.0,0.3,36.3 +rollout,after,101.27,valkey,0147a03cc244,0.0075,0.0,0.5,12.2 +rollout,after,101.27,k6,448a7e633a22,0.0898,0.0,0.86,454.9 +rollout,after,101.27,sampler,e76d1214732b,0.004,0.0,0.01,1.7 +rollout,after,101.27,vm,,1.0451,,2.92, +rollout,after,102.27,api-new,342603d12120,0.3061,0.0,1.05,127.1 +rollout,after,102.27,api-new,f6bff6eaee6c,0.3051,0.0,1.23,126.5 +rollout,after,102.27,postgres,c03720a13dc2,0.0973,0.0,0.62,201.6 +rollout,after,102.27,haproxy,e128ee930c06,0.0216,0.0,0.41,36.1 +rollout,after,102.27,valkey,0147a03cc244,0.0076,0.0,0.47,12.0 +rollout,after,102.27,k6,448a7e633a22,0.0865,0.0,1.01,454.8 +rollout,after,102.27,sampler,e76d1214732b,0.0041,0.0,0.02,1.7 +rollout,after,102.27,vm,,1.0346,,2.58, +rollout,after,103.28,api-new,342603d12120,0.3091,0.0,1.16,127.0 +rollout,after,103.28,api-new,f6bff6eaee6c,0.3041,0.0,0.88,126.6 +rollout,after,103.28,postgres,c03720a13dc2,0.0983,0.0,0.65,202.4 +rollout,after,103.28,haproxy,e128ee930c06,0.0335,0.0,0.3,36.5 +rollout,after,103.28,valkey,0147a03cc244,0.0078,0.0,0.61,12.0 +rollout,after,103.28,k6,448a7e633a22,0.1005,0.0,0.93,455.2 +rollout,after,103.28,sampler,e76d1214732b,0.0034,0.0,0.01,1.5 +rollout,after,103.28,vm,,1.0052,,2.84, diff --git a/evidence/rollout/unit-of-work/summary.md b/evidence/rollout/unit-of-work/summary.md new file mode 100644 index 00000000..306ae065 --- /dev/null +++ b/evidence/rollout/unit-of-work/summary.md @@ -0,0 +1,94 @@ +# Поочерёдная замена реплик под нагрузкой: метка `unit-of-work` + +- Статус: **complete** +- Commit: `6ba74b1` +- Профиль `rollout`: 2 реплики за HAProxy; замена с образа commit `7f38948` на образ текущего checkout (`scripts/rolling-update.sh`); 100 записей с ключом и 100 чтений страницы истории в секунду (k6, постоянная интенсивность); окна: 15 с до запуска скрипта, бюджет замены 90 с, ещё 15 с; порог доли успешных 99% +- Лимиты без swap: API 1 CPU / 512m на реплику, HAProxy 1 CPU / 256m, PostgreSQL 2 CPU / 1g, Valkey 0.5 CPU / 128m, сэмплер 0.25 CPU / 128m, k6 без лимита +- Посторонние контейнеры в VM во время замера: domains-api-1, domains-bot-1, domains-postgres-1 + +Время — секунды на часах ВМ Docker от начала замены (создание контейнера миграции). Шаги — события Docker (создание и старт новой реплики, SIGTERM, выход и удаление старой) и журнал HAProxy (`UP` новой, `drain` и `maint` старой, возврат слота в `ready`). Ответы — отметки k6 при отправке; «старые» и «новые» — по `X-Instance-Id` контейнеров до и после замены. Окно замены — от начала до удаления последней старой реплики. Сверка — после повтора неуспешных записей с тем же ключом: сообщений в чате записи и разных текстов столько, сколько отправлено ключей. + +| Замена, с | Сборка / миграция, с | Ревизия до → после | Ошибки до / во время / после | Мин. доля успешных | Секунд ниже порога | Успешных в секунду: до / мин. во время | p95: до / макс. во время, мс | Первый ответ новой / последний старой, с | Ответов старых после дренажа | Повтор записей | Сообщений = ключей | Пометки | +|---|---|---|---|---|---|---|---|---|---|---|---|---| +| 8.68 | 0 / 2 | `a1d4c7e90b23` → `d3f9a6b2c1e7` | 0 / 0 / 0 | 1 | 0 | 200 / 200 | 6 / 161 | 4.45 / 7.92 | 0 | 0 → 0 | 12001 = 12001 | — | + +## Шаги по репликам + +| Шаг | Новая (слот) | Старая (слот) | Новая создана, с | Новая `UP`, с | Старт → `UP`, с | Дренаж, с | Остановка, с | Старая удалена, с | Слот `ready`, с | Замена целиком, с | Ошибок за шаг | Ответов старой после дренажа | +|---|---|---|---|---|---|---|---|---|---|---|---|---| +| 1 | `342603d12120` (api-3) | `81247d9d1f35` (api-2) | 2.29 | 4.44 | 2.01 | 0.15 | 0.51 | 5.74 | 5.93 | 3.45 | 0 | 0 | +| 2 | `f6bff6eaee6c` (api-2) | `9b70bf3317f6` (api-1) | 6.16 | 7.47 | 1.18 | 0.15 | 0.42 | 8.68 | 9.96 | 2.52 | 0 | 0 | + +## Ресурсы по окнам замены + +Ресурсы — сэмплер `bench/sampler.sh` в режиме `scan` (свой контейнер без сети, лимит 0,25 CPU / 128 МиБ): раз в секунду счётчики cgroup каждого контейнера стенда, k6 и самого сэмплера и `/proc/stat` ВМ, на тех же часах ВМ, что шкала. Ячейка — среднее CPU за окно (CPU-секунды / длина окна, ядер) / наибольшее посекундное: CPU интервала между отсчётами / его длина по всем интервалам, задевающим окно, включая граничный (у заморозки — только с CPU в окне); строка граничного интервала в `samples.csv` помечена соседним окном (окно строки — по концу интервала, у заморозки — по концу незамороженной части); пик памяти cgroup (`memory.current`, с кэшем файлов) по отсчётам, МиБ; «(N с)» — сколько секунд окна контейнер существовал, если меньше окна; «нет» — контейнера не было ни в одном отсчёте. API всего — сумма по репликам, пик — наибольшая сумма памяти на одном отсчёте. ВМ — занятые ядра ВМ Docker целиком (в них и k6, и сэмплер). Полные значения — `resources.csv`, посекундные — `samples.csv`. + +Окна (секунды от начала замены): до — от первого запроса + 2 с (разгон k6) до первого обращения скрипта к стенду (`exec_start` в событиях проекта, кроме проверок здоровья контейнеров); подготовка — проверки скрипта и сборка образа до создания контейнера миграции; замена — до удаления последней старой реплики; после — до отправки последнего запроса. Старые и новые реплики — каждая отдельно со своим `X-Instance-Id`; на пике замены работают три реплики. + +| Компонент | до (-14.48…-1.43 с) | подготовка (-1.43…0 с) | замена (0…8.68 с) | после (8.68…103.51 с) | +|---|---|---|---|---| +| старая `81247d9d1f35` | 0.31 / 0.35; 124 | 0.34 / 0.34; 125 | 0.18 / 0.45; 127 (4.81 с) | 0.00 / — (0 с) | +| старая `9b70bf3317f6` | 0.31 / 0.37; 124 | 0.34 / 0.34; 125 | 0.29 / 0.37; 127 (7.82 с) | 0.00 / — (0 с) | +| новая `342603d12120` | 0.00 / — (0 с) | 0.00 / — (0 с) | 0.33 / 1.05; 111 (6.25 с) | 0.31 / 0.40; 128 | +| новая `f6bff6eaee6c` | 0.00 / — (0 с) | 0.00 / — (0 с) | 0.20 / 1.03; 107 (2.38 с) | 0.31 / 0.44; 128 | +| API всего | 0.62 / 0.67; 248 | 0.67 / 0.68; 249 | 0.99 / 1.88; 359 | 0.62 / 0.84; 254 | +| миграция `e5c77588635a` | 0.00 / — (0 с) | 0.00 / — (0 с) | 0.10 / 0.57; 72 (1.64 с) | 0.00 / — (0 с) | +| PostgreSQL `c03720a13dc2` | 0.10 / 0.15; 182 | 0.15 / 0.17; 183 | 0.14 / 0.20; 210 | 0.10 / 0.18; 207 | +| HAProxy `e128ee930c06` | 0.04 / 0.05; 34 | 0.06 / 0.07; 34 | 0.06 / 0.10; 35 | 0.03 / 0.10; 37 | +| Valkey `0147a03cc244` | 0.01 / 0.04; 13 | 0.02 / 0.02; 13 | 0.01 / 0.02; 13 | 0.01 / 0.02; 13 | +| k6 `448a7e633a22` | 0.12 / 0.30; 345 | 0.11 / 0.12; 345 | 0.14 / 0.45; 400 | 0.10 / 0.37; 455 | +| сэмплер `e76d1214732b` | 0.00 / 0.00; 2 | 0.00 / 0.00; 2 | 0.00 / 0.01; 2 | 0.00 / 0.01; 2 | +| ВМ | 1.21 / 1.83 | 2.14 / 3.32 | 2.57 / 3.54 | 1.14 / 2.97 | + +### CPU на успешный запрос до и после замены, мкс + +CPU компонента × 10⁶ / успешных в секунду в окнах до и после: две реплики одной версии, скрипт не работает. В подготовке и замене CPU на запрос не считается: CPU там идёт на сборку образа, миграцию, запуск третьей реплики, дренаж и остановку старой — цену процедуры, а не запросов; там — только абсолютные числа выше. Смесь (50 % записи, 50 % чтения страницы чата из 1 000 сообщений) другая, чем у серий трека 1: с их CPU на запрос числа напрямую не сравниваются. + +| Компонент | до | после | +|---|---|---| +| API всего | 3089 | 3113 | +| PostgreSQL | 493 | 524 | +| HAProxy | 178 | 132 | +| Valkey | 62 | 52 | +| k6 | 608 | 488 | +| сэмплер | 19 | 19 | +| ВМ | 6036 | 5711 | + +Успешных в секунду по окнам: до 200.0, подготовка 199.8, замена 200.1, после 200.0. + +## Контейнеры `api` до замены + +| Контейнер | `X-Instance-Id` | Образ (тег) | Конфигурация образа | +|---|---|---|---| +| mtusi-bench-api-1 | `81247d9d1f35` | `mtusi-messenger:bench` | `sha256:de2a95419621…` | +| mtusi-bench-api-2 | `9b70bf3317f6` | `mtusi-messenger:bench` | `sha256:de2a95419621…` | + +## Контейнеры `api` после замены + +| Контейнер | `X-Instance-Id` | Образ (тег) | Конфигурация образа | +|---|---|---|---| +| mtusi-bench-api-3 | `342603d12120` | `mtusi-messenger:bench` | `sha256:ffb64b282745…` | +| mtusi-bench-api-4 | `f6bff6eaee6c` | `mtusi-messenger:bench` | `sha256:ffb64b282745…` | + +## Шкала вокруг замены + +Полная шкала — `timeline.csv`. + +| с от начала | Записи ok / ош | Чтения ok / ош | Коды ошибок | Доля успешных | p50 / p95, мс | Старые / новые ok | Ответы реплик | +|---|---|---|---|---|---|---|---| +| -3 | 100 / 0 | 100 / 0 | — | 1 | 3 / 7 | 200 / 0 | 81247d9d1f35:100 9b70bf3317f6:100 | +| -2 | 100 / 0 | 100 / 0 | — | 1 | 4 / 6 | 200 / 0 | 81247d9d1f35:100 9b70bf3317f6:100 | +| -1 | 100 / 0 | 100 / 0 | — | 1 | 4 / 7 | 200 / 0 | 81247d9d1f35:100 9b70bf3317f6:100 | +| 0 | 100 / 0 | 100 / 0 | — | 1 | 3 / 8 | 200 / 0 | 81247d9d1f35:100 9b70bf3317f6:100 | +| 1 | 100 / 0 | 100 / 0 | — | 1 | 3 / 4 | 200 / 0 | 81247d9d1f35:100 9b70bf3317f6:100 | +| 2 | 100 / 0 | 100 / 0 | — | 1 | 4 / 47 | 200 / 0 | 81247d9d1f35:100 9b70bf3317f6:100 | +| 3 | 100 / 0 | 100 / 0 | — | 1 | 4 / 23 | 200 / 0 | 81247d9d1f35:100 9b70bf3317f6:100 | +| 4 | 100 / 0 | 100 / 0 | — | 1 | 4 / 5 | 160 / 40 | 342603d12120:40 81247d9d1f35:75 9b70bf3317f6:85 | +| 5 | 100 / 0 | 100 / 0 | — | 1 | 4 / 161 | 100 / 100 | 342603d12120:100 9b70bf3317f6:100 | +| 6 | 100 / 0 | 100 / 0 | — | 1 | 4 / 8 | 100 / 100 | 342603d12120:100 9b70bf3317f6:100 | +| 7 | 100 / 0 | 100 / 0 | — | 1 | 4 / 9 | 78 / 122 | 342603d12120:85 9b70bf3317f6:78 f6bff6eaee6c:37 | +| 8 | 100 / 0 | 100 / 0 | — | 1 | 4 / 109 | 0 / 200 | 342603d12120:100 f6bff6eaee6c:100 | +| 9 | 100 / 0 | 100 / 0 | — | 1 | 4 / 6 | 0 / 200 | 342603d12120:100 f6bff6eaee6c:100 | +| 10 | 100 / 0 | 100 / 0 | — | 1 | 4 / 5 | 0 / 200 | 342603d12120:100 f6bff6eaee6c:100 | +| 11 | 100 / 0 | 100 / 0 | — | 1 | 4 / 6 | 0 / 200 | 342603d12120:100 f6bff6eaee6c:100 | +| 12 | 100 / 0 | 100 / 0 | — | 1 | 4 / 5 | 0 / 200 | 342603d12120:100 f6bff6eaee6c:100 | diff --git a/evidence/rollout/unit-of-work/timeline.csv b/evidence/rollout/unit-of-work/timeline.csv new file mode 100644 index 00000000..23721311 --- /dev/null +++ b/evidence/rollout/unit-of-work/timeline.csv @@ -0,0 +1,122 @@ +second,writes_ok,writes_failed,reads_ok,reads_failed,codes,success,p50_ms,p95_ms,old_ok,new_ok,instances +-17,49,0,49,0,,1.0,4,12,98,0,81247d9d1f35:49 9b70bf3317f6:49 +-16,100,0,100,0,,1.0,3,5,200,0,81247d9d1f35:100 9b70bf3317f6:100 +-15,100,0,100,0,,1.0,4,5,200,0,81247d9d1f35:100 9b70bf3317f6:100 +-14,100,0,100,0,,1.0,4,5,200,0,81247d9d1f35:100 9b70bf3317f6:100 +-13,100,0,100,0,,1.0,4,9,200,0,81247d9d1f35:100 9b70bf3317f6:100 +-12,100,0,100,0,,1.0,4,6,200,0,81247d9d1f35:100 9b70bf3317f6:100 +-11,100,0,100,0,,1.0,4,20,200,0,81247d9d1f35:100 9b70bf3317f6:100 +-10,100,0,100,0,,1.0,3,69,200,0,81247d9d1f35:100 9b70bf3317f6:100 +-9,100,0,100,0,,1.0,3,6,200,0,81247d9d1f35:100 9b70bf3317f6:100 +-8,100,0,100,0,,1.0,3,5,200,0,81247d9d1f35:100 9b70bf3317f6:100 +-7,100,0,100,0,,1.0,4,5,200,0,81247d9d1f35:100 9b70bf3317f6:100 +-6,100,0,100,0,,1.0,3,5,200,0,81247d9d1f35:100 9b70bf3317f6:100 +-5,100,0,100,0,,1.0,4,5,200,0,81247d9d1f35:100 9b70bf3317f6:100 +-4,100,0,100,0,,1.0,4,6,200,0,81247d9d1f35:100 9b70bf3317f6:100 +-3,100,0,100,0,,1.0,3,7,200,0,81247d9d1f35:100 9b70bf3317f6:100 +-2,100,0,100,0,,1.0,4,6,200,0,81247d9d1f35:100 9b70bf3317f6:100 +-1,100,0,100,0,,1.0,4,7,200,0,81247d9d1f35:100 9b70bf3317f6:100 +0,100,0,100,0,,1.0,3,8,200,0,81247d9d1f35:100 9b70bf3317f6:100 +1,100,0,100,0,,1.0,3,4,200,0,81247d9d1f35:100 9b70bf3317f6:100 +2,100,0,100,0,,1.0,4,47,200,0,81247d9d1f35:100 9b70bf3317f6:100 +3,100,0,100,0,,1.0,4,23,200,0,81247d9d1f35:100 9b70bf3317f6:100 +4,100,0,100,0,,1.0,4,5,160,40,342603d12120:40 81247d9d1f35:75 9b70bf3317f6:85 +5,100,0,100,0,,1.0,4,161,100,100,342603d12120:100 9b70bf3317f6:100 +6,100,0,100,0,,1.0,4,8,100,100,342603d12120:100 9b70bf3317f6:100 +7,100,0,100,0,,1.0,4,9,78,122,342603d12120:85 9b70bf3317f6:78 f6bff6eaee6c:37 +8,100,0,100,0,,1.0,4,109,0,200,342603d12120:100 f6bff6eaee6c:100 +9,100,0,100,0,,1.0,4,6,0,200,342603d12120:100 f6bff6eaee6c:100 +10,100,0,100,0,,1.0,4,5,0,200,342603d12120:100 f6bff6eaee6c:100 +11,100,0,100,0,,1.0,4,6,0,200,342603d12120:100 f6bff6eaee6c:100 +12,100,0,100,0,,1.0,4,5,0,200,342603d12120:100 f6bff6eaee6c:100 +13,100,0,100,0,,1.0,4,6,0,200,342603d12120:100 f6bff6eaee6c:100 +14,100,0,100,0,,1.0,3,22,0,200,342603d12120:100 f6bff6eaee6c:100 +15,100,0,100,0,,1.0,4,6,0,200,342603d12120:100 f6bff6eaee6c:100 +16,100,0,100,0,,1.0,4,6,0,200,342603d12120:100 f6bff6eaee6c:100 +17,100,0,100,0,,1.0,4,14,0,200,342603d12120:100 f6bff6eaee6c:100 +18,100,0,100,0,,1.0,4,6,0,200,342603d12120:100 f6bff6eaee6c:100 +19,100,0,100,0,,1.0,4,5,0,200,342603d12120:100 f6bff6eaee6c:100 +20,100,0,100,0,,1.0,4,6,0,200,342603d12120:100 f6bff6eaee6c:100 +21,100,0,100,0,,1.0,4,7,0,200,342603d12120:100 f6bff6eaee6c:100 +22,100,0,100,0,,1.0,4,5,0,200,342603d12120:100 f6bff6eaee6c:100 +23,100,0,100,0,,1.0,4,5,0,200,342603d12120:100 f6bff6eaee6c:100 +24,100,0,100,0,,1.0,4,5,0,200,342603d12120:100 f6bff6eaee6c:100 +25,100,0,100,0,,1.0,4,5,0,200,342603d12120:100 f6bff6eaee6c:100 +26,100,0,100,0,,1.0,4,6,0,200,342603d12120:100 f6bff6eaee6c:100 +27,100,0,100,0,,1.0,4,9,0,200,342603d12120:100 f6bff6eaee6c:100 +28,100,0,100,0,,1.0,4,7,0,200,342603d12120:100 f6bff6eaee6c:100 +29,100,0,100,0,,1.0,4,5,0,200,342603d12120:100 f6bff6eaee6c:100 +30,100,0,100,0,,1.0,4,44,0,200,342603d12120:100 f6bff6eaee6c:100 +31,100,0,100,0,,1.0,4,5,0,200,342603d12120:100 f6bff6eaee6c:100 +32,100,0,100,0,,1.0,4,5,0,200,342603d12120:100 f6bff6eaee6c:100 +33,100,0,100,0,,1.0,4,6,0,200,342603d12120:100 f6bff6eaee6c:100 +34,100,0,100,0,,1.0,4,5,0,200,342603d12120:100 f6bff6eaee6c:100 +35,100,0,100,0,,1.0,4,6,0,200,342603d12120:100 f6bff6eaee6c:100 +36,100,0,100,0,,1.0,4,5,0,200,342603d12120:100 f6bff6eaee6c:100 +37,100,0,100,0,,1.0,4,7,0,200,342603d12120:100 f6bff6eaee6c:100 +38,100,0,100,0,,1.0,4,6,0,200,342603d12120:100 f6bff6eaee6c:100 +39,100,0,100,0,,1.0,4,6,0,200,342603d12120:100 f6bff6eaee6c:100 +40,100,0,100,0,,1.0,4,5,0,200,342603d12120:100 f6bff6eaee6c:100 +41,100,0,100,0,,1.0,4,5,0,200,342603d12120:100 f6bff6eaee6c:100 +42,100,0,100,0,,1.0,4,12,0,200,342603d12120:100 f6bff6eaee6c:100 +43,100,0,100,0,,1.0,4,5,0,200,342603d12120:100 f6bff6eaee6c:100 +44,100,0,100,0,,1.0,4,5,0,200,342603d12120:100 f6bff6eaee6c:100 +45,100,0,100,0,,1.0,4,5,0,200,342603d12120:100 f6bff6eaee6c:100 +46,100,0,100,0,,1.0,4,8,0,200,342603d12120:100 f6bff6eaee6c:100 +47,100,0,100,0,,1.0,4,8,0,200,342603d12120:100 f6bff6eaee6c:100 +48,100,0,100,0,,1.0,4,6,0,200,342603d12120:100 f6bff6eaee6c:100 +49,100,0,100,0,,1.0,4,5,0,200,342603d12120:100 f6bff6eaee6c:100 +50,100,0,100,0,,1.0,4,5,0,200,342603d12120:100 f6bff6eaee6c:100 +51,100,0,100,0,,1.0,4,5,0,200,342603d12120:100 f6bff6eaee6c:100 +52,100,0,100,0,,1.0,4,5,0,200,342603d12120:100 f6bff6eaee6c:100 +53,100,0,100,0,,1.0,4,5,0,200,342603d12120:100 f6bff6eaee6c:100 +54,100,0,100,0,,1.0,4,5,0,200,342603d12120:100 f6bff6eaee6c:100 +55,100,0,100,0,,1.0,4,5,0,200,342603d12120:100 f6bff6eaee6c:100 +56,100,0,100,0,,1.0,4,5,0,200,342603d12120:100 f6bff6eaee6c:100 +57,100,0,100,0,,1.0,4,15,0,200,342603d12120:100 f6bff6eaee6c:100 +58,100,0,100,0,,1.0,4,5,0,200,342603d12120:100 f6bff6eaee6c:100 +59,100,0,100,0,,1.0,4,6,0,200,342603d12120:100 f6bff6eaee6c:100 +60,100,0,100,0,,1.0,4,5,0,200,342603d12120:100 f6bff6eaee6c:100 +61,100,0,100,0,,1.0,4,6,0,200,342603d12120:100 f6bff6eaee6c:100 +62,100,0,100,0,,1.0,4,5,0,200,342603d12120:100 f6bff6eaee6c:100 +63,100,0,100,0,,1.0,4,30,0,200,342603d12120:100 f6bff6eaee6c:100 +64,100,0,100,0,,1.0,4,5,0,200,342603d12120:100 f6bff6eaee6c:100 +65,100,0,100,0,,1.0,4,5,0,200,342603d12120:100 f6bff6eaee6c:100 +66,100,0,100,0,,1.0,4,5,0,200,342603d12120:100 f6bff6eaee6c:100 +67,100,0,100,0,,1.0,4,7,0,200,342603d12120:100 f6bff6eaee6c:100 +68,100,0,100,0,,1.0,4,7,0,200,342603d12120:100 f6bff6eaee6c:100 +69,100,0,100,0,,1.0,4,6,0,200,342603d12120:100 f6bff6eaee6c:100 +70,100,0,100,0,,1.0,4,5,0,200,342603d12120:100 f6bff6eaee6c:100 +71,100,0,100,0,,1.0,4,5,0,200,342603d12120:100 f6bff6eaee6c:100 +72,100,0,100,0,,1.0,4,5,0,200,342603d12120:100 f6bff6eaee6c:100 +73,100,0,100,0,,1.0,4,5,0,200,342603d12120:100 f6bff6eaee6c:100 +74,100,0,100,0,,1.0,4,5,0,200,342603d12120:100 f6bff6eaee6c:100 +75,100,0,100,0,,1.0,4,5,0,200,342603d12120:100 f6bff6eaee6c:100 +76,100,0,100,0,,1.0,4,23,0,200,342603d12120:100 f6bff6eaee6c:100 +77,100,0,100,0,,1.0,4,10,0,200,342603d12120:100 f6bff6eaee6c:100 +78,100,0,100,0,,1.0,4,6,0,200,342603d12120:100 f6bff6eaee6c:100 +79,100,0,100,0,,1.0,4,93,0,200,342603d12120:100 f6bff6eaee6c:100 +80,100,0,100,0,,1.0,4,5,0,200,342603d12120:100 f6bff6eaee6c:100 +81,100,0,100,0,,1.0,4,7,0,200,342603d12120:100 f6bff6eaee6c:100 +82,100,0,100,0,,1.0,4,6,0,200,342603d12120:100 f6bff6eaee6c:100 +83,100,0,100,0,,1.0,4,7,0,200,342603d12120:100 f6bff6eaee6c:100 +84,100,0,100,0,,1.0,4,5,0,200,342603d12120:100 f6bff6eaee6c:100 +85,100,0,100,0,,1.0,4,5,0,200,342603d12120:100 f6bff6eaee6c:100 +86,100,0,100,0,,1.0,4,5,0,200,342603d12120:100 f6bff6eaee6c:100 +87,100,0,100,0,,1.0,4,8,0,200,342603d12120:100 f6bff6eaee6c:100 +88,100,0,100,0,,1.0,4,5,0,200,342603d12120:100 f6bff6eaee6c:100 +89,100,0,100,0,,1.0,4,6,0,200,342603d12120:100 f6bff6eaee6c:100 +90,100,0,100,0,,1.0,4,5,0,200,342603d12120:100 f6bff6eaee6c:100 +91,100,0,100,0,,1.0,4,5,0,200,342603d12120:100 f6bff6eaee6c:100 +92,100,0,100,0,,1.0,4,9,0,200,342603d12120:100 f6bff6eaee6c:100 +93,100,0,100,0,,1.0,4,6,0,200,342603d12120:100 f6bff6eaee6c:100 +94,100,0,100,0,,1.0,4,5,0,200,342603d12120:100 f6bff6eaee6c:100 +95,100,0,100,0,,1.0,4,33,0,200,342603d12120:100 f6bff6eaee6c:100 +96,100,0,100,0,,1.0,4,5,0,200,342603d12120:100 f6bff6eaee6c:100 +97,100,0,100,0,,1.0,4,123,0,200,342603d12120:100 f6bff6eaee6c:100 +98,100,0,100,0,,1.0,4,6,0,200,342603d12120:100 f6bff6eaee6c:100 +99,100,0,100,0,,1.0,4,7,0,200,342603d12120:100 f6bff6eaee6c:100 +100,100,0,100,0,,1.0,4,5,0,200,342603d12120:100 f6bff6eaee6c:100 +101,100,0,100,0,,1.0,4,5,0,200,342603d12120:100 f6bff6eaee6c:100 +102,100,0,100,0,,1.0,4,5,0,200,342603d12120:100 f6bff6eaee6c:100 +103,52,0,51,0,,1.0,4,5,0,103,342603d12120:51 f6bff6eaee6c:52 diff --git a/evidence/s3/privacy.md b/evidence/s3/privacy.md new file mode 100644 index 00000000..f0cb40fa --- /dev/null +++ b/evidence/s3/privacy.md @@ -0,0 +1,43 @@ +# Приватность bucket вне API + +- Команда: `make s3_check` (`driver.py s3-check`) +- Дата: 2026-10-31, 20:44:28–20:44:31 UTC; код выхода 0, итог `PASS: 90 checks` +- Commit: `6ba74b1` (ветка `feat/unit-of-work`), рабочее дерево без правок кода (добавлены только файлы `evidence/`) +- Стенд: проект compose `mtusi-lab5`, собран `make run_docker` из `HEAD`; S3 `s3:8333` (хост `127.0.0.1:8334`), bucket `messenger`, образ `chrislusf/seaweedfs:4.48` +- Секретов в выводе нет: только коды ответов. Порт `41357` — случайный порт контейнера, loopback +- Вывод сокращён: у строк «server» однотипные отказы сгруппированы, все 90 проверок — `ok` + +```text +where check expected got verdict +server anonymous access setting none none ok +server api key put, get, head object 200 200 ok +server api key get missing object 404 404 ok +server api key list objects, create, delete bucket, get, put bucket policy, get, put bucket acl public-read, put object acl public-read 403 403 ok +server api key put cleaner probe object 200 200 ok +server cleaner key get, head object 200 200 ok +server cleaner key delete object, again, missing 204 204 ok +server api key get deleted object 404 404 ok +server cleaner key put object, list objects 403 403 ok +server cleaner key list attachments prefix 200 200 ok +server cleaner key list staging prefix 200 200 ok +server cleaner key list database prefix 403 403 ok +server cleaner key list other prefix 403 403 ok +server cleaner key create, delete bucket, get, put bucket policy, get, put bucket acl public-read, put object acl public-read 403 403 ok +server worker key put, get, head object, get object of api key 200 200 ok +server worker key delete object 403 403 ok +server api key get object after worker delete 200 200 ok +server worker key list objects, list attachments prefix, create, delete bucket, get, put bucket policy, get, put bucket acl public-read, put object acl public-read 403 403 ok +server api key put, get, list, delete other bucket 403 403 ok +server cleaner key get, delete, list, delete other bucket 403 403 ok +server worker key put, get, list other bucket 403 403 ok +server anonymous get, head, get missing, list objects, list buckets, put object, create bucket 403 403 ok +host anonymous get, head, get missing, list objects, list buckets, put object 403 403 ok +server listening outside loopback 8333 18333 8333 18333 ok +network anonymous get, head, get missing, list objects, list buckets, put object 403 403 ok +network port 8333 (S3 API / gRPC of gateway) open open ok +network port 18333 (S3 API / gRPC of gateway) open open ok +network port 8080, 8888, 9333, 18080, 18888, 19333, 41357 (loopback only) closed closed ok +server temporary buckets left 0 0 ok +server probe objects left 0 0 ok +PASS: 90 checks, bucket messenger is private +``` diff --git a/evidence/tests/failure-checks.md b/evidence/tests/failure-checks.md index c20b2053..89f1f1b8 100644 --- a/evidence/tests/failure-checks.md +++ b/evidence/tests/failure-checks.md @@ -1,11 +1,11 @@ # Проверки отказов - Команда: `make failure_checks` -- Дата: 2026-10-31, 16:05:22–16:44:08 UTC; код выхода 0 -- Commit: `399da05` (ветка `feat/pipeline-reliability`), рабочее дерево без правок кода (на момент прогона добавлены только файлы `evidence/`) +- Дата: 2026-10-31, 20:49–21:30:16 UTC; код выхода 0 +- Commit: `6ba74b1` (ветка `feat/unit-of-work`), рабочее дерево без правок кода (на момент прогона добавлены только файлы `evidence/`); `student-tests/` от `9efab79` не менялись - Стенд: проект `mtusi-lab5-failures` со своими PostgreSQL, Valkey, S3, RabbitMQ, уборщиком, relay, worker и четырьмя API; рабочий стенд `mtusi-lab5` на время прогона остановлен (хост свободен); стенд отказов и его volumes удалены в конце -- Итог: **141 passed, 224 deselected, pytest 2302,16 с (38:22); вся команда 38:45**; журнал PostgreSQL стенда без признаков аварии (`crash markers 0`). «too many clients» 40 и «administrator command» 192 — следы самих проверок (заполнение слотов, остановки PostgreSQL) -- С прогона на `e2a6427` (140 проверок) усилен `test_hung_worker_lease_fencing`, прежний его поток стал `test_hung_worker_thawed_after_ready`. Тесты в этом прогоне не правились, временных красных нет +- Итог: **141 passed, 224 deselected, pytest 2449,18 с (40:49)**; журнал PostgreSQL стенда без признаков аварии (`crash markers 0`). «too many clients» 32 и «administrator command» 194 — следы самих проверок (заполнение слотов, остановки PostgreSQL) +- Change `unit-of-work`: набор не правился, тот же набор на прежнем коде — 141 passed; тесты в этом прогоне не правились, временных красных нет - Параметры: уборщик — grace 20 с, интервал 1 с, плановая сверка выключена; worker — 4 попытки, пауза 4–16 с, срок 10 с, запас аренды 2 с, рендер 8 с / 3 с CPU, graceful 2 с; relay — опрос 0,2 с, повторная публикация через 5 с - Вывод сокращён: убраны лог сборки и шаги compose, адреса API временные, строки `PASSED` свёрнуты в список имён @@ -15,10 +15,9 @@ [failure_checks] start worker: attempts 4, retry 4–16 s, job timeout 10 s, lease margin 2 s, render 8 s / 3 s CPU, graceful 2 s [failure_checks] start relay: poll 0.2 s, republish after 5 s [failure_checks] pytest -m fault -=============== 141 passed, 224 deselected in 2302.16s (0:38:22) =============== -[failure_checks] postgres log: 578 lines, crash markers 0; "too many clients" 40, "administrator command" 192 +=============== 141 passed, 224 deselected in 2449.18s (0:40:49) =============== +[failure_checks] postgres log: 573 lines, crash markers 0; "too many clients" 32, "administrator command" 194 [failure_checks] results: {'fault': 0, 'postgres': 0} -make failure_checks 219,83s user 85,52s system 13% cpu 38:45,66 total ``` ## Прошедшие проверки по порядку diff --git a/evidence/tests/service-tests.md b/evidence/tests/service-tests.md new file mode 100644 index 00000000..444fa3b8 --- /dev/null +++ b/evidence/tests/service-tests.md @@ -0,0 +1,37 @@ +# Быстрые тесты сервисов + +- Команды: `make service_test`, `make service_test_db` +- Дата: 2026-10-31, 21:30:16–21:31:00 UTC; коды выхода 0 +- Commit: `6ba74b1` (ветка `feat/unit-of-work`), рабочее дерево без правок кода (добавлены только файлы `evidence/`) +- Стенд: `service_test` — без хранилищ и docker; тот же результат с `DATABASE__PORT=1 CACHE__PORT=1 S3__PORT=1` снят на рабочем дереве задачи 8.2. `service_test_db` — временная база `test_uow_messenger` в PostgreSQL стенда, после прогона баз `test_uow_*` нет (`pg_database`: 0), рабочая база не затронута +- Контракт repo: 39 проверок и на фейке, и на SQL (`service-tests/repo_contract.py`) +- Сравнение покрытия: блокировки и конкуренцию доказывает только `make failure_checks` (`evidence/tests/failure-checks.md`) + +```text +uv run pytest -c service-tests/pytest.ini service-tests/unit +200 passed in 1.48s +uv run pytest -c service-tests/pytest.ini service-tests/db +71 passed in 21.51s +``` + +## Регрессии задачи 11.7: тесты ловят нарушение + +Сняты до commit на рабочем дереве (design change `unit-of-work`, «Уточнения apply»): каждая регрессия внесена, показана красным прогоном и откатана, хэш `src` совпал со снимком до них, в commit не вошла. + +| Регрессия | Цель | Какой тест красный | +|---|---|---| +| автокоммит при выходе из блока | `service_test_db` | `test_uow.py::test_exit_without_commit` | +| компенсация без флага | `service_test` | `test_attachment_service.py::test_failure_on_commit_keeps_object` | +| отметка публикации отдельным блоком | `service_test` | `test_attachment_relay.py::test_publish_order_in_one_block` | +| DELETE уборщика после commit | `service_test` | `test_attachment_cleanup.py::test_two_blocks_object_before_row`, `test_storage_failure_keeps_mark_and_row`, `test_row_delete_failure_rolls_back_second_block` | +| откат вне срока | `service_test_db` | `test_uow.py::test_frozen_on_rollback` | +| без ветки `CancelledError` | `service_test_db` | `test_uow.py::test_cancel_with_open_transaction` | +| без `request_deadline` | `service_test_db` | `test_request_flow.py::test_two_slow_steps_fit_single_deadline`, `test_hash_queue_gets_deadline` | +| условие `updated_at = created_at` убрано из SQL `mark_queued` | `service_test_db` (на фейке зелено) | `test_repo_contract_sql[check_mark_queued_marked_row]` | +| импорт SQLAlchemy в сервис | `service_test` | `test_architecture.py::test_no_forbidden_imports`: `src/core/services/user.py:3 imports sqlalchemy` | +| метод порта без фейка | `service_test` | `test_port_implementation_fake_match[AbstractUserRepository]`: `SqlAlchemyUserRepository.get_user_probe`, `FakeUserRepository.get_user_probe` | +| `put` worker внутри блока | `service_test` | `test_attachment_processing.py::test_put_is_not_inside_a_block`, `test_ready_and_variants_one_block`, `test_success_commits_ready_with_variants` | +| `_connection` адаптера переименован в `_ping_once` | `service_test_db` | `test_ping_detects_dropped_connection_through_proxy`, `test_ping_is_one_exchange` | +| `_handle_exception` адаптера переименован в `_ping_once` | `service_test_db` | `test_ping_detects_dropped_connection_through_proxy` | + +Две проверки сначала не ловили нарушение и были исправлены до commit, регрессии повторены: откат вне срока вешал тест, теперь прокси размораживает сторож; метод порта без фейка оставался зелёным, унаследованный абстрактный метод считался реализацией. diff --git a/evidence/tests/student-test-lb.md b/evidence/tests/student-test-lb.md index 1cbf47b9..8b9d0609 100644 --- a/evidence/tests/student-test-lb.md +++ b/evidence/tests/student-test-lb.md @@ -1,39 +1,21 @@ # Свой набор через LB - Команда: `make student_test` (`BASE_URL=http://localhost:8080 EXPECT_REPLICAS=2`) -- Дата: 2026-10-31, 13:29:48–13:31:06 UTC; код выхода 2 (код pytest 1) -- Commit: `e2a6427` (ветка `feat/pipeline-reliability`), рабочее дерево без правок кода (добавлены только файлы `evidence/`) +- Дата: 2026-10-31, 20:39:36–20:41:09 UTC; код выхода 2 (код pytest 1) +- Commit: `6ba74b1` (ветка `feat/unit-of-work`), рабочее дерево без правок кода (добавлены только файлы `evidence/`) - Стенд: проект compose `mtusi-lab5`, две реплики за HAProxy, relay, worker, собран `make run_docker` из `HEAD` -- Итог: **1 failed, 218 passed, 140 deselected, 77,81 с**. 140 deselected — проверки отказов (`evidence/tests/failure-checks.md`) -- Единственное красное — `test_exclusion_evidence_exists`, причина ровно `missing_evidence`: файлы старых исключений `evidence/cache/hits.md`, `evidence/auth/passwords-and-tokens.md`, `evidence/idempotency/replay-after-restart.md` снимаются на последнем шаге всего прогона лабы (`QUESTIONS.md`, «Перенос из лабы 4»). Приложение тут ни при чём: проверяется наличие файла в репозитории -- Сверка покрытия: 370 сценариев в 16 спеках, 348 проверены (163 — `make failure_checks`), 22 исключения; «no test and no exclusion» и «unknown scenario» нет +- Итог: **1 failed, 223 passed, 141 deselected, 92,33 с**. 141 deselected — проверки отказов (`evidence/tests/failure-checks.md`) +- Единственное красное — ожидаемое `test_exclusion_evidence_exists`, причина ровно `missing_evidence`: файлы старых исключений `evidence/cache/hits.md`, `evidence/auth/passwords-and-tokens.md`, `evidence/idempotency/replay-after-restart.md` снимаются на последнем шаге всего прогона лабы (`QUESTIONS.md`, «Перенос из лабы 4»). Приложение тут ни при чём: проверяется наличие файла в репозитории +- `student-tests/` с change `unit-of-work` не менялись (`git diff --stat` пуст): набор доказывает, что поведение то же - Вывод сокращён: убраны строки `PASSED`, заголовки блоков вывода и текст функции теста ```text -collecting ... collected 359 items / 140 deselected / 219 selected -student-tests/test_coverage.py::test_exclusion_evidence_exists FAILED [ 49%] - -=================================== FAILURES =================================== -________________________ test_exclusion_evidence_exists ________________________ +student-tests/test_coverage.py::test_exclusion_evidence_exists FAILED [ 50%] E AssertionError: exclusion refers to missing evidence/cache/hits.md: chat-cache / Временная база E exclusion refers to missing evidence/cache/hits.md: chat-cache / Срок записи E exclusion refers to missing evidence/cache/hits.md: chat-cache / Чтение из кэша E exclusion refers to missing evidence/idempotency/replay-after-restart.md: idempotency / Повтор после рестарта API E exclusion refers to missing evidence/auth/passwords-and-tokens.md: sessions / Токена нет в хранилище E exclusion refers to missing evidence/auth/passwords-and-tokens.md: users / Хэш в БД - -==================================== PASSES ==================================== -test_one_instance_id_per_process: two series of 18 requests: {'d7f1b8c394b9': 18, 'e933a5daf6b3': 18} -test_attachment_becomes_ready: ready in 0.42 s -test_download_through_other_replica: uploaded via e933a5daf6b3, downloaded via ['d7f1b8c394b9', 'e933a5daf6b3'] -test_every_scenario_is_covered: coverage: 370 scenarios in 16 specs, 348 tested (163 by make failure_checks), 22 excluded -test_replay_on_other_replica: sent via e933a5daf6b3, replayed via ['d7f1b8c394b9']; 409 via ['d7f1b8c394b9', 'e933a5daf6b3'] -test_one_session_on_several_replicas: one session, 20 requests: {'d7f1b8c394b9': 10, 'e933a5daf6b3': 10} -test_write_visible_through_other_replica: written via e933a5daf6b3, read via {'d7f1b8c394b9': 3, 'e933a5daf6b3': 3} -test_hundred_messages_from_ten_clients: race: 10 clients x 10 messages, statuses {201: 100}, max in flight 10; history: 100 messages, 100 unique ids, 4 pages by 30 -test_same_username_at_once: username race: 10 clients, statuses {409: 9, 201: 1}, max in flight 10 -test_same_key_at_once: key race: 10 clients, statuses {201: 10}, max in flight 10; history: 1 messages -test_same_key_through_replicas: key race: 10 clients, statuses {201: 10}, max in flight 10; history: 1 messages; key race through replicas: {'e933a5daf6b3': 5, 'd7f1b8c394b9': 5} -=========== 1 failed, 218 passed, 140 deselected in 77.81s (0:01:17) =========== -make: *** [student_test] Error 1 +=========== 1 failed, 223 passed, 141 deselected in 92.33s (0:01:32) =========== ``` diff --git a/evidence/tests/test-isolated.md b/evidence/tests/test-isolated.md index daa3a713..6ce3dad4 100644 --- a/evidence/tests/test-isolated.md +++ b/evidence/tests/test-isolated.md @@ -1,41 +1,31 @@ # Набор на временной базе - Команда: `make test_isolated` -- Дата: 2026-10-31, 13:34:20–13:36:55 UTC; код выхода 2 (`results: {'test': 0, 'student_test': 2}`) -- Commit: `e2a6427` (ветка `feat/pipeline-reliability`), рабочее дерево без правок кода (добавлены только файлы `evidence/`) +- Дата: 2026-10-31, 20:36:52–20:39:36 UTC; код выхода 2 (`results: {'test': 0, 'student_test': 2}`) +- Commit: `6ba74b1` (ветка `feat/unit-of-work`), рабочее дерево без правок кода (добавлены только файлы `evidence/`) - Стенд: образ из рабочего дерева, контейнеры `mtusi-lab5-test-api`, `mtusi-lab5-test-worker`, `mtusi-lab5-test-relay` на базе `test_messenger` поверх хранилищ рабочего стенда, один процесс API, `EXPECT_REPLICAS=1` -- Итог: smoke — `PASS: lab5`; набор — **1 failed, 212 passed, 6 skipped, 140 deselected, 129,89 с** +- Итог: smoke — `PASS: lab5`; набор — **1 failed, 217 passed, 6 skipped, 141 deselected, 135,58 с** - 6 skipped — тесты реплик против одного процесса, причина напечатана -- Красное — `test_exclusion_evidence_exists`, только `missing_evidence` по трём файлам последнего шага прогона лабы; разбор — `evidence/tests/student-test-lb.md` -- После уборки (проверено отдельно): контейнеров `*-test-*` нет, базы `test_messenger` нет (`pg_database`: `postgres`, `messenger`, `template1`, `template0`), очереди временной базы нет (`list_queues`: только `messenger.attachment.process.v1`) +- Красное — ожидаемое `test_exclusion_evidence_exists`, только `missing_evidence` по трём файлам, которые снимаются на последнем шаге прогона лабы: `evidence/cache/hits.md`, `evidence/auth/passwords-and-tokens.md`, `evidence/idempotency/replay-after-restart.md`; разбор — `evidence/tests/student-test-lb.md` - Вывод сокращён: убраны лог сборки, строки `PASSED` и журналы контейнеров, которые цель печатает при коде ≠ 0 ```text -[test_isolated] database=test_messenger objects=/buckets/messenger/test_messenger/ queue=test_messenger.attachment.process.v1 containers=mtusi-lab5-test-api mtusi-lab5-test-worker mtusi-lab5-test-relay base_url=http://127.0.0.1:18088 -[test_isolated] remove objects /buckets/messenger/test_messenger/ and queue test_messenger.attachment.process.v1 -[test_isolated] build image -[test_isolated] create database test_messenger -[test_isolated] migrations -[test_isolated] start api container -[test_isolated] start worker container -[test_isolated] start relay container -[test_isolated] ready -[test_isolated] make test +python3 tests/smoke.py --base-url "http://localhost:8080" PASS: lab5 public API scenario; infrastructure and grading evidence remain separate. -[test_isolated] make student_test -E AssertionError: exclusion refers to missing evidence/cache/hits.md: chat-cache / Временная база -E exclusion refers to missing evidence/cache/hits.md: chat-cache / Срок записи -E exclusion refers to missing evidence/cache/hits.md: chat-cache / Чтение из кэша -E exclusion refers to missing evidence/idempotency/replay-after-restart.md: idempotency / Повтор после рестарта API -E exclusion refers to missing evidence/auth/passwords-and-tokens.md: sessions / Токена нет в хранилище -E exclusion refers to missing evidence/auth/passwords-and-tokens.md: users / Хэш в БД -SKIPPED [1] student-tests/test_attachment_processing.py:475: one API process (EXPECT_REPLICAS=1): replica checks need the stand with the load balancer + +two series of 18 requests: {'772710ec8dda': 36} +ready in 0.64 s +coverage: 371 scenarios in 16 specs, 349 tested (164 by make failure_checks), 22 excluded +race: 10 clients x 10 messages, statuses {201: 100}, max in flight 10; history: 100 messages, 100 unique ids, 4 pages by 30 +username race: 10 clients, statuses {409: 9, 201: 1}, max in flight 10 +key race: 10 clients, statuses {201: 10}, max in flight 10; history: 1 messages +SKIPPED [1] student-tests/test_attachment_processing.py:511: one API process (EXPECT_REPLICAS=1): replica checks need the stand with the load balancer SKIPPED [1] student-tests/test_attachments.py:748: one API process (EXPECT_REPLICAS=1): replica checks need the stand with the load balancer SKIPPED [1] student-tests/test_idempotency.py:372: one API process (EXPECT_REPLICAS=1): replica checks need the stand with the load balancer SKIPPED [1] student-tests/test_load_balancing.py:18: one API process (EXPECT_REPLICAS=1): replica checks need the stand with the load balancer SKIPPED [1] student-tests/test_load_balancing.py:34: one API process (EXPECT_REPLICAS=1): replica checks need the stand with the load balancer SKIPPED [1] student-tests/test_race.py:169: one API process (EXPECT_REPLICAS=1): replica checks need the stand with the load balancer -===== 1 failed, 212 passed, 6 skipped, 140 deselected in 129.89s (0:02:09) ===== +===== 1 failed, 217 passed, 6 skipped, 141 deselected in 135.58s (0:02:15) ===== [test_isolated] cleanup [test_isolated] remove objects /buckets/messenger/test_messenger/ and queue test_messenger.attachment.process.v1 [test_isolated] results: {'test': 0, 'student_test': 2} diff --git a/evidence/worker/process.md b/evidence/worker/process.md index 5f51fcd5..ed471d98 100644 --- a/evidence/worker/process.md +++ b/evidence/worker/process.md @@ -1,37 +1,14 @@ # Процесс worker - Команда: `python3 .claude/skills/run-mtusi-messenger/driver.py --port 8080 worker-process` -- Дата: 2026-10-31, 15:58:11–16:01:07 UTC; код выхода 0 -- Commit: `399da05` (ветка `feat/pipeline-reliability`), рабочее дерево без правок кода (добавлены только файлы `evidence/`) +- Дата: 2026-10-31, 20:44:31–20:47:32 UTC; код выхода 0 +- Commit: `6ba74b1` (ветка `feat/unit-of-work`), рабочее дерево без правок кода (добавлены только файлы `evidence/`) - Стенд: проект compose `mtusi-lab5`, собран `make run_docker` из `HEAD` - Спеки: `container-run`, `container-image`, `graceful-shutdown`, `service-configuration` -- Что показано: PID 1, нет healthcheck, лимиты 1 CPU / 1 ГБ; `_imaging` нет ни в репликах API, ни в процессе 1 worker: декодер только в процессе обработки; неверные `WORKER__*` — код 2, запись называет поле без значения; значения по умолчанию и подмена окружением; остановка простаивающего и на старте; «Worker переживает рестарт хранилищ»; остановка на двух дорогих JPEG: 8,15 с, при замороженных PostgreSQL и брокере 9,18 с, граница 9,5 с (design, решение 19), код 0, задания после этого дошли по аренде до `failed`, `limit_cpu` +- Что показано: PID 1, нет healthcheck, лимиты 1 CPU / 1 ГБ; `_imaging` нет ни в репликах API, ни в процессе 1 worker: декодер только в процессе обработки; неверные `WORKER__*` — код 2 без значений; остановка под нагрузкой и при замороженных хранилищах быстрее 9,5 с. С change `unit-of-work` сервис собирается на доставку, поведение процесса то же - Вывод сокращён: однотипные строки таблицы «record names …», «default …», «names the field», «hides the value» и «early stop» свёрнуты, все совпали с ожидаемым ```text -Started worker: - concurrency: 2 - prefetch: 2 - max_attempts: 5 - job_timeout_seconds: 60 - lease_margin_seconds: 10 - retry_base_delay_seconds: 5 - retry_max_delay_seconds: 300 - render_timeout_seconds: 40 - render_cpu_limit_seconds: 15 - render_memory_limit_mib: 450 - graceful_shutdown_seconds: 8 - reconnect_seconds: 2 - broker_host: rabbitmq - broker_port: 5672 - broker_queue: messenger.attachment.process.v1 - s3_host: s3 - s3_port: 8333 - s3_bucket: messenger - database_host: postgres - database_port: 5432 - database_name: messenger - database_pool_size: 2 WORKER__CONCURRENCY=0: exit 2, errors [{'loc': 'worker.concurrency', 'msg': 'Input should be greater than or equal to 1'}] WORKER__PREFETCH=0: exit 2, errors [{'loc': 'worker.prefetch', 'msg': 'Input should be greater than or equal to 1'}] WORKER__MAX_ATTEMPTS=abc: exit 2, errors [{'loc': 'worker.max_attempts', 'msg': 'Input should be a valid integer, unable to parse string as an integer'}] @@ -39,69 +16,46 @@ WORKER__GRACEFUL_SHUTDOWN_SECONDS=9: exit 2, errors [{'loc': 'worker.graceful_sh WORKER__RENDER_MEMORY_LIMIT_MIB=0: exit 2, errors [{'loc': 'worker.render_memory_limit_mib', 'msg': 'Input should be greater than or equal to 1'}] WORKER__RENDER_TIMEOUT_SECONDS=120: exit 2, errors [{'loc': 'worker.render_timeout_seconds', 'msg': 'Value error, must be less than job_timeout_seconds'}] docker compose stop worker: 0.2 s -docker stop after 0.3 s: 0.06 s, exit 0, records ['Stopped worker before startup'] -docker stop after 0.2 s: 0.05 s, exit 0, records ['Stopped worker before startup'] -docker stop after 0.4 s: 0.07 s, exit 0, records ['Stopped worker before startup'] -stop under load: docker stop worker took 8.15 s -stop frozen storage: docker stop worker took 9.18 s -PID 1 of the worker expected python -m src.worker got python -m src.worker -healthcheck expected NONE got NONE -limit NanoCpus expected 1000000000 got 1000000000 -limit Memory expected 1073741824 got 1073741824 -_imaging in mtusi-lab5-api-15 expected no got no -_imaging in mtusi-lab5-api-16 expected no got no -API replicas checked expected yes got yes -_imaging in PID 1 of the worker expected no got no -Pillow in the image = uv.lock expected 13.0.0 got 13.0.0 -'Started worker' record, every field named, defaults as above: expected = got -six invalid WORKER__* : exit code 2, names the field, hides the value: expected = got -env override container started expected 0 got 0 -env override concurrency expected 3 got 3 -env override reconnect_seconds expected 1.0 got 1.0 -stop idle: command exit code expected 0 got 0 -stop idle: container exit code expected 0 got 0 -stop idle: under 10 s expected yes got yes -stop idle: last record expected Stopped worker got Stopped worker -stop idle: record exit_code expected 0 got 0 -docker compose start worker expected 0 got 0 -early stop 0.2, 0.3, 0.4 s: docker stop 0, exit code 0, within 1 s: expected = got -'Stopped worker before startup' seen expected yes got yes -worker running before restart expected yes got yes -scripts/restart.sh expected 0 got 0 -LB ready after restart expected yes got yes -worker StartedAt unchanged expected yes got yes -worker RestartCount expected 0 got 0 -new upload after restart expected 202 got 202 -new upload becomes ready expected yes got yes -expensive JPEG generated expected yes got yes -stop under load: worker stopped before uploads expected 0 got 0 -stop under load: upload 0 expected 202 got 202 -stop under load: upload 1 expected 202 got 202 -stop under load: worker started expected 0 got 0 -stop under load: both files in processing expected processing got processing -stop under load: command exit code expected 0 got 0 -stop under load: under 9.5 s expected yes got yes -stop under load: container exit code expected 0 got 0 -stop under load: OOM killed expected false got false -stop under load: last record expected Stopped worker got Stopped worker -stop under load: worker back expected 0 got 0 -stop frozen storage: worker stopped before uploads expected 0 got 0 -stop frozen storage: upload 0 expected 202 got 202 -stop frozen storage: upload 1 expected 202 got 202 -stop frozen storage: worker started expected 0 got 0 -stop frozen storage: both files in processing expected processing got processing -stop frozen storage: storage paused expected 0 got 0 -stop frozen storage: command exit code expected 0 got 0 -stop frozen storage: under 9.5 s expected yes got yes -stop frozen storage: container exit code expected 0 got 0 -stop frozen storage: OOM killed expected false got false -stop frozen storage: last record expected Stopped worker got Stopped worker -stop frozen storage: worker back expected 0 got 0 -LB ready after unpause expected yes got yes -stopped work finished: 4f53824c-a065-4875-8ddf-d7a507e505a0 expected failed limit_cpu got failed limit_cpu -stopped work finished: 6845c972-0f91-4401-91dc-d84dc2229b10 expected failed limit_cpu got failed limit_cpu -stopped work finished: fc9cc3a5-dbeb-4e3c-9b63-d2ce6180b584 expected failed limit_cpu got failed limit_cpu -stopped work finished: 7811470c-95fd-492d-95f1-ff4d4dde4a23 expected failed limit_cpu got failed limit_cpu +docker stop after 0.3 s: 0.07 s, exit 0, records ['Stopped worker before startup'] +docker stop after 0.2 s: 0.07 s, exit 0, records ['Stopped worker before startup'] +docker stop after 0.4 s: 0.06 s, exit 0, records ['Stopped worker before startup'] +stop under load: docker stop worker took 8.32 s +stop frozen storage: docker stop worker took 9.26 s +PID 1 of the worker expected python -m src.worker got python -m src.worker +healthcheck expected NONE got NONE +limit NanoCpus expected 1000000000 got 1000000000 +limit Memory expected 1073741824 got 1073741824 +_imaging in mtusi-lab5-api-19 expected no got no +_imaging in mtusi-lab5-api-20 expected no got no +API replicas checked expected yes got yes +_imaging in PID 1 of the worker expected no got no +Pillow in the image = uv.lock expected 13.0.0 got 13.0.0 +'Started worker' record, все поля и значения по умолчанию совпало +WORKER__* неверные: exit code 2, names the field, hides the value совпало у шести +env override concurrency expected 3 got 3 +env override reconnect_seconds expected 1.0 got 1.0 +stop idle: command, container, record exit_code 0, under 10 s, last record Stopped worker совпало +early stop 0.2, 0.3, 0.4 s: exit 0, within 1 s, 'Stopped worker before startup' совпало +worker running before restart expected yes got yes +scripts/restart.sh expected 0 got 0 +LB ready after restart expected yes got yes +worker StartedAt unchanged expected yes got yes +worker RestartCount expected 0 got 0 +new upload after restart expected 202 got 202 +new upload becomes ready expected yes got yes +stop under load: both files in processing expected processing got processing +stop under load: under 9.5 s expected yes got yes +stop under load: container exit code expected 0 got 0 +stop under load: OOM killed expected false got false +stop under load: last record expected Stopped worker got Stopped worker +stop frozen storage: both files in processing expected processing got processing +stop frozen storage: storage paused expected 0 got 0 +stop frozen storage: under 9.5 s expected yes got yes +stop frozen storage: container exit code expected 0 got 0 +stop frozen storage: OOM killed expected false got false +stop frozen storage: last record expected Stopped worker got Stopped worker +LB ready after unpause expected yes got yes +stopped work finished: 4 файла expected failed limit_cpu got failed limit_cpu PASS: the worker process matches the spec worker and relay running at the end: yes ``` diff --git a/openspec/changes/unit-of-work/tasks.md b/openspec/changes/unit-of-work/tasks.md index ae812331..aace2a7b 100644 --- a/openspec/changes/unit-of-work/tasks.md +++ b/openspec/changes/unit-of-work/tasks.md @@ -186,24 +186,24 @@ В шапке каждого файла — команда, дата, commit (`git rev-parse --short HEAD`), `git.dirty` false; секретов нет (`evidence/README.md`). Перед замерами — проверка хоста (`bench.md`), рабочий стенд `make stop`, посторонние контейнеры названы в паспорте. -- [ ] 13.1 Стоимость «до» и «после» подряд, в одной сессии хоста: временный `git worktree` commit до кода (`9efab79` или commit артефактов, `src` тот же), там дважды `caffeinate -isu uv run python bench/run.py --profile quick --label unit-of-work-before` и `--label unit-of-work-aa` (профиль `make bench_quick`, ~3 мин, такие метки идут в git); в основном дереве так же `--label unit-of-work-after`; каталоги меток из worktree — в `evidence/bench/`; worktree убрать. `make bench_compare BEFORE=unit-of-work-before AFTER=unit-of-work-after AA=unit-of-work-aa`. +- [x] 13.1 Стоимость «до» и «после» подряд, в одной сессии хоста: временный `git worktree` commit до кода (`9efab79` или commit артефактов, `src` тот же), там дважды `caffeinate -isu uv run python bench/run.py --profile quick --label unit-of-work-before` и `--label unit-of-work-aa` (профиль `make bench_quick`, ~3 мин, такие метки идут в git); в основном дереве так же `--label unit-of-work-after`; каталоги меток из worktree — в `evidence/bench/`; worktree убрать. `make bench_compare BEFORE=unit-of-work-before AFTER=unit-of-work-after AA=unit-of-work-aa`. Проверка: три паспорта `git.dirty` false, `evidence/compare/unit-of-work-before__unit-of-work-after.md`; если worktree не подходит — `make bench_ab` по `bench.md`. -- [ ] 13.2 `make service_test`, `make service_test_db`, таблица регрессий 11.7 → `evidence/tests/service-tests.md`. +- [x] 13.2 `make service_test`, `make service_test_db`, таблица регрессий 11.7 → `evidence/tests/service-tests.md`. Проверка: файл с временем прогона и числом тестов. -- [ ] 13.3 `make test_isolated` → `evidence/tests/test-isolated.md`; `make run_docker`, `make replicas`, `make student_test` → `evidence/tests/student-test-lb.md`; `make failure_checks` при остановленном рабочем стенде → `evidence/tests/failure-checks.md`. +- [x] 13.3 `make test_isolated` → `evidence/tests/test-isolated.md`; `make run_docker`, `make replicas`, `make student_test` → `evidence/tests/student-test-lb.md`; `make failure_checks` при остановленном рабочем стенде → `evidence/tests/failure-checks.md`. Проверка: итоги и commit в шапке, тесты не менялись (`git log -- student-tests` без новых коммитов от `9efab79`). -- [ ] 13.4 `make test-persistence ACTION_SCRIPT=scripts/restart.sh` → `evidence/replicas/test-persistence.md`; `make test-failover` `stop` и `kill` с `STOP_ONE_LOG` → `evidence/failover/test-failover.md`. +- [x] 13.4 `make test-persistence ACTION_SCRIPT=scripts/restart.sh` → `evidence/replicas/test-persistence.md`; `make test-failover` `stop` и `kill` с `STOP_ONE_LOG` → `evidence/failover/test-failover.md`. Проверка: `StartedAt` до и после, остановленный контейнер совпадает с `TARGET_INSTANCE_ID`. -- [ ] 13.5 `driver.py --port defense-faults` → `evidence/attachments/defense-faults.md`; `make s3_check` → `evidence/s3/privacy.md`; `driver.py worker-process`, `relay-process` → `evidence/worker/process.md`, `evidence/relay/process.md`. +- [x] 13.5 `driver.py --port defense-faults` → `evidence/attachments/defense-faults.md`; `make s3_check` → `evidence/s3/privacy.md`; `driver.py worker-process`, `relay-process` → `evidence/worker/process.md`, `evidence/relay/process.md`. Проверка: коды 0, в выводе нет секретов. -- [ ] 13.6 `make bench_rollout ROLLOUT_LABEL=unit-of-work` (замена с `Profile.rollout_from`) и `bench/run.py --profile rollout --from --label unit-of-work-previous` (та же нагрузка, та же схема: CPU на запрос старых и новых реплик в одном прогоне) → `evidence/rollout/<метка>/`. +- [x] 13.6 `make bench_rollout ROLLOUT_LABEL=unit-of-work` (замена с `Profile.rollout_from`) и `bench/run.py --profile rollout --from --label unit-of-work-previous` (та же нагрузка, та же схема: CPU на запрос старых и новых реплик в одном прогоне) → `evidence/rollout/<метка>/`. Проверка: ошибок 0, записей столько же, сколько ключей, `git.dirty` false, `from_commit` в паспорте. -- [ ] 13.7 `REPORT.md`: таблица решения 7 и цена шага из меток 13.1 и 13.6 (сценарий «Цена в отчёте»), строки доказательств уровня 4 с новым commit, `bench/`-числа переносить из `summary.md` и `evidence/compare/`, а не считать вручную; новые файлы и метки `evidence/` — на карте `AGENTS.md`. Основная сессия коммитит evidence и отчёт. +- [x] 13.7 `REPORT.md`: таблица решения 7 и цена шага из меток 13.1 и 13.6 (сценарий «Цена в отчёте»), строки доказательств уровня 4 с новым commit, `bench/`-числа переносить из `summary.md` и `evidence/compare/`, а не считать вручную; новые файлы и метки `evidence/` — на карте `AGENTS.md`. Основная сессия коммитит evidence и отчёт. Проверка: каждое число отчёта есть в названном файле; `openspec validate unit-of-work --strict`.