diff --git a/.env.example b/.env.example index d32b9be0..dd47a2ca 100644 --- a/.env.example +++ b/.env.example @@ -1,13 +1,11 @@ # Copy to .env for your LOCAL synthetic test environment; never commit .env. -# These are logical interface suggestions; map actual framework names in REPORT.md. -APP_HOST=0.0.0.0 +# Variables used by compose.yaml for this local lab stack. APP_PORT=8080 APP_ENV=lab +POSTGRES_DB=chat +POSTGRES_USER=app +POSTGRES_PASSWORD=change_for_local_lab +DB_POOL_MAX=15 +CACHE_PREFIX=messenger:cache:v1 SESSION_TTL_SECONDS=3600 -# Choose credentials locally. File paths contain no secret values. -DATABASE_URL_FILE=/run/secrets/database_url -# Optional on 3, required use on 4 in lab2; Redis OR Valkey: -SESSION_STORE=postgres -CACHE_URL_FILE=/run/secrets/cache_url -API_REPLICAS=2 IDEMPOTENCY_TTL_SECONDS=86400 diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 00000000..fdd00d37 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,6 @@ +test/*.sh text eol=lf +test/*.cmd text eol=crlf +scripts/*.sh text eol=lf +scripts/*.cmd text eol=crlf +infra/*.sh text eol=lf +scripts/diagnostics/*.sh text eol=lf diff --git a/.gitignore b/.gitignore index b5a71896..ecd09920 100644 --- a/.gitignore +++ b/.gitignore @@ -19,11 +19,15 @@ __pycache__/ *.py[cod] node_modules/ dist/ +src/generated/prisma/ +*.tsbuildinfo +.pnpm-store/ build/ target/ bin/ obj/ coverage/ +.artifacts/ *.log .DS_Store .idea/ diff --git a/.oxlintrc.json b/.oxlintrc.json new file mode 100644 index 00000000..fd932650 --- /dev/null +++ b/.oxlintrc.json @@ -0,0 +1,11 @@ +{ + "$schema": "./node_modules/oxlint/configuration_schema.json", + "ignorePatterns": ["src/generated/**"], + "rules": { + "typescript/no-explicit-any": "off", + "typescript/no-floating-promises": "error" + }, + "env": { + "node": true + } +} diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 00000000..a20502b7 --- /dev/null +++ b/.prettierrc @@ -0,0 +1,4 @@ +{ + "singleQuote": true, + "trailingComma": "all" +} diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 00000000..ec322d56 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,58 @@ +FROM node:24.20.0-bookworm-slim AS base + +WORKDIR /app +RUN apt-get update \ + && apt-get install -y --no-install-recommends openssl \ + && rm -rf /var/lib/apt/lists/* +RUN npm install --global pnpm@10.14.0 + +FROM base AS dependencies + +COPY package.json pnpm-lock.yaml ./ +RUN pnpm install --frozen-lockfile + +FROM dependencies AS migrate + +COPY prisma ./prisma +COPY prisma.config.ts ./ +CMD ["pnpm", "db:deploy"] + +FROM migrate AS build + +COPY nest-cli.json tsconfig.json tsconfig.build.json ./ +COPY src ./src +RUN pnpm build + +FROM base AS production-dependencies + +COPY package.json pnpm-lock.yaml ./ +RUN pnpm install --prod --frozen-lockfile + +FROM node:24.20.0-bookworm-slim AS runtime + +RUN apt-get update \ + && apt-get install -y --no-install-recommends curl \ + && rm -rf /var/lib/apt/lists/* + +ENV NODE_ENV=production \ + APP_HOST=0.0.0.0 \ + APP_PORT=8080 + +WORKDIR /app + +RUN groupadd --system --gid 10001 app \ + && useradd --system --uid 10001 --gid app --home-dir /app --shell /usr/sbin/nologin app + +RUN mkdir -p /app/data && chown 10001:10001 /app/data + +COPY --from=production-dependencies --chown=10001:10001 /app/node_modules ./node_modules +COPY --from=build --chown=10001:10001 /app/dist ./dist +COPY --from=build --chown=10001:10001 /app/package.json ./package.json + +USER 10001:10001 +EXPOSE 8080 + +HEALTHCHECK --interval=30s --timeout=3s --start-period=15s --retries=3 \ + CMD curl --fail --silent --show-error --max-time 2 --output /dev/null "http://127.0.0.1:${APP_PORT:-8080}/health/ready" + +CMD ["node", "dist/main.js"] diff --git a/Dockerfile.example b/Dockerfile.example deleted file mode 100644 index e333a12e..00000000 --- a/Dockerfile.example +++ /dev/null @@ -1,8 +0,0 @@ -# Teaching outline, not a runnable Dockerfile. Implement your own Dockerfile. -# 1. Choose a runtime/toolchain version and pin the base image tag/digest. -# 2. Copy dependency manifests first; install from the language lockfile. -# 3. Copy source and build. For compiled languages use a separate runtime stage. -# 4. Run the HTTP process as PID 1; listen on 0.0.0.0:8080. -# 5. Add non-root, signals and healthcheck according to the current rubric. -# 6. Pass runtime config/secrets at startup, never COPY .env or secret files. -# This file deliberately has no FROM/CMD: selecting/implementing them is the task. diff --git a/REPORT.md b/REPORT.md index c2679005..301fbd74 100644 --- a/REPORT.md +++ b/REPORT.md @@ -1,37 +1,170 @@ # Отчёт — лабораторная 3 -- Автор, группа: TODO -- Целевая оценка; выбранный трек 5, если нужен: TODO -- Commit/PR: TODO после публикации -- Использованные источники, библиотеки и помощь ИИ: TODO +- Автор, группа: **Пинаев Олег Константинович, БПИ2302**. +- Целевая оценка: **5, трек 1 — цена масштабирования**. +- Версия: API — коммит `24f32c3`, инфраструктура — `676b38c`, проверки — `5c8bcf0`; основа — skeleton `0ab3a34`. Хеши и образы измеренной версии сохранены в [measurements.json](evidence/measurements.json), актуальной проверенной версии — в [checks.json](evidence/checks.json). +- Источники: `README.md`, `COURSE.md`, `contracts/`, документация PostgreSQL, Redis, Node.js и Docker. ИИ использовался при разработке, подготовке проверок, замеров и отчёта. ## Запуск из чистого clone -TODO: версии runtime/образов, prerequisites, команды создания локальных secrets/.env, build, миграций, запуска, ожидания готовности, тестов и остановки. Указать необходимые действия оператора. Не вставлять секреты. Отдельно указать безопасную остановку и команду намеренного удаления учебных данных. +Нужны Docker с Compose, Python **3.9+**, Node.js **24.20.0**, pnpm **10.14.0**. Образы: `node:24.20.0-bookworm-slim`, `postgres:17.6-bookworm`, `redis:7.4.5-alpine`, `nginx:1.30.6-alpine`. Для графиков используется закреплённый в команде диапазон Matplotlib, для нагрузки — `grafana/k6:1.3.0`. + +```sh +cp .env.example .env +pnpm install --frozen-lockfile +docker compose --env-file .env config --quiet +docker compose --env-file .env up -d --build +chmod +x scripts/restart.sh scripts/stop-one.sh +python -X utf8 scripts/collect-report-checks.py --base-url http://127.0.0.1:8080 +``` + +Учебный пароль PostgreSQL заменить в локальном `.env`, сам файл не публиковать. `APP_PORT` задаёт только публичный порт Nginx; в контейнерах API слушает 8080. `POSTGRES_*` — настройки общей БД, `DB_POOL_MAX` — максимум соединений **одной** API, `SESSION_TTL_SECONDS` — срок сессии, `IDEMPOTENCY_TTL_SECONDS` — срок идемпотентности не менее 86400 с, `CACHE_PREFIX` — пространство ключей Redis. Адреса БД и Redis внутри Compose устанавливаются именами сервисов. API не публикуют порты наружу. + +Миграции выполняет отдельный сервис `migrate`; API запускаются после успешного завершения миграции и готовности хранилищ, Nginx — после готовности API. Перед HTTP-проверками должны быть healthy обе API и доступен `/health/ready` через Nginx. `/swagger` и `/docs` доступны через тот же LB. На Windows используется `.cmd`-обёртка с Git Bash; при нестандартной установке Git задаётся `GIT_BASH`. В выполненных проверках локальный `.env` задавал порт **18080**, поэтому их команды используют этот порт. Запуск из полностью чистого clone отдельно не проверялся. + +Безопасная остановка — `docker compose down`: named volumes остаются. **Намеренное удаление учебных данных** — `docker compose down --volumes`; для обычного перезапуска эту команду не использовать. ## Архитектура и решения -TODO: схема процессов/хранилищ, источник истины, транзакционные границы, ограничения. Что перенесено из lab2, что изменено в этой работе. Соответствие переменных из .env.example реальной конфигурации. +Клиент → **Nginx → NestJS/Fastify × 2 → PostgreSQL**, Redis используется как общий кэш. Из lab2 сохранены пользователи, чаты, членство, Argon2id, Bearer-сессии, cursor-пагинация и согласованность кэша через эпохи. PostgreSQL остаётся источником истины; сессии хранятся в общей таблице, в БД записывается SHA-256 токена. Переключение API не требует повторного входа. Потеря Redis приводит к чтению из PostgreSQL, недоступность БД — к 503. + +Новые элементы lab3 — заголовок `X-Instance-Id`, несколько реплик одного Compose-service, общая идемпотентность POST сообщения, балансировка и проверки отказа. `INSTANCE_ID` получает hostname контейнера. `container_name` и sticky sessions не используются. + +Идемпотентность хранится в PostgreSQL с уникальным ключом `(user_id, chat_id, key)`. В одной транзакции API резервирует ключ через `INSERT ... ON CONFLICT`, создаёт сообщение, изменяет эпоху истории и связывает ключ с сообщением. Конкурирующий повтор получает то же сообщение; другое содержимое с тем же ключом возвращает 409. После истечения TTL запись удаляется при следующем обращении с этим ключом; фонового удаления всех истёкших записей нет. Счётчик истории разделён на 16 строк; запись и увеличение одного счётчика выполняются одним CTE. + +Nginx применяет `least_conn`. Каждый обход получает адреса API из Docker DNS и проверяет `/health/ready` **параллельно**, ограничивая каждый HTTP-запрос одной секундой; после обхода выдерживается пауза 2 с. Backend добавляется после двух успехов и исключается после двух неудач; исчезнувший из DNS адрес удаляется сразу. Сетевые таймауты реплик не суммируются, но DNS, планирование CPU и reload добавляют задержку: пауза 2 с не означает обнаружение за 2 с. Пассивные проверки используют `max_fails=2 fail_timeout=2s`, connect timeout — 2 с, read timeout — 30 с. + +Readiness выполняет `SELECT 1`, liveness не обращается к БД. При SIGTERM/SIGINT ранний хук HTTP-адаптера сначала включает **draining**: `/health/ready` возвращает 503 без запроса к БД, `/health/live` продолжает возвращать 200. API ещё 7 с обслуживает обычные запросы, пока Nginx исключает её после двух неудачных проверок. Задержка согласована с двумя параллельными обходами по `(1 с таймаута + 2 с паузы)` и запасом 1 с на обновление upstream; это расчёт для текущих настроек, не гарантия при произвольной нагрузке хоста. + +После окна draining Fastify прекращает приём новых соединений и ждёт завершения активных HTTP-запросов. Их ответы на этапе закрытия получают `Connection: close`, чтобы keep-alive не задерживал остановку. Только затем NestJS закрывает Prisma/Redis; повторное начало shutdown не запускает второй таймер и повторное закрытие HTTP. Compose, restart-hook и stop-one-hook дают процессу до 30 с до принудительного завершения. Проверка подключения/SQL ограничена 5 с, транзакции — 10 с. Образ разделён на build/migrate/runtime, API работает от UID/GID 10001. + +Обычный профиль — две API по **1 CPU / 512 МиБ**, PostgreSQL — **1 CPU / 512 МиБ**, Nginx — **0,5 CPU / 128 МиБ**, Redis — **0,5 CPU / 256 МиБ**. Пул по умолчанию 15 на API. В исследовании общий бюджет соединений задавался отдельно: по 32/16/8 для 1/2/4 API, до 32 суммарно. ## Доказательства критериев -| Критерий README | Команда/сценарий | Наблюдаемый результат | Файл доказательства | -| --- | --- | --- | --- | -| Публичный smoke | make test | TODO | TODO | -| Остальные пункты уровня 3 | TODO | TODO | TODO | -| Все пункты уровня 4, если заявлен | TODO | TODO | TODO | -| Выбранный трек 5, если заявлен | TODO | TODO | TODO | +Повторные проверки выполнены 29.10.2026; команды, длительности, метрики и состояния контейнеров собраны в одном [checks.json](evidence/checks.json). -TODO: добавить отдельную строку для каждого заявленного критерия. PASS без команды и наблюдения не является доказательством. Проверка инфраструктурного hook требует подтверждения, какие реальные процессы/хранилища перезапущены. +| Проверка | Команда/сценарий | Результат | +| --- | --- | --- | +| Структура, сборка, линтер | `python scripts/check_contract.py`, `pnpm lint`, `pnpm build` | PASS | +| Публичный smoke | `python -X utf8 tests/smoke.py --base-url http://127.0.0.1:18080` | PASS, включая `X-Instance-Id` и POST с `Idempotency-Key` | +| Общая идемпотентность | `test/idempotency.mjs` через `docker compose run` | PASS: два экземпляра приложения, 12 конкурентных запросов с одним ключом, одинаковое сообщение; другой текст — 409, чужой участник — 404 | +| Полный перезапуск | Публичный `tests/resilience.py --mode persistence` с `scripts/restart.cmd` | PASS, 59,507 с; API/Nginx/PG/Redis действительно перезапущены, контейнеры и volumes сохранены, прежние данные и сессия доступны | +| Публичный отказ | `tests/resilience.py --mode failover` с `scripts/stop-one.cmd` | PASS: до отказа две реплики, 73 успешные записи, 1 неудачная попытка, первая запись после завершения hook за 7,900 с от его запуска | +| Ресурсы и доступ | `test/grade4.py --scenario resources` | PASS: реальные CPU/RAM совпадают с профилем, в снимке контейнеров публичный порт есть только у Nginx, `migrate` завершён с кодом 0 | +| Отказ каждой API | `test/grade4.py --scenario failover --concurrency 4 --observe-seconds 10` | PASS: поочерёдно остановлены обе реплики; прежняя сессия, подтверждённые записи и отсутствие дублей проверены | +| Поочерёдная замена | `test/grade4.py --scenario rolling --concurrency 4 --observe-seconds 10` | PASS: ID обеих API заменены по очереди, трафик продолжался, контейнер миграции не менялся | +| Завершение активного запроса | `node --test --test-reporter=tap test/draining.mjs` | PASS, 2 теста: запрос завершён до закрытия БД, liveness доступен при draining, повторный shutdown идемпотентен, readiness не возвращает запоздалый 200 | +| Пороги readiness Nginx | `test/nginx-readiness.sh`, `test/nginx-readiness-parallel.sh` в изолированных контейнерах | PASS: пороги двух успехов/неудач сохранены, четыре пробы запускаются параллельно | +| SIGTERM и draining | `python -X utf8 test/check_shutdown.py --base-url http://127.0.0.1:18080` | PASS: readiness `200 → 503 → закрыто`; 114 ответов 503 при liveness=200; LB исключил API через 3,282 с при живом HTTP, остановка 9,963 с, exit code 143 без SIGKILL | +| Совместимость миграции | `python -X utf8 test/check_migration_compat.py` | PASS в отдельной временной БД: миграция 28,386 с, 77 записей старого API без ошибок; общая сессия и взаимное чтение старой/новой версии | +| Трек 1 | Матрица 1/2/4 API, рост CPU, квота PG и размер пула | 54 сохранённых прогона, [CSV](evidence/scaling.csv), [агрегаты и диагностика](evidence/measurements.json), рисунки ниже | + +Все 16 проверок актуальной версии имеют итоговый PASS. Первый вариант прямого shutdown-теста завершился ошибкой из-за того, что считал клиентские ошибки соединения в парных пробах признаком нездорового HTTP-ответа liveness. В повторе дедлайн проб увеличен с 0,3 до 1 с; HTTP-статусы и транспортные ошибки считаются отдельно. Получены 114 ответов liveness=200 при readiness=503 и ноль транспортных ошибок в этих парах. Неудачная попытка сохранена в `previous_attempts`, хеши прежнего теста — в `source_before_recheck_sha256`. Предыдущие 13 проверок версии без draining, включая историю повтора сохранности, оставлены в компактном `previous_validation`. + +Hook полного перезапуска сохраняет число API и volumes, останавливает Nginx/API/PG/Redis, затем поднимает хранилища, API и LB. Hook отказа сопоставляет полученный `TARGET_INSTANCE_ID` с hostname и оставляет именно эту API остановленной. Сборщик доказательств после проверки восстанавливает две реплики. ## Эксперименты и отказы -TODO: гипотеза, hardware/лимиты, версии, объём данных, профиль нагрузки, concurrency/arrival rate, длительность/прогрев, повторы, успешные RPS, ошибки, p50/p95/p99, CPU/RAM. Сохранить raw summary без tokens и объяснить ограничения измерения. +### Отказ и замена API -| Воздействие | Что ожидаем | Что наблюдали | Время восстановления / потеря данных | -| --- | --- | --- | --- | -| TODO | TODO | TODO | TODO | +Четыре параллельных клиента через LB читают профиль и пишут сообщения; неподтверждённая запись повторяется с исходным ключом. Метрики ниже относятся к окну действия и 10 с наблюдения после него. + +| Воздействие | Успешные RPS чтения / записи | Ошибки чтения / записи | Наблюдаемый результат | +| --- | ---: | ---: | --- | +| Остановка первой API | 21,199 / 14,348 | 0 / 0 | После окончания остановки чтение/запись успешны на 8,581 / 8,570 с от начала действия | +| Остановка второй API | 19,580 / 13,140 | 0 / 0 | После окончания остановки чтение/запись успешны на 9,259 / 9,304 с от начала действия | +| Замена первой API | 19,516 / 12,519 | 0 / 2 | Новый контейнер готов через 31,297 с, сохранившаяся реплика отвечала уже через 0,051 с | +| Замена второй API | 18,670 / 12,175 | 0 / 0 | Новый контейнер готов через 24,332 с, сохранившаяся реплика отвечала уже через 0,056 с | + +В сценарии отказа проверена 1001 подтверждённая запись, в сценарии замены — 1082; потеря подтверждённых сообщений и дубли не обнаружены. Последний ответ останавливаемой API наблюдался через 4,718 и 5,443 с от начала действия: в окне draining она ещё обслуживала запросы до исключения из LB. Это наблюдение конкретных прогонов, а не теоретическая верхняя граница исключения backend. Время создания нового контейнера не равно времени недоступности сервиса: другая API продолжала обслуживать запросы. Нулевые ошибки двух отказов не означают их отсутствие при любых нагрузках: публичный сценарий и первая замена зафиксировали переходные неудачные попытки. + +### Трек 1: цена масштабирования + +Гипотеза: дополнительные API при неизменном суммарном бюджете не дают линейного роста, поскольку делят CPU, создают отдельные пулы и используют одну БД. Увеличение нужного ресурса или ограничение невыгодного параллелизма должно улучшать качество. + +Генератор и наблюдатели делят ресурсы с приложением. Набор синтетический: новый чат с 30 сообщениями на прогон, первая страница до 50 сообщений, 80% чтений и 20% отправок. Время регистрации/входа не входит в измеряемое окно. База между прогонами не очищалась. + +В основной матрице k6 одна итерация равна одному запросу, задан постоянный arrival rate, 128 VU на сценарий, таймаут 5 с, POST без автоматических повторов. Измерение 30 с после 10 с смешанного прогрева. 36 прогонов: 1/2/4 API × общий CPU 1/2 × 40/80 RPS × три повтора. Общая RAM API — 1 ГиБ, общий максимум соединений — 32, PG — 1 CPU / 512 МиБ во всех вариантах. Порядок попарный: `one-small → one → two-small → two → four-small → four`; внутри каждого профиля 40/80 чередуются. + +Экспериментальный критерий качества — ошибки ≤1% и **p95 всех запросов ≤1000 мс**. Достаточная подача — 98–102% планового числа начатых запросов и не более 2% пропусков. + +| API | CPU суммарно | CPU / RAM одной API | Медиана p95 на 40 RPS, мс | Проход / нарушение / недоподача | +| ---: | ---: | --- | ---: | --- | +| 1 | 1 | 1 / 1024 МиБ | 1363 | 0 / 3 / 0 | +| 2 | 1 | 0,5 / 512 МиБ | 1338 | 0 / 3 / 0 | +| 4 | 1 | 0,25 / 256 МиБ | 808 | 2 / 0 / 1 | +| 1 | 2 | 2 / 1024 МиБ | 751 | 2 / 1 / 0 | +| 2 | 2 | 1 / 512 МиБ | **452** | **3 / 0 / 0** | +| 4 | 2 | 0,5 / 256 МиБ | 1044 | 1 / 2 / 0 | + +При фиксированных 2 CPU две API прошли все повторы на 40 RPS, четыре — один из трёх. Рост числа процессов не улучшил качество. Четыре API при 1 CPU дали два прохода. + +При увеличении CPU **двух API с 1 до 2** p95 трёх повторов изменился с **1119 / 1757 / 1338** на **777 / 452 / 404 мс**. Все шесть повторов получили достаточную нагрузку, ошибок нет. Медиана p95 снизилась примерно **в 2,96 раза**, медиана максимальной среди API доли throttled-периодов — **18,83 → 1,30%**. Это повторяемое улучшение задержки при прежних RAM, пуле и БД. + +На 80 RPS у двух API с общим 1 CPU было 658 / 473 / 499 ошибок, при 2 CPU — 0 / 31 / 0. У четырёх API — 219 / 1 / 101 против 0 / 3 / 0. + +![Число реплик, фиксированный бюджет и рост CPU](evidence/scaling.png) + +### Ограничение PostgreSQL и увеличение его квоты + +Раннее сравнение: четыре API с суммарными 2 CPU / 1 ГиБ, пул по 15, то есть до 60 соединений. Linux Node-генератор через Nginx, 60 заданных RPS, по три повтора по 120 с после 20 с прогрева чтениями. PostgreSQL получил 1 CPU вместо 0,5, RAM осталась 512 МиБ. Облегчённый наблюдатель v3 держал одно постоянное psql-соединение. + +| Метрика | PG 0,5 CPU | PG 1 CPU | +| --- | ---: | ---: | +| Средняя загрузка PG, CPU | 0,32–0,39 | 0,32–0,39 | +| Загрузка относительно выделенной квоты | 64–78% | 32–39% | +| Периоды с CPU throttling PG | 33–55% | 3–8% | +| Медиана p95 успешных запросов, мс | 826 | **296** | +| Ошибки за три повтора | 121 | **1** | +| Средние успешные RPS | 52,81 | 53,00 | +| Медиана среднего получения соединения, мс | 23,61 | **1,17** | + +При квоте 0,5 CPU среднее потребление ниже лимита, но во время всплесков квота регулярно исчерпывалась. В проблемной области наблюдались ошибки получения соединений и ожидания блокировок записи; четыре API не добавляли ресурсов общей БД. Увеличение CPU базы снизило p95 примерно в 2,8 раза и ошибки при почти одинаковом числе отправленных запросов. Это подтверждает влияние CPU-квоты PG на задержки и надёжность. + +Последующий контроль **PG 1 → 2 CPU** выполнен отдельно: две API с общими 2 CPU / 1 ГиБ, пул 32, k6, 80 RPS, одинаковые 30 с смешанного прогрева и 30 с измерения. При 1 CPU получены два прохода и одно нарушение задержки: p95 **793 / 2026 / 744 мс**. При 2 CPU — два недоподанных повтора и один проход: **2122 / 1555 / 713 мс**. Throttling PG исчез, но устойчивого выигрыша не получено. Следовательно, усиление БД после снятия жёсткой квоты не гарантирует дальнейшего роста. + +### Ограничение общего числа соединений + +Четыре API, PG 1 CPU / 512 МиБ, остальные ресурсы прежние. Сравниваются пулы по 15 и по 8 на API: общий максимум **60 → 32**. Node-генератор, 100 заданных RPS, по три повтора по 60 с после 15 с прогрева чтением. + +| Метрика | 60 соединений | 32 соединения | +| --- | ---: | ---: | +| Успешных запросов за 180 с | 13 447 | **14 543** | +| Средние успешные RPS | 74,71 | **80,79** | +| Ошибки | 488 | **4** | +| Ошибки получения соединений | 418 | **0** | +| Медиана успешных RPS повторов | 83,93 | 82,05 | +| Медиана p95 успешных запросов, мс | 289 | 389 | + +Средний полезный поток вырос **на 8,15%**, ошибок стало меньше. Однако все 488 ошибок исходного варианта пришлись на один нестабильный повтор, а фактически отправленный поток вырос с 77,42 до 80,82 RPS. Это наблюдаемый выигрыш надёжности и среднего полезного потока, а не доказательство ускорения каждого запроса или увеличения предельного RPS. Ограничение пула согласуется с гипотезой защиты общей БД от невыгодного параллелизма; само увеличение числа соединений производительность не гарантирует. + +![Отдельные сравнения CPU API, квоты PG и пула соединений](evidence/improvements.png) + +### Исходные данные и повторение + +В `evidence/` оставлены **пять файлов**: `checks.json`, `measurements.json`, `scaling.csv`, `scaling.png`, `improvements.png`. JSON содержит 54 прогона из семи исходных серий, их HTTP-агрегаты, p50/p95/p99, CPU/RAM, очереди, SQL-состояния, профили, manifest и хеши исходных результатов. CSV — плоская таблица тех же прогонов. Запросы по отдельности, stdout/stderr, временные ряды, экспериментальные README и дубли рисунков удалены. Ненужные предварительные и отменённые серии в отчёт не включены. + +Повтор основной матрицы в отдельный временный каталог: + +```sh +python -X utf8 scripts/run-saturation.py --profiles one-small one two-small two four-small four --confirm-rates 40 80 --confirm-seconds 30 --no-expand --output .artifacts/scaling/repeat +python -X utf8 scripts/summarize-scaling-diagnostics.py .artifacts/scaling/repeat +python -X utf8 scripts/audit-saturation.py .artifacts/scaling/repeat +``` + +После серии runner восстанавливает обычные две API. Варианты исторических сравнений требуют соответствующих квот PG и размеров пулов, записанных в `measurements.json`; их не следует повторять с текущим пулом 8 и выдавать за старый вариант с пулом 15. Инструкции измерителей — в `scripts/diagnostics/`. + +Пересчитать CSV и два рисунка из сохранённых данных без новой нагрузки: + +```sh +uv run --no-project --with 'matplotlib>=3.9,<4' python scripts/report-evidence.py --plot +``` ## Ограничения и следующие шаги -TODO: какие отказы выдерживаются и какие нет; что не реализовано; где учебное упрощение; какое улучшение подтверждено, а какое пока гипотеза. +Один Docker-host, одна БД, один Redis и один LB. Проверен отказ и замена API, но не выживание при потере узла PostgreSQL, Nginx или всего ноутбука. Резервирование хранилищ и распределённый кластер не реализованы. Rolling-проверка использовала тот же образ; совместимость схемы lab2/lab3 проверена отдельно, но старая API из lab2 не умеет `Idempotency-Key`, поэтому во время смешанного развёртывания нельзя обещать идемпотентность POST, попавшего на старую версию. + +В штатном режиме readiness зависит от ответа PG: краткие задержки базы способны исключить живую API и усилить ошибки. Draining использует 7-секундное окно под текущие параллельные проверки Nginx; при изменении таймаутов, паузы или порогов LB это окно нужно пересогласовать. Активные запросы завершаются в пределах общего 30-секундного бюджета Docker; бесконечно долгие запросы этот бюджет не продлевают. Чистый bootstrap на другой машине и под другим Docker-окружением не проверен. Нагрузочные сравнения не повторялись после добавления draining: их данные относятся к прежнему образу, проверки остановки и отказов — к актуальному. + +Итог исследования: две API — устойчивый рабочий вариант при текущем бюджете; увеличение их CPU улучшило задержки, усиление PG с 0,5 до 1 CPU улучшило работу зависимого пути, ограничение соединений сопровождалось снижением ошибок. Дальнейший рост реплик, пула или квоты PG сам по себе выигрыша не гарантирует. Следующий шаг для уточнения границы — независимый генератор или больший запас хоста и чередование вариантов с достаточной фактической подачей. diff --git a/compose.example.yaml b/compose.example.yaml deleted file mode 100644 index dd4d3878..00000000 --- a/compose.example.yaml +++ /dev/null @@ -1,11 +0,0 @@ -# Topology worksheet, deliberately NOT a runnable stack (no application supplied). -# Implement compose.yaml or stack.yaml; do not submit this empty file as deployment. -# Service names below are logical roles, not imposed container names. -x-lab-number: 3 -x-required-roles: - - api - - postgres - - load_balancer -# TODO: implement real images/builds, network wiring, volumes, healthchecks, -# credentials and bootstrap. Details: contracts/infrastructure.json and README.md. -services: {} diff --git a/compose.yaml b/compose.yaml new file mode 100644 index 00000000..e73f18eb --- /dev/null +++ b/compose.yaml @@ -0,0 +1,113 @@ +services: + api: + build: + context: . + target: runtime + restart: unless-stopped + init: true + cpus: '1.0' + mem_limit: 512m + deploy: + replicas: 2 + command: ['sh', '-c', 'INSTANCE_ID=$$(hostname) exec node dist/main.js'] + environment: + NODE_ENV: production + APP_ENV: ${APP_ENV:-lab} + APP_HOST: 0.0.0.0 + APP_PORT: 8080 + DATABASE_URL: postgresql://${POSTGRES_USER:-app}:${POSTGRES_PASSWORD:-local_dev_password}@postgres:5432/${POSTGRES_DB:-chat} + DB_POOL_MAX: ${DB_POOL_MAX:-15} + CACHE_URL: redis://redis:6379/0 + CACHE_PREFIX: ${CACHE_PREFIX:-messenger:cache:v1} + SESSION_TTL_SECONDS: ${SESSION_TTL_SECONDS:-3600} + IDEMPOTENCY_TTL_SECONDS: ${IDEMPOTENCY_TTL_SECONDS:-86400} + depends_on: + migrate: + condition: service_completed_successfully + postgres: + condition: service_healthy + redis: + condition: service_healthy + healthcheck: + test: + - CMD + - curl + - --fail + - --silent + - --show-error + - --max-time + - '2' + - --output + - /dev/null + - http://127.0.0.1:8080/health/ready + interval: 10s + timeout: 3s + start_period: 20s + retries: 5 + stop_grace_period: 30s + + nginx: + image: nginx:1.30.6-alpine + restart: unless-stopped + cpus: '0.5' + mem_limit: 128m + ports: + - '127.0.0.1:${APP_PORT:-8080}:80' + volumes: + - ./infra/nginx.conf:/etc/nginx/nginx.conf:ro + - ./infra/start-nginx.sh:/etc/nginx/start-nginx.sh:ro + entrypoint: ['/bin/sh', '/etc/nginx/start-nginx.sh'] + depends_on: + api: + condition: service_healthy + + migrate: + build: + context: . + target: migrate + cpus: '1.0' + mem_limit: 512m + environment: + DATABASE_URL: postgresql://${POSTGRES_USER:-app}:${POSTGRES_PASSWORD:-local_dev_password}@postgres:5432/${POSTGRES_DB:-chat} + depends_on: + postgres: + condition: service_healthy + + postgres: + image: postgres:17.6-bookworm + restart: unless-stopped + cpus: '1.0' + mem_limit: 512m + environment: + POSTGRES_DB: ${POSTGRES_DB:-chat} + POSTGRES_USER: ${POSTGRES_USER:-app} + POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-local_dev_password} + volumes: + - postgres_data:/var/lib/postgresql/data + healthcheck: + test: ['CMD-SHELL', 'pg_isready -U "$$POSTGRES_USER" -d "$$POSTGRES_DB"'] + interval: 5s + timeout: 3s + start_period: 10s + retries: 10 + stop_grace_period: 30s + + redis: + image: redis:7.4.5-alpine + restart: unless-stopped + cpus: '0.5' + mem_limit: 256m + command: + ['redis-server', '--appendonly', 'yes', '--appendfsync', 'everysec'] + volumes: + - redis_data:/data + healthcheck: + test: ['CMD', 'redis-cli', 'ping'] + interval: 5s + timeout: 3s + retries: 10 + stop_grace_period: 30s + +volumes: + postgres_data: + redis_data: diff --git a/configs/four-large.yaml b/configs/four-large.yaml new file mode 100644 index 00000000..d5478f6a --- /dev/null +++ b/configs/four-large.yaml @@ -0,0 +1,8 @@ +services: + api: + environment: + DB_POOL_MAX: '8' + deploy: + replicas: 4 + cpus: '1.0' + mem_limit: 512m diff --git a/configs/four-small.yaml b/configs/four-small.yaml new file mode 100644 index 00000000..15cfb0a8 --- /dev/null +++ b/configs/four-small.yaml @@ -0,0 +1,8 @@ +services: + api: + environment: + DB_POOL_MAX: '8' + deploy: + replicas: 4 + cpus: '0.25' + mem_limit: 256m diff --git a/configs/four.yaml b/configs/four.yaml new file mode 100644 index 00000000..084c7c97 --- /dev/null +++ b/configs/four.yaml @@ -0,0 +1,8 @@ +services: + api: + environment: + DB_POOL_MAX: '8' + deploy: + replicas: 4 + cpus: '0.5' + mem_limit: 256m diff --git a/configs/one-small.yaml b/configs/one-small.yaml new file mode 100644 index 00000000..8eb742c7 --- /dev/null +++ b/configs/one-small.yaml @@ -0,0 +1,6 @@ +services: + api: + deploy: + replicas: 1 + cpus: '1.0' + mem_limit: 1024m diff --git a/configs/one.yaml b/configs/one.yaml new file mode 100644 index 00000000..fbcfda60 --- /dev/null +++ b/configs/one.yaml @@ -0,0 +1,6 @@ +services: + api: + deploy: + replicas: 1 + cpus: '2.0' + mem_limit: 1024m diff --git a/configs/two-small.yaml b/configs/two-small.yaml new file mode 100644 index 00000000..3cc10112 --- /dev/null +++ b/configs/two-small.yaml @@ -0,0 +1,6 @@ +services: + api: + deploy: + replicas: 2 + cpus: '0.5' + mem_limit: 512m diff --git a/configs/two.yaml b/configs/two.yaml new file mode 100644 index 00000000..94977fda --- /dev/null +++ b/configs/two.yaml @@ -0,0 +1,6 @@ +services: + api: + deploy: + replicas: 2 + cpus: '1.0' + mem_limit: 512m diff --git a/evidence/README.md b/evidence/README.md deleted file mode 100644 index 8df70015..00000000 --- a/evidence/README.md +++ /dev/null @@ -1,5 +0,0 @@ -# Доказательства - -Храните небольшие обезличенные результаты: команды и stdout проверок, JSON/CSV агрегатов нагрузки, EXPLAIN, dashboard JSON, текст разбора отказа. Укажите дату, commit, аппаратные лимиты и профиль нагрузки. - -Не добавляйте .env, session tokens, cookies, приватные ключи, credentials, реальные сообщения, raw dumps и signed URLs. Для скриншотов скрывайте секреты. Большие логи/бинарные traces сохраняйте отдельно по правилам преподавателя; одного скриншота без методики недостаточно. diff --git a/evidence/checks.json b/evidence/checks.json new file mode 100644 index 00000000..6ec3a77d --- /dev/null +++ b/evidence/checks.json @@ -0,0 +1,1540 @@ +{ + "recorded_at": "2026-10-29T08:12:38.932550+00:00", + "base_url": "http://127.0.0.1:18080", + "checks": [ + { + "name": "contract", + "command": [ + "C:\\Program Files\\Python313\\python.exe", + "-X", + "utf8", + "scripts/check_contract.py" + ], + "started": "2026-10-29T08:12:40.453037+00:00", + "exit_code": 0, + "status": "PASS", + "summary": [ + "PASS: offline skeleton structure, local refs and Python syntax; application NOT tested." + ], + "seconds": 17.364 + }, + { + "name": "lint", + "command": [ + "pnpm.cmd", + "lint" + ], + "started": "2026-10-29T08:12:57.817983+00:00", + "exit_code": 0, + "status": "PASS", + "summary": [], + "seconds": 14.84 + }, + { + "name": "build", + "command": [ + "pnpm.cmd", + "build" + ], + "started": "2026-10-29T08:13:12.661389+00:00", + "exit_code": 0, + "status": "PASS", + "summary": [], + "seconds": 49.585 + }, + { + "name": "draining", + "command": [ + "node", + "--test", + "--test-reporter=tap", + "test/draining.mjs" + ], + "started": "2026-10-29T08:14:02.255011+00:00", + "exit_code": 0, + "status": "PASS", + "summary": [ + "ok 1 - draining keeps liveness and dependencies alive until active HTTP work completes", + "ok 2 - readiness already querying the DB cannot return 200 after draining begins", + "# tests 2", + "# pass 2", + "# fail 0", + "# cancelled 0" + ], + "seconds": 6.247 + }, + { + "name": "nginx-readiness", + "command": [ + "docker", + "run", + "--rm", + "--network", + "none", + "--entrypoint", + "/bin/sh", + "-v", + "C:\\Users\\olpin\\Projects\\mtusi2026lab3-fork\\infra:/source:ro", + "-v", + "C:\\Users\\olpin\\Projects\\mtusi2026lab3-fork\\test\\nginx-readiness.sh:/test.sh:ro", + "nginx:1.30.6-alpine", + "/test.sh" + ], + "started": "2026-10-29T08:14:08.505206+00:00", + "exit_code": 0, + "status": "PASS", + "summary": [ + "PASS: admission, isolated failure, recovery, removal and re-admission; 3 reloads" + ], + "seconds": 4.894 + }, + { + "name": "nginx-readiness-parallel", + "command": [ + "docker", + "run", + "--rm", + "--network", + "none", + "--entrypoint", + "/bin/sh", + "-v", + "C:\\Users\\olpin\\Projects\\mtusi2026lab3-fork\\infra:/source:ro", + "-v", + "C:\\Users\\olpin\\Projects\\mtusi2026lab3-fork\\test\\nginx-readiness-parallel.sh:/test.sh:ro", + "nginx:1.30.6-alpine", + "/test.sh" + ], + "started": "2026-10-29T08:14:13.401456+00:00", + "exit_code": 0, + "status": "PASS", + "summary": [ + "PASS: four concurrent probes admitted after two successful rounds" + ], + "seconds": 5.687 + }, + { + "name": "smoke", + "command": [ + "C:\\Program Files\\Python313\\python.exe", + "-X", + "utf8", + "tests/smoke.py", + "--base-url", + "http://127.0.0.1:18080" + ], + "started": "2026-10-29T08:14:19.093397+00:00", + "exit_code": 0, + "status": "PASS", + "summary": [ + "PASS: lab3 public API scenario; infrastructure and grading evidence remain separate." + ], + "seconds": 12.865 + }, + { + "name": "idempotency", + "command": [ + "docker", + "compose", + "run", + "--rm", + "--no-deps", + "-T", + "-v", + "C:\\Users\\olpin\\Projects\\mtusi2026lab3-fork\\test\\idempotency.mjs:/app/test/idempotency.mjs:ro", + "api", + "node", + "--test", + "test/idempotency.mjs" + ], + "started": "2026-10-29T08:14:31.959929+00:00", + "exit_code": 0, + "status": "PASS", + "summary": [], + "seconds": 23.077 + }, + { + "name": "persistence", + "command": [ + "C:\\Program Files\\Python313\\python.exe", + "-X", + "utf8", + "tests/resilience.py", + "--mode", + "persistence", + "--action-script", + "scripts/restart.cmd", + "--base-url", + "http://127.0.0.1:18080" + ], + "started": "2026-10-29T08:14:57.349615+00:00", + "exit_code": 0, + "status": "PASS", + "summary": [ + "PASS: persistence preserved confirmed data and existing session. Hook scope needs operator evidence." + ], + "seconds": 59.507, + "before": [ + { + "service": "api", + "id": "60df529195b979ecaf89c5ae3f90943cfad886d46184958fe71d302f6d5381e7", + "image": "sha256:61f1bfcd07cf183463d6ac162cf1aa23766f5cf2e0a0503dcbdeb0b762d764e6", + "started_at": "2026-10-29T08:07:53.355689983Z", + "status": "running", + "health": "healthy", + "exit_code": 0, + "cpu": 1.0, + "memory_mib": 512.0, + "pool_max": "15", + "command": [ + "sh", + "-c", + "INSTANCE_ID=$(hostname) exec node dist/main.js" + ], + "ports": {}, + "volumes": [] + }, + { + "service": "api", + "id": "8afa8e6966d507a01e9eb4fea4de4b0fde68d5ae2507e532b11ace78fb38d547", + "image": "sha256:61f1bfcd07cf183463d6ac162cf1aa23766f5cf2e0a0503dcbdeb0b762d764e6", + "started_at": "2026-10-29T08:07:51.843100289Z", + "status": "running", + "health": "healthy", + "exit_code": 0, + "cpu": 1.0, + "memory_mib": 512.0, + "pool_max": "15", + "command": [ + "sh", + "-c", + "INSTANCE_ID=$(hostname) exec node dist/main.js" + ], + "ports": {}, + "volumes": [] + }, + { + "service": "migrate", + "id": "54712687d1545d3c3f31e0a7f2ea644d35c44b36506065018df8c486cdf33d3c", + "image": "sha256:56e5b742612fa59b4e0bb09de668b4d6357e97d9811fe862f06f6bc3fa5aa858", + "started_at": "2026-10-28T05:10:21.875696751Z", + "status": "exited", + "health": null, + "exit_code": 0, + "cpu": 1.0, + "memory_mib": 512.0, + "pool_max": null, + "command": [ + "pnpm", + "db:deploy" + ], + "ports": {}, + "volumes": [] + }, + { + "service": "nginx", + "id": "0891b089ad4712a7f9899383b09755ceda41793c5fecd8cba6ef07568a38aedb", + "image": "sha256:47928bf67eb62a1863cb08d9ecb52d3e704304ba614eaee17884204677702951", + "started_at": "2026-10-29T08:12:35.59321535Z", + "status": "running", + "health": null, + "exit_code": 0, + "cpu": 0.5, + "memory_mib": 128.0, + "pool_max": null, + "command": null, + "ports": { + "80/tcp": [ + { + "HostIp": "127.0.0.1", + "HostPort": "18080" + } + ] + }, + "volumes": [] + }, + { + "service": "postgres", + "id": "d9f3adf56ca819973772bd039136681490c66c49d4630dc5bd62ea37fadd69d3", + "image": "sha256:f3bd19c606e442c3d7bdfa8002e03fe260a1023351e0ea4598032022b68dd6e3", + "started_at": "2026-10-29T08:11:11.834517401Z", + "status": "running", + "health": "healthy", + "exit_code": 0, + "cpu": 1.0, + "memory_mib": 512.0, + "pool_max": null, + "command": [ + "postgres" + ], + "ports": {}, + "volumes": [ + { + "name": "mtusi2026lab3-fork_postgres_data", + "destination": "/var/lib/postgresql/data" + } + ] + }, + { + "service": "redis", + "id": "a2ece96bc2f0b98b2b0a805c4a2ef6fd1e634b81c568554f80d018493494c189", + "image": "sha256:bb186d083732f669da90be8b0f975a37812b15e913465bb14d845db72a4e3e08", + "started_at": "2026-10-29T08:11:11.801812104Z", + "status": "running", + "health": "healthy", + "exit_code": 0, + "cpu": 0.5, + "memory_mib": 256.0, + "pool_max": null, + "command": [ + "redis-server", + "--appendonly", + "yes", + "--appendfsync", + "everysec" + ], + "ports": {}, + "volumes": [ + { + "name": "mtusi2026lab3-fork_redis_data", + "destination": "/data" + } + ] + } + ], + "after": [ + { + "service": "api", + "id": "60df529195b979ecaf89c5ae3f90943cfad886d46184958fe71d302f6d5381e7", + "image": "sha256:61f1bfcd07cf183463d6ac162cf1aa23766f5cf2e0a0503dcbdeb0b762d764e6", + "started_at": "2026-10-29T08:15:29.950263691Z", + "status": "running", + "health": "healthy", + "exit_code": 0, + "cpu": 1.0, + "memory_mib": 512.0, + "pool_max": "15", + "command": [ + "sh", + "-c", + "INSTANCE_ID=$(hostname) exec node dist/main.js" + ], + "ports": {}, + "volumes": [] + }, + { + "service": "api", + "id": "8afa8e6966d507a01e9eb4fea4de4b0fde68d5ae2507e532b11ace78fb38d547", + "image": "sha256:61f1bfcd07cf183463d6ac162cf1aa23766f5cf2e0a0503dcbdeb0b762d764e6", + "started_at": "2026-10-29T08:15:29.152072589Z", + "status": "running", + "health": "healthy", + "exit_code": 0, + "cpu": 1.0, + "memory_mib": 512.0, + "pool_max": "15", + "command": [ + "sh", + "-c", + "INSTANCE_ID=$(hostname) exec node dist/main.js" + ], + "ports": {}, + "volumes": [] + }, + { + "service": "migrate", + "id": "54712687d1545d3c3f31e0a7f2ea644d35c44b36506065018df8c486cdf33d3c", + "image": "sha256:56e5b742612fa59b4e0bb09de668b4d6357e97d9811fe862f06f6bc3fa5aa858", + "started_at": "2026-10-28T05:10:21.875696751Z", + "status": "exited", + "health": null, + "exit_code": 0, + "cpu": 1.0, + "memory_mib": 512.0, + "pool_max": null, + "command": [ + "pnpm", + "db:deploy" + ], + "ports": {}, + "volumes": [] + }, + { + "service": "nginx", + "id": "0891b089ad4712a7f9899383b09755ceda41793c5fecd8cba6ef07568a38aedb", + "image": "sha256:47928bf67eb62a1863cb08d9ecb52d3e704304ba614eaee17884204677702951", + "started_at": "2026-10-29T08:15:50.076114459Z", + "status": "running", + "health": null, + "exit_code": 0, + "cpu": 0.5, + "memory_mib": 128.0, + "pool_max": null, + "command": null, + "ports": { + "80/tcp": [ + { + "HostIp": "127.0.0.1", + "HostPort": "18080" + } + ] + }, + "volumes": [] + }, + { + "service": "postgres", + "id": "d9f3adf56ca819973772bd039136681490c66c49d4630dc5bd62ea37fadd69d3", + "image": "sha256:f3bd19c606e442c3d7bdfa8002e03fe260a1023351e0ea4598032022b68dd6e3", + "started_at": "2026-10-29T08:15:21.521775403Z", + "status": "running", + "health": "healthy", + "exit_code": 0, + "cpu": 1.0, + "memory_mib": 512.0, + "pool_max": null, + "command": [ + "postgres" + ], + "ports": {}, + "volumes": [ + { + "name": "mtusi2026lab3-fork_postgres_data", + "destination": "/var/lib/postgresql/data" + } + ] + }, + { + "service": "redis", + "id": "a2ece96bc2f0b98b2b0a805c4a2ef6fd1e634b81c568554f80d018493494c189", + "image": "sha256:bb186d083732f669da90be8b0f975a37812b15e913465bb14d845db72a4e3e08", + "started_at": "2026-10-29T08:15:21.468775476Z", + "status": "running", + "health": "healthy", + "exit_code": 0, + "cpu": 0.5, + "memory_mib": 256.0, + "pool_max": null, + "command": [ + "redis-server", + "--appendonly", + "yes", + "--appendfsync", + "everysec" + ], + "ports": {}, + "volumes": [ + { + "name": "mtusi2026lab3-fork_redis_data", + "destination": "/data" + } + ] + } + ], + "containers_restarted": true, + "volumes_preserved": true + }, + { + "name": "public-failover", + "command": [ + "C:\\Program Files\\Python313\\python.exe", + "-X", + "utf8", + "tests/resilience.py", + "--mode", + "failover", + "--action-script", + "scripts/stop-one.cmd", + "--base-url", + "http://127.0.0.1:18080" + ], + "started": "2026-10-29T08:15:59.167346+00:00", + "exit_code": 0, + "status": "PASS", + "summary": [ + "PASS: failover preserved confirmed data and existing session. Hook scope needs operator evidence." + ], + "details": { + "observed_instances_before": 2, + "successful_writes": 73, + "failed_attempts": 1, + "first_recovery_seconds": 7.9 + }, + "seconds": 20.61 + }, + { + "name": "grade4-resources", + "command": [ + "C:\\Program Files\\Python313\\python.exe", + "-X", + "utf8", + "test/grade4.py", + "--scenario", + "resources", + "--base-url", + "http://127.0.0.1:18080", + "--concurrency", + "4", + "--observe-seconds", + "10", + "--output", + "C:\\Users\\olpin\\AppData\\Local\\Temp\\lab3-report-91qipz4e\\grade4-resources.json" + ], + "started": "2026-10-29T08:16:39.554411+00:00", + "exit_code": 0, + "status": "PASS", + "summary": [ + "PASS: grade 4 scenario" + ], + "details": { + "scenario": "resources", + "resources": { + "api": [ + { + "instance": "60df529195b9", + "cpus": 1.0, + "memory_mib": 512 + }, + { + "instance": "8afa8e6966d5", + "cpus": 1.0, + "memory_mib": 512 + } + ], + "nginx": { + "cpus": 0.5, + "memory_mib": 128 + }, + "migrate": { + "cpus": 1.0, + "memory_mib": 512 + }, + "postgres": { + "cpus": 1.0, + "memory_mib": 512 + }, + "redis": { + "cpus": 0.5, + "memory_mib": 256 + } + }, + "actions": [] + }, + "seconds": 6.753 + }, + { + "name": "grade4-failover", + "command": [ + "C:\\Program Files\\Python313\\python.exe", + "-X", + "utf8", + "test/grade4.py", + "--scenario", + "failover", + "--base-url", + "http://127.0.0.1:18080", + "--concurrency", + "4", + "--observe-seconds", + "10", + "--output", + "C:\\Users\\olpin\\AppData\\Local\\Temp\\lab3-report-91qipz4e\\grade4-failover.json" + ], + "started": "2026-10-29T08:16:46.310612+00:00", + "exit_code": 0, + "status": "PASS", + "summary": [ + "PASS: grade 4 scenario" + ], + "details": { + "scenario": "failover", + "resources": { + "api": [ + { + "instance": "60df529195b9", + "cpus": 1.0, + "memory_mib": 512 + }, + { + "instance": "8afa8e6966d5", + "cpus": 1.0, + "memory_mib": 512 + } + ], + "nginx": { + "cpus": 0.5, + "memory_mib": 128 + }, + "migrate": { + "cpus": 1.0, + "memory_mib": 512 + }, + "postgres": { + "cpus": 1.0, + "memory_mib": 512 + }, + "redis": { + "cpus": 0.5, + "memory_mib": 256 + } + }, + "actions": [ + { + "target": "60df529195b9", + "action_seconds": 8.539, + "window_seconds": 18.539, + "traffic": { + "read": { + "successful": 393, + "errors": 0, + "successful_rps": 21.199, + "first_survivor_seconds": 0.155, + "first_success_after_action_seconds": 8.581 + }, + "write": { + "successful": 266, + "errors": 0, + "successful_rps": 14.348, + "first_survivor_seconds": 0.076, + "first_success_after_action_seconds": 8.57 + }, + "last_target_response_seconds": 4.718 + } + }, + { + "target": "8afa8e6966d5", + "action_seconds": 9.254, + "window_seconds": 19.254, + "traffic": { + "read": { + "successful": 377, + "errors": 0, + "successful_rps": 19.58, + "first_survivor_seconds": 0.638, + "first_success_after_action_seconds": 9.259 + }, + "write": { + "successful": 253, + "errors": 0, + "successful_rps": 13.14, + "first_survivor_seconds": 0.86, + "first_success_after_action_seconds": 9.304 + }, + "last_target_response_seconds": 5.443 + } + } + ], + "confirmed_writes": 1001, + "attempted_unique_writes": 1001, + "migration_container_unchanged": true + }, + "seconds": 82.472 + }, + { + "name": "grade4-rolling", + "command": [ + "C:\\Program Files\\Python313\\python.exe", + "-X", + "utf8", + "test/grade4.py", + "--scenario", + "rolling", + "--base-url", + "http://127.0.0.1:18080", + "--concurrency", + "4", + "--observe-seconds", + "10", + "--output", + "C:\\Users\\olpin\\AppData\\Local\\Temp\\lab3-report-91qipz4e\\grade4-rolling.json" + ], + "started": "2026-10-29T08:18:08.803393+00:00", + "exit_code": 0, + "status": "PASS", + "summary": [ + "PASS: grade 4 scenario" + ], + "details": { + "scenario": "rolling", + "resources": { + "api": [ + { + "instance": "60df529195b9", + "cpus": 1.0, + "memory_mib": 512 + }, + { + "instance": "8afa8e6966d5", + "cpus": 1.0, + "memory_mib": 512 + } + ], + "nginx": { + "cpus": 0.5, + "memory_mib": 128 + }, + "migrate": { + "cpus": 1.0, + "memory_mib": 512 + }, + "postgres": { + "cpus": 1.0, + "memory_mib": 512 + }, + "redis": { + "cpus": 0.5, + "memory_mib": 256 + } + }, + "actions": [ + { + "target": "60df529195b9", + "action_seconds": 31.297, + "window_seconds": 41.299, + "traffic": { + "read": { + "successful": 806, + "errors": 0, + "successful_rps": 19.516, + "first_survivor_seconds": 0.051, + "first_success_after_action_seconds": 31.306 + }, + "write": { + "successful": 517, + "errors": 2, + "successful_rps": 12.519, + "first_survivor_seconds": 0.034, + "first_success_after_action_seconds": 31.341 + } + } + }, + { + "target": "8afa8e6966d5", + "action_seconds": 24.332, + "window_seconds": 34.333, + "traffic": { + "read": { + "successful": 641, + "errors": 0, + "successful_rps": 18.67, + "first_survivor_seconds": 0.056, + "first_success_after_action_seconds": 24.394 + }, + "write": { + "successful": 418, + "errors": 0, + "successful_rps": 12.175, + "first_survivor_seconds": 0.046, + "first_success_after_action_seconds": 24.387 + } + } + } + ], + "confirmed_writes": 1082, + "attempted_unique_writes": 1082, + "migration_container_unchanged": true + }, + "seconds": 101.15 + }, + { + "name": "shutdown", + "command": [ + "C:\\Program Files\\Python313\\python.exe", + "-X", + "utf8", + "test/check_shutdown.py", + "--base-url", + "http://127.0.0.1:18080" + ], + "started": "2026-10-29T08:24:42.449217+00:00", + "exit_code": 0, + "status": "PASS", + "summary": [ + "PASS: readiness 200 -> 503 -> closed; liveness 200; LB withdrawal before HTTP close" + ], + "details": { + "stop_seconds": 9.963, + "lb_withdrawn_seconds": 3.282, + "lb_withdrawn_before_http_close": true, + "readiness_sequence": [ + 200, + 503, + "connection_error" + ], + "readiness_503_samples": 114, + "liveness_200_while_draining": 114, + "liveness_connection_errors_while_draining": 0, + "exit_code": 143, + "direct_ready_responses": { + "before": { + "200": 16 + }, + "stopping": { + "200": 3, + "503": 54 + }, + "withdrawn": { + "503": 60, + "connection_error": 39 + }, + "stopped": { + "connection_error": 1 + } + } + }, + "seconds": 36.3, + "previous_attempts": [ + { + "name": "shutdown", + "command": [ + "C:\\Program Files\\Python313\\python.exe", + "-X", + "utf8", + "test/check_shutdown.py", + "--base-url", + "http://127.0.0.1:18080" + ], + "started": "2026-10-29T08:19:49.963220+00:00", + "exit_code": 1, + "status": "FAIL", + "summary": [ + "FAIL: liveness must remain 200 while readiness is 503" + ], + "seconds": 40.801 + } + ] + }, + { + "name": "migration-compatibility", + "command": [ + "C:\\Program Files\\Python313\\python.exe", + "-X", + "utf8", + "test/check_migration_compat.py" + ], + "started": "2026-10-29T08:20:32.968558+00:00", + "exit_code": 0, + "status": "PASS", + "summary": [ + "PASS: additive migration compatible with running lab2 API" + ], + "details": { + "old_image": "mtusi2026lab2-fork-backend:latest", + "new_image": "mtusi2026lab3-fork-api:latest", + "migration_image": "mtusi2026lab3-fork-migrate:latest", + "migration_seconds": 28.386, + "old_writes_near_migration": 77, + "old_write_errors": 0, + "old_and_new_read_each_others_messages": true, + "existing_session_accepted_by_new_api": true, + "new_api_idempotent_replay": true, + "temporary_database": true + }, + "seconds": 110.867 + }, + { + "name": "final-smoke", + "command": [ + "C:\\Program Files\\Python313\\python.exe", + "-X", + "utf8", + "tests/smoke.py", + "--base-url", + "http://127.0.0.1:18080" + ], + "started": "2026-10-29T08:25:18.751208+00:00", + "exit_code": 0, + "status": "PASS", + "summary": [ + "PASS: lab3 public API scenario; infrastructure and grading evidence remain separate." + ], + "seconds": 4.549, + "previous_attempts": [ + { + "name": "final-smoke", + "command": [ + "C:\\Program Files\\Python313\\python.exe", + "-X", + "utf8", + "tests/smoke.py", + "--base-url", + "http://127.0.0.1:18080" + ], + "started": "2026-10-29T08:22:23.841834+00:00", + "exit_code": 0, + "status": "PASS", + "summary": [ + "PASS: lab3 public API scenario; infrastructure and grading evidence remain separate." + ], + "seconds": 7.277 + } + ] + } + ], + "initial": [ + { + "service": "api", + "id": "60df529195b979ecaf89c5ae3f90943cfad886d46184958fe71d302f6d5381e7", + "image": "sha256:61f1bfcd07cf183463d6ac162cf1aa23766f5cf2e0a0503dcbdeb0b762d764e6", + "started_at": "2026-10-29T08:07:53.355689983Z", + "status": "running", + "health": "healthy", + "exit_code": 0, + "cpu": 1.0, + "memory_mib": 512.0, + "pool_max": "15", + "command": [ + "sh", + "-c", + "INSTANCE_ID=$(hostname) exec node dist/main.js" + ], + "ports": {}, + "volumes": [] + }, + { + "service": "api", + "id": "8afa8e6966d507a01e9eb4fea4de4b0fde68d5ae2507e532b11ace78fb38d547", + "image": "sha256:61f1bfcd07cf183463d6ac162cf1aa23766f5cf2e0a0503dcbdeb0b762d764e6", + "started_at": "2026-10-29T08:07:51.843100289Z", + "status": "running", + "health": "healthy", + "exit_code": 0, + "cpu": 1.0, + "memory_mib": 512.0, + "pool_max": "15", + "command": [ + "sh", + "-c", + "INSTANCE_ID=$(hostname) exec node dist/main.js" + ], + "ports": {}, + "volumes": [] + }, + { + "service": "migrate", + "id": "54712687d1545d3c3f31e0a7f2ea644d35c44b36506065018df8c486cdf33d3c", + "image": "sha256:56e5b742612fa59b4e0bb09de668b4d6357e97d9811fe862f06f6bc3fa5aa858", + "started_at": "2026-10-28T05:10:21.875696751Z", + "status": "exited", + "health": null, + "exit_code": 0, + "cpu": 1.0, + "memory_mib": 512.0, + "pool_max": null, + "command": [ + "pnpm", + "db:deploy" + ], + "ports": {}, + "volumes": [] + }, + { + "service": "nginx", + "id": "0891b089ad4712a7f9899383b09755ceda41793c5fecd8cba6ef07568a38aedb", + "image": "sha256:47928bf67eb62a1863cb08d9ecb52d3e704304ba614eaee17884204677702951", + "started_at": "2026-10-29T08:12:35.59321535Z", + "status": "running", + "health": null, + "exit_code": 0, + "cpu": 0.5, + "memory_mib": 128.0, + "pool_max": null, + "command": null, + "ports": { + "80/tcp": [ + { + "HostIp": "127.0.0.1", + "HostPort": "18080" + } + ] + }, + "volumes": [] + }, + { + "service": "postgres", + "id": "d9f3adf56ca819973772bd039136681490c66c49d4630dc5bd62ea37fadd69d3", + "image": "sha256:f3bd19c606e442c3d7bdfa8002e03fe260a1023351e0ea4598032022b68dd6e3", + "started_at": "2026-10-29T08:11:11.834517401Z", + "status": "running", + "health": "healthy", + "exit_code": 0, + "cpu": 1.0, + "memory_mib": 512.0, + "pool_max": null, + "command": [ + "postgres" + ], + "ports": {}, + "volumes": [ + { + "name": "mtusi2026lab3-fork_postgres_data", + "destination": "/var/lib/postgresql/data" + } + ] + }, + { + "service": "redis", + "id": "a2ece96bc2f0b98b2b0a805c4a2ef6fd1e634b81c568554f80d018493494c189", + "image": "sha256:bb186d083732f669da90be8b0f975a37812b15e913465bb14d845db72a4e3e08", + "started_at": "2026-10-29T08:11:11.801812104Z", + "status": "running", + "health": "healthy", + "exit_code": 0, + "cpu": 0.5, + "memory_mib": 256.0, + "pool_max": null, + "command": [ + "redis-server", + "--appendonly", + "yes", + "--appendfsync", + "everysec" + ], + "ports": {}, + "volumes": [ + { + "name": "mtusi2026lab3-fork_redis_data", + "destination": "/data" + } + ] + } + ], + "previous_validation": { + "recorded_at": "2026-10-29T07:00:44.707076+00:00", + "finished": "2026-10-29T07:14:07.844371+00:00", + "api_images": [ + "sha256:06d717266f9eb248c84149e88685ee0210b33bf314b5c1101f22316a0845bb77" + ], + "checks": [ + { + "name": "contract", + "status": "PASS", + "seconds": 46.752 + }, + { + "name": "lint", + "status": "PASS", + "seconds": 37.916 + }, + { + "name": "build", + "status": "PASS", + "seconds": 111.545 + }, + { + "name": "smoke", + "status": "PASS", + "seconds": 5.633 + }, + { + "name": "idempotency", + "status": "PASS", + "seconds": 29.348 + }, + { + "name": "persistence", + "status": "PASS", + "seconds": 67.221, + "previous_attempts": [ + { + "name": "persistence", + "command": [ + "C:\\Program Files\\Python313\\python.exe", + "-X", + "utf8", + "tests/resilience.py", + "--mode", + "persistence", + "--action-script", + "scripts/restart.cmd", + "--base-url", + "http://127.0.0.1:18080" + ], + "started": "2026-10-29T07:04:39.453013+00:00", + "exit_code": 1, + "status": "FAIL", + "summary": [ + "FAIL: POST /api/v1/auth/sessions: connection/TLS failure (TimeoutError)" + ], + "seconds": 4.127, + "before": [ + { + "service": "api", + "id": "59513a0f1aa197641380462f8e38b5adaa6b357a47706ca491c928ed1165836f", + "image": "sha256:06d717266f9eb248c84149e88685ee0210b33bf314b5c1101f22316a0845bb77", + "started_at": "2026-10-29T06:07:59.836057453Z", + "status": "running", + "health": "healthy", + "exit_code": 0, + "cpu": 1.0, + "memory_mib": 512.0, + "pool_max": "15", + "command": [ + "sh", + "-c", + "INSTANCE_ID=$(hostname) exec node dist/main.js" + ], + "ports": {}, + "volumes": [] + }, + { + "service": "api", + "id": "2b698ec1d9d8fb3ee4d76493516083373f3a70fec109ed5ea2d68c796e35c266", + "image": "sha256:06d717266f9eb248c84149e88685ee0210b33bf314b5c1101f22316a0845bb77", + "started_at": "2026-10-29T06:08:01.64283855Z", + "status": "running", + "health": "healthy", + "exit_code": 0, + "cpu": 1.0, + "memory_mib": 512.0, + "pool_max": "15", + "command": [ + "sh", + "-c", + "INSTANCE_ID=$(hostname) exec node dist/main.js" + ], + "ports": {}, + "volumes": [] + }, + { + "service": "migrate", + "id": "54712687d1545d3c3f31e0a7f2ea644d35c44b36506065018df8c486cdf33d3c", + "image": "sha256:56e5b742612fa59b4e0bb09de668b4d6357e97d9811fe862f06f6bc3fa5aa858", + "started_at": "2026-10-28T05:10:21.875696751Z", + "status": "exited", + "health": null, + "exit_code": 0, + "cpu": 1.0, + "memory_mib": 512.0, + "pool_max": null, + "command": [ + "pnpm", + "db:deploy" + ], + "ports": {}, + "volumes": [] + }, + { + "service": "nginx", + "id": "0891b089ad4712a7f9899383b09755ceda41793c5fecd8cba6ef07568a38aedb", + "image": "sha256:47928bf67eb62a1863cb08d9ecb52d3e704304ba614eaee17884204677702951", + "started_at": "2026-10-28T06:10:10.779592253Z", + "status": "running", + "health": null, + "exit_code": 0, + "cpu": 0.5, + "memory_mib": 128.0, + "pool_max": null, + "command": null, + "ports": { + "80/tcp": [ + { + "HostIp": "127.0.0.1", + "HostPort": "18080" + } + ] + }, + "volumes": [] + }, + { + "service": "postgres", + "id": "d9f3adf56ca819973772bd039136681490c66c49d4630dc5bd62ea37fadd69d3", + "image": "sha256:f3bd19c606e442c3d7bdfa8002e03fe260a1023351e0ea4598032022b68dd6e3", + "started_at": "2026-10-28T14:36:47.68132306Z", + "status": "running", + "health": "healthy", + "exit_code": 0, + "cpu": 1.0, + "memory_mib": 512.0, + "pool_max": null, + "command": [ + "postgres" + ], + "ports": {}, + "volumes": [ + { + "name": "mtusi2026lab3-fork_postgres_data", + "destination": "/var/lib/postgresql/data" + } + ] + }, + { + "service": "redis", + "id": "a2ece96bc2f0b98b2b0a805c4a2ef6fd1e634b81c568554f80d018493494c189", + "image": "sha256:bb186d083732f669da90be8b0f975a37812b15e913465bb14d845db72a4e3e08", + "started_at": "2026-10-28T05:10:13.154306946Z", + "status": "running", + "health": "healthy", + "exit_code": 0, + "cpu": 0.5, + "memory_mib": 256.0, + "pool_max": null, + "command": [ + "redis-server", + "--appendonly", + "yes", + "--appendfsync", + "everysec" + ], + "ports": {}, + "volumes": [ + { + "name": "mtusi2026lab3-fork_redis_data", + "destination": "/data" + } + ] + } + ], + "after": [ + { + "service": "api", + "id": "59513a0f1aa197641380462f8e38b5adaa6b357a47706ca491c928ed1165836f", + "image": "sha256:06d717266f9eb248c84149e88685ee0210b33bf314b5c1101f22316a0845bb77", + "started_at": "2026-10-29T06:07:59.836057453Z", + "status": "running", + "health": "healthy", + "exit_code": 0, + "cpu": 1.0, + "memory_mib": 512.0, + "pool_max": "15", + "command": [ + "sh", + "-c", + "INSTANCE_ID=$(hostname) exec node dist/main.js" + ], + "ports": {}, + "volumes": [] + }, + { + "service": "api", + "id": "2b698ec1d9d8fb3ee4d76493516083373f3a70fec109ed5ea2d68c796e35c266", + "image": "sha256:06d717266f9eb248c84149e88685ee0210b33bf314b5c1101f22316a0845bb77", + "started_at": "2026-10-29T06:08:01.64283855Z", + "status": "running", + "health": "healthy", + "exit_code": 0, + "cpu": 1.0, + "memory_mib": 512.0, + "pool_max": "15", + "command": [ + "sh", + "-c", + "INSTANCE_ID=$(hostname) exec node dist/main.js" + ], + "ports": {}, + "volumes": [] + }, + { + "service": "migrate", + "id": "54712687d1545d3c3f31e0a7f2ea644d35c44b36506065018df8c486cdf33d3c", + "image": "sha256:56e5b742612fa59b4e0bb09de668b4d6357e97d9811fe862f06f6bc3fa5aa858", + "started_at": "2026-10-28T05:10:21.875696751Z", + "status": "exited", + "health": null, + "exit_code": 0, + "cpu": 1.0, + "memory_mib": 512.0, + "pool_max": null, + "command": [ + "pnpm", + "db:deploy" + ], + "ports": {}, + "volumes": [] + }, + { + "service": "nginx", + "id": "0891b089ad4712a7f9899383b09755ceda41793c5fecd8cba6ef07568a38aedb", + "image": "sha256:47928bf67eb62a1863cb08d9ecb52d3e704304ba614eaee17884204677702951", + "started_at": "2026-10-28T06:10:10.779592253Z", + "status": "running", + "health": null, + "exit_code": 0, + "cpu": 0.5, + "memory_mib": 128.0, + "pool_max": null, + "command": null, + "ports": { + "80/tcp": [ + { + "HostIp": "127.0.0.1", + "HostPort": "18080" + } + ] + }, + "volumes": [] + }, + { + "service": "postgres", + "id": "d9f3adf56ca819973772bd039136681490c66c49d4630dc5bd62ea37fadd69d3", + "image": "sha256:f3bd19c606e442c3d7bdfa8002e03fe260a1023351e0ea4598032022b68dd6e3", + "started_at": "2026-10-28T14:36:47.68132306Z", + "status": "running", + "health": "healthy", + "exit_code": 0, + "cpu": 1.0, + "memory_mib": 512.0, + "pool_max": null, + "command": [ + "postgres" + ], + "ports": {}, + "volumes": [ + { + "name": "mtusi2026lab3-fork_postgres_data", + "destination": "/var/lib/postgresql/data" + } + ] + }, + { + "service": "redis", + "id": "a2ece96bc2f0b98b2b0a805c4a2ef6fd1e634b81c568554f80d018493494c189", + "image": "sha256:bb186d083732f669da90be8b0f975a37812b15e913465bb14d845db72a4e3e08", + "started_at": "2026-10-28T05:10:13.154306946Z", + "status": "running", + "health": "healthy", + "exit_code": 0, + "cpu": 0.5, + "memory_mib": 256.0, + "pool_max": null, + "command": [ + "redis-server", + "--appendonly", + "yes", + "--appendfsync", + "everysec" + ], + "ports": {}, + "volumes": [ + { + "name": "mtusi2026lab3-fork_redis_data", + "destination": "/data" + } + ] + } + ], + "containers_restarted": false, + "volumes_preserved": true + } + ] + }, + { + "name": "public-failover", + "status": "PASS", + "seconds": 21.481 + }, + { + "name": "grade4-resources", + "status": "PASS", + "seconds": 5.274 + }, + { + "name": "grade4-failover", + "status": "PASS", + "seconds": 84.687 + }, + { + "name": "grade4-rolling", + "status": "PASS", + "seconds": 101.997 + }, + { + "name": "shutdown", + "status": "PASS", + "seconds": 30.821 + }, + { + "name": "migration-compatibility", + "status": "PASS", + "seconds": 109.738 + }, + { + "name": "final-smoke", + "status": "PASS", + "seconds": 4.523, + "previous_attempts": [ + { + "name": "final-smoke", + "command": [ + "C:\\Program Files\\Python313\\python.exe", + "-X", + "utf8", + "tests/smoke.py", + "--base-url", + "http://127.0.0.1:18080" + ], + "started": "2026-10-29T07:11:04.242618+00:00", + "exit_code": 0, + "status": "PASS", + "summary": [ + "PASS: lab3 public API scenario; infrastructure and grading evidence remain separate." + ], + "seconds": 13.841 + } + ] + } + ] + }, + "source_sha256": { + "src/main.ts": "03937f0187c2b14c763a63df55def5fda8254d5a07ebbc51a406e4c4219bb96b", + "src/app.controller.ts": "c234b39a9ae914c1fdc47933f2e722920b1d20730ed827c7869f45f0af5fa7e6", + "src/common/http/fastify-adapter.ts": "6fb2906d67c32f27d393e620a93b7acc693afe3a61a14d6557afaf5572b7a307", + "infra/start-nginx.sh": "718dc03233bd837242216a37c77394c1b5952c49072ac15ddb2056f88d38b03a", + "scripts/stop-one.sh": "9d1853a721fdc96654110c2843a9e6ffe6d8091336045294e089164649334a16", + "scripts/restart.sh": "40d314e8310e8d1bad347a8a2d4d443e4e9e8daa3cf0f5cb67d52246cef8b338", + "test/check_shutdown.py": "30a26b7b1fdb8a35ee9cfac135ee4883eb342a74fc79d2672c80e06f0c891732" + }, + "final": [ + { + "service": "api", + "id": "d39b4687b5d9627707a20076abe3470ba614df7719e2300b540c3103a50ca0c7", + "image": "sha256:61f1bfcd07cf183463d6ac162cf1aa23766f5cf2e0a0503dcbdeb0b762d764e6", + "started_at": "2026-10-29T08:25:06.075178523Z", + "status": "running", + "health": "healthy", + "exit_code": 0, + "cpu": 1.0, + "memory_mib": 512.0, + "pool_max": "15", + "command": [ + "sh", + "-c", + "INSTANCE_ID=$(hostname) exec node dist/main.js" + ], + "ports": {}, + "volumes": [] + }, + { + "service": "api", + "id": "0e7cb1e5ae362e9ee4303c22f3d798d0e1ebf732614d8d0d8ba5203a9dd9ca3b", + "image": "sha256:61f1bfcd07cf183463d6ac162cf1aa23766f5cf2e0a0503dcbdeb0b762d764e6", + "started_at": "2026-10-29T08:19:18.936985562Z", + "status": "running", + "health": "healthy", + "exit_code": 0, + "cpu": 1.0, + "memory_mib": 512.0, + "pool_max": "15", + "command": [ + "sh", + "-c", + "INSTANCE_ID=$(hostname) exec node dist/main.js" + ], + "ports": {}, + "volumes": [] + }, + { + "service": "migrate", + "id": "54712687d1545d3c3f31e0a7f2ea644d35c44b36506065018df8c486cdf33d3c", + "image": "sha256:56e5b742612fa59b4e0bb09de668b4d6357e97d9811fe862f06f6bc3fa5aa858", + "started_at": "2026-10-28T05:10:21.875696751Z", + "status": "exited", + "health": null, + "exit_code": 0, + "cpu": 1.0, + "memory_mib": 512.0, + "pool_max": null, + "command": [ + "pnpm", + "db:deploy" + ], + "ports": {}, + "volumes": [] + }, + { + "service": "nginx", + "id": "0891b089ad4712a7f9899383b09755ceda41793c5fecd8cba6ef07568a38aedb", + "image": "sha256:47928bf67eb62a1863cb08d9ecb52d3e704304ba614eaee17884204677702951", + "started_at": "2026-10-29T08:15:50.076114459Z", + "status": "running", + "health": null, + "exit_code": 0, + "cpu": 0.5, + "memory_mib": 128.0, + "pool_max": null, + "command": null, + "ports": { + "80/tcp": [ + { + "HostIp": "127.0.0.1", + "HostPort": "18080" + } + ] + }, + "volumes": [] + }, + { + "service": "postgres", + "id": "d9f3adf56ca819973772bd039136681490c66c49d4630dc5bd62ea37fadd69d3", + "image": "sha256:f3bd19c606e442c3d7bdfa8002e03fe260a1023351e0ea4598032022b68dd6e3", + "started_at": "2026-10-29T08:15:21.521775403Z", + "status": "running", + "health": "healthy", + "exit_code": 0, + "cpu": 1.0, + "memory_mib": 512.0, + "pool_max": null, + "command": [ + "postgres" + ], + "ports": {}, + "volumes": [ + { + "name": "mtusi2026lab3-fork_postgres_data", + "destination": "/var/lib/postgresql/data" + } + ] + }, + { + "service": "redis", + "id": "a2ece96bc2f0b98b2b0a805c4a2ef6fd1e634b81c568554f80d018493494c189", + "image": "sha256:bb186d083732f669da90be8b0f975a37812b15e913465bb14d845db72a4e3e08", + "started_at": "2026-10-29T08:15:21.468775476Z", + "status": "running", + "health": "healthy", + "exit_code": 0, + "cpu": 0.5, + "memory_mib": 256.0, + "pool_max": null, + "command": [ + "redis-server", + "--appendonly", + "yes", + "--appendfsync", + "everysec" + ], + "ports": {}, + "volumes": [ + { + "name": "mtusi2026lab3-fork_redis_data", + "destination": "/data" + } + ] + } + ], + "all_executed_checks_pass": true, + "finished": "2026-10-29T08:25:25.769451+00:00", + "source_before_recheck_sha256": { + "src/main.ts": "03937f0187c2b14c763a63df55def5fda8254d5a07ebbc51a406e4c4219bb96b", + "src/app.controller.ts": "c234b39a9ae914c1fdc47933f2e722920b1d20730ed827c7869f45f0af5fa7e6", + "src/common/http/fastify-adapter.ts": "6fb2906d67c32f27d393e620a93b7acc693afe3a61a14d6557afaf5572b7a307", + "infra/start-nginx.sh": "718dc03233bd837242216a37c77394c1b5952c49072ac15ddb2056f88d38b03a", + "scripts/stop-one.sh": "9d1853a721fdc96654110c2843a9e6ffe6d8091336045294e089164649334a16", + "scripts/restart.sh": "40d314e8310e8d1bad347a8a2d4d443e4e9e8daa3cf0f5cb67d52246cef8b338", + "test/check_shutdown.py": "ed4a9bb2ec76ceff1529c8b5ac2683bb8d65f3998b967beeb0dec565a9cd25fb" + }, + "recheck_started": "2026-10-29T08:24:42.421679+00:00", + "post_cleanup": { + "evidence_files": [ + "checks.json", + "improvements.png", + "measurements.json", + "scaling.csv", + "scaling.png" + ], + "retained_runs": 54, + "readme_count": 0, + "local_document_links_valid": true, + "draining_verified": true, + "report_sha256": "002db8a1a3b5014e395e14b3c39bb0d01aea4eb67f183464c6deaf62183cab9d" + } +} diff --git a/evidence/improvements.png b/evidence/improvements.png new file mode 100644 index 00000000..c5221459 Binary files /dev/null and b/evidence/improvements.png differ diff --git a/evidence/measurements.json b/evidence/measurements.json new file mode 100644 index 00000000..02bceda0 --- /dev/null +++ b/evidence/measurements.json @@ -0,0 +1,15188 @@ +{ + "schema_version": 1, + "recorded_at": "2026-10-29T07:03:35.634398+00:00", + "git_base": "0ab3a341aa7ba32363ce43061d4ff02b1f2964af", + "revision_note": "Implementation is in the working tree; git_base identifies the scaffold, not a committed implementation.", + "retained_data": "Per-run HTTP aggregates, profiles, CPU/RAM/pool/SQL-state diagnostics, original manifests and source hashes. Request samples, stdout/stderr, traces and duplicate documentation omitted.", + "application_source_sha256": { + "compose.yaml": "cb59c949e0ec8d3ebfaed8410aa26217232baed2cff1bd4e8b6f38b50f006aa6", + "configs/four-large.yaml": "4be7eb2dc4945fb88fc667e79430c795bd577bb90abb9149fe4b575fd762dc4a", + "configs/four-small.yaml": "cc236a0ba729a399444a21a64fa8d0f335a072ce8661306f06bde82b9c40a67d", + "configs/four.yaml": "d4c530a834002e4e1dbdcec8d2d5ce09677c912afc3892155ef10269b272d403", + "configs/one-small.yaml": "9bfbfcb68a340d8346c90d02ffaec6e65a4b8214bc52c8db011a84dde7693382", + "configs/one.yaml": "4a00d1c2043408f5443bc3a8b3a7df18ff1187ce5cf5f5e6ab2486d41de7ab24", + "configs/two-small.yaml": "e536999fdaaf7c1786851f161f0bb527645827e2009aa4c0e27ceedaab788b3e", + "configs/two.yaml": "2607853b0241dc9602da937a39ba7e0f98430b02f3ef46450a352cf202f351e4", + "Dockerfile": "0fd34507266697a7da4a2546e8ce19efc513df88746aa5a8ab8f4f09c3929d5f", + "infra/nginx.conf": "946c810cacc2bc8fa914bacbc3e6bd10a2b8f30db0dcfa7952e2f5df861f4759", + "infra/start-nginx.sh": "2cbc3ffe5bba8e6407b6e46620a5aac6a6fb443db76501b1c3a8b7d316bbc339", + "pnpm-lock.yaml": "6cf91b5241c1d4ad131af5ccdde5cbf9301d4ab8712cf2f5655be9cabbd29ef0", + "prisma/migrations/20261011140000_initial/migration.sql": "46d8ae86fea6f9eadd741ea9f9cd4eefaa1049eb29ceb8d096e243c9dc57f729", + "prisma/migrations/20261011160000_auth/migration.sql": "638d03a9f9dad008f6b1f1827d90750c1622c4d2cf96c09723ced8c0e62ee87c", + "prisma/migrations/20261013093000_cache_epochs/migration.sql": "7f4e593735c2ffd761ad90d8a3fd5cc076ce65aaea92952e1066cfcc1b324b71", + "prisma/migrations/20261013150000_message_epoch_buckets/migration.sql": "19a4b92577c2ee0fe53fff9f731ca8426d0fb5b590fffe68dda492151ff0bc2c", + "prisma/migrations/20261026120000_message_idempotency/migration.sql": "b42205f1b859adf6041d4c2f342b4aa9ba5177e98097af35116b0fd7dd83b0e8", + "src/app.controller.spec.ts": "e7e7badf3be48587350bd92b9bb0eb931e24e436edb746ac60f0367154accf0d", + "src/app.controller.ts": "59cdea510fdecd9d3d1b68e64b0d991611311ff04de02ed96f31f32a51d7881e", + "src/app.module.ts": "1d51c8a7694a04e17a8c883bf551b390f8068881a642015d1e95a64d34858c1a", + "src/app.service.ts": "eaf8514ce110fa428a93a27408df4d06d133dbd9ed0a775c315ddfdd507853a9", + "src/Auth/auth.controller.ts": "0d317feb67e7ab26b46f8c0f0ac1b02ab114d7de519dc1d7278e5d349d6abb18", + "src/Auth/auth.exception.ts": "3eb5bdccfee702bf1fd0dd5ea93be9df51e86327578115ed7b5e911ebd46e985", + "src/Auth/auth.schema.ts": "c81786a4d5e774b0da838601826dfffae4ecc8ad15c21af01a20a7afafcf0340", + "src/Auth/auth.service.ts": "78c7c8567a12347a9a65343d3ead5c931cecba34f0b83565f41205f8d61aa5b1", + "src/Auth/password.service.ts": "280b7928717c9d067e0f20067506ed2f5398e3c73e808e898e84875e94a38cc5", + "src/cache/cache.module.ts": "fc81bf307e5243584ebf96119273a45e8ade767e9911101287a1da61aa0a6028", + "src/cache/cache.service.ts": "f27ab6ff5a0f8da05936272bafbc7cea38198074e5c7d17c2e01ae0bf29986b3", + "src/Chat/chat.controller.ts": "5199aae1198320d8dae23a9dcc726e90eed0f4ff38b4e20445dc16a96a392bdc", + "src/Chat/chat.module.ts": "8c4ce5e7082a219a74b9010547e825219bbb2259aa26cd0f843776d84939b1eb", + "src/Chat/chat.schema.ts": "cbb220d24c16076ca0b4e4104c34366b5a376ad13f245c1aecf74f9e858fe648", + "src/Chat/chat.service.ts": "35819e60eb03a5d68c1679e7c47dbbb604e88c69595dce29089bd8911ecc485f", + "src/common/exceptions/api.exception.ts": "ddb2fa02e3e12a355a43418cd2489197fe2bb82a2498c34e0e14ca3db545bfc1", + "src/common/filters/all-exceptions.filter.ts": "8afe5fc224d3119fd601fd79f8c46adcd7b6fc0bb79386718e14848c8fab5ef8", + "src/common/http/fastify-adapter.ts": "174edd20725f71c286dd280274bd384a5effc638b0245165fc74b07d4b0e10aa", + "src/common/validation.ts": "859f2a3d7da4c42a94f03f95bdbaadc1618c38254151fd4bf613fd822526c4e9", + "src/main.ts": "dd952bc6a329a4d9a4b0166af1a0a9c9e2fdf2dd090e02d94a07d6e555231b1b", + "src/prisma/prisma.module.ts": "0cded004a66f8e902920bc1762ed229b6514e581d5c6ab601f42691a223eb167", + "src/prisma/prisma.service.ts": "7ccb2e16f34e507a02b00e259b9be1f44f2af3af403b3f787ea6954bc7a1894c", + "src/User/user.controller.ts": "050172bd8117e8df82cecfb3d7c8d99a0bbe480563bc2af4bd12a80da0fb3494", + "src/User/user.guard.ts": "20b05a0e5272a4ee1ccbddef83494e62621ffb0236e56a15c17e7f8f0083f6d7", + "src/User/user.module.ts": "b3d64ebbc16ee14a1fa827e9ec99eaa6cef76d9d76076524941e39b391512a3b", + "src/User/user.schema.ts": "a1cabed8f960ede367eec1f084ec4d4f901e383fecff5ef0571c82c89bc71fdc", + "src/User/user.service.ts": "0737e88c408510bc17ec0597c3812be855c03499dfc2ad5ba6a4b1e85bb1c5e7" + }, + "manifests": { + "api-small-growth-20261029": { + "started": "2026-10-29T05:14:32.607546+00:00", + "profiles": [ + "one-small", + "one", + "two-small", + "two", + "four-small", + "four" + ], + "client": "container", + "engine": "k6", + "duration_seconds": 30, + "warmup_seconds": 10, + "probe_duration_seconds": 15, + "probe_warmup_seconds": 5, + "repetitions": 3, + "rates": [ + 40, + 80 + ], + "containers": { + "one-small": [ + { + "id": "8269a2d0e237765793eb07abf84b1a5191ed253a545946e983cbf026dd18a287", + "name": "/mtusi2026lab3-fork-api-21", + "image": "sha256:06d717266f9eb248c84149e88685ee0210b33bf314b5c1101f22316a0845bb77", + "nano_cpus": 1000000000, + "memory_bytes": 1073741824, + "pool_max": "32" + }, + { + "id": "d9f3adf56ca819973772bd039136681490c66c49d4630dc5bd62ea37fadd69d3", + "name": "/mtusi2026lab3-fork-postgres-1", + "image": "sha256:f3bd19c606e442c3d7bdfa8002e03fe260a1023351e0ea4598032022b68dd6e3", + "nano_cpus": 1000000000, + "memory_bytes": 536870912, + "pool_max": null + }, + { + "id": "0891b089ad4712a7f9899383b09755ceda41793c5fecd8cba6ef07568a38aedb", + "name": "/mtusi2026lab3-fork-nginx-1", + "image": "sha256:47928bf67eb62a1863cb08d9ecb52d3e704304ba614eaee17884204677702951", + "nano_cpus": 500000000, + "memory_bytes": 134217728, + "pool_max": null + }, + { + "id": "a2ece96bc2f0b98b2b0a805c4a2ef6fd1e634b81c568554f80d018493494c189", + "name": "/mtusi2026lab3-fork-redis-1", + "image": "sha256:bb186d083732f669da90be8b0f975a37812b15e913465bb14d845db72a4e3e08", + "nano_cpus": 500000000, + "memory_bytes": 268435456, + "pool_max": null + } + ], + "one": [ + { + "id": "d0a4060b0ff85a6bdf05a6bc3649be49df87a5276f7507dca82787c36cd0eac3", + "name": "/mtusi2026lab3-fork-api-21", + "image": "sha256:06d717266f9eb248c84149e88685ee0210b33bf314b5c1101f22316a0845bb77", + "nano_cpus": 2000000000, + "memory_bytes": 1073741824, + "pool_max": "32" + }, + { + "id": "d9f3adf56ca819973772bd039136681490c66c49d4630dc5bd62ea37fadd69d3", + "name": "/mtusi2026lab3-fork-postgres-1", + "image": "sha256:f3bd19c606e442c3d7bdfa8002e03fe260a1023351e0ea4598032022b68dd6e3", + "nano_cpus": 1000000000, + "memory_bytes": 536870912, + "pool_max": null + }, + { + "id": "0891b089ad4712a7f9899383b09755ceda41793c5fecd8cba6ef07568a38aedb", + "name": "/mtusi2026lab3-fork-nginx-1", + "image": "sha256:47928bf67eb62a1863cb08d9ecb52d3e704304ba614eaee17884204677702951", + "nano_cpus": 500000000, + "memory_bytes": 134217728, + "pool_max": null + }, + { + "id": "a2ece96bc2f0b98b2b0a805c4a2ef6fd1e634b81c568554f80d018493494c189", + "name": "/mtusi2026lab3-fork-redis-1", + "image": "sha256:bb186d083732f669da90be8b0f975a37812b15e913465bb14d845db72a4e3e08", + "nano_cpus": 500000000, + "memory_bytes": 268435456, + "pool_max": null + } + ], + "two-small": [ + { + "id": "a6455e4f2e6eb06d5a42cb04a2fcb54ab91c0f238cc85c877431f3b6d5c05a30", + "name": "/mtusi2026lab3-fork-api-21", + "image": "sha256:06d717266f9eb248c84149e88685ee0210b33bf314b5c1101f22316a0845bb77", + "nano_cpus": 500000000, + "memory_bytes": 536870912, + "pool_max": "16" + }, + { + "id": "94508e170149d1f6ce1f7ddaa3beaf2ecdeff8bf88ec26f8b29d5d3ba470bffb", + "name": "/mtusi2026lab3-fork-api-22", + "image": "sha256:06d717266f9eb248c84149e88685ee0210b33bf314b5c1101f22316a0845bb77", + "nano_cpus": 500000000, + "memory_bytes": 536870912, + "pool_max": "16" + }, + { + "id": "d9f3adf56ca819973772bd039136681490c66c49d4630dc5bd62ea37fadd69d3", + "name": "/mtusi2026lab3-fork-postgres-1", + "image": "sha256:f3bd19c606e442c3d7bdfa8002e03fe260a1023351e0ea4598032022b68dd6e3", + "nano_cpus": 1000000000, + "memory_bytes": 536870912, + "pool_max": null + }, + { + "id": "0891b089ad4712a7f9899383b09755ceda41793c5fecd8cba6ef07568a38aedb", + "name": "/mtusi2026lab3-fork-nginx-1", + "image": "sha256:47928bf67eb62a1863cb08d9ecb52d3e704304ba614eaee17884204677702951", + "nano_cpus": 500000000, + "memory_bytes": 134217728, + "pool_max": null + }, + { + "id": "a2ece96bc2f0b98b2b0a805c4a2ef6fd1e634b81c568554f80d018493494c189", + "name": "/mtusi2026lab3-fork-redis-1", + "image": "sha256:bb186d083732f669da90be8b0f975a37812b15e913465bb14d845db72a4e3e08", + "nano_cpus": 500000000, + "memory_bytes": 268435456, + "pool_max": null + } + ], + "two": [ + { + "id": "d11039391e3f61fc81712da243696dff313effb0f05aa810735cfef2a0de4fdf", + "name": "/mtusi2026lab3-fork-api-21", + "image": "sha256:06d717266f9eb248c84149e88685ee0210b33bf314b5c1101f22316a0845bb77", + "nano_cpus": 1000000000, + "memory_bytes": 536870912, + "pool_max": "16" + }, + { + "id": "4db01a2fd57ea184b92eeab5b1123136b0dc021ce6762113934f1662b227671c", + "name": "/mtusi2026lab3-fork-api-22", + "image": "sha256:06d717266f9eb248c84149e88685ee0210b33bf314b5c1101f22316a0845bb77", + "nano_cpus": 1000000000, + "memory_bytes": 536870912, + "pool_max": "16" + }, + { + "id": "d9f3adf56ca819973772bd039136681490c66c49d4630dc5bd62ea37fadd69d3", + "name": "/mtusi2026lab3-fork-postgres-1", + "image": "sha256:f3bd19c606e442c3d7bdfa8002e03fe260a1023351e0ea4598032022b68dd6e3", + "nano_cpus": 1000000000, + "memory_bytes": 536870912, + "pool_max": null + }, + { + "id": "0891b089ad4712a7f9899383b09755ceda41793c5fecd8cba6ef07568a38aedb", + "name": "/mtusi2026lab3-fork-nginx-1", + "image": "sha256:47928bf67eb62a1863cb08d9ecb52d3e704304ba614eaee17884204677702951", + "nano_cpus": 500000000, + "memory_bytes": 134217728, + "pool_max": null + }, + { + "id": "a2ece96bc2f0b98b2b0a805c4a2ef6fd1e634b81c568554f80d018493494c189", + "name": "/mtusi2026lab3-fork-redis-1", + "image": "sha256:bb186d083732f669da90be8b0f975a37812b15e913465bb14d845db72a4e3e08", + "nano_cpus": 500000000, + "memory_bytes": 268435456, + "pool_max": null + } + ], + "four-small": [ + { + "id": "00f08e33f8a4fb812c73bb49e04b5c67425434a7d1c8078a384c8058494d41ab", + "name": "/mtusi2026lab3-fork-api-21", + "image": "sha256:06d717266f9eb248c84149e88685ee0210b33bf314b5c1101f22316a0845bb77", + "nano_cpus": 250000000, + "memory_bytes": 268435456, + "pool_max": "8" + }, + { + "id": "b71829058bf42a696f9216cbae8b936b98a5dd03e380ff347a795eee9172bb84", + "name": "/mtusi2026lab3-fork-api-22", + "image": "sha256:06d717266f9eb248c84149e88685ee0210b33bf314b5c1101f22316a0845bb77", + "nano_cpus": 250000000, + "memory_bytes": 268435456, + "pool_max": "8" + }, + { + "id": "40355cd63513a35d5e40b2cbfcbc92dcf0c067246824c3485e27e0fad26c9b92", + "name": "/mtusi2026lab3-fork-api-23", + "image": "sha256:06d717266f9eb248c84149e88685ee0210b33bf314b5c1101f22316a0845bb77", + "nano_cpus": 250000000, + "memory_bytes": 268435456, + "pool_max": "8" + }, + { + "id": "0578dc6a443bd7b2b38ea35da1f9c6abc61967813028cd946d34018be23fb6d8", + "name": "/mtusi2026lab3-fork-api-24", + "image": "sha256:06d717266f9eb248c84149e88685ee0210b33bf314b5c1101f22316a0845bb77", + "nano_cpus": 250000000, + "memory_bytes": 268435456, + "pool_max": "8" + }, + { + "id": "d9f3adf56ca819973772bd039136681490c66c49d4630dc5bd62ea37fadd69d3", + "name": "/mtusi2026lab3-fork-postgres-1", + "image": "sha256:f3bd19c606e442c3d7bdfa8002e03fe260a1023351e0ea4598032022b68dd6e3", + "nano_cpus": 1000000000, + "memory_bytes": 536870912, + "pool_max": null + }, + { + "id": "0891b089ad4712a7f9899383b09755ceda41793c5fecd8cba6ef07568a38aedb", + "name": "/mtusi2026lab3-fork-nginx-1", + "image": "sha256:47928bf67eb62a1863cb08d9ecb52d3e704304ba614eaee17884204677702951", + "nano_cpus": 500000000, + "memory_bytes": 134217728, + "pool_max": null + }, + { + "id": "a2ece96bc2f0b98b2b0a805c4a2ef6fd1e634b81c568554f80d018493494c189", + "name": "/mtusi2026lab3-fork-redis-1", + "image": "sha256:bb186d083732f669da90be8b0f975a37812b15e913465bb14d845db72a4e3e08", + "nano_cpus": 500000000, + "memory_bytes": 268435456, + "pool_max": null + } + ], + "four": [ + { + "id": "147b78cc1a85ce531210c97c1ae866f59c593abda9ca6e6bcb3d7abccb0a4c86", + "name": "/mtusi2026lab3-fork-api-21", + "image": "sha256:06d717266f9eb248c84149e88685ee0210b33bf314b5c1101f22316a0845bb77", + "nano_cpus": 500000000, + "memory_bytes": 268435456, + "pool_max": "8" + }, + { + "id": "064b0e307a1a57750d33575f01cfede67b767a8692518c24f7d7c9a1992305f2", + "name": "/mtusi2026lab3-fork-api-22", + "image": "sha256:06d717266f9eb248c84149e88685ee0210b33bf314b5c1101f22316a0845bb77", + "nano_cpus": 500000000, + "memory_bytes": 268435456, + "pool_max": "8" + }, + { + "id": "c61ac847afb75cdaa35984e8d9e59bf771c7484cede8789442e7386452b65103", + "name": "/mtusi2026lab3-fork-api-23", + "image": "sha256:06d717266f9eb248c84149e88685ee0210b33bf314b5c1101f22316a0845bb77", + "nano_cpus": 500000000, + "memory_bytes": 268435456, + "pool_max": "8" + }, + { + "id": "4976fe957a50ceb1c432a24934c4a260d01a0ab655f3efaa6ed175d163ce108a", + "name": "/mtusi2026lab3-fork-api-24", + "image": "sha256:06d717266f9eb248c84149e88685ee0210b33bf314b5c1101f22316a0845bb77", + "nano_cpus": 500000000, + "memory_bytes": 268435456, + "pool_max": "8" + }, + { + "id": "d9f3adf56ca819973772bd039136681490c66c49d4630dc5bd62ea37fadd69d3", + "name": "/mtusi2026lab3-fork-postgres-1", + "image": "sha256:f3bd19c606e442c3d7bdfa8002e03fe260a1023351e0ea4598032022b68dd6e3", + "nano_cpus": 1000000000, + "memory_bytes": 536870912, + "pool_max": null + }, + { + "id": "0891b089ad4712a7f9899383b09755ceda41793c5fecd8cba6ef07568a38aedb", + "name": "/mtusi2026lab3-fork-nginx-1", + "image": "sha256:47928bf67eb62a1863cb08d9ecb52d3e704304ba614eaee17884204677702951", + "nano_cpus": 500000000, + "memory_bytes": 134217728, + "pool_max": null + }, + { + "id": "a2ece96bc2f0b98b2b0a805c4a2ef6fd1e634b81c568554f80d018493494c189", + "name": "/mtusi2026lab3-fork-redis-1", + "image": "sha256:bb186d083732f669da90be8b0f975a37812b15e913465bb14d845db72a4e3e08", + "nano_cpus": 500000000, + "memory_bytes": 268435456, + "pool_max": null + } + ] + }, + "runs": [ + "one-small-r40-confirmation-4", + "one-small-r80-confirmation-5", + "one-small-r40-confirmation-6", + "one-small-r80-confirmation-7", + "one-small-r40-confirmation-8", + "one-small-r80-confirmation-9", + "one-r40-confirmation-10", + "one-r80-confirmation-11", + "one-r40-confirmation-12", + "one-r80-confirmation-13", + "one-r40-confirmation-14", + "one-r80-confirmation-15", + "two-small-r40-confirmation-16", + "two-small-r80-confirmation-17", + "two-small-r40-confirmation-18", + "two-small-r80-confirmation-19", + "two-small-r40-confirmation-20", + "two-small-r80-confirmation-21", + "two-r40-confirmation-22", + "two-r80-confirmation-23", + "two-r40-confirmation-24", + "two-r80-confirmation-25", + "two-r40-confirmation-26", + "two-r80-confirmation-27", + "four-small-r40-confirmation-28", + "four-small-r80-confirmation-29", + "four-small-r40-confirmation-30", + "four-small-r80-confirmation-31", + "four-small-r40-confirmation-32", + "four-small-r80-confirmation-33", + "four-r40-confirmation-34", + "four-r80-confirmation-35", + "four-r40-confirmation-36", + "four-r80-confirmation-37", + "four-r40-confirmation-38", + "four-r80-confirmation-39" + ], + "boundaries": { + "one-small": { + "confirmed_good": null, + "confirmed_bad": 40, + "confirmations": { + "40": [ + { + "delivery_fraction": 1.0008333333333332, + "error_fraction": 0.0, + "all_request_p95_ms": 1363.2556869999999, + "delivery_valid": true, + "slo_pass": false, + "classification": "slo_fail" + }, + { + "delivery_fraction": 1.0008333333333332, + "error_fraction": 0.0, + "all_request_p95_ms": 1682.559437, + "delivery_valid": true, + "slo_pass": false, + "classification": "slo_fail" + }, + { + "delivery_fraction": 1.0008333333333332, + "error_fraction": 0.0, + "all_request_p95_ms": 1322.7580870000002, + "delivery_valid": true, + "slo_pass": false, + "classification": "slo_fail" + } + ], + "80": [ + { + "delivery_fraction": 0.9254166666666667, + "error_fraction": 0.4844664565511031, + "all_request_p95_ms": 3913.775195, + "delivery_valid": false, + "slo_pass": false, + "classification": "generator_limited" + }, + { + "delivery_fraction": 0.9220833333333334, + "error_fraction": 0.21554450971531858, + "all_request_p95_ms": 2288.1632106000006, + "delivery_valid": false, + "slo_pass": false, + "classification": "generator_limited" + }, + { + "delivery_fraction": 1.0004166666666667, + "error_fraction": 0.059142024156601414, + "all_request_p95_ms": 623.018676, + "delivery_valid": true, + "slo_pass": false, + "classification": "slo_fail" + } + ] + }, + "bracketed": false + }, + "one": { + "confirmed_good": null, + "confirmed_bad": null, + "confirmations": { + "40": [ + { + "delivery_fraction": 1.0008333333333332, + "error_fraction": 0.035803497085761866, + "all_request_p95_ms": 2319.3248719999997, + "delivery_valid": true, + "slo_pass": false, + "classification": "slo_fail" + }, + { + "delivery_fraction": 1.0008333333333332, + "error_fraction": 0.0, + "all_request_p95_ms": 418.903777, + "delivery_valid": true, + "slo_pass": true, + "classification": "pass" + }, + { + "delivery_fraction": 1.0008333333333332, + "error_fraction": 0.0, + "all_request_p95_ms": 751.296029, + "delivery_valid": true, + "slo_pass": true, + "classification": "pass" + } + ], + "80": [ + { + "delivery_fraction": 0.9458333333333333, + "error_fraction": 0.31541850220264317, + "all_request_p95_ms": 1849.6533385999996, + "delivery_valid": false, + "slo_pass": false, + "classification": "generator_limited" + }, + { + "delivery_fraction": 1.0, + "error_fraction": 0.0, + "all_request_p95_ms": 1378.379113749999, + "delivery_valid": true, + "slo_pass": false, + "classification": "slo_fail" + }, + { + "delivery_fraction": 0.9870833333333333, + "error_fraction": 0.0, + "all_request_p95_ms": 966.6013613999995, + "delivery_valid": true, + "slo_pass": true, + "classification": "pass" + } + ] + }, + "bracketed": false + }, + "two-small": { + "confirmed_good": null, + "confirmed_bad": 40, + "confirmations": { + "40": [ + { + "delivery_fraction": 1.0008333333333332, + "error_fraction": 0.0, + "all_request_p95_ms": 1118.8671709999999, + "delivery_valid": true, + "slo_pass": false, + "classification": "slo_fail" + }, + { + "delivery_fraction": 1.005, + "error_fraction": 0.0, + "all_request_p95_ms": 1757.4142032500001, + "delivery_valid": true, + "slo_pass": false, + "classification": "slo_fail" + }, + { + "delivery_fraction": 1.0008333333333332, + "error_fraction": 0.0, + "all_request_p95_ms": 1338.075269, + "delivery_valid": true, + "slo_pass": false, + "classification": "slo_fail" + } + ], + "80": [ + { + "delivery_fraction": 0.9879166666666667, + "error_fraction": 0.27752003374103756, + "all_request_p95_ms": 588.881168, + "delivery_valid": true, + "slo_pass": false, + "classification": "slo_fail" + }, + { + "delivery_fraction": 0.68625, + "error_fraction": 0.28718882817243474, + "all_request_p95_ms": 5009.7729897, + "delivery_valid": false, + "slo_pass": false, + "classification": "generator_limited" + }, + { + "delivery_fraction": 0.80875, + "error_fraction": 0.25708397733127253, + "all_request_p95_ms": 5000.846076000001, + "delivery_valid": false, + "slo_pass": false, + "classification": "generator_limited" + } + ] + }, + "bracketed": false + }, + "two": { + "confirmed_good": 40, + "confirmed_bad": null, + "confirmations": { + "40": [ + { + "delivery_fraction": 1.0, + "error_fraction": 0.0, + "all_request_p95_ms": 776.7075832999998, + "delivery_valid": true, + "slo_pass": true, + "classification": "pass" + }, + { + "delivery_fraction": 1.0008333333333332, + "error_fraction": 0.0, + "all_request_p95_ms": 451.573919, + "delivery_valid": true, + "slo_pass": true, + "classification": "pass" + }, + { + "delivery_fraction": 1.0, + "error_fraction": 0.0, + "all_request_p95_ms": 404.04996024999986, + "delivery_valid": true, + "slo_pass": true, + "classification": "pass" + } + ], + "80": [ + { + "delivery_fraction": 0.97, + "error_fraction": 0.0, + "all_request_p95_ms": 1732.0478621500022, + "delivery_valid": false, + "slo_pass": false, + "classification": "generator_limited" + }, + { + "delivery_fraction": 0.8375, + "error_fraction": 0.015422885572139304, + "all_request_p95_ms": 3644.38635635, + "delivery_valid": false, + "slo_pass": false, + "classification": "generator_limited" + }, + { + "delivery_fraction": 1.0, + "error_fraction": 0.0, + "all_request_p95_ms": 372.4251258499997, + "delivery_valid": true, + "slo_pass": true, + "classification": "pass" + } + ] + }, + "bracketed": false + }, + "four-small": { + "confirmed_good": null, + "confirmed_bad": null, + "confirmations": { + "40": [ + { + "delivery_fraction": 0.9525, + "error_fraction": 0.18635170603674542, + "all_request_p95_ms": 5002.5158862, + "delivery_valid": false, + "slo_pass": false, + "classification": "generator_limited" + }, + { + "delivery_fraction": 1.0008333333333332, + "error_fraction": 0.0, + "all_request_p95_ms": 664.626691, + "delivery_valid": true, + "slo_pass": true, + "classification": "pass" + }, + { + "delivery_fraction": 1.0008333333333332, + "error_fraction": 0.0, + "all_request_p95_ms": 808.456865, + "delivery_valid": true, + "slo_pass": true, + "classification": "pass" + } + ], + "80": [ + { + "delivery_fraction": 0.6270833333333333, + "error_fraction": 0.14551495016611296, + "all_request_p95_ms": 5011.016073, + "delivery_valid": false, + "slo_pass": false, + "classification": "generator_limited" + }, + { + "delivery_fraction": 0.9204166666666667, + "error_fraction": 0.0004526935264825713, + "all_request_p95_ms": 2819.614260199997, + "delivery_valid": false, + "slo_pass": false, + "classification": "generator_limited" + }, + { + "delivery_fraction": 0.6425, + "error_fraction": 0.0654993514915694, + "all_request_p95_ms": 5000.4370198, + "delivery_valid": false, + "slo_pass": false, + "classification": "generator_limited" + } + ] + }, + "bracketed": false + }, + "four": { + "confirmed_good": null, + "confirmed_bad": 40, + "confirmations": { + "40": [ + { + "delivery_fraction": 1.0016666666666667, + "error_fraction": 0.0, + "all_request_p95_ms": 1443.624807400003, + "delivery_valid": true, + "slo_pass": false, + "classification": "slo_fail" + }, + { + "delivery_fraction": 1.0, + "error_fraction": 0.0, + "all_request_p95_ms": 678.1664768499995, + "delivery_valid": true, + "slo_pass": true, + "classification": "pass" + }, + { + "delivery_fraction": 1.0008333333333332, + "error_fraction": 0.0, + "all_request_p95_ms": 1044.026936, + "delivery_valid": true, + "slo_pass": false, + "classification": "slo_fail" + } + ], + "80": [ + { + "delivery_fraction": 0.9429166666666666, + "error_fraction": 0.0, + "all_request_p95_ms": 2765.0429346000005, + "delivery_valid": false, + "slo_pass": false, + "classification": "generator_limited" + }, + { + "delivery_fraction": 0.8779166666666667, + "error_fraction": 0.0014238253440911248, + "all_request_p95_ms": 2950.8826460999994, + "delivery_valid": false, + "slo_pass": false, + "classification": "generator_limited" + }, + { + "delivery_fraction": 0.9608333333333333, + "error_fraction": 0.0, + "all_request_p95_ms": 2106.622289, + "delivery_valid": false, + "slo_pass": false, + "classification": "generator_limited" + } + ] + }, + "bracketed": false + } + }, + "stopped_profiles": {}, + "observer_version": 3, + "criterion": "delivery 98..102%, dropped iterations <=2%, errors <=1%, all-request p95 <=1000 ms", + "pool_budget": 32, + "notes": [ + "Local empirical SLO boundary, not universal maximum throughput.", + "Native sequential warmup/measurement scenarios at target-rate 80/20; custom counters belong only to measurement.", + "Generator shares Docker VM CPU; calibration does not eliminate competition during API load.", + "Probe durations differ; use confirmation rows for reported bounds." + ], + "source_sha256": { + "scripts/saturation.k6.js": "220bfb22e3f2734cffa77ba03d969567f62fa9ba049c1611d100d9e778e6ce02", + "scripts/saturation-mock.cjs": "11e23b71ab32371343df65a535e988e2eded04e32facff44afea48d6472bc8dd", + "scripts/run-saturation.py": "124e8ca5013aa8c30ba7034a6280c26790ca4f2c0a9ff1a9d321a455cef23651", + "scripts/run-scaling-diagnostics.py": "0c853758a1a155e5f6471ce16bdb4ddaede6b2c4da13deecae8533b9ae974743", + "scripts/diagnostics/pool.cjs": "5b1f2b713fc8fb471c3701584839e478f99c4a78941ad2cdf237068464299623", + "scripts/diagnostics/observer.sh": "a5d0a1bc77fa1922a2d0e71947d67ee51849a9a9fe303bc158bd6c88366c5fd5", + "compose.yaml": "cb59c949e0ec8d3ebfaed8410aa26217232baed2cff1bd4e8b6f38b50f006aa6", + "test/compose.diagnostics.yaml": "585e330e7fdd160b35b0f4ce1d23308bbafd405a790aa2e3527b88f72a287900", + "configs/one-small.yaml": "9bfbfcb68a340d8346c90d02ffaec6e65a4b8214bc52c8db011a84dde7693382", + "configs/one.yaml": "4a00d1c2043408f5443bc3a8b3a7df18ff1187ce5cf5f5e6ab2486d41de7ab24", + "configs/two-small.yaml": "e536999fdaaf7c1786851f161f0bb527645827e2009aa4c0e27ceedaab788b3e", + "configs/two.yaml": "2607853b0241dc9602da937a39ba7e0f98430b02f3ef46450a352cf202f351e4", + "configs/four-small.yaml": "cc236a0ba729a399444a21a64fa8d0f335a072ce8661306f06bde82b9c40a67d", + "configs/four.yaml": "d4c530a834002e4e1dbdcec8d2d5ce09677c912afc3892155ef10269b272d403" + }, + "requested_confirmation_rates": [ + 40, + 80 + ], + "expand_confirmation_rates": false, + "generator_container": "lab3-saturation-client-2ad09c1eb6f14ef980f83fea7a83e86d", + "mock_container": "lab3-saturation-mock-2ad09c1eb6f14ef980f83fea7a83e86d", + "generator_image": "sha256:3ddc8b1a33a2c3d8edc6e99b6a762ae36cba08788463458f5e6a7703e14eb77d", + "generator_version": "k6 v1.3.0+dirty (commit/5870e99ae8-dirty, go1.25.1, linux/amd64)", + "docker": { + "cpus": 4, + "memory_bytes": 3008614400, + "version": "28.3.2" + }, + "calibration_attempts": [ + { + "label": "calibration-r400-calibration-1", + "rate": 400, + "delivery_fraction": 0.87525, + "error_fraction": 0.0, + "all_request_p95_ms": 368.523972, + "delivery_valid": false, + "slo_pass": true, + "classification": "generator_limited" + }, + { + "label": "calibration-r200-calibration-2", + "rate": 200, + "delivery_fraction": 1.0, + "error_fraction": 0.0, + "all_request_p95_ms": 124.56483784999993, + "delivery_valid": true, + "slo_pass": true, + "classification": "pass" + } + ], + "calibration": { + "label": "calibration-r200-calibration-2", + "delivery_fraction": 1.0, + "error_fraction": 0.0, + "all_request_p95_ms": 124.56483784999993, + "delivery_valid": true, + "slo_pass": true, + "classification": "pass" + }, + "calibration_low_rate": { + "label": "calibration-r40-calibration-low-rate-3", + "delivery_fraction": 1.0025, + "error_fraction": 0.0, + "all_request_p95_ms": 355.074778, + "delivery_valid": true, + "slo_pass": true, + "classification": "pass" + }, + "finished": "2026-10-29T05:53:31.577666+00:00" + }, + "diagnostics-v3-linux-20261028": { + "started": "2026-10-28T14:18:46.181377+00:00", + "profiles": [ + "four" + ], + "client": "container", + "rates": [ + 60, + 80, + 100 + ], + "duration_seconds": 120, + "warmup_seconds": 20, + "repetitions": 3, + "stop_rule": "stop a profile after >=2 repeats at one rate exceed any threshold: scheduler late >5%, capacity drops >5%, request errors >1%, success p95 >1000ms", + "sampling": "API queue every 100ms; API JSON/cgroup about 1s; other services and PG about 2s", + "observer_version": 3, + "source_sha256": { + "scripts/diagnostics/pool.cjs": "5b1f2b713fc8fb471c3701584839e478f99c4a78941ad2cdf237068464299623", + "scripts/diagnostics/observer.sh": "a5d0a1bc77fa1922a2d0e71947d67ee51849a9a9fe303bc158bd6c88366c5fd5", + "scripts/benchmark-scaling.mjs": "c0f069be7271a5b56f1a522714eb9ecc6fb413c66c13eee79c994989f36e53fe", + "scripts/run-scaling-diagnostics.py": "c98c80c815001e75ea4f9618c8b98f5415645dfa559db18168d49fa8585cc6bc" + }, + "notes": [ + "All profiles use the same instrumentation and pool15.", + "A container client uses the nginx service directly; it shares Docker VM CPU and bypasses Windows port forwarding.", + "Acquisition latency includes opening new connections; it is not SQL execution time.", + "Observers consume resources inside the existing container budgets.", + "Instrumentation stores no tokens, passwords, message text or SQL parameters." + ], + "containers": { + "four": [ + { + "id": "48e242801a29195225122c815c7c95586d48c32c941c3cc4f594435f397101c7", + "name": "/mtusi2026lab3-fork-api-10", + "image": "sha256:706b71f1a866c5cf40a988d821657d71a443a9e9de311dd76ac1a423638af230", + "nano_cpus": 500000000, + "memory_bytes": 268435456, + "pool_max": "15" + }, + { + "id": "5f50e56fe9a0ee215cd1e7dfe21699622c52b3d213b45f2b1f3592256e658a85", + "name": "/mtusi2026lab3-fork-api-12", + "image": "sha256:706b71f1a866c5cf40a988d821657d71a443a9e9de311dd76ac1a423638af230", + "nano_cpus": 500000000, + "memory_bytes": 268435456, + "pool_max": "15" + }, + { + "id": "0be78ec840358607ef13c8123297b7bdd3d2dff862cc40a7a35cc4d50b903eed", + "name": "/mtusi2026lab3-fork-api-13", + "image": "sha256:706b71f1a866c5cf40a988d821657d71a443a9e9de311dd76ac1a423638af230", + "nano_cpus": 500000000, + "memory_bytes": 268435456, + "pool_max": "15" + }, + { + "id": "331a9f18faa122d72f3a2e9a9f8aa51046f22db8acdba5842ee49fbaf326ee2b", + "name": "/mtusi2026lab3-fork-api-14", + "image": "sha256:706b71f1a866c5cf40a988d821657d71a443a9e9de311dd76ac1a423638af230", + "nano_cpus": 500000000, + "memory_bytes": 268435456, + "pool_max": "15" + }, + { + "id": "8e3d23d4116ca5bd1d0741b44a40b72bcbff72f122831b68214eb874a029c084", + "name": "/mtusi2026lab3-fork-postgres-1", + "image": "sha256:f3bd19c606e442c3d7bdfa8002e03fe260a1023351e0ea4598032022b68dd6e3", + "nano_cpus": 500000000, + "memory_bytes": 536870912, + "pool_max": null + }, + { + "id": "0891b089ad4712a7f9899383b09755ceda41793c5fecd8cba6ef07568a38aedb", + "name": "/mtusi2026lab3-fork-nginx-1", + "image": "sha256:47928bf67eb62a1863cb08d9ecb52d3e704304ba614eaee17884204677702951", + "nano_cpus": 500000000, + "memory_bytes": 134217728, + "pool_max": null + }, + { + "id": "a2ece96bc2f0b98b2b0a805c4a2ef6fd1e634b81c568554f80d018493494c189", + "name": "/mtusi2026lab3-fork-redis-1", + "image": "sha256:bb186d083732f669da90be8b0f975a37812b15e913465bb14d845db72a4e3e08", + "nano_cpus": 500000000, + "memory_bytes": 268435456, + "pool_max": null + } + ] + }, + "environments": { + "four": { + "docker": { + "cpus": 4, + "memory_bytes": 3008614400, + "version": "28.3.2", + "kernel": "6.6.87.2-microsoft-standard-WSL2" + }, + "running_containers": [ + { + "name": "mtusi2026lab3-fork-api-14", + "image": "mtusi2026lab3-fork-api" + }, + { + "name": "mtusi2026lab3-fork-api-13", + "image": "mtusi2026lab3-fork-api" + }, + { + "name": "mtusi2026lab3-fork-api-10", + "image": "mtusi2026lab3-fork-api" + }, + { + "name": "mtusi2026lab3-fork-api-12", + "image": "mtusi2026lab3-fork-api" + }, + { + "name": "mtusi2026lab3-fork-postgres-1", + "image": "postgres:17.6-bookworm" + }, + { + "name": "mtusi2026lab3-fork-nginx-1", + "image": "nginx:1.30.6-alpine" + }, + { + "name": "mtusi2026lab3-fork-redis-1", + "image": "redis:7.4.5-alpine" + } + ] + } + }, + "runs": [ + "four-r60-repeat1", + "four-r60-repeat2", + "four-r60-repeat3" + ], + "stopped_profiles": { + "four": { + "rate": 60, + "reasons": [ + "generator_late" + ] + } + }, + "finished": "2026-10-28T14:27:57.948648+00:00" + }, + "diagnostics-pg1cpu-linux-20261028": { + "started": "2026-10-28T14:38:16.722845+00:00", + "profiles": [ + "four" + ], + "client": "container", + "rates": [ + 60 + ], + "duration_seconds": 120, + "warmup_seconds": 20, + "repetitions": 3, + "stop_rule": "stop a profile after >=2 repeats at one rate exceed any threshold: scheduler late >5%, capacity drops >5%, request errors >1%, success p95 >1000ms", + "sampling": "API queue every 100ms; API JSON/cgroup about 1s; other services and PG about 2s", + "observer_version": 3, + "source_sha256": { + "scripts/diagnostics/pool.cjs": "5b1f2b713fc8fb471c3701584839e478f99c4a78941ad2cdf237068464299623", + "scripts/diagnostics/observer.sh": "a5d0a1bc77fa1922a2d0e71947d67ee51849a9a9fe303bc158bd6c88366c5fd5", + "scripts/benchmark-scaling.mjs": "c0f069be7271a5b56f1a522714eb9ecc6fb413c66c13eee79c994989f36e53fe", + "scripts/run-scaling-diagnostics.py": "c98c80c815001e75ea4f9618c8b98f5415645dfa559db18168d49fa8585cc6bc" + }, + "notes": [ + "All profiles use the same instrumentation and pool15.", + "A container client uses the nginx service directly; it shares Docker VM CPU and bypasses Windows port forwarding.", + "Acquisition latency includes opening new connections; it is not SQL execution time.", + "Observers consume resources inside the existing container budgets.", + "Instrumentation stores no tokens, passwords, message text or SQL parameters." + ], + "containers": { + "four": [ + { + "id": "e61ee4a43c4b4c656e44a7b0cf89c45bbf26b833dc9b311bb896909645f7f03c", + "name": "/mtusi2026lab3-fork-api-13", + "image": "sha256:706b71f1a866c5cf40a988d821657d71a443a9e9de311dd76ac1a423638af230", + "nano_cpus": 500000000, + "memory_bytes": 268435456, + "pool_max": "15" + }, + { + "id": "5fb62b603f9ebe3cc5ea80df6516d3046793559f91b5732cd2c3f2275e8fb518", + "name": "/mtusi2026lab3-fork-api-14", + "image": "sha256:706b71f1a866c5cf40a988d821657d71a443a9e9de311dd76ac1a423638af230", + "nano_cpus": 500000000, + "memory_bytes": 268435456, + "pool_max": "15" + }, + { + "id": "be15ed8d3392351174a4b6ed28a4a4e23bb7dfc543c4b7a52ce1126493d8988a", + "name": "/mtusi2026lab3-fork-api-15", + "image": "sha256:706b71f1a866c5cf40a988d821657d71a443a9e9de311dd76ac1a423638af230", + "nano_cpus": 500000000, + "memory_bytes": 268435456, + "pool_max": "15" + }, + { + "id": "34ba7a14aac34e60e004a4597aa59a27bf094d7f8bb9688fffe61083746b2133", + "name": "/mtusi2026lab3-fork-api-16", + "image": "sha256:706b71f1a866c5cf40a988d821657d71a443a9e9de311dd76ac1a423638af230", + "nano_cpus": 500000000, + "memory_bytes": 268435456, + "pool_max": "15" + }, + { + "id": "d9f3adf56ca819973772bd039136681490c66c49d4630dc5bd62ea37fadd69d3", + "name": "/mtusi2026lab3-fork-postgres-1", + "image": "sha256:f3bd19c606e442c3d7bdfa8002e03fe260a1023351e0ea4598032022b68dd6e3", + "nano_cpus": 1000000000, + "memory_bytes": 536870912, + "pool_max": null + }, + { + "id": "0891b089ad4712a7f9899383b09755ceda41793c5fecd8cba6ef07568a38aedb", + "name": "/mtusi2026lab3-fork-nginx-1", + "image": "sha256:47928bf67eb62a1863cb08d9ecb52d3e704304ba614eaee17884204677702951", + "nano_cpus": 500000000, + "memory_bytes": 134217728, + "pool_max": null + }, + { + "id": "a2ece96bc2f0b98b2b0a805c4a2ef6fd1e634b81c568554f80d018493494c189", + "name": "/mtusi2026lab3-fork-redis-1", + "image": "sha256:bb186d083732f669da90be8b0f975a37812b15e913465bb14d845db72a4e3e08", + "nano_cpus": 500000000, + "memory_bytes": 268435456, + "pool_max": null + } + ] + }, + "environments": { + "four": { + "docker": { + "cpus": 4, + "memory_bytes": 3008614400, + "version": "28.3.2", + "kernel": "6.6.87.2-microsoft-standard-WSL2" + }, + "running_containers": [ + { + "name": "mtusi2026lab3-fork-api-16", + "image": "mtusi2026lab3-fork-api" + }, + { + "name": "mtusi2026lab3-fork-api-14", + "image": "mtusi2026lab3-fork-api" + }, + { + "name": "mtusi2026lab3-fork-api-15", + "image": "mtusi2026lab3-fork-api" + }, + { + "name": "mtusi2026lab3-fork-api-13", + "image": "mtusi2026lab3-fork-api" + }, + { + "name": "mtusi2026lab3-fork-postgres-1", + "image": "postgres:17.6-bookworm" + }, + { + "name": "mtusi2026lab3-fork-nginx-1", + "image": "nginx:1.30.6-alpine" + }, + { + "name": "mtusi2026lab3-fork-redis-1", + "image": "redis:7.4.5-alpine" + } + ] + } + }, + "runs": [ + "four-r60-repeat1", + "four-r60-repeat2", + "four-r60-repeat3" + ], + "stopped_profiles": { + "four": { + "rate": 60, + "reasons": [ + "generator_late" + ] + } + }, + "finished": "2026-10-28T14:47:27.654968+00:00" + }, + "pool15-four-r100-short-20261028": { + "started": "2026-10-28T17:37:25.260370+00:00", + "profiles": [ + "four" + ], + "client": "container", + "rates": [ + 100 + ], + "duration_seconds": 60, + "warmup_seconds": 15, + "repetitions": 3, + "full_matrix": true, + "stop_rule": "record only; continue all requested rates after >=2 repeats exceed thresholds: scheduler late >5%, capacity drops >5%, request errors >1%, success p95 >1000ms", + "sampling": "API queue every 100ms; API JSON/cgroup about 1s; other services and PG about 2s", + "observer_version": 3, + "source_sha256": { + "scripts/diagnostics/pool.cjs": "5b1f2b713fc8fb471c3701584839e478f99c4a78941ad2cdf237068464299623", + "scripts/diagnostics/observer.sh": "a5d0a1bc77fa1922a2d0e71947d67ee51849a9a9fe303bc158bd6c88366c5fd5", + "scripts/benchmark-scaling.mjs": "506963d7c7538ad1ec2ca0661ce4eb47ddf444e45f5887618b37e9a48850f33b", + "scripts/run-scaling-diagnostics.py": "0c853758a1a155e5f6471ce16bdb4ddaede6b2c4da13deecae8533b9ae974743" + }, + "notes": [ + "All profiles use the same instrumentation; actual per-replica pool limits are recorded in containers.", + "A container client uses the nginx service directly; it shares Docker VM CPU and bypasses Windows port forwarding.", + "Acquisition latency includes opening new connections; it is not SQL execution time.", + "Observers consume resources inside the existing container budgets.", + "Instrumentation stores no tokens, passwords, message text or SQL parameters." + ], + "containers": { + "four": [ + { + "id": "2b56974d2849d0b80749fddba7087d799ab6d36c7f7bd6cda15fc741550aef94", + "name": "/mtusi2026lab3-fork-api-16", + "image": "sha256:706b71f1a866c5cf40a988d821657d71a443a9e9de311dd76ac1a423638af230", + "nano_cpus": 500000000, + "memory_bytes": 268435456, + "pool_max": "15" + }, + { + "id": "f1d70f064d3d7ae0d08712e4c0c1ae4294ad473e95c2bf7f841da21ceafac489", + "name": "/mtusi2026lab3-fork-api-17", + "image": "sha256:706b71f1a866c5cf40a988d821657d71a443a9e9de311dd76ac1a423638af230", + "nano_cpus": 500000000, + "memory_bytes": 268435456, + "pool_max": "15" + }, + { + "id": "7532994d79e73f42a804724d3cf0a918a5543f06a4a634066a1235946d042a76", + "name": "/mtusi2026lab3-fork-api-18", + "image": "sha256:706b71f1a866c5cf40a988d821657d71a443a9e9de311dd76ac1a423638af230", + "nano_cpus": 500000000, + "memory_bytes": 268435456, + "pool_max": "15" + }, + { + "id": "58a985cadd205149383b8190fcecb9820cf069fb70321e5df88fe9912a3be4cb", + "name": "/mtusi2026lab3-fork-api-19", + "image": "sha256:706b71f1a866c5cf40a988d821657d71a443a9e9de311dd76ac1a423638af230", + "nano_cpus": 500000000, + "memory_bytes": 268435456, + "pool_max": "15" + }, + { + "id": "d9f3adf56ca819973772bd039136681490c66c49d4630dc5bd62ea37fadd69d3", + "name": "/mtusi2026lab3-fork-postgres-1", + "image": "sha256:f3bd19c606e442c3d7bdfa8002e03fe260a1023351e0ea4598032022b68dd6e3", + "nano_cpus": 1000000000, + "memory_bytes": 536870912, + "pool_max": null + }, + { + "id": "0891b089ad4712a7f9899383b09755ceda41793c5fecd8cba6ef07568a38aedb", + "name": "/mtusi2026lab3-fork-nginx-1", + "image": "sha256:47928bf67eb62a1863cb08d9ecb52d3e704304ba614eaee17884204677702951", + "nano_cpus": 500000000, + "memory_bytes": 134217728, + "pool_max": null + }, + { + "id": "a2ece96bc2f0b98b2b0a805c4a2ef6fd1e634b81c568554f80d018493494c189", + "name": "/mtusi2026lab3-fork-redis-1", + "image": "sha256:bb186d083732f669da90be8b0f975a37812b15e913465bb14d845db72a4e3e08", + "nano_cpus": 500000000, + "memory_bytes": 268435456, + "pool_max": null + } + ] + }, + "environments": { + "four": { + "docker": { + "cpus": 4, + "memory_bytes": 3008614400, + "version": "28.3.2", + "kernel": "6.6.87.2-microsoft-standard-WSL2" + }, + "running_containers": [ + { + "name": "mtusi2026lab3-fork-api-17", + "image": "mtusi2026lab3-fork-api" + }, + { + "name": "mtusi2026lab3-fork-api-16", + "image": "mtusi2026lab3-fork-api" + }, + { + "name": "mtusi2026lab3-fork-api-19", + "image": "mtusi2026lab3-fork-api" + }, + { + "name": "mtusi2026lab3-fork-api-18", + "image": "mtusi2026lab3-fork-api" + }, + { + "name": "mtusi2026lab3-fork-postgres-1", + "image": "postgres:17.6-bookworm" + }, + { + "name": "mtusi2026lab3-fork-nginx-1", + "image": "nginx:1.30.6-alpine" + }, + { + "name": "mtusi2026lab3-fork-redis-1", + "image": "redis:7.4.5-alpine" + } + ] + } + }, + "runs": [ + "four-r100-repeat1", + "four-r100-repeat2", + "four-r100-repeat3" + ], + "stopped_profiles": {}, + "threshold_crossings": { + "four": [ + { + "rate": 100, + "reasons": [ + "generator_late" + ] + } + ] + }, + "finished": "2026-10-28T17:44:06.948102+00:00" + }, + "pool8-four-r100-short-20261028": { + "started": "2026-10-28T17:44:27.527774+00:00", + "profiles": [ + "four" + ], + "client": "container", + "rates": [ + 100 + ], + "duration_seconds": 60, + "warmup_seconds": 15, + "repetitions": 3, + "full_matrix": true, + "stop_rule": "record only; continue all requested rates after >=2 repeats exceed thresholds: scheduler late >5%, capacity drops >5%, request errors >1%, success p95 >1000ms", + "sampling": "API queue every 100ms; API JSON/cgroup about 1s; other services and PG about 2s", + "observer_version": 3, + "source_sha256": { + "scripts/diagnostics/pool.cjs": "5b1f2b713fc8fb471c3701584839e478f99c4a78941ad2cdf237068464299623", + "scripts/diagnostics/observer.sh": "a5d0a1bc77fa1922a2d0e71947d67ee51849a9a9fe303bc158bd6c88366c5fd5", + "scripts/benchmark-scaling.mjs": "506963d7c7538ad1ec2ca0661ce4eb47ddf444e45f5887618b37e9a48850f33b", + "scripts/run-scaling-diagnostics.py": "0c853758a1a155e5f6471ce16bdb4ddaede6b2c4da13deecae8533b9ae974743" + }, + "notes": [ + "All profiles use the same instrumentation; actual per-replica pool limits are recorded in containers.", + "A container client uses the nginx service directly; it shares Docker VM CPU and bypasses Windows port forwarding.", + "Acquisition latency includes opening new connections; it is not SQL execution time.", + "Observers consume resources inside the existing container budgets.", + "Instrumentation stores no tokens, passwords, message text or SQL parameters." + ], + "containers": { + "four": [ + { + "id": "08d305faa51b520c8990ad1264e0cedd29e103fcc1effb9181e6524a64117e0d", + "name": "/mtusi2026lab3-fork-api-16", + "image": "sha256:706b71f1a866c5cf40a988d821657d71a443a9e9de311dd76ac1a423638af230", + "nano_cpus": 500000000, + "memory_bytes": 268435456, + "pool_max": "8" + }, + { + "id": "3dadb549bbea0d9ba33556cae863b3df2afc75fd32eced2cad006af4f81ceafd", + "name": "/mtusi2026lab3-fork-api-17", + "image": "sha256:706b71f1a866c5cf40a988d821657d71a443a9e9de311dd76ac1a423638af230", + "nano_cpus": 500000000, + "memory_bytes": 268435456, + "pool_max": "8" + }, + { + "id": "1cfdac196b57d7503f5b867b3d38f48573ad2024283f18e1b1ca7524cb82c076", + "name": "/mtusi2026lab3-fork-api-18", + "image": "sha256:706b71f1a866c5cf40a988d821657d71a443a9e9de311dd76ac1a423638af230", + "nano_cpus": 500000000, + "memory_bytes": 268435456, + "pool_max": "8" + }, + { + "id": "061f64fa625e5130d6d09a70e32b69156b7430529d60f4e81adcbd804844e042", + "name": "/mtusi2026lab3-fork-api-19", + "image": "sha256:706b71f1a866c5cf40a988d821657d71a443a9e9de311dd76ac1a423638af230", + "nano_cpus": 500000000, + "memory_bytes": 268435456, + "pool_max": "8" + }, + { + "id": "d9f3adf56ca819973772bd039136681490c66c49d4630dc5bd62ea37fadd69d3", + "name": "/mtusi2026lab3-fork-postgres-1", + "image": "sha256:f3bd19c606e442c3d7bdfa8002e03fe260a1023351e0ea4598032022b68dd6e3", + "nano_cpus": 1000000000, + "memory_bytes": 536870912, + "pool_max": null + }, + { + "id": "0891b089ad4712a7f9899383b09755ceda41793c5fecd8cba6ef07568a38aedb", + "name": "/mtusi2026lab3-fork-nginx-1", + "image": "sha256:47928bf67eb62a1863cb08d9ecb52d3e704304ba614eaee17884204677702951", + "nano_cpus": 500000000, + "memory_bytes": 134217728, + "pool_max": null + }, + { + "id": "a2ece96bc2f0b98b2b0a805c4a2ef6fd1e634b81c568554f80d018493494c189", + "name": "/mtusi2026lab3-fork-redis-1", + "image": "sha256:bb186d083732f669da90be8b0f975a37812b15e913465bb14d845db72a4e3e08", + "nano_cpus": 500000000, + "memory_bytes": 268435456, + "pool_max": null + } + ] + }, + "environments": { + "four": { + "docker": { + "cpus": 4, + "memory_bytes": 3008614400, + "version": "28.3.2", + "kernel": "6.6.87.2-microsoft-standard-WSL2" + }, + "running_containers": [ + { + "name": "mtusi2026lab3-fork-api-19", + "image": "mtusi2026lab3-fork-api" + }, + { + "name": "mtusi2026lab3-fork-api-16", + "image": "mtusi2026lab3-fork-api" + }, + { + "name": "mtusi2026lab3-fork-api-17", + "image": "mtusi2026lab3-fork-api" + }, + { + "name": "mtusi2026lab3-fork-api-18", + "image": "mtusi2026lab3-fork-api" + }, + { + "name": "mtusi2026lab3-fork-postgres-1", + "image": "postgres:17.6-bookworm" + }, + { + "name": "mtusi2026lab3-fork-nginx-1", + "image": "nginx:1.30.6-alpine" + }, + { + "name": "mtusi2026lab3-fork-redis-1", + "image": "redis:7.4.5-alpine" + } + ] + } + }, + "runs": [ + "four-r100-repeat1", + "four-r100-repeat2", + "four-r100-repeat3" + ], + "stopped_profiles": {}, + "threshold_crossings": { + "four": [ + { + "rate": 100, + "reasons": [ + "generator_late" + ] + } + ] + }, + "finished": "2026-10-28T17:50:59.353424+00:00" + }, + "api-small-db-control-20261029/pg1": { + "started": "2026-10-29T05:55:46.193670+00:00", + "profiles": [ + "two" + ], + "client": "container", + "engine": "k6", + "duration_seconds": 30, + "warmup_seconds": 30, + "probe_duration_seconds": 15, + "probe_warmup_seconds": 5, + "repetitions": 3, + "rates": [ + 80 + ], + "containers": { + "two": [ + { + "id": "7151619a6e7762ec4a5a108c5d8e5468b97c0ef7de50f0df0b6be488809308f3", + "name": "/mtusi2026lab3-fork-api-21", + "image": "sha256:06d717266f9eb248c84149e88685ee0210b33bf314b5c1101f22316a0845bb77", + "nano_cpus": 1000000000, + "memory_bytes": 536870912, + "pool_max": "16" + }, + { + "id": "6c358b8fb4fa5596fb8b51160e2a256778ce3dc9dcd14212337e825a272de97a", + "name": "/mtusi2026lab3-fork-api-23", + "image": "sha256:06d717266f9eb248c84149e88685ee0210b33bf314b5c1101f22316a0845bb77", + "nano_cpus": 1000000000, + "memory_bytes": 536870912, + "pool_max": "16" + }, + { + "id": "d9f3adf56ca819973772bd039136681490c66c49d4630dc5bd62ea37fadd69d3", + "name": "/mtusi2026lab3-fork-postgres-1", + "image": "sha256:f3bd19c606e442c3d7bdfa8002e03fe260a1023351e0ea4598032022b68dd6e3", + "nano_cpus": 1000000000, + "memory_bytes": 536870912, + "pool_max": null + }, + { + "id": "0891b089ad4712a7f9899383b09755ceda41793c5fecd8cba6ef07568a38aedb", + "name": "/mtusi2026lab3-fork-nginx-1", + "image": "sha256:47928bf67eb62a1863cb08d9ecb52d3e704304ba614eaee17884204677702951", + "nano_cpus": 500000000, + "memory_bytes": 134217728, + "pool_max": null + }, + { + "id": "a2ece96bc2f0b98b2b0a805c4a2ef6fd1e634b81c568554f80d018493494c189", + "name": "/mtusi2026lab3-fork-redis-1", + "image": "sha256:bb186d083732f669da90be8b0f975a37812b15e913465bb14d845db72a4e3e08", + "nano_cpus": 500000000, + "memory_bytes": 268435456, + "pool_max": null + } + ] + }, + "runs": [ + "two-r80-confirmation-4", + "two-r80-confirmation-5", + "two-r80-confirmation-6" + ], + "boundaries": { + "two": { + "confirmed_good": null, + "confirmed_bad": null, + "confirmations": { + "80": [ + { + "delivery_fraction": 1.0004166666666667, + "error_fraction": 0.0, + "all_request_p95_ms": 793.449891, + "delivery_valid": true, + "slo_pass": true, + "classification": "pass" + }, + { + "delivery_fraction": 0.9870833333333333, + "error_fraction": 0.0, + "all_request_p95_ms": 2026.0931697999993, + "delivery_valid": true, + "slo_pass": false, + "classification": "slo_fail" + }, + { + "delivery_fraction": 1.0004166666666667, + "error_fraction": 0.0, + "all_request_p95_ms": 744.1695299999999, + "delivery_valid": true, + "slo_pass": true, + "classification": "pass" + } + ] + }, + "bracketed": false + } + }, + "stopped_profiles": {}, + "observer_version": 3, + "criterion": "delivery 98..102%, dropped iterations <=2%, errors <=1%, all-request p95 <=1000 ms", + "pool_budget": 32, + "notes": [ + "Local empirical SLO boundary, not universal maximum throughput.", + "Native sequential warmup/measurement scenarios at target-rate 80/20; custom counters belong only to measurement.", + "Generator shares Docker VM CPU; calibration does not eliminate competition during API load.", + "Probe durations differ; use confirmation rows for reported bounds." + ], + "source_sha256": { + "scripts/saturation.k6.js": "220bfb22e3f2734cffa77ba03d969567f62fa9ba049c1611d100d9e778e6ce02", + "scripts/saturation-mock.cjs": "11e23b71ab32371343df65a535e988e2eded04e32facff44afea48d6472bc8dd", + "scripts/run-saturation.py": "3dbc18ccd0986bf0421665d156b8dc0bb137752a0b824f85fa7513bc49ffd5e9", + "scripts/run-scaling-diagnostics.py": "0c853758a1a155e5f6471ce16bdb4ddaede6b2c4da13deecae8533b9ae974743", + "scripts/diagnostics/pool.cjs": "5b1f2b713fc8fb471c3701584839e478f99c4a78941ad2cdf237068464299623", + "scripts/diagnostics/observer.sh": "a5d0a1bc77fa1922a2d0e71947d67ee51849a9a9fe303bc158bd6c88366c5fd5", + "compose.yaml": "cb59c949e0ec8d3ebfaed8410aa26217232baed2cff1bd4e8b6f38b50f006aa6", + "test/compose.diagnostics.yaml": "585e330e7fdd160b35b0f4ce1d23308bbafd405a790aa2e3527b88f72a287900", + "configs/two.yaml": "2607853b0241dc9602da937a39ba7e0f98430b02f3ef46450a352cf202f351e4" + }, + "requested_confirmation_rates": [ + 80 + ], + "expand_confirmation_rates": false, + "generator_container": "lab3-saturation-client-0b48b3be4d614f37807aaa7f65e64ec1", + "mock_container": "lab3-saturation-mock-0b48b3be4d614f37807aaa7f65e64ec1", + "generator_image": "sha256:3ddc8b1a33a2c3d8edc6e99b6a762ae36cba08788463458f5e6a7703e14eb77d", + "generator_version": "k6 v1.3.0+dirty (commit/5870e99ae8-dirty, go1.25.1, linux/amd64)", + "docker": { + "cpus": 4, + "memory_bytes": 3008614400, + "version": "28.3.2" + }, + "calibration_attempts": [ + { + "label": "calibration-r400-calibration-1", + "rate": 400, + "delivery_fraction": 0.7955, + "error_fraction": 0.0, + "all_request_p95_ms": 450.6655827499994, + "delivery_valid": false, + "slo_pass": true, + "classification": "generator_limited" + }, + { + "label": "calibration-r200-calibration-2", + "rate": 200, + "delivery_fraction": 0.9995, + "error_fraction": 0.0, + "all_request_p95_ms": 97.95357569999994, + "delivery_valid": true, + "slo_pass": true, + "classification": "pass" + } + ], + "calibration": { + "label": "calibration-r200-calibration-2", + "delivery_fraction": 0.9995, + "error_fraction": 0.0, + "all_request_p95_ms": 97.95357569999994, + "delivery_valid": true, + "slo_pass": true, + "classification": "pass" + }, + "calibration_low_rate": { + "label": "calibration-r40-calibration-low-rate-3", + "delivery_fraction": 1.0, + "error_fraction": 0.0, + "all_request_p95_ms": 164.13085249999943, + "delivery_valid": true, + "slo_pass": true, + "classification": "pass" + }, + "finished": "2026-10-29T06:02:09.771284+00:00" + }, + "api-small-db-control-20261029/pg2": { + "started": "2026-10-29T06:02:10.440540+00:00", + "profiles": [ + "two" + ], + "client": "container", + "engine": "k6", + "duration_seconds": 30, + "warmup_seconds": 30, + "probe_duration_seconds": 15, + "probe_warmup_seconds": 5, + "repetitions": 3, + "rates": [ + 80 + ], + "containers": { + "two": [ + { + "id": "dbba0607a5070d44975a26da1c741304bc4b67f4d0b1e7a2e06c9fbcbc17cd9c", + "name": "/mtusi2026lab3-fork-api-21", + "image": "sha256:06d717266f9eb248c84149e88685ee0210b33bf314b5c1101f22316a0845bb77", + "nano_cpus": 1000000000, + "memory_bytes": 536870912, + "pool_max": "16" + }, + { + "id": "7ab084a1dd0aa5cc0f9a8440211663e372199e8b279266ee7a26a714277a8955", + "name": "/mtusi2026lab3-fork-api-23", + "image": "sha256:06d717266f9eb248c84149e88685ee0210b33bf314b5c1101f22316a0845bb77", + "nano_cpus": 1000000000, + "memory_bytes": 536870912, + "pool_max": "16" + }, + { + "id": "d9f3adf56ca819973772bd039136681490c66c49d4630dc5bd62ea37fadd69d3", + "name": "/mtusi2026lab3-fork-postgres-1", + "image": "sha256:f3bd19c606e442c3d7bdfa8002e03fe260a1023351e0ea4598032022b68dd6e3", + "nano_cpus": 2000000000, + "memory_bytes": 536870912, + "pool_max": null + }, + { + "id": "0891b089ad4712a7f9899383b09755ceda41793c5fecd8cba6ef07568a38aedb", + "name": "/mtusi2026lab3-fork-nginx-1", + "image": "sha256:47928bf67eb62a1863cb08d9ecb52d3e704304ba614eaee17884204677702951", + "nano_cpus": 500000000, + "memory_bytes": 134217728, + "pool_max": null + }, + { + "id": "a2ece96bc2f0b98b2b0a805c4a2ef6fd1e634b81c568554f80d018493494c189", + "name": "/mtusi2026lab3-fork-redis-1", + "image": "sha256:bb186d083732f669da90be8b0f975a37812b15e913465bb14d845db72a4e3e08", + "nano_cpus": 500000000, + "memory_bytes": 268435456, + "pool_max": null + } + ] + }, + "runs": [ + "two-r80-confirmation-4", + "two-r80-confirmation-5", + "two-r80-confirmation-6" + ], + "boundaries": { + "two": { + "confirmed_good": null, + "confirmed_bad": null, + "confirmations": { + "80": [ + { + "delivery_fraction": 0.9691666666666666, + "error_fraction": 0.0, + "all_request_p95_ms": 2121.76918975, + "delivery_valid": false, + "slo_pass": false, + "classification": "generator_limited" + }, + { + "delivery_fraction": 0.9608333333333333, + "error_fraction": 0.1422376409366869, + "all_request_p95_ms": 1555.304007, + "delivery_valid": false, + "slo_pass": false, + "classification": "generator_limited" + }, + { + "delivery_fraction": 0.9995833333333334, + "error_fraction": 0.0, + "all_request_p95_ms": 712.7126198999999, + "delivery_valid": true, + "slo_pass": true, + "classification": "pass" + } + ] + }, + "bracketed": false + } + }, + "stopped_profiles": {}, + "observer_version": 3, + "criterion": "delivery 98..102%, dropped iterations <=2%, errors <=1%, all-request p95 <=1000 ms", + "pool_budget": 32, + "notes": [ + "Local empirical SLO boundary, not universal maximum throughput.", + "Native sequential warmup/measurement scenarios at target-rate 80/20; custom counters belong only to measurement.", + "Generator shares Docker VM CPU; calibration does not eliminate competition during API load.", + "Probe durations differ; use confirmation rows for reported bounds." + ], + "source_sha256": { + "scripts/saturation.k6.js": "220bfb22e3f2734cffa77ba03d969567f62fa9ba049c1611d100d9e778e6ce02", + "scripts/saturation-mock.cjs": "11e23b71ab32371343df65a535e988e2eded04e32facff44afea48d6472bc8dd", + "scripts/run-saturation.py": "3dbc18ccd0986bf0421665d156b8dc0bb137752a0b824f85fa7513bc49ffd5e9", + "scripts/run-scaling-diagnostics.py": "0c853758a1a155e5f6471ce16bdb4ddaede6b2c4da13deecae8533b9ae974743", + "scripts/diagnostics/pool.cjs": "5b1f2b713fc8fb471c3701584839e478f99c4a78941ad2cdf237068464299623", + "scripts/diagnostics/observer.sh": "a5d0a1bc77fa1922a2d0e71947d67ee51849a9a9fe303bc158bd6c88366c5fd5", + "compose.yaml": "cb59c949e0ec8d3ebfaed8410aa26217232baed2cff1bd4e8b6f38b50f006aa6", + "test/compose.diagnostics.yaml": "585e330e7fdd160b35b0f4ce1d23308bbafd405a790aa2e3527b88f72a287900", + "configs/two.yaml": "2607853b0241dc9602da937a39ba7e0f98430b02f3ef46450a352cf202f351e4" + }, + "requested_confirmation_rates": [ + 80 + ], + "expand_confirmation_rates": false, + "generator_container": "lab3-saturation-client-f02685fc28a8450faea408fc649c160f", + "mock_container": "lab3-saturation-mock-f02685fc28a8450faea408fc649c160f", + "generator_image": "sha256:3ddc8b1a33a2c3d8edc6e99b6a762ae36cba08788463458f5e6a7703e14eb77d", + "generator_version": "k6 v1.3.0+dirty (commit/5870e99ae8-dirty, go1.25.1, linux/amd64)", + "docker": { + "cpus": 4, + "memory_bytes": 3008614400, + "version": "28.3.2" + }, + "calibration_attempts": [ + { + "label": "calibration-r400-calibration-1", + "rate": 400, + "delivery_fraction": 0.84675, + "error_fraction": 0.0, + "all_request_p95_ms": 360.09994680000005, + "delivery_valid": false, + "slo_pass": true, + "classification": "generator_limited" + }, + { + "label": "calibration-r200-calibration-2", + "rate": 200, + "delivery_fraction": 1.0005, + "error_fraction": 0.0, + "all_request_p95_ms": 48.061249, + "delivery_valid": true, + "slo_pass": true, + "classification": "pass" + } + ], + "calibration": { + "label": "calibration-r200-calibration-2", + "delivery_fraction": 1.0005, + "error_fraction": 0.0, + "all_request_p95_ms": 48.061249, + "delivery_valid": true, + "slo_pass": true, + "classification": "pass" + }, + "calibration_low_rate": { + "label": "calibration-r40-calibration-low-rate-3", + "delivery_fraction": 1.0025, + "error_fraction": 0.0, + "all_request_p95_ms": 234.54618100000002, + "delivery_valid": true, + "slo_pass": true, + "classification": "pass" + }, + "finished": "2026-10-29T06:08:19.508506+00:00" + } + }, + "runs": [ + { + "dataset": "api-cpu", + "variant": "one-small", + "configuration": "one-small", + "manifest": "api-small-growth-20261029", + "label": "one-small-r40-confirmation-4", + "profile": { + "arrival_model": "k6 constant-arrival-rate; one HTTP request per iteration", + "offered_rps": 40, + "duration_seconds": 30, + "warmup_seconds": 10, + "warmup_profile": "same 80/20 workload at target rate", + "read_percent": 80, + "write_percent": 20, + "initial_messages": 30, + "history_limit": 50, + "max_in_flight": 128, + "timeout_ms": 5000, + "automatic_retries": false, + "expected_instances": 1, + "phase": "confirmation" + }, + "measurement": { + "scheduled_slots": 1200, + "client_dropped_slots": 0, + "scheduler_late_slots": 0, + "read": { + "attempted": 961, + "successful": 961, + "errors": 0, + "successful_rps": 32.03333333333333, + "successful_latency_ms": { + "p50": 19.929526, + "p95": 1268.986602, + "p99": 1621.0082001999997 + }, + "status_counts": {}, + "error_counts": {}, + "instance_counts": {} + }, + "write": { + "attempted": 240, + "successful": 240, + "errors": 0, + "successful_rps": 8, + "successful_latency_ms": { + "p50": 55.266779, + "p95": 1512.0278882, + "p99": 1830.9945195199996 + }, + "status_counts": {}, + "error_counts": {}, + "instance_counts": {} + }, + "all": { + "attempted": 1201, + "successful": 1201, + "errors": 0, + "successful_rps": 40.03333333333333, + "successful_latency_ms": { + "p50": 26.847786, + "p95": 1363.2556869999999, + "p99": 1703.2769420000002 + }, + "status_counts": { + "200": 961, + "201": 240, + "other": 0, + "network": 0 + }, + "error_counts": {}, + "instance_counts": { + "8269a2d0e237": 1201 + } + } + }, + "timing": { + "measurement_started_epoch_ms": 1793250984751, + "measurement_scheduled_end_epoch_ms": 1793251014751, + "measurement_completed_epoch_ms": 1793251012537 + }, + "client": { + "engine": "k6", + "scheduler_lateness_measured": false, + "raw_dropped_iterations_including_warmup": 0, + "peak_vus": 61, + "max_vus": 128 + }, + "all_latency_ms": { + "p50": 26.847786, + "p95": 1363.2556869999999, + "p99": 1703.2769420000002 + }, + "criterion": { + "delivery_fraction": 1.0008333333333332, + "error_fraction": 0.0, + "all_request_p95_ms": 1363.2556869999999, + "delivery_valid": true, + "slo_pass": false, + "classification": "slo_fail" + }, + "diagnostics": { + "resources": { + "api-1": { + "samples": 30, + "coverage_seconds": 27.999, + "max_sample_gap_seconds": 1.303, + "mean_cpu_cores": 0.4689939283545841, + "throttled_seconds": 2.708348, + "throttled_period_fraction": 0.0664451827242525, + "peak_memory_mib": 180.99609375, + "oom_kills": 0 + }, + "postgres": { + "samples": 15, + "coverage_seconds": 27.0, + "max_sample_gap_seconds": 3.0, + "mean_cpu_cores": 0.33446107407407405, + "throttled_seconds": 0.468726, + "throttled_period_fraction": 0.0410958904109589, + "peak_memory_mib": 246.28125, + "oom_kills": 0 + }, + "nginx": { + "samples": 15, + "coverage_seconds": 28.0, + "max_sample_gap_seconds": 3.0, + "mean_cpu_cores": 0.12417832142857142, + "throttled_seconds": 1.765481, + "throttled_period_fraction": 0.08163265306122448, + "peak_memory_mib": 10.5859375, + "oom_kills": 0 + }, + "redis": { + "samples": 15, + "coverage_seconds": 27.0, + "max_sample_gap_seconds": 3.0, + "mean_cpu_cores": 0.08451766666666667, + "throttled_seconds": 0.520692, + "throttled_period_fraction": 0.02702702702702703, + "peak_memory_mib": 11.79296875, + "oom_kills": 0 + }, + "generator": { + "samples": 15, + "coverage_seconds": 27.0, + "max_sample_gap_seconds": 3.0, + "mean_cpu_cores": 0.27501548148148147, + "throttled_seconds": 0.0, + "throttled_period_fraction": 0.0, + "peak_memory_mib": 96.65234375, + "oom_kills": 0 + } + }, + "pools": { + "api-1": { + "samples": 30, + "acquisitions": 1989, + "acquisition_errors": 0, + "mean_acquisition_ms": 0.5064286857716331, + "max_acquisition_ms": 76.60523999999714, + "max_waiting": 0, + "queued_interval_fraction": 0.0, + "max_total": 32, + "observed_connection_increases": 0, + "observed_connection_decreases": 4, + "event_loop_p99_max_ms": 492.568575 + } + }, + "host": { + "samples": 15, + "cpu_some_fraction": 0.4080378148148148, + "memory_some_fraction": 0.0, + "memory_full_fraction": 0.0, + "io_some_fraction": 0.013075851851851852, + "io_full_fraction": 0.004405592592592593, + "min_available_mib": 1378.20703125, + "max_swap_used_mib": 243.125 + }, + "postgres": { + "samples": 16, + "max_active": 2, + "max_idle_in_transaction": 5, + "active_wait_observations": { + "no_wait_event/-": 6 + } + }, + "nginx": { + "samples": 15, + "upstream_changes": 0, + "min_ready": 1, + "max_ready": 1 + }, + "limits_reached": { + "generator_late": false, + "client_capacity": false, + "request_errors": false, + "latency": true + }, + "diagnostics_complete": true + }, + "source_hashes": { + "benchmark": "ab3bb4006a8a21df526450ed2ef5b97ba6d12a45d9101bed9c6f40bc46fb351a", + "summary": "a89d23e52b05c2d85305455b825960ee113f7705fb8cfada571575741efd34f1" + } + }, + { + "dataset": "api-cpu", + "variant": "one-small", + "configuration": "one-small", + "manifest": "api-small-growth-20261029", + "label": "one-small-r80-confirmation-5", + "profile": { + "arrival_model": "k6 constant-arrival-rate; one HTTP request per iteration", + "offered_rps": 80, + "duration_seconds": 30, + "warmup_seconds": 10, + "warmup_profile": "same 80/20 workload at target rate", + "read_percent": 80, + "write_percent": 20, + "initial_messages": 30, + "history_limit": 50, + "max_in_flight": 128, + "timeout_ms": 5000, + "automatic_retries": false, + "expected_instances": 1, + "phase": "confirmation" + }, + "measurement": { + "scheduled_slots": 2400, + "client_dropped_slots": 179, + "scheduler_late_slots": 0, + "read": { + "attempted": 1777, + "successful": 918, + "errors": 859, + "successful_rps": 30.6, + "successful_latency_ms": { + "p50": 644.7919875, + "p95": 3613.4948415999997, + "p99": 4762.1025351200005 + }, + "status_counts": {}, + "error_counts": {}, + "instance_counts": {} + }, + "write": { + "attempted": 444, + "successful": 227, + "errors": 217, + "successful_rps": 7.566666666666666, + "successful_latency_ms": { + "p50": 1257.987955, + "p95": 3538.3763595999994, + "p99": 4419.11369072 + }, + "status_counts": {}, + "error_counts": {}, + "instance_counts": {} + }, + "all": { + "attempted": 2221, + "successful": 1145, + "errors": 1076, + "successful_rps": 38.166666666666664, + "successful_latency_ms": { + "p50": 675.249624, + "p95": 3612.0851274, + "p99": 4642.559255439987 + }, + "status_counts": { + "200": 918, + "201": 227, + "other": 1010, + "network": 66 + }, + "error_counts": {}, + "instance_counts": { + "8269a2d0e237": 1145 + } + } + }, + "timing": { + "measurement_started_epoch_ms": 1793251033399, + "measurement_scheduled_end_epoch_ms": 1793251063399, + "measurement_completed_epoch_ms": 1793251061234 + }, + "client": { + "engine": "k6", + "scheduler_lateness_measured": false, + "raw_dropped_iterations_including_warmup": 179, + "peak_vus": 131, + "max_vus": 128 + }, + "all_latency_ms": { + "p50": 124.590465, + "p95": 3913.775195, + "p99": 5024.5456298 + }, + "criterion": { + "delivery_fraction": 0.9254166666666667, + "error_fraction": 0.4844664565511031, + "all_request_p95_ms": 3913.775195, + "delivery_valid": false, + "slo_pass": false, + "classification": "generator_limited" + }, + "diagnostics": { + "resources": { + "api-1": { + "samples": 31, + "coverage_seconds": 29.786, + "max_sample_gap_seconds": 1.204, + "mean_cpu_cores": 0.5187701269052575, + "throttled_seconds": 1.490499, + "throttled_period_fraction": 0.09009009009009009, + "peak_memory_mib": 220.72265625, + "oom_kills": 0 + }, + "postgres": { + "samples": 15, + "coverage_seconds": 28.0, + "max_sample_gap_seconds": 3.0, + "mean_cpu_cores": 0.3064097142857143, + "throttled_seconds": 0.049702, + "throttled_period_fraction": 0.029661016949152543, + "peak_memory_mib": 254.94921875, + "oom_kills": 0 + }, + "nginx": { + "samples": 14, + "coverage_seconds": 27.0, + "max_sample_gap_seconds": 3.0, + "mean_cpu_cores": 0.16157203703703704, + "throttled_seconds": 1.846144, + "throttled_period_fraction": 0.10583941605839416, + "peak_memory_mib": 11.6640625, + "oom_kills": 0 + }, + "redis": { + "samples": 15, + "coverage_seconds": 27.0, + "max_sample_gap_seconds": 3.0, + "mean_cpu_cores": 0.10024618518518519, + "throttled_seconds": 0.456632, + "throttled_period_fraction": 0.03767123287671233, + "peak_memory_mib": 11.98828125, + "oom_kills": 0 + }, + "generator": { + "samples": 15, + "coverage_seconds": 28.0, + "max_sample_gap_seconds": 3.0, + "mean_cpu_cores": 0.43532482142857143, + "throttled_seconds": 0.0, + "throttled_period_fraction": 0.0, + "peak_memory_mib": 106.9765625, + "oom_kills": 0 + } + }, + "pools": { + "api-1": { + "samples": 31, + "acquisitions": 2578, + "acquisition_errors": 0, + "mean_acquisition_ms": 35.72717908921662, + "max_acquisition_ms": 1304.3396079999948, + "max_waiting": 29, + "queued_interval_fraction": 0.22580645161290322, + "max_total": 32, + "observed_connection_increases": 0, + "observed_connection_decreases": 0, + "event_loop_p99_max_ms": 475.791359 + } + }, + "host": { + "samples": 15, + "cpu_some_fraction": 0.48179525, + "memory_some_fraction": 0.0, + "memory_full_fraction": 0.0, + "io_some_fraction": 0.026553678571428572, + "io_full_fraction": 0.008690392857142857, + "min_available_mib": 1322.45703125, + "max_swap_used_mib": 243.125 + }, + "postgres": { + "samples": 16, + "max_active": 5, + "max_idle_in_transaction": 11, + "active_wait_observations": { + "Lock/transactionid": 4, + "no_wait_event/-": 7, + "IO/WalSync": 1, + "LWLock/WALWrite": 1 + } + }, + "nginx": { + "samples": 14, + "upstream_changes": 4, + "min_ready": 0, + "max_ready": 1 + }, + "limits_reached": { + "generator_late": false, + "client_capacity": true, + "request_errors": true, + "latency": true + }, + "diagnostics_complete": true + }, + "source_hashes": { + "benchmark": "20d58812a86def05375b324f65eaf903f9e86e57be47240751bb634413d241cb", + "summary": "34d328102e9edd835acc46e80877ebb66714610942356e994cc395a397c71720" + } + }, + { + "dataset": "api-cpu", + "variant": "one-small", + "configuration": "one-small", + "manifest": "api-small-growth-20261029", + "label": "one-small-r40-confirmation-6", + "profile": { + "arrival_model": "k6 constant-arrival-rate; one HTTP request per iteration", + "offered_rps": 40, + "duration_seconds": 30, + "warmup_seconds": 10, + "warmup_profile": "same 80/20 workload at target rate", + "read_percent": 80, + "write_percent": 20, + "initial_messages": 30, + "history_limit": 50, + "max_in_flight": 128, + "timeout_ms": 5000, + "automatic_retries": false, + "expected_instances": 1, + "phase": "confirmation" + }, + "measurement": { + "scheduled_slots": 1200, + "client_dropped_slots": 0, + "scheduler_late_slots": 0, + "read": { + "attempted": 961, + "successful": 961, + "errors": 0, + "successful_rps": 32.03333333333333, + "successful_latency_ms": { + "p50": 72.611804, + "p95": 1642.1120839999999, + "p99": 2234.5641005999996 + }, + "status_counts": {}, + "error_counts": {}, + "instance_counts": {} + }, + "write": { + "attempted": 240, + "successful": 240, + "errors": 0, + "successful_rps": 8, + "successful_latency_ms": { + "p50": 165.79763000000003, + "p95": 1999.0831884999996, + "p99": 2424.557844909999 + }, + "status_counts": {}, + "error_counts": {}, + "instance_counts": {} + }, + "all": { + "attempted": 1201, + "successful": 1201, + "errors": 0, + "successful_rps": 40.03333333333333, + "successful_latency_ms": { + "p50": 86.459411, + "p95": 1682.559437, + "p99": 2313.335861 + }, + "status_counts": { + "200": 961, + "201": 240, + "other": 0, + "network": 0 + }, + "error_counts": {}, + "instance_counts": { + "8269a2d0e237": 1201 + } + } + }, + "timing": { + "measurement_started_epoch_ms": 1793251080823, + "measurement_scheduled_end_epoch_ms": 1793251110823, + "measurement_completed_epoch_ms": 1793251109044 + }, + "client": { + "engine": "k6", + "scheduler_lateness_measured": false, + "raw_dropped_iterations_including_warmup": 0, + "peak_vus": 74, + "max_vus": 128 + }, + "all_latency_ms": { + "p50": 86.459411, + "p95": 1682.559437, + "p99": 2313.335861 + }, + "criterion": { + "delivery_fraction": 1.0008333333333332, + "error_fraction": 0.0, + "all_request_p95_ms": 1682.559437, + "delivery_valid": true, + "slo_pass": false, + "classification": "slo_fail" + }, + "diagnostics": { + "resources": { + "api-1": { + "samples": 30, + "coverage_seconds": 28.536, + "max_sample_gap_seconds": 1.449, + "mean_cpu_cores": 0.5015700869077656, + "throttled_seconds": 1.289547, + "throttled_period_fraction": 0.06188925081433225, + "peak_memory_mib": 242.703125, + "oom_kills": 0 + }, + "postgres": { + "samples": 16, + "coverage_seconds": 29.0, + "max_sample_gap_seconds": 3.0, + "mean_cpu_cores": 0.46909210344827584, + "throttled_seconds": 4.652511, + "throttled_period_fraction": 0.14057507987220447, + "peak_memory_mib": 253.98828125, + "oom_kills": 0 + }, + "nginx": { + "samples": 14, + "coverage_seconds": 25.0, + "max_sample_gap_seconds": 3.0, + "mean_cpu_cores": 0.10065148, + "throttled_seconds": 0.339133, + "throttled_period_fraction": 0.022304832713754646, + "peak_memory_mib": 10.8984375, + "oom_kills": 0 + }, + "redis": { + "samples": 15, + "coverage_seconds": 27.0, + "max_sample_gap_seconds": 3.0, + "mean_cpu_cores": 0.08838737037037037, + "throttled_seconds": 0.650417, + "throttled_period_fraction": 0.058419243986254296, + "peak_memory_mib": 11.3828125, + "oom_kills": 0 + }, + "generator": { + "samples": 15, + "coverage_seconds": 27.0, + "max_sample_gap_seconds": 3.0, + "mean_cpu_cores": 0.264328, + "throttled_seconds": 0.0, + "throttled_period_fraction": 0.0, + "peak_memory_mib": 99.8046875, + "oom_kills": 0 + } + }, + "pools": { + "api-1": { + "samples": 30, + "acquisitions": 2076, + "acquisition_errors": 0, + "mean_acquisition_ms": 5.8440807538536665, + "max_acquisition_ms": 1416.3773030000157, + "max_waiting": 8, + "queued_interval_fraction": 0.03333333333333333, + "max_total": 32, + "observed_connection_increases": 3, + "observed_connection_decreases": 0, + "event_loop_p99_max_ms": 622.854143 + } + }, + "host": { + "samples": 16, + "cpu_some_fraction": 0.5116733103448275, + "memory_some_fraction": 7.993103448275863e-05, + "memory_full_fraction": 7.862068965517242e-06, + "io_some_fraction": 0.026147620689655173, + "io_full_fraction": 0.00659451724137931, + "min_available_mib": 1328.98046875, + "max_swap_used_mib": 243.125 + }, + "postgres": { + "samples": 17, + "max_active": 28, + "max_idle_in_transaction": 6, + "active_wait_observations": { + "no_wait_event/-": 17, + "LWLock/BufferContent": 14, + "LWLock/WALInsert": 1, + "IO/WalSync": 1 + } + }, + "nginx": { + "samples": 14, + "upstream_changes": 0, + "min_ready": 1, + "max_ready": 1 + }, + "limits_reached": { + "generator_late": false, + "client_capacity": false, + "request_errors": false, + "latency": true + }, + "diagnostics_complete": true + }, + "source_hashes": { + "benchmark": "3a3cb81ae217aa125d8c668e94d7a507beea28875317d76ce04e90a83151b69d", + "summary": "68d52236586e68527acd7e070b9a3bf342164c3660c26c47b71f083a97b34d2f" + } + }, + { + "dataset": "api-cpu", + "variant": "one-small", + "configuration": "one-small", + "manifest": "api-small-growth-20261029", + "label": "one-small-r80-confirmation-7", + "profile": { + "arrival_model": "k6 constant-arrival-rate; one HTTP request per iteration", + "offered_rps": 80, + "duration_seconds": 30, + "warmup_seconds": 10, + "warmup_profile": "same 80/20 workload at target rate", + "read_percent": 80, + "write_percent": 20, + "initial_messages": 30, + "history_limit": 50, + "max_in_flight": 128, + "timeout_ms": 5000, + "automatic_retries": false, + "expected_instances": 1, + "phase": "confirmation" + }, + "measurement": { + "scheduled_slots": 2400, + "client_dropped_slots": 187, + "scheduler_late_slots": 0, + "read": { + "attempted": 1771, + "successful": 1388, + "errors": 383, + "successful_rps": 46.266666666666666, + "successful_latency_ms": { + "p50": 133.99005800000003, + "p95": 2605.866085999998, + "p99": 4448.713066439995 + }, + "status_counts": {}, + "error_counts": {}, + "instance_counts": {} + }, + "write": { + "attempted": 442, + "successful": 348, + "errors": 94, + "successful_rps": 11.6, + "successful_latency_ms": { + "p50": 265.2434765, + "p95": 2695.7813768999995, + "p99": 4531.554865429996 + }, + "status_counts": {}, + "error_counts": {}, + "instance_counts": {} + }, + "all": { + "attempted": 2213, + "successful": 1736, + "errors": 477, + "successful_rps": 57.86666666666667, + "successful_latency_ms": { + "p50": 146.5581615, + "p95": 2659.44941475, + "p99": 4480.5786870500015 + }, + "status_counts": { + "200": 1388, + "201": 348, + "other": 477, + "network": 0 + }, + "error_counts": {}, + "instance_counts": { + "8269a2d0e237": 1736 + } + } + }, + "timing": { + "measurement_started_epoch_ms": 1793251125006, + "measurement_scheduled_end_epoch_ms": 1793251155006, + "measurement_completed_epoch_ms": 1793251153003 + }, + "client": { + "engine": "k6", + "scheduler_lateness_measured": false, + "raw_dropped_iterations_including_warmup": 188, + "peak_vus": 128, + "max_vus": 128 + }, + "all_latency_ms": { + "p50": 71.749786, + "p95": 2288.1632106000006, + "p99": 4394.562941520001 + }, + "criterion": { + "delivery_fraction": 0.9220833333333334, + "error_fraction": 0.21554450971531858, + "all_request_p95_ms": 2288.1632106000006, + "delivery_valid": false, + "slo_pass": false, + "classification": "generator_limited" + }, + "diagnostics": { + "resources": { + "api-1": { + "samples": 30, + "coverage_seconds": 29.19, + "max_sample_gap_seconds": 1.625, + "mean_cpu_cores": 0.46460503597122305, + "throttled_seconds": 0.917602, + "throttled_period_fraction": 0.04487179487179487, + "peak_memory_mib": 243.12109375, + "oom_kills": 0 + }, + "postgres": { + "samples": 14, + "coverage_seconds": 27.0, + "max_sample_gap_seconds": 3.0, + "mean_cpu_cores": 0.36433525925925925, + "throttled_seconds": 0.26978, + "throttled_period_fraction": 0.03461538461538462, + "peak_memory_mib": 262.03125, + "oom_kills": 0 + }, + "nginx": { + "samples": 14, + "coverage_seconds": 27.0, + "max_sample_gap_seconds": 3.0, + "mean_cpu_cores": 0.1502474074074074, + "throttled_seconds": 1.083199, + "throttled_period_fraction": 0.07368421052631578, + "peak_memory_mib": 11.31640625, + "oom_kills": 0 + }, + "redis": { + "samples": 15, + "coverage_seconds": 29.0, + "max_sample_gap_seconds": 3.0, + "mean_cpu_cores": 0.09611096551724138, + "throttled_seconds": 0.956539, + "throttled_period_fraction": 0.04262295081967213, + "peak_memory_mib": 14.6171875, + "oom_kills": 0 + }, + "generator": { + "samples": 14, + "coverage_seconds": 28.0, + "max_sample_gap_seconds": 3.0, + "mean_cpu_cores": 0.4018415357142857, + "throttled_seconds": 0.0, + "throttled_period_fraction": 0.0, + "peak_memory_mib": 109.91015625, + "oom_kills": 0 + } + }, + "pools": { + "api-1": { + "samples": 30, + "acquisitions": 3287, + "acquisition_errors": 0, + "mean_acquisition_ms": 3.753992680559904, + "max_acquisition_ms": 605.4182359999977, + "max_waiting": 4, + "queued_interval_fraction": 0.13333333333333333, + "max_total": 32, + "observed_connection_increases": 0, + "observed_connection_decreases": 0, + "event_loop_p99_max_ms": 964.689919 + } + }, + "host": { + "samples": 14, + "cpu_some_fraction": 0.4544102222222222, + "memory_some_fraction": 0.0, + "memory_full_fraction": 0.0, + "io_some_fraction": 0.019670185185185186, + "io_full_fraction": 0.005542037037037037, + "min_available_mib": 1328.265625, + "max_swap_used_mib": 243.125 + }, + "postgres": { + "samples": 16, + "max_active": 3, + "max_idle_in_transaction": 9, + "active_wait_observations": { + "no_wait_event/-": 3, + "Lock/transactionid": 4, + "Client/ClientRead": 1 + } + }, + "nginx": { + "samples": 14, + "upstream_changes": 2, + "min_ready": 0, + "max_ready": 1 + }, + "limits_reached": { + "generator_late": false, + "client_capacity": true, + "request_errors": true, + "latency": true + }, + "diagnostics_complete": true + }, + "source_hashes": { + "benchmark": "9c8c78a67ab805b682fd2e3e129d93210c98a9c038ebce1dba8918495625bf48", + "summary": "6f3174279087db58f6be6e2976ce52b749233f826f19c2c2e1c564dfa6dc2324" + } + }, + { + "dataset": "api-cpu", + "variant": "one-small", + "configuration": "one-small", + "manifest": "api-small-growth-20261029", + "label": "one-small-r40-confirmation-8", + "profile": { + "arrival_model": "k6 constant-arrival-rate; one HTTP request per iteration", + "offered_rps": 40, + "duration_seconds": 30, + "warmup_seconds": 10, + "warmup_profile": "same 80/20 workload at target rate", + "read_percent": 80, + "write_percent": 20, + "initial_messages": 30, + "history_limit": 50, + "max_in_flight": 128, + "timeout_ms": 5000, + "automatic_retries": false, + "expected_instances": 1, + "phase": "confirmation" + }, + "measurement": { + "scheduled_slots": 1200, + "client_dropped_slots": 0, + "scheduler_late_slots": 0, + "read": { + "attempted": 961, + "successful": 961, + "errors": 0, + "successful_rps": 32.03333333333333, + "successful_latency_ms": { + "p50": 62.782648, + "p95": 1222.344748, + "p99": 1824.6642843999998 + }, + "status_counts": {}, + "error_counts": {}, + "instance_counts": {} + }, + "write": { + "attempted": 240, + "successful": 240, + "errors": 0, + "successful_rps": 8, + "successful_latency_ms": { + "p50": 141.521919, + "p95": 1713.9327228999998, + "p99": 2415.360428579993 + }, + "status_counts": {}, + "error_counts": {}, + "instance_counts": {} + }, + "all": { + "attempted": 1201, + "successful": 1201, + "errors": 0, + "successful_rps": 40.03333333333333, + "successful_latency_ms": { + "p50": 70.035875, + "p95": 1322.7580870000002, + "p99": 2087.550949 + }, + "status_counts": { + "200": 961, + "201": 240, + "other": 0, + "network": 0 + }, + "error_counts": {}, + "instance_counts": { + "8269a2d0e237": 1201 + } + } + }, + "timing": { + "measurement_started_epoch_ms": 1793251171290, + "measurement_scheduled_end_epoch_ms": 1793251201290, + "measurement_completed_epoch_ms": 1793251200849 + }, + "client": { + "engine": "k6", + "scheduler_lateness_measured": false, + "raw_dropped_iterations_including_warmup": 0, + "peak_vus": 56, + "max_vus": 128 + }, + "all_latency_ms": { + "p50": 70.035875, + "p95": 1322.7580870000002, + "p99": 2087.550949 + }, + "criterion": { + "delivery_fraction": 1.0008333333333332, + "error_fraction": 0.0, + "all_request_p95_ms": 1322.7580870000002, + "delivery_valid": true, + "slo_pass": false, + "classification": "slo_fail" + }, + "diagnostics": { + "resources": { + "api-1": { + "samples": 31, + "coverage_seconds": 29.621, + "max_sample_gap_seconds": 1.691, + "mean_cpu_cores": 0.5208842712940144, + "throttled_seconds": 0.923718, + "throttled_period_fraction": 0.037900874635568516, + "peak_memory_mib": 242.90234375, + "oom_kills": 0 + }, + "postgres": { + "samples": 14, + "coverage_seconds": 28.0, + "max_sample_gap_seconds": 3.0, + "mean_cpu_cores": 0.41083307142857145, + "throttled_seconds": 0.830743, + "throttled_period_fraction": 0.07023411371237458, + "peak_memory_mib": 264.1015625, + "oom_kills": 0 + }, + "nginx": { + "samples": 14, + "coverage_seconds": 28.0, + "max_sample_gap_seconds": 3.0, + "mean_cpu_cores": 0.12447717857142857, + "throttled_seconds": 0.450797, + "throttled_period_fraction": 0.033444816053511704, + "peak_memory_mib": 10.234375, + "oom_kills": 0 + }, + "redis": { + "samples": 15, + "coverage_seconds": 28.0, + "max_sample_gap_seconds": 3.0, + "mean_cpu_cores": 0.10183842857142857, + "throttled_seconds": 0.347039, + "throttled_period_fraction": 0.04666666666666667, + "peak_memory_mib": 11.703125, + "oom_kills": 0 + }, + "generator": { + "samples": 15, + "coverage_seconds": 28.0, + "max_sample_gap_seconds": 3.0, + "mean_cpu_cores": 0.30639753571428574, + "throttled_seconds": 0.0, + "throttled_period_fraction": 0.0, + "peak_memory_mib": 96.984375, + "oom_kills": 0 + } + }, + "pools": { + "api-1": { + "samples": 31, + "acquisitions": 2293, + "acquisition_errors": 0, + "mean_acquisition_ms": 0.7800225128654482, + "max_acquisition_ms": 56.46072099998128, + "max_waiting": 0, + "queued_interval_fraction": 0.0, + "max_total": 32, + "observed_connection_increases": 0, + "observed_connection_decreases": 1, + "event_loop_p99_max_ms": 1361.051647 + } + }, + "host": { + "samples": 14, + "cpu_some_fraction": 0.49057935714285716, + "memory_some_fraction": 4.875e-05, + "memory_full_fraction": 1.8285714285714284e-05, + "io_some_fraction": 0.02108482142857143, + "io_full_fraction": 0.006226392857142857, + "min_available_mib": 1338.73828125, + "max_swap_used_mib": 243.125 + }, + "postgres": { + "samples": 18, + "max_active": 5, + "max_idle_in_transaction": 7, + "active_wait_observations": { + "no_wait_event/-": 14, + "IO/WalSync": 1, + "Lock/transactionid": 3, + "LWLock/WALWrite": 1 + } + }, + "nginx": { + "samples": 14, + "upstream_changes": 0, + "min_ready": 1, + "max_ready": 1 + }, + "limits_reached": { + "generator_late": false, + "client_capacity": false, + "request_errors": false, + "latency": true + }, + "diagnostics_complete": true + }, + "source_hashes": { + "benchmark": "f74009929fcdd8d8f60b5f8a701409dc1706a2015c6bc1ac6247bde8ab98bd8d", + "summary": "2be7ee2dfd671c42faad327e99c90e37803510127274429883f7c24e57ffa623" + } + }, + { + "dataset": "api-cpu", + "variant": "one-small", + "configuration": "one-small", + "manifest": "api-small-growth-20261029", + "label": "one-small-r80-confirmation-9", + "profile": { + "arrival_model": "k6 constant-arrival-rate; one HTTP request per iteration", + "offered_rps": 80, + "duration_seconds": 30, + "warmup_seconds": 10, + "warmup_profile": "same 80/20 workload at target rate", + "read_percent": 80, + "write_percent": 20, + "initial_messages": 30, + "history_limit": 50, + "max_in_flight": 128, + "timeout_ms": 5000, + "automatic_retries": false, + "expected_instances": 1, + "phase": "confirmation" + }, + "measurement": { + "scheduled_slots": 2400, + "client_dropped_slots": 0, + "scheduler_late_slots": 0, + "read": { + "attempted": 1921, + "successful": 1807, + "errors": 114, + "successful_rps": 60.233333333333334, + "successful_latency_ms": { + "p50": 19.523022, + "p95": 590.6509335999993, + "p99": 808.13024034 + }, + "status_counts": {}, + "error_counts": {}, + "instance_counts": {} + }, + "write": { + "attempted": 480, + "successful": 452, + "errors": 28, + "successful_rps": 15.066666666666666, + "successful_latency_ms": { + "p50": 47.346496, + "p95": 699.7678605499998, + "p99": 909.82386365 + }, + "status_counts": {}, + "error_counts": {}, + "instance_counts": {} + }, + "all": { + "attempted": 2401, + "successful": 2259, + "errors": 142, + "successful_rps": 75.3, + "successful_latency_ms": { + "p50": 23.386415, + "p95": 623.2823438999998, + "p99": 816.6689335600003 + }, + "status_counts": { + "200": 1807, + "201": 452, + "other": 142, + "network": 0 + }, + "error_counts": {}, + "instance_counts": { + "8269a2d0e237": 2259 + } + } + }, + "timing": { + "measurement_started_epoch_ms": 1793251219843, + "measurement_scheduled_end_epoch_ms": 1793251249843, + "measurement_completed_epoch_ms": 1793251247699 + }, + "client": { + "engine": "k6", + "scheduler_lateness_measured": false, + "raw_dropped_iterations_including_warmup": 33, + "peak_vus": 128, + "max_vus": 128 + }, + "all_latency_ms": { + "p50": 24.543113, + "p95": 623.018676, + "p99": 815.604394 + }, + "criterion": { + "delivery_fraction": 1.0004166666666667, + "error_fraction": 0.059142024156601414, + "all_request_p95_ms": 623.018676, + "delivery_valid": true, + "slo_pass": false, + "classification": "slo_fail" + }, + "diagnostics": { + "resources": { + "api-1": { + "samples": 31, + "coverage_seconds": 29.279, + "max_sample_gap_seconds": 1.351, + "mean_cpu_cores": 0.5334591003791113, + "throttled_seconds": 0.446922, + "throttled_period_fraction": 0.022292993630573247, + "peak_memory_mib": 244.5078125, + "oom_kills": 0 + }, + "postgres": { + "samples": 16, + "coverage_seconds": 29.0, + "max_sample_gap_seconds": 3.0, + "mean_cpu_cores": 0.39796175862068967, + "throttled_seconds": 0.151364, + "throttled_period_fraction": 0.022435897435897436, + "peak_memory_mib": 285.01171875, + "oom_kills": 0 + }, + "nginx": { + "samples": 15, + "coverage_seconds": 27.0, + "max_sample_gap_seconds": 3.0, + "mean_cpu_cores": 0.10810414814814814, + "throttled_seconds": 0.147259, + "throttled_period_fraction": 0.02097902097902098, + "peak_memory_mib": 9.90625, + "oom_kills": 0 + }, + "redis": { + "samples": 16, + "coverage_seconds": 28.0, + "max_sample_gap_seconds": 2.0, + "mean_cpu_cores": 0.07326517857142857, + "throttled_seconds": 0.201322, + "throttled_period_fraction": 0.02287581699346405, + "peak_memory_mib": 14.9140625, + "oom_kills": 0 + }, + "generator": { + "samples": 15, + "coverage_seconds": 27.0, + "max_sample_gap_seconds": 3.0, + "mean_cpu_cores": 0.314991037037037, + "throttled_seconds": 0.0, + "throttled_period_fraction": 0.0, + "peak_memory_mib": 103.828125, + "oom_kills": 0 + } + }, + "pools": { + "api-1": { + "samples": 31, + "acquisitions": 3884, + "acquisition_errors": 0, + "mean_acquisition_ms": 0.3408927703400665, + "max_acquisition_ms": 71.72154100000625, + "max_waiting": 0, + "queued_interval_fraction": 0.0, + "max_total": 32, + "observed_connection_increases": 0, + "observed_connection_decreases": 4, + "event_loop_p99_max_ms": 393.478143 + } + }, + "host": { + "samples": 16, + "cpu_some_fraction": 0.3845307931034483, + "memory_some_fraction": 0.0, + "memory_full_fraction": 0.0, + "io_some_fraction": 0.017021413793103447, + "io_full_fraction": 0.006866931034482758, + "min_available_mib": 1354.8359375, + "max_swap_used_mib": 236.375 + }, + "postgres": { + "samples": 16, + "max_active": 1, + "max_idle_in_transaction": 3, + "active_wait_observations": { + "no_wait_event/-": 1, + "IO/WalSync": 1 + } + }, + "nginx": { + "samples": 15, + "upstream_changes": 0, + "min_ready": 1, + "max_ready": 1 + }, + "limits_reached": { + "generator_late": false, + "client_capacity": false, + "request_errors": true, + "latency": false + }, + "diagnostics_complete": true + }, + "source_hashes": { + "benchmark": "bd2c70f2d2fec223c54f0e2717fd2a4f7d43baa38bdfb3b5d1efe776138a82a6", + "summary": "830dd34270d0bab4c0b1f0aac6a38df2123e7dcea727b4a742dd0f53fb0480bb" + } + }, + { + "dataset": "api-cpu", + "variant": "one", + "configuration": "one", + "manifest": "api-small-growth-20261029", + "label": "one-r40-confirmation-10", + "profile": { + "arrival_model": "k6 constant-arrival-rate; one HTTP request per iteration", + "offered_rps": 40, + "duration_seconds": 30, + "warmup_seconds": 10, + "warmup_profile": "same 80/20 workload at target rate", + "read_percent": 80, + "write_percent": 20, + "initial_messages": 30, + "history_limit": 50, + "max_in_flight": 128, + "timeout_ms": 5000, + "automatic_retries": false, + "expected_instances": 1, + "phase": "confirmation" + }, + "measurement": { + "scheduled_slots": 1200, + "client_dropped_slots": 0, + "scheduler_late_slots": 0, + "read": { + "attempted": 961, + "successful": 927, + "errors": 34, + "successful_rps": 30.9, + "successful_latency_ms": { + "p50": 21.170069, + "p95": 2420.5802713999988, + "p99": 3824.3722410600003 + }, + "status_counts": {}, + "error_counts": {}, + "instance_counts": {} + }, + "write": { + "attempted": 240, + "successful": 231, + "errors": 9, + "successful_rps": 7.7, + "successful_latency_ms": { + "p50": 53.67280100000001, + "p95": 2158.781121, + "p99": 4276.660216499994 + }, + "status_counts": {}, + "error_counts": {}, + "instance_counts": {} + }, + "all": { + "attempted": 1201, + "successful": 1158, + "errors": 43, + "successful_rps": 38.6, + "successful_latency_ms": { + "p50": 28.589108000000003, + "p95": 2413.214785799998, + "p99": 3846.0589049900004 + }, + "status_counts": { + "200": 927, + "201": 231, + "other": 43, + "network": 0 + }, + "error_counts": {}, + "instance_counts": { + "d0a4060b0ff8": 1158 + } + } + }, + "timing": { + "measurement_started_epoch_ms": 1793251338104, + "measurement_scheduled_end_epoch_ms": 1793251368104, + "measurement_completed_epoch_ms": 1793251365799 + }, + "client": { + "engine": "k6", + "scheduler_lateness_measured": false, + "raw_dropped_iterations_including_warmup": 0, + "peak_vus": 89, + "max_vus": 128 + }, + "all_latency_ms": { + "p50": 25.203771000000003, + "p95": 2319.3248719999997, + "p99": 3842.738448 + }, + "criterion": { + "delivery_fraction": 1.0008333333333332, + "error_fraction": 0.035803497085761866, + "all_request_p95_ms": 2319.3248719999997, + "delivery_valid": true, + "slo_pass": false, + "classification": "slo_fail" + }, + "diagnostics": { + "resources": { + "api-1": { + "samples": 32, + "coverage_seconds": 29.448, + "max_sample_gap_seconds": 1.927, + "mean_cpu_cores": 0.4332059223037218, + "throttled_seconds": 0.0, + "throttled_period_fraction": 0.0, + "peak_memory_mib": 200.88671875, + "oom_kills": 0 + }, + "postgres": { + "samples": 15, + "coverage_seconds": 28.0, + "max_sample_gap_seconds": 3.0, + "mean_cpu_cores": 0.3532345, + "throttled_seconds": 2.84418, + "throttled_period_fraction": 0.12927756653992395, + "peak_memory_mib": 283.921875, + "oom_kills": 0 + }, + "nginx": { + "samples": 15, + "coverage_seconds": 27.0, + "max_sample_gap_seconds": 3.0, + "mean_cpu_cores": 0.10580837037037037, + "throttled_seconds": 0.653421, + "throttled_period_fraction": 0.04887218045112782, + "peak_memory_mib": 10.6796875, + "oom_kills": 0 + }, + "redis": { + "samples": 15, + "coverage_seconds": 27.0, + "max_sample_gap_seconds": 3.0, + "mean_cpu_cores": 0.06906662962962963, + "throttled_seconds": 0.309213, + "throttled_period_fraction": 0.02413793103448276, + "peak_memory_mib": 13.7109375, + "oom_kills": 0 + }, + "generator": { + "samples": 16, + "coverage_seconds": 28.0, + "max_sample_gap_seconds": 3.0, + "mean_cpu_cores": 0.19858542857142858, + "throttled_seconds": 0.0, + "throttled_period_fraction": 0.0, + "peak_memory_mib": 95.875, + "oom_kills": 0 + } + }, + "pools": { + "api-1": { + "samples": 32, + "acquisitions": 1994, + "acquisition_errors": 0, + "mean_acquisition_ms": 16.47106694684052, + "max_acquisition_ms": 2420.5482210000046, + "max_waiting": 8, + "queued_interval_fraction": 0.0625, + "max_total": 32, + "observed_connection_increases": 15, + "observed_connection_decreases": 0, + "event_loop_p99_max_ms": 974.651391 + } + }, + "host": { + "samples": 15, + "cpu_some_fraction": 0.39199192857142856, + "memory_some_fraction": 1.107142857142857e-05, + "memory_full_fraction": 1.1107142857142857e-05, + "io_some_fraction": 0.0172905, + "io_full_fraction": 0.0054741071428571425, + "min_available_mib": 1392.80078125, + "max_swap_used_mib": 236.375 + }, + "postgres": { + "samples": 18, + "max_active": 3, + "max_idle_in_transaction": 9, + "active_wait_observations": { + "no_wait_event/-": 12, + "Client/ClientRead": 1, + "Lock/transactionid": 2 + } + }, + "nginx": { + "samples": 15, + "upstream_changes": 2, + "min_ready": 0, + "max_ready": 1 + }, + "limits_reached": { + "generator_late": false, + "client_capacity": false, + "request_errors": true, + "latency": true + }, + "diagnostics_complete": true + }, + "source_hashes": { + "benchmark": "a1bfa5b2ab32ce37119b869fe21dfbb69d382ac590446c01eaea620f0b95b26b", + "summary": "3f7160d8cf4ea863ef04b0b4f74be6bb990c212bb366270927f6d4391616743d" + } + }, + { + "dataset": "api-cpu", + "variant": "one", + "configuration": "one", + "manifest": "api-small-growth-20261029", + "label": "one-r80-confirmation-11", + "profile": { + "arrival_model": "k6 constant-arrival-rate; one HTTP request per iteration", + "offered_rps": 80, + "duration_seconds": 30, + "warmup_seconds": 10, + "warmup_profile": "same 80/20 workload at target rate", + "read_percent": 80, + "write_percent": 20, + "initial_messages": 30, + "history_limit": 50, + "max_in_flight": 128, + "timeout_ms": 5000, + "automatic_retries": false, + "expected_instances": 1, + "phase": "confirmation" + }, + "measurement": { + "scheduled_slots": 2400, + "client_dropped_slots": 130, + "scheduler_late_slots": 0, + "read": { + "attempted": 1817, + "successful": 1248, + "errors": 569, + "successful_rps": 41.6, + "successful_latency_ms": { + "p50": 133.48602499999998, + "p95": 1364.1633442999998, + "p99": 2042.9747206199984 + }, + "status_counts": {}, + "error_counts": {}, + "instance_counts": {} + }, + "write": { + "attempted": 453, + "successful": 306, + "errors": 147, + "successful_rps": 10.2, + "successful_latency_ms": { + "p50": 234.90694050000002, + "p95": 2014.3771755, + "p99": 2960.4287584500003 + }, + "status_counts": {}, + "error_counts": {}, + "instance_counts": {} + }, + "all": { + "attempted": 2270, + "successful": 1554, + "errors": 716, + "successful_rps": 51.8, + "successful_latency_ms": { + "p50": 150.2324305, + "p95": 1506.410031149999, + "p99": 2727.858566280001 + }, + "status_counts": { + "200": 1248, + "201": 306, + "other": 653, + "network": 63 + }, + "error_counts": {}, + "instance_counts": { + "d0a4060b0ff8": 1554 + } + } + }, + "timing": { + "measurement_started_epoch_ms": 1793251383417, + "measurement_scheduled_end_epoch_ms": 1793251413417, + "measurement_completed_epoch_ms": 1793251411230 + }, + "client": { + "engine": "k6", + "scheduler_lateness_measured": false, + "raw_dropped_iterations_including_warmup": 131, + "peak_vus": 128, + "max_vus": 128 + }, + "all_latency_ms": { + "p50": 43.084019, + "p95": 1849.6533385999996, + "p99": 5009.95111663 + }, + "criterion": { + "delivery_fraction": 0.9458333333333333, + "error_fraction": 0.31541850220264317, + "all_request_p95_ms": 1849.6533385999996, + "delivery_valid": false, + "slo_pass": false, + "classification": "generator_limited" + }, + "diagnostics": { + "resources": { + "api-1": { + "samples": 30, + "coverage_seconds": 28.345, + "max_sample_gap_seconds": 1.192, + "mean_cpu_cores": 0.5490057858528841, + "throttled_seconds": 0.022205, + "throttled_period_fraction": 0.0033112582781456954, + "peak_memory_mib": 222.453125, + "oom_kills": 0 + }, + "postgres": { + "samples": 16, + "coverage_seconds": 29.0, + "max_sample_gap_seconds": 3.0, + "mean_cpu_cores": 0.370641, + "throttled_seconds": 0.877175, + "throttled_period_fraction": 0.055350553505535055, + "peak_memory_mib": 289.72265625, + "oom_kills": 0 + }, + "nginx": { + "samples": 15, + "coverage_seconds": 27.0, + "max_sample_gap_seconds": 3.0, + "mean_cpu_cores": 0.1328991111111111, + "throttled_seconds": 0.823305, + "throttled_period_fraction": 0.07241379310344828, + "peak_memory_mib": 11.3984375, + "oom_kills": 0 + }, + "redis": { + "samples": 16, + "coverage_seconds": 29.0, + "max_sample_gap_seconds": 3.0, + "mean_cpu_cores": 0.08963693103448275, + "throttled_seconds": 0.37574, + "throttled_period_fraction": 0.02903225806451613, + "peak_memory_mib": 12.4765625, + "oom_kills": 0 + }, + "generator": { + "samples": 16, + "coverage_seconds": 29.0, + "max_sample_gap_seconds": 3.0, + "mean_cpu_cores": 0.32301989655172414, + "throttled_seconds": 0.0, + "throttled_period_fraction": 0.0, + "peak_memory_mib": 106.1015625, + "oom_kills": 0 + } + }, + "pools": { + "api-1": { + "samples": 30, + "acquisitions": 2972, + "acquisition_errors": 0, + "mean_acquisition_ms": 14.885148709623188, + "max_acquisition_ms": 620.5374359999987, + "max_waiting": 18, + "queued_interval_fraction": 0.2, + "max_total": 32, + "observed_connection_increases": 0, + "observed_connection_decreases": 0, + "event_loop_p99_max_ms": 496.500735 + } + }, + "host": { + "samples": 16, + "cpu_some_fraction": 0.5059365172413793, + "memory_some_fraction": 0.0, + "memory_full_fraction": 0.0, + "io_some_fraction": 0.01958451724137931, + "io_full_fraction": 0.005855655172413793, + "min_available_mib": 1346.65234375, + "max_swap_used_mib": 236.375 + }, + "postgres": { + "samples": 16, + "max_active": 3, + "max_idle_in_transaction": 8, + "active_wait_observations": { + "no_wait_event/-": 2, + "Lock/transactionid": 5, + "IO/WalSync": 1, + "LWLock/WALWrite": 1 + } + }, + "nginx": { + "samples": 15, + "upstream_changes": 2, + "min_ready": 0, + "max_ready": 1 + }, + "limits_reached": { + "generator_late": false, + "client_capacity": true, + "request_errors": true, + "latency": true + }, + "diagnostics_complete": true + }, + "source_hashes": { + "benchmark": "df2de3a535e4007db3aa0105f4ec2f6f022bc3ef322678ecca0b88bb602aa082", + "summary": "ea4b8e81c667f4f1e82cf4f68fbbd77d013044470c5b667aa1c696c0164447ec" + } + }, + { + "dataset": "api-cpu", + "variant": "one", + "configuration": "one", + "manifest": "api-small-growth-20261029", + "label": "one-r40-confirmation-12", + "profile": { + "arrival_model": "k6 constant-arrival-rate; one HTTP request per iteration", + "offered_rps": 40, + "duration_seconds": 30, + "warmup_seconds": 10, + "warmup_profile": "same 80/20 workload at target rate", + "read_percent": 80, + "write_percent": 20, + "initial_messages": 30, + "history_limit": 50, + "max_in_flight": 128, + "timeout_ms": 5000, + "automatic_retries": false, + "expected_instances": 1, + "phase": "confirmation" + }, + "measurement": { + "scheduled_slots": 1200, + "client_dropped_slots": 0, + "scheduler_late_slots": 0, + "read": { + "attempted": 961, + "successful": 961, + "errors": 0, + "successful_rps": 32.03333333333333, + "successful_latency_ms": { + "p50": 15.366018, + "p95": 396.652034, + "p99": 935.1785565999992 + }, + "status_counts": {}, + "error_counts": {}, + "instance_counts": {} + }, + "write": { + "attempted": 240, + "successful": 240, + "errors": 0, + "successful_rps": 8, + "successful_latency_ms": { + "p50": 40.892227500000004, + "p95": 480.0058638499995, + "p99": 965.9876234099982 + }, + "status_counts": {}, + "error_counts": {}, + "instance_counts": {} + }, + "all": { + "attempted": 1201, + "successful": 1201, + "errors": 0, + "successful_rps": 40.03333333333333, + "successful_latency_ms": { + "p50": 18.939717, + "p95": 418.903777, + "p99": 957.1179070000001 + }, + "status_counts": { + "200": 961, + "201": 240, + "other": 0, + "network": 0 + }, + "error_counts": {}, + "instance_counts": { + "d0a4060b0ff8": 1201 + } + } + }, + "timing": { + "measurement_started_epoch_ms": 1793251428398, + "measurement_scheduled_end_epoch_ms": 1793251458398, + "measurement_completed_epoch_ms": 1793251456241 + }, + "client": { + "engine": "k6", + "scheduler_lateness_measured": false, + "raw_dropped_iterations_including_warmup": 0, + "peak_vus": 61, + "max_vus": 128 + }, + "all_latency_ms": { + "p50": 18.939717, + "p95": 418.903777, + "p99": 957.1179070000001 + }, + "criterion": { + "delivery_fraction": 1.0008333333333332, + "error_fraction": 0.0, + "all_request_p95_ms": 418.903777, + "delivery_valid": true, + "slo_pass": true, + "classification": "pass" + }, + "diagnostics": { + "resources": { + "api-1": { + "samples": 31, + "coverage_seconds": 28.823, + "max_sample_gap_seconds": 1.19, + "mean_cpu_cores": 0.3838068209416091, + "throttled_seconds": 0.0, + "throttled_period_fraction": 0.0, + "peak_memory_mib": 244.421875, + "oom_kills": 0 + }, + "postgres": { + "samples": 16, + "coverage_seconds": 28.0, + "max_sample_gap_seconds": 2.0, + "mean_cpu_cores": 0.2989388571428571, + "throttled_seconds": 0.559066, + "throttled_period_fraction": 0.030405405405405407, + "peak_memory_mib": 291.7734375, + "oom_kills": 0 + }, + "nginx": { + "samples": 16, + "coverage_seconds": 28.0, + "max_sample_gap_seconds": 2.0, + "mean_cpu_cores": 0.08336814285714286, + "throttled_seconds": 0.140491, + "throttled_period_fraction": 0.010273972602739725, + "peak_memory_mib": 10.2265625, + "oom_kills": 0 + }, + "redis": { + "samples": 16, + "coverage_seconds": 29.0, + "max_sample_gap_seconds": 3.0, + "mean_cpu_cores": 0.06526603448275863, + "throttled_seconds": 0.197503, + "throttled_period_fraction": 0.019417475728155338, + "peak_memory_mib": 12.85546875, + "oom_kills": 0 + }, + "generator": { + "samples": 16, + "coverage_seconds": 29.0, + "max_sample_gap_seconds": 3.0, + "mean_cpu_cores": 0.2364369655172414, + "throttled_seconds": 0.0, + "throttled_period_fraction": 0.0, + "peak_memory_mib": 97.421875, + "oom_kills": 0 + } + }, + "pools": { + "api-1": { + "samples": 31, + "acquisitions": 1958, + "acquisition_errors": 0, + "mean_acquisition_ms": 0.48221057456625477, + "max_acquisition_ms": 50.25036000000546, + "max_waiting": 0, + "queued_interval_fraction": 0.0, + "max_total": 32, + "observed_connection_increases": 0, + "observed_connection_decreases": 2, + "event_loop_p99_max_ms": 375.652351 + } + }, + "host": { + "samples": 16, + "cpu_some_fraction": 0.4000857857142857, + "memory_some_fraction": 1.5607142857142858e-05, + "memory_full_fraction": 1.6785714285714286e-06, + "io_some_fraction": 0.017378178571428572, + "io_full_fraction": 0.005343892857142857, + "min_available_mib": 1320.046875, + "max_swap_used_mib": 236.375 + }, + "postgres": { + "samples": 16, + "max_active": 3, + "max_idle_in_transaction": 2, + "active_wait_observations": { + "no_wait_event/-": 5 + } + }, + "nginx": { + "samples": 16, + "upstream_changes": 0, + "min_ready": 1, + "max_ready": 1 + }, + "limits_reached": { + "generator_late": false, + "client_capacity": false, + "request_errors": false, + "latency": false + }, + "diagnostics_complete": true + }, + "source_hashes": { + "benchmark": "2104684c071a52ee1237bc429746cbf39c215a7fa54fc5cff16d4ec5d1371910", + "summary": "a990ab648666d8335dfc92db6c2fc6626eb2550d5713aaaa6a62bf15e96bead9" + } + }, + { + "dataset": "api-cpu", + "variant": "one", + "configuration": "one", + "manifest": "api-small-growth-20261029", + "label": "one-r80-confirmation-13", + "profile": { + "arrival_model": "k6 constant-arrival-rate; one HTTP request per iteration", + "offered_rps": 80, + "duration_seconds": 30, + "warmup_seconds": 10, + "warmup_profile": "same 80/20 workload at target rate", + "read_percent": 80, + "write_percent": 20, + "initial_messages": 30, + "history_limit": 50, + "max_in_flight": 128, + "timeout_ms": 5000, + "automatic_retries": false, + "expected_instances": 1, + "phase": "confirmation" + }, + "measurement": { + "scheduled_slots": 2400, + "client_dropped_slots": 0, + "scheduler_late_slots": 0, + "read": { + "attempted": 1920, + "successful": 1920, + "errors": 0, + "successful_rps": 64, + "successful_latency_ms": { + "p50": 181.65466400000003, + "p95": 1307.1654214999999, + "p99": 1939.36776909 + }, + "status_counts": {}, + "error_counts": {}, + "instance_counts": {} + }, + "write": { + "attempted": 480, + "successful": 480, + "errors": 0, + "successful_rps": 16, + "successful_latency_ms": { + "p50": 356.82055949999994, + "p95": 1552.0342257999996, + "p99": 2406.2325517699956 + }, + "status_counts": {}, + "error_counts": {}, + "instance_counts": {} + }, + "all": { + "attempted": 2400, + "successful": 2400, + "errors": 0, + "successful_rps": 80, + "successful_latency_ms": { + "p50": 205.252095, + "p95": 1378.379113749999, + "p99": 2144.6287917899995 + }, + "status_counts": { + "200": 1920, + "201": 480, + "other": 0, + "network": 0 + }, + "error_counts": {}, + "instance_counts": { + "d0a4060b0ff8": 2400 + } + } + }, + "timing": { + "measurement_started_epoch_ms": 1793251471056, + "measurement_scheduled_end_epoch_ms": 1793251501056, + "measurement_completed_epoch_ms": 1793251499963 + }, + "client": { + "engine": "k6", + "scheduler_lateness_measured": false, + "raw_dropped_iterations_including_warmup": 0, + "peak_vus": 88, + "max_vus": 128 + }, + "all_latency_ms": { + "p50": 205.252095, + "p95": 1378.379113749999, + "p99": 2144.6287917899995 + }, + "criterion": { + "delivery_fraction": 1.0, + "error_fraction": 0.0, + "all_request_p95_ms": 1378.379113749999, + "delivery_valid": true, + "slo_pass": false, + "classification": "slo_fail" + }, + "diagnostics": { + "resources": { + "api-1": { + "samples": 29, + "coverage_seconds": 28.118, + "max_sample_gap_seconds": 1.463, + "mean_cpu_cores": 0.6651004694501743, + "throttled_seconds": 0.0, + "throttled_period_fraction": 0.0, + "peak_memory_mib": 244.953125, + "oom_kills": 0 + }, + "postgres": { + "samples": 15, + "coverage_seconds": 28.0, + "max_sample_gap_seconds": 3.0, + "mean_cpu_cores": 0.49829189285714287, + "throttled_seconds": 0.863753, + "throttled_period_fraction": 0.06060606060606061, + "peak_memory_mib": 301.0703125, + "oom_kills": 0 + }, + "nginx": { + "samples": 15, + "coverage_seconds": 27.0, + "max_sample_gap_seconds": 3.0, + "mean_cpu_cores": 0.1094212962962963, + "throttled_seconds": 0.240857, + "throttled_period_fraction": 0.010344827586206896, + "peak_memory_mib": 10.921875, + "oom_kills": 0 + }, + "redis": { + "samples": 16, + "coverage_seconds": 29.0, + "max_sample_gap_seconds": 3.0, + "mean_cpu_cores": 0.08031603448275862, + "throttled_seconds": 0.387314, + "throttled_period_fraction": 0.025806451612903226, + "peak_memory_mib": 14.515625, + "oom_kills": 0 + }, + "generator": { + "samples": 16, + "coverage_seconds": 29.0, + "max_sample_gap_seconds": 3.0, + "mean_cpu_cores": 0.3087138620689655, + "throttled_seconds": 0.0, + "throttled_period_fraction": 0.0, + "peak_memory_mib": 106.328125, + "oom_kills": 0 + } + }, + "pools": { + "api-1": { + "samples": 29, + "acquisitions": 4462, + "acquisition_errors": 0, + "mean_acquisition_ms": 3.464600104437483, + "max_acquisition_ms": 451.05865599997924, + "max_waiting": 10, + "queued_interval_fraction": 0.06896551724137931, + "max_total": 32, + "observed_connection_increases": 0, + "observed_connection_decreases": 0, + "event_loop_p99_max_ms": 680.525823 + } + }, + "host": { + "samples": 15, + "cpu_some_fraction": 0.4672890714285714, + "memory_some_fraction": 0.0, + "memory_full_fraction": 0.0, + "io_some_fraction": 0.022238821428571427, + "io_full_fraction": 0.00815457142857143, + "min_available_mib": 1328.65625, + "max_swap_used_mib": 236.375 + }, + "postgres": { + "samples": 17, + "max_active": 6, + "max_idle_in_transaction": 9, + "active_wait_observations": { + "Client/ClientRead": 1, + "IO/WalSync": 3, + "no_wait_event/-": 13, + "Lock/transactionid": 1, + "LWLock/WALWrite": 1 + } + }, + "nginx": { + "samples": 15, + "upstream_changes": 0, + "min_ready": 1, + "max_ready": 1 + }, + "limits_reached": { + "generator_late": false, + "client_capacity": false, + "request_errors": false, + "latency": true + }, + "diagnostics_complete": true + }, + "source_hashes": { + "benchmark": "121f979699560011cc870b8f4f076eea9f42a413bbc138121f30d5b90426d743", + "summary": "de1ae323dc49ee6e21b55bf9d49951c0be9ded10cd3c0bb3d87a86360192be85" + } + }, + { + "dataset": "api-cpu", + "variant": "one", + "configuration": "one", + "manifest": "api-small-growth-20261029", + "label": "one-r40-confirmation-14", + "profile": { + "arrival_model": "k6 constant-arrival-rate; one HTTP request per iteration", + "offered_rps": 40, + "duration_seconds": 30, + "warmup_seconds": 10, + "warmup_profile": "same 80/20 workload at target rate", + "read_percent": 80, + "write_percent": 20, + "initial_messages": 30, + "history_limit": 50, + "max_in_flight": 128, + "timeout_ms": 5000, + "automatic_retries": false, + "expected_instances": 1, + "phase": "confirmation" + }, + "measurement": { + "scheduled_slots": 1200, + "client_dropped_slots": 0, + "scheduler_late_slots": 0, + "read": { + "attempted": 961, + "successful": 961, + "errors": 0, + "successful_rps": 32.03333333333333, + "successful_latency_ms": { + "p50": 13.057055, + "p95": 646.693499, + "p99": 1140.7052251999992 + }, + "status_counts": {}, + "error_counts": {}, + "instance_counts": {} + }, + "write": { + "attempted": 240, + "successful": 240, + "errors": 0, + "successful_rps": 8, + "successful_latency_ms": { + "p50": 38.8673455, + "p95": 1000.1947060499991, + "p99": 1459.4178555299998 + }, + "status_counts": {}, + "error_counts": {}, + "instance_counts": {} + }, + "all": { + "attempted": 1201, + "successful": 1201, + "errors": 0, + "successful_rps": 40.03333333333333, + "successful_latency_ms": { + "p50": 17.859334999999998, + "p95": 751.296029, + "p99": 1386.120503 + }, + "status_counts": { + "200": 961, + "201": 240, + "other": 0, + "network": 0 + }, + "error_counts": {}, + "instance_counts": { + "d0a4060b0ff8": 1201 + } + } + }, + "timing": { + "measurement_started_epoch_ms": 1793251517375, + "measurement_scheduled_end_epoch_ms": 1793251547375, + "measurement_completed_epoch_ms": 1793251545106 + }, + "client": { + "engine": "k6", + "scheduler_lateness_measured": false, + "raw_dropped_iterations_including_warmup": 0, + "peak_vus": 35, + "max_vus": 128 + }, + "all_latency_ms": { + "p50": 17.859334999999998, + "p95": 751.296029, + "p99": 1386.120503 + }, + "criterion": { + "delivery_fraction": 1.0008333333333332, + "error_fraction": 0.0, + "all_request_p95_ms": 751.296029, + "delivery_valid": true, + "slo_pass": true, + "classification": "pass" + }, + "diagnostics": { + "resources": { + "api-1": { + "samples": 32, + "coverage_seconds": 29.687, + "max_sample_gap_seconds": 1.272, + "mean_cpu_cores": 0.35999272408798466, + "throttled_seconds": 0.0, + "throttled_period_fraction": 0.0, + "peak_memory_mib": 245.04296875, + "oom_kills": 0 + }, + "postgres": { + "samples": 16, + "coverage_seconds": 29.0, + "max_sample_gap_seconds": 3.0, + "mean_cpu_cores": 0.34728475862068964, + "throttled_seconds": 1.012248, + "throttled_period_fraction": 0.07540983606557378, + "peak_memory_mib": 299.8671875, + "oom_kills": 0 + }, + "nginx": { + "samples": 16, + "coverage_seconds": 29.0, + "max_sample_gap_seconds": 3.0, + "mean_cpu_cores": 0.07929048275862069, + "throttled_seconds": 0.195664, + "throttled_period_fraction": 0.013745704467353952, + "peak_memory_mib": 10.4375, + "oom_kills": 0 + }, + "redis": { + "samples": 15, + "coverage_seconds": 27.0, + "max_sample_gap_seconds": 3.0, + "mean_cpu_cores": 0.08065922222222222, + "throttled_seconds": 0.346222, + "throttled_period_fraction": 0.02364864864864865, + "peak_memory_mib": 12.9765625, + "oom_kills": 0 + }, + "generator": { + "samples": 15, + "coverage_seconds": 28.0, + "max_sample_gap_seconds": 3.0, + "mean_cpu_cores": 0.25364035714285715, + "throttled_seconds": 0.0, + "throttled_period_fraction": 0.0, + "peak_memory_mib": 97.125, + "oom_kills": 0 + } + }, + "pools": { + "api-1": { + "samples": 32, + "acquisitions": 1979, + "acquisition_errors": 0, + "mean_acquisition_ms": 0.27413348812545674, + "max_acquisition_ms": 81.89241299999412, + "max_waiting": 0, + "queued_interval_fraction": 0.0, + "max_total": 32, + "observed_connection_increases": 0, + "observed_connection_decreases": 4, + "event_loop_p99_max_ms": 730.333183 + } + }, + "host": { + "samples": 16, + "cpu_some_fraction": 0.3473657931034483, + "memory_some_fraction": 1.1379310344827586e-05, + "memory_full_fraction": 6.103448275862069e-06, + "io_some_fraction": 0.01488248275862069, + "io_full_fraction": 0.006875896551724138, + "min_available_mib": 1336.82421875, + "max_swap_used_mib": 236.375 + }, + "postgres": { + "samples": 16, + "max_active": 10, + "max_idle_in_transaction": 4, + "active_wait_observations": { + "no_wait_event/-": 13, + "IO/WalSync": 1 + } + }, + "nginx": { + "samples": 16, + "upstream_changes": 0, + "min_ready": 1, + "max_ready": 1 + }, + "limits_reached": { + "generator_late": false, + "client_capacity": false, + "request_errors": false, + "latency": false + }, + "diagnostics_complete": true + }, + "source_hashes": { + "benchmark": "80d6e14cd847fb116774e2e02745fa219d586741cc129b80faed74296a34a482", + "summary": "f891d11fd4c28d8abef7317141437ec5b5e87b376e799dbf7e18d4c0bd0b04d3" + } + }, + { + "dataset": "api-cpu", + "variant": "one", + "configuration": "one", + "manifest": "api-small-growth-20261029", + "label": "one-r80-confirmation-15", + "profile": { + "arrival_model": "k6 constant-arrival-rate; one HTTP request per iteration", + "offered_rps": 80, + "duration_seconds": 30, + "warmup_seconds": 10, + "warmup_profile": "same 80/20 workload at target rate", + "read_percent": 80, + "write_percent": 20, + "initial_messages": 30, + "history_limit": 50, + "max_in_flight": 128, + "timeout_ms": 5000, + "automatic_retries": false, + "expected_instances": 1, + "phase": "confirmation" + }, + "measurement": { + "scheduled_slots": 2400, + "client_dropped_slots": 31, + "scheduler_late_slots": 0, + "read": { + "attempted": 1896, + "successful": 1896, + "errors": 0, + "successful_rps": 63.2, + "successful_latency_ms": { + "p50": 31.4876795, + "p95": 822.545059, + "p99": 1561.3985721499998 + }, + "status_counts": {}, + "error_counts": {}, + "instance_counts": {} + }, + "write": { + "attempted": 473, + "successful": 473, + "errors": 0, + "successful_rps": 15.766666666666667, + "successful_latency_ms": { + "p50": 75.967337, + "p95": 1065.10183, + "p99": 1598.6565730799985 + }, + "status_counts": {}, + "error_counts": {}, + "instance_counts": {} + }, + "all": { + "attempted": 2369, + "successful": 2369, + "errors": 0, + "successful_rps": 78.96666666666667, + "successful_latency_ms": { + "p50": 38.92324300000001, + "p95": 966.6013613999995, + "p99": 1567.104490280001 + }, + "status_counts": { + "200": 1896, + "201": 473, + "other": 0, + "network": 0 + }, + "error_counts": {}, + "instance_counts": { + "d0a4060b0ff8": 2369 + } + } + }, + "timing": { + "measurement_started_epoch_ms": 1793251559096, + "measurement_scheduled_end_epoch_ms": 1793251589096, + "measurement_completed_epoch_ms": 1793251586935 + }, + "client": { + "engine": "k6", + "scheduler_lateness_measured": false, + "raw_dropped_iterations_including_warmup": 32, + "peak_vus": 92, + "max_vus": 128 + }, + "all_latency_ms": { + "p50": 38.92324300000001, + "p95": 966.6013613999995, + "p99": 1567.104490280001 + }, + "criterion": { + "delivery_fraction": 0.9870833333333333, + "error_fraction": 0.0, + "all_request_p95_ms": 966.6013613999995, + "delivery_valid": true, + "slo_pass": true, + "classification": "pass" + }, + "diagnostics": { + "resources": { + "api-1": { + "samples": 34, + "coverage_seconds": 29.451, + "max_sample_gap_seconds": 1.152, + "mean_cpu_cores": 0.577001595871108, + "throttled_seconds": 0.00037, + "throttled_period_fraction": 0.002932551319648094, + "peak_memory_mib": 245.30078125, + "oom_kills": 0 + }, + "postgres": { + "samples": 15, + "coverage_seconds": 27.0, + "max_sample_gap_seconds": 3.0, + "mean_cpu_cores": 0.4352526666666667, + "throttled_seconds": 0.534881, + "throttled_period_fraction": 0.034482758620689655, + "peak_memory_mib": 302.50390625, + "oom_kills": 0 + }, + "nginx": { + "samples": 15, + "coverage_seconds": 27.0, + "max_sample_gap_seconds": 3.0, + "mean_cpu_cores": 0.10365759259259259, + "throttled_seconds": 0.240358, + "throttled_period_fraction": 0.021352313167259787, + "peak_memory_mib": 10.78515625, + "oom_kills": 0 + }, + "redis": { + "samples": 17, + "coverage_seconds": 29.0, + "max_sample_gap_seconds": 3.0, + "mean_cpu_cores": 0.0766271724137931, + "throttled_seconds": 0.219651, + "throttled_period_fraction": 0.017804154302670624, + "peak_memory_mib": 15.96875, + "oom_kills": 0 + }, + "generator": { + "samples": 15, + "coverage_seconds": 27.0, + "max_sample_gap_seconds": 3.0, + "mean_cpu_cores": 0.2896245925925926, + "throttled_seconds": 0.0, + "throttled_period_fraction": 0.0, + "peak_memory_mib": 106.5703125, + "oom_kills": 0 + } + }, + "pools": { + "api-1": { + "samples": 34, + "acquisitions": 4427, + "acquisition_errors": 0, + "mean_acquisition_ms": 0.42102274316591715, + "max_acquisition_ms": 300.08527999999933, + "max_waiting": 0, + "queued_interval_fraction": 0.0, + "max_total": 32, + "observed_connection_increases": 1, + "observed_connection_decreases": 0, + "event_loop_p99_max_ms": 339.476479 + } + }, + "host": { + "samples": 15, + "cpu_some_fraction": 0.4326645185185185, + "memory_some_fraction": 0.0, + "memory_full_fraction": 0.0, + "io_some_fraction": 0.017068592592592594, + "io_full_fraction": 0.0078018518518518515, + "min_available_mib": 1312.40625, + "max_swap_used_mib": 236.375 + }, + "postgres": { + "samples": 17, + "max_active": 4, + "max_idle_in_transaction": 8, + "active_wait_observations": { + "IO/WalSync": 1, + "no_wait_event/-": 8, + "Lock/transactionid": 1 + } + }, + "nginx": { + "samples": 15, + "upstream_changes": 0, + "min_ready": 1, + "max_ready": 1 + }, + "limits_reached": { + "generator_late": false, + "client_capacity": false, + "request_errors": false, + "latency": false + }, + "diagnostics_complete": true + }, + "source_hashes": { + "benchmark": "b613068f78efdfe949d4f6de2de84c7765a6ddcc43c6adb60d1f26fbb1352e2a", + "summary": "d1072764d181d177f721838051d6ce63590738f1438672804c5cfbf54d6f5248" + } + }, + { + "dataset": "api-cpu", + "variant": "two-small", + "configuration": "two-small", + "manifest": "api-small-growth-20261029", + "label": "two-small-r40-confirmation-16", + "profile": { + "arrival_model": "k6 constant-arrival-rate; one HTTP request per iteration", + "offered_rps": 40, + "duration_seconds": 30, + "warmup_seconds": 10, + "warmup_profile": "same 80/20 workload at target rate", + "read_percent": 80, + "write_percent": 20, + "initial_messages": 30, + "history_limit": 50, + "max_in_flight": 128, + "timeout_ms": 5000, + "automatic_retries": false, + "expected_instances": 2, + "phase": "confirmation" + }, + "measurement": { + "scheduled_slots": 1200, + "client_dropped_slots": 0, + "scheduler_late_slots": 0, + "read": { + "attempted": 961, + "successful": 961, + "errors": 0, + "successful_rps": 32.03333333333333, + "successful_latency_ms": { + "p50": 39.385064, + "p95": 1040.04252, + "p99": 1438.0943335999991 + }, + "status_counts": {}, + "error_counts": {}, + "instance_counts": {} + }, + "write": { + "attempted": 240, + "successful": 240, + "errors": 0, + "successful_rps": 8, + "successful_latency_ms": { + "p50": 85.011546, + "p95": 1357.8757024499998, + "p99": 1570.34057788 + }, + "status_counts": {}, + "error_counts": {}, + "instance_counts": {} + }, + "all": { + "attempted": 1201, + "successful": 1201, + "errors": 0, + "successful_rps": 40.03333333333333, + "successful_latency_ms": { + "p50": 48.445418, + "p95": 1118.8671709999999, + "p99": 1544.904627 + }, + "status_counts": { + "200": 961, + "201": 240, + "other": 0, + "network": 0 + }, + "error_counts": {}, + "instance_counts": { + "94508e170149": 698, + "a6455e4f2e6e": 503 + } + } + }, + "timing": { + "measurement_started_epoch_ms": 1793251674117, + "measurement_scheduled_end_epoch_ms": 1793251704117, + "measurement_completed_epoch_ms": 1793251701749 + }, + "client": { + "engine": "k6", + "scheduler_lateness_measured": false, + "raw_dropped_iterations_including_warmup": 0, + "peak_vus": 116, + "max_vus": 128 + }, + "all_latency_ms": { + "p50": 48.445418, + "p95": 1118.8671709999999, + "p99": 1544.904627 + }, + "criterion": { + "delivery_fraction": 1.0008333333333332, + "error_fraction": 0.0, + "all_request_p95_ms": 1118.8671709999999, + "delivery_valid": true, + "slo_pass": false, + "classification": "slo_fail" + }, + "diagnostics": { + "resources": { + "api-1": { + "samples": 30, + "coverage_seconds": 28.643, + "max_sample_gap_seconds": 1.541, + "mean_cpu_cores": 0.2736024508605942, + "throttled_seconds": 4.138479, + "throttled_period_fraction": 0.18151815181518152, + "peak_memory_mib": 124.80859375, + "oom_kills": 0 + }, + "api-2": { + "samples": 30, + "coverage_seconds": 28.434, + "max_sample_gap_seconds": 1.319, + "mean_cpu_cores": 0.30090764577618345, + "throttled_seconds": 3.77486, + "throttled_period_fraction": 0.21172638436482086, + "peak_memory_mib": 124.1484375, + "oom_kills": 0 + }, + "postgres": { + "samples": 15, + "coverage_seconds": 28.0, + "max_sample_gap_seconds": 3.0, + "mean_cpu_cores": 0.30872242857142856, + "throttled_seconds": 0.263871, + "throttled_period_fraction": 0.025179856115107913, + "peak_memory_mib": 302.90234375, + "oom_kills": 0 + }, + "nginx": { + "samples": 16, + "coverage_seconds": 28.0, + "max_sample_gap_seconds": 2.0, + "mean_cpu_cores": 0.11654910714285714, + "throttled_seconds": 0.773702, + "throttled_period_fraction": 0.03355704697986577, + "peak_memory_mib": 10.37109375, + "oom_kills": 0 + }, + "redis": { + "samples": 15, + "coverage_seconds": 27.0, + "max_sample_gap_seconds": 3.0, + "mean_cpu_cores": 0.07801218518518518, + "throttled_seconds": 0.432758, + "throttled_period_fraction": 0.020202020202020204, + "peak_memory_mib": 11.78125, + "oom_kills": 0 + }, + "generator": { + "samples": 16, + "coverage_seconds": 28.0, + "max_sample_gap_seconds": 2.0, + "mean_cpu_cores": 0.25150246428571427, + "throttled_seconds": 0.0, + "throttled_period_fraction": 0.0, + "peak_memory_mib": 94.1953125, + "oom_kills": 0 + } + }, + "pools": { + "api-1": { + "samples": 30, + "acquisitions": 862, + "acquisition_errors": 0, + "mean_acquisition_ms": 0.6222442262183744, + "max_acquisition_ms": 74.95709199999692, + "max_waiting": 0, + "queued_interval_fraction": 0.0, + "max_total": 16, + "observed_connection_increases": 0, + "observed_connection_decreases": 3, + "event_loop_p99_max_ms": 710.410239 + }, + "api-2": { + "samples": 30, + "acquisitions": 1112, + "acquisition_errors": 0, + "mean_acquisition_ms": 0.6392549748200659, + "max_acquisition_ms": 75.59806599999865, + "max_waiting": 1, + "queued_interval_fraction": 0.03333333333333333, + "max_total": 16, + "observed_connection_increases": 0, + "observed_connection_decreases": 0, + "event_loop_p99_max_ms": 576.192511 + } + }, + "host": { + "samples": 15, + "cpu_some_fraction": 0.5486230357142857, + "memory_some_fraction": 0.0, + "memory_full_fraction": 0.0, + "io_some_fraction": 0.015120071428571429, + "io_full_fraction": 0.00404575, + "min_available_mib": 1333.76171875, + "max_swap_used_mib": 236.375 + }, + "postgres": { + "samples": 16, + "max_active": 4, + "max_idle_in_transaction": 4, + "active_wait_observations": { + "no_wait_event/-": 8, + "Client/ClientRead": 2, + "Lock/transactionid": 2 + } + }, + "nginx": { + "samples": 16, + "upstream_changes": 1, + "min_ready": 1, + "max_ready": 2 + }, + "limits_reached": { + "generator_late": false, + "client_capacity": false, + "request_errors": false, + "latency": true + }, + "diagnostics_complete": true + }, + "source_hashes": { + "benchmark": "6434e606304852fc2a404f2a8e4faa2e377366941a002e4f102774686395805b", + "summary": "4c51a51f25f30a2cc9fde472a702497f67cc498f9d4cc88f33d940df444852ba" + } + }, + { + "dataset": "api-cpu", + "variant": "two-small", + "configuration": "two-small", + "manifest": "api-small-growth-20261029", + "label": "two-small-r80-confirmation-17", + "profile": { + "arrival_model": "k6 constant-arrival-rate; one HTTP request per iteration", + "offered_rps": 80, + "duration_seconds": 30, + "warmup_seconds": 10, + "warmup_profile": "same 80/20 workload at target rate", + "read_percent": 80, + "write_percent": 20, + "initial_messages": 30, + "history_limit": 50, + "max_in_flight": 128, + "timeout_ms": 5000, + "automatic_retries": false, + "expected_instances": 2, + "phase": "confirmation" + }, + "measurement": { + "scheduled_slots": 2400, + "client_dropped_slots": 29, + "scheduler_late_slots": 0, + "read": { + "attempted": 1898, + "successful": 1372, + "errors": 526, + "successful_rps": 45.733333333333334, + "successful_latency_ms": { + "p50": 16.9986435, + "p95": 559.58223765, + "p99": 946.7337913199987 + }, + "status_counts": {}, + "error_counts": {}, + "instance_counts": {} + }, + "write": { + "attempted": 473, + "successful": 341, + "errors": 132, + "successful_rps": 11.366666666666667, + "successful_latency_ms": { + "p50": 45.041518, + "p95": 1050.610277, + "p99": 1433.746252600002 + }, + "status_counts": {}, + "error_counts": {}, + "instance_counts": {} + }, + "all": { + "attempted": 2371, + "successful": 1713, + "errors": 658, + "successful_rps": 57.1, + "successful_latency_ms": { + "p50": 25.045635, + "p95": 691.4786511999989, + "p99": 1143.6126581199976 + }, + "status_counts": { + "200": 1372, + "201": 341, + "other": 658, + "network": 0 + }, + "error_counts": {}, + "instance_counts": { + "94508e170149": 870, + "a6455e4f2e6e": 843 + } + } + }, + "timing": { + "measurement_started_epoch_ms": 1793251725115, + "measurement_scheduled_end_epoch_ms": 1793251755115, + "measurement_completed_epoch_ms": 1793251753340 + }, + "client": { + "engine": "k6", + "scheduler_lateness_measured": false, + "raw_dropped_iterations_including_warmup": 281, + "peak_vus": 139, + "max_vus": 128 + }, + "all_latency_ms": { + "p50": 17.88918, + "p95": 588.881168, + "p99": 1101.7267822000028 + }, + "criterion": { + "delivery_fraction": 0.9879166666666667, + "error_fraction": 0.27752003374103756, + "all_request_p95_ms": 588.881168, + "delivery_valid": true, + "slo_pass": false, + "classification": "slo_fail" + }, + "diagnostics": { + "resources": { + "api-1": { + "samples": 33, + "coverage_seconds": 28.488, + "max_sample_gap_seconds": 1.13, + "mean_cpu_cores": 0.30012752737994947, + "throttled_seconds": 4.325364, + "throttled_period_fraction": 0.215625, + "peak_memory_mib": 166.83203125, + "oom_kills": 0 + }, + "api-2": { + "samples": 33, + "coverage_seconds": 28.755, + "max_sample_gap_seconds": 1.139, + "mean_cpu_cores": 0.30482670839853937, + "throttled_seconds": 4.874499, + "throttled_period_fraction": 0.19938650306748465, + "peak_memory_mib": 163.24609375, + "oom_kills": 0 + }, + "postgres": { + "samples": 17, + "coverage_seconds": 29.0, + "max_sample_gap_seconds": 2.0, + "mean_cpu_cores": 0.33328606896551727, + "throttled_seconds": 0.352923, + "throttled_period_fraction": 0.034013605442176874, + "peak_memory_mib": 293.62109375, + "oom_kills": 0 + }, + "nginx": { + "samples": 17, + "coverage_seconds": 29.0, + "max_sample_gap_seconds": 3.0, + "mean_cpu_cores": 0.09895144827586207, + "throttled_seconds": 0.030703, + "throttled_period_fraction": 0.0032679738562091504, + "peak_memory_mib": 11.859375, + "oom_kills": 0 + }, + "redis": { + "samples": 17, + "coverage_seconds": 28.0, + "max_sample_gap_seconds": 3.0, + "mean_cpu_cores": 0.06175353571428571, + "throttled_seconds": 0.140297, + "throttled_period_fraction": 0.015337423312883436, + "peak_memory_mib": 13.13671875, + "oom_kills": 0 + }, + "generator": { + "samples": 17, + "coverage_seconds": 29.0, + "max_sample_gap_seconds": 3.0, + "mean_cpu_cores": 0.2735028620689655, + "throttled_seconds": 0.0, + "throttled_period_fraction": 0.0, + "peak_memory_mib": 106.76171875, + "oom_kills": 0 + } + }, + "pools": { + "api-1": { + "samples": 33, + "acquisitions": 1560, + "acquisition_errors": 0, + "mean_acquisition_ms": 50.78464790256429, + "max_acquisition_ms": 2327.667266000004, + "max_waiting": 33, + "queued_interval_fraction": 0.12121212121212122, + "max_total": 16, + "observed_connection_increases": 0, + "observed_connection_decreases": 0, + "event_loop_p99_max_ms": 480.772095 + }, + "api-2": { + "samples": 33, + "acquisitions": 1554, + "acquisition_errors": 0, + "mean_acquisition_ms": 32.91306011969052, + "max_acquisition_ms": 2111.1756929999974, + "max_waiting": 26, + "queued_interval_fraction": 0.15151515151515152, + "max_total": 16, + "observed_connection_increases": 0, + "observed_connection_decreases": 0, + "event_loop_p99_max_ms": 911.212543 + } + }, + "host": { + "samples": 17, + "cpu_some_fraction": 0.5418164827586207, + "memory_some_fraction": 0.022036689655172415, + "memory_full_fraction": 0.009873413793103449, + "io_some_fraction": 0.021511862068965517, + "io_full_fraction": 0.006801379310344828, + "min_available_mib": 1245.48828125, + "max_swap_used_mib": 240.890625 + }, + "postgres": { + "samples": 16, + "max_active": 3, + "max_idle_in_transaction": 11, + "active_wait_observations": { + "IO/WalSync": 1, + "Lock/transactionid": 2, + "Client/ClientRead": 1, + "no_wait_event/-": 2 + } + }, + "nginx": { + "samples": 17, + "upstream_changes": 1, + "min_ready": 0, + "max_ready": 2 + }, + "limits_reached": { + "generator_late": false, + "client_capacity": false, + "request_errors": true, + "latency": false + }, + "diagnostics_complete": true + }, + "source_hashes": { + "benchmark": "48d38faee6e780aa0374e383548bf853fc974046e36cf87453c2f9a80bfa9a73", + "summary": "00d9f9d6d380af033a97c1398963a45ec03860e2fa7a7c011b02b0f859685764" + } + }, + { + "dataset": "api-cpu", + "variant": "two-small", + "configuration": "two-small", + "manifest": "api-small-growth-20261029", + "label": "two-small-r40-confirmation-18", + "profile": { + "arrival_model": "k6 constant-arrival-rate; one HTTP request per iteration", + "offered_rps": 40, + "duration_seconds": 30, + "warmup_seconds": 10, + "warmup_profile": "same 80/20 workload at target rate", + "read_percent": 80, + "write_percent": 20, + "initial_messages": 30, + "history_limit": 50, + "max_in_flight": 128, + "timeout_ms": 5000, + "automatic_retries": false, + "expected_instances": 2, + "phase": "confirmation" + }, + "measurement": { + "scheduled_slots": 1200, + "client_dropped_slots": 0, + "scheduler_late_slots": 0, + "read": { + "attempted": 965, + "successful": 965, + "errors": 0, + "successful_rps": 32.166666666666664, + "successful_latency_ms": { + "p50": 77.618886, + "p95": 1677.2890689999997, + "p99": 2486.77553544 + }, + "status_counts": {}, + "error_counts": {}, + "instance_counts": {} + }, + "write": { + "attempted": 241, + "successful": 241, + "errors": 0, + "successful_rps": 8.033333333333333, + "successful_latency_ms": { + "p50": 180.184384, + "p95": 1892.876255, + "p99": 2605.990879599999 + }, + "status_counts": {}, + "error_counts": {}, + "instance_counts": {} + }, + "all": { + "attempted": 1206, + "successful": 1206, + "errors": 0, + "successful_rps": 40.2, + "successful_latency_ms": { + "p50": 93.989056, + "p95": 1757.4142032500001, + "p99": 2544.2509913000004 + }, + "status_counts": { + "200": 965, + "201": 241, + "other": 0, + "network": 0 + }, + "error_counts": {}, + "instance_counts": { + "94508e170149": 594, + "a6455e4f2e6e": 612 + } + } + }, + "timing": { + "measurement_started_epoch_ms": 1793251773470, + "measurement_scheduled_end_epoch_ms": 1793251803470, + "measurement_completed_epoch_ms": 1793251803426 + }, + "client": { + "engine": "k6", + "scheduler_lateness_measured": false, + "raw_dropped_iterations_including_warmup": 0, + "peak_vus": 74, + "max_vus": 128 + }, + "all_latency_ms": { + "p50": 93.989056, + "p95": 1757.4142032500001, + "p99": 2544.2509913000004 + }, + "criterion": { + "delivery_fraction": 1.005, + "error_fraction": 0.0, + "all_request_p95_ms": 1757.4142032500001, + "delivery_valid": true, + "slo_pass": false, + "classification": "slo_fail" + }, + "diagnostics": { + "resources": { + "api-1": { + "samples": 30, + "coverage_seconds": 29.756, + "max_sample_gap_seconds": 1.416, + "mean_cpu_cores": 0.3092128982390106, + "throttled_seconds": 2.790203, + "throttled_period_fraction": 0.1838006230529595, + "peak_memory_mib": 188.78125, + "oom_kills": 0 + }, + "api-2": { + "samples": 30, + "coverage_seconds": 29.336, + "max_sample_gap_seconds": 2.042, + "mean_cpu_cores": 0.2889625715844014, + "throttled_seconds": 4.27644, + "throttled_period_fraction": 0.16878980891719744, + "peak_memory_mib": 184.23046875, + "oom_kills": 0 + }, + "postgres": { + "samples": 14, + "coverage_seconds": 27.0, + "max_sample_gap_seconds": 3.0, + "mean_cpu_cores": 0.4452461111111111, + "throttled_seconds": 1.45709, + "throttled_period_fraction": 0.07357859531772576, + "peak_memory_mib": 276.8125, + "oom_kills": 0 + }, + "nginx": { + "samples": 14, + "coverage_seconds": 27.0, + "max_sample_gap_seconds": 3.0, + "mean_cpu_cores": 0.11923277777777777, + "throttled_seconds": 0.528643, + "throttled_period_fraction": 0.03333333333333333, + "peak_memory_mib": 10.671875, + "oom_kills": 0 + }, + "redis": { + "samples": 15, + "coverage_seconds": 28.0, + "max_sample_gap_seconds": 3.0, + "mean_cpu_cores": 0.09999957142857142, + "throttled_seconds": 0.44182, + "throttled_period_fraction": 0.02287581699346405, + "peak_memory_mib": 12.296875, + "oom_kills": 0 + }, + "generator": { + "samples": 14, + "coverage_seconds": 28.0, + "max_sample_gap_seconds": 4.0, + "mean_cpu_cores": 0.2952607857142857, + "throttled_seconds": 0.0, + "throttled_period_fraction": 0.0, + "peak_memory_mib": 99.640625, + "oom_kills": 0 + } + }, + "pools": { + "api-1": { + "samples": 30, + "acquisitions": 1063, + "acquisition_errors": 0, + "mean_acquisition_ms": 3.4137541599246335, + "max_acquisition_ms": 140.15568300001905, + "max_waiting": 10, + "queued_interval_fraction": 0.1, + "max_total": 16, + "observed_connection_increases": 0, + "observed_connection_decreases": 0, + "event_loop_p99_max_ms": 956.301311 + }, + "api-2": { + "samples": 30, + "acquisitions": 1011, + "acquisition_errors": 0, + "mean_acquisition_ms": 0.8620253679525424, + "max_acquisition_ms": 49.59766500000842, + "max_waiting": 0, + "queued_interval_fraction": 0.0, + "max_total": 16, + "observed_connection_increases": 0, + "observed_connection_decreases": 0, + "event_loop_p99_max_ms": 766.509055 + } + }, + "host": { + "samples": 14, + "cpu_some_fraction": 0.6234872962962963, + "memory_some_fraction": 0.012353481481481481, + "memory_full_fraction": 0.0073492962962962965, + "io_some_fraction": 0.018534185185185185, + "io_full_fraction": 0.0033598518518518517, + "min_available_mib": 1217.84375, + "max_swap_used_mib": 245.90625 + }, + "postgres": { + "samples": 16, + "max_active": 6, + "max_idle_in_transaction": 5, + "active_wait_observations": { + "no_wait_event/-": 16, + "IO/WalSync": 2 + } + }, + "nginx": { + "samples": 14, + "upstream_changes": 0, + "min_ready": 2, + "max_ready": 2 + }, + "limits_reached": { + "generator_late": false, + "client_capacity": false, + "request_errors": false, + "latency": true + }, + "diagnostics_complete": true + }, + "source_hashes": { + "benchmark": "dcb5574eb13ab6409822a2e791e5794e86ccd1a452b292f150064a55ddd50967", + "summary": "3436c7b16ed1d2f8724bb06703901e653a351c6be1c16789dacf4685b7d1a97e" + } + }, + { + "dataset": "api-cpu", + "variant": "two-small", + "configuration": "two-small", + "manifest": "api-small-growth-20261029", + "label": "two-small-r80-confirmation-19", + "profile": { + "arrival_model": "k6 constant-arrival-rate; one HTTP request per iteration", + "offered_rps": 80, + "duration_seconds": 30, + "warmup_seconds": 10, + "warmup_profile": "same 80/20 workload at target rate", + "read_percent": 80, + "write_percent": 20, + "initial_messages": 30, + "history_limit": 50, + "max_in_flight": 128, + "timeout_ms": 5000, + "automatic_retries": false, + "expected_instances": 2, + "phase": "confirmation" + }, + "measurement": { + "scheduled_slots": 2400, + "client_dropped_slots": 753, + "scheduler_late_slots": 0, + "read": { + "attempted": 1318, + "successful": 948, + "errors": 370, + "successful_rps": 31.6, + "successful_latency_ms": { + "p50": 871.8272405, + "p95": 4590.71145065, + "p99": 4823.42481409 + }, + "status_counts": {}, + "error_counts": {}, + "instance_counts": {} + }, + "write": { + "attempted": 329, + "successful": 226, + "errors": 103, + "successful_rps": 7.533333333333333, + "successful_latency_ms": { + "p50": 1672.4924369999999, + "p95": 4339.983712, + "p99": 4849.256059249999 + }, + "status_counts": {}, + "error_counts": {}, + "instance_counts": {} + }, + "all": { + "attempted": 1647, + "successful": 1174, + "errors": 473, + "successful_rps": 39.13333333333333, + "successful_latency_ms": { + "p50": 1051.8127515, + "p95": 4573.172054199999, + "p99": 4829.25868523 + }, + "status_counts": { + "200": 948, + "201": 226, + "other": 162, + "network": 311 + }, + "error_counts": {}, + "instance_counts": { + "94508e170149": 518, + "a6455e4f2e6e": 656 + } + } + }, + "timing": { + "measurement_started_epoch_ms": 1793251824454, + "measurement_scheduled_end_epoch_ms": 1793251854454, + "measurement_completed_epoch_ms": 1793251853094 + }, + "client": { + "engine": "k6", + "scheduler_lateness_measured": false, + "raw_dropped_iterations_including_warmup": 784, + "peak_vus": 129, + "max_vus": 128 + }, + "all_latency_ms": { + "p50": 1223.783122, + "p95": 5009.7729897, + "p99": 5053.72034198 + }, + "criterion": { + "delivery_fraction": 0.68625, + "error_fraction": 0.28718882817243474, + "all_request_p95_ms": 5009.7729897, + "delivery_valid": false, + "slo_pass": false, + "classification": "generator_limited" + }, + "diagnostics": { + "resources": { + "api-1": { + "samples": 29, + "coverage_seconds": 29.348, + "max_sample_gap_seconds": 2.088, + "mean_cpu_cores": 0.32948418972332016, + "throttled_seconds": 12.917066, + "throttled_period_fraction": 0.5100671140939598, + "peak_memory_mib": 191.484375, + "oom_kills": 0 + }, + "api-2": { + "samples": 29, + "coverage_seconds": 28.767, + "max_sample_gap_seconds": 1.49, + "mean_cpu_cores": 0.3169497688323426, + "throttled_seconds": 9.064817, + "throttled_period_fraction": 0.44745762711864406, + "peak_memory_mib": 186.35546875, + "oom_kills": 0 + }, + "postgres": { + "samples": 15, + "coverage_seconds": 28.0, + "max_sample_gap_seconds": 3.0, + "mean_cpu_cores": 0.399076, + "throttled_seconds": 0.736983, + "throttled_period_fraction": 0.033112582781456956, + "peak_memory_mib": 274.375, + "oom_kills": 0 + }, + "nginx": { + "samples": 15, + "coverage_seconds": 28.0, + "max_sample_gap_seconds": 3.0, + "mean_cpu_cores": 0.16178753571428572, + "throttled_seconds": 2.457094, + "throttled_period_fraction": 0.13486842105263158, + "peak_memory_mib": 12.56640625, + "oom_kills": 0 + }, + "redis": { + "samples": 15, + "coverage_seconds": 27.0, + "max_sample_gap_seconds": 3.0, + "mean_cpu_cores": 0.09466062962962964, + "throttled_seconds": 0.67698, + "throttled_period_fraction": 0.04827586206896552, + "peak_memory_mib": 13.8828125, + "oom_kills": 0 + }, + "generator": { + "samples": 15, + "coverage_seconds": 26.0, + "max_sample_gap_seconds": 2.0, + "mean_cpu_cores": 0.30618315384615385, + "throttled_seconds": 0.0, + "throttled_period_fraction": 0.0, + "peak_memory_mib": 109.7265625, + "oom_kills": 0 + } + }, + "pools": { + "api-1": { + "samples": 29, + "acquisitions": 1633, + "acquisition_errors": 0, + "mean_acquisition_ms": 149.81121382914867, + "max_acquisition_ms": 2416.097731000016, + "max_waiting": 42, + "queued_interval_fraction": 0.4827586206896552, + "max_total": 16, + "observed_connection_increases": 0, + "observed_connection_decreases": 0, + "event_loop_p99_max_ms": 1080.033279 + }, + "api-2": { + "samples": 29, + "acquisitions": 1309, + "acquisition_errors": 0, + "mean_acquisition_ms": 163.83100673491182, + "max_acquisition_ms": 1021.2804579999938, + "max_waiting": 37, + "queued_interval_fraction": 0.41379310344827586, + "max_total": 16, + "observed_connection_increases": 0, + "observed_connection_decreases": 0, + "event_loop_p99_max_ms": 683.147263 + } + }, + "host": { + "samples": 15, + "cpu_some_fraction": 0.6090348571428571, + "memory_some_fraction": 0.0008442857142857143, + "memory_full_fraction": 0.0007235714285714286, + "io_some_fraction": 0.01679442857142857, + "io_full_fraction": 0.005027785714285715, + "min_available_mib": 1201.5078125, + "max_swap_used_mib": 245.90625 + }, + "postgres": { + "samples": 16, + "max_active": 13, + "max_idle_in_transaction": 7, + "active_wait_observations": { + "Lock/transactionid": 3, + "no_wait_event/-": 7, + "IO/WalSync": 1, + "LWLock/BufferContent": 3, + "LWLock/WALInsert": 3, + "LWLock/WALWrite": 2 + } + }, + "nginx": { + "samples": 15, + "upstream_changes": 5, + "min_ready": 0, + "max_ready": 1 + }, + "limits_reached": { + "generator_late": false, + "client_capacity": true, + "request_errors": true, + "latency": true + }, + "diagnostics_complete": true + }, + "source_hashes": { + "benchmark": "a3eafa7de7b73f6ab1f8a855c07343ff29b162a0ade283d2d678f645b938f1b7", + "summary": "25c6402a51cfd10f8fb240c9dc57b50925200b77855cfedcc0eedf9a3b29b108" + } + }, + { + "dataset": "api-cpu", + "variant": "two-small", + "configuration": "two-small", + "manifest": "api-small-growth-20261029", + "label": "two-small-r40-confirmation-20", + "profile": { + "arrival_model": "k6 constant-arrival-rate; one HTTP request per iteration", + "offered_rps": 40, + "duration_seconds": 30, + "warmup_seconds": 10, + "warmup_profile": "same 80/20 workload at target rate", + "read_percent": 80, + "write_percent": 20, + "initial_messages": 30, + "history_limit": 50, + "max_in_flight": 128, + "timeout_ms": 5000, + "automatic_retries": false, + "expected_instances": 2, + "phase": "confirmation" + }, + "measurement": { + "scheduled_slots": 1200, + "client_dropped_slots": 0, + "scheduler_late_slots": 0, + "read": { + "attempted": 961, + "successful": 961, + "errors": 0, + "successful_rps": 32.03333333333333, + "successful_latency_ms": { + "p50": 47.642047, + "p95": 1173.675775, + "p99": 1571.7564677999997 + }, + "status_counts": {}, + "error_counts": {}, + "instance_counts": {} + }, + "write": { + "attempted": 240, + "successful": 240, + "errors": 0, + "successful_rps": 8, + "successful_latency_ms": { + "p50": 122.9189505, + "p95": 1708.0721207999998, + "p99": 2044.1201727499995 + }, + "status_counts": {}, + "error_counts": {}, + "instance_counts": {} + }, + "all": { + "attempted": 1201, + "successful": 1201, + "errors": 0, + "successful_rps": 40.03333333333333, + "successful_latency_ms": { + "p50": 62.321341000000004, + "p95": 1338.075269, + "p99": 1721.736195 + }, + "status_counts": { + "200": 961, + "201": 240, + "other": 0, + "network": 0 + }, + "error_counts": {}, + "instance_counts": { + "a6455e4f2e6e": 603, + "94508e170149": 598 + } + } + }, + "timing": { + "measurement_started_epoch_ms": 1793251869648, + "measurement_scheduled_end_epoch_ms": 1793251899648, + "measurement_completed_epoch_ms": 1793251897424 + }, + "client": { + "engine": "k6", + "scheduler_lateness_measured": false, + "raw_dropped_iterations_including_warmup": 0, + "peak_vus": 55, + "max_vus": 128 + }, + "all_latency_ms": { + "p50": 62.321341000000004, + "p95": 1338.075269, + "p99": 1721.736195 + }, + "criterion": { + "delivery_fraction": 1.0008333333333332, + "error_fraction": 0.0, + "all_request_p95_ms": 1338.075269, + "delivery_valid": true, + "slo_pass": false, + "classification": "slo_fail" + }, + "diagnostics": { + "resources": { + "api-1": { + "samples": 31, + "coverage_seconds": 29.684, + "max_sample_gap_seconds": 1.271, + "mean_cpu_cores": 0.2669271661501145, + "throttled_seconds": 3.521279, + "throttled_period_fraction": 0.1523809523809524, + "peak_memory_mib": 211.0859375, + "oom_kills": 0 + }, + "api-2": { + "samples": 30, + "coverage_seconds": 28.665, + "max_sample_gap_seconds": 1.489, + "mean_cpu_cores": 0.2832935635792779, + "throttled_seconds": 2.584757, + "throttled_period_fraction": 0.18831168831168832, + "peak_memory_mib": 187.13671875, + "oom_kills": 0 + }, + "postgres": { + "samples": 15, + "coverage_seconds": 29.0, + "max_sample_gap_seconds": 3.0, + "mean_cpu_cores": 0.38870475862068965, + "throttled_seconds": 1.095987, + "throttled_period_fraction": 0.04777070063694268, + "peak_memory_mib": 274.83203125, + "oom_kills": 0 + }, + "nginx": { + "samples": 15, + "coverage_seconds": 29.0, + "max_sample_gap_seconds": 3.0, + "mean_cpu_cores": 0.10898024137931034, + "throttled_seconds": 0.379993, + "throttled_period_fraction": 0.026578073089700997, + "peak_memory_mib": 10.68359375, + "oom_kills": 0 + }, + "redis": { + "samples": 15, + "coverage_seconds": 28.0, + "max_sample_gap_seconds": 3.0, + "mean_cpu_cores": 0.09393296428571428, + "throttled_seconds": 0.37016, + "throttled_period_fraction": 0.02356902356902357, + "peak_memory_mib": 11.97265625, + "oom_kills": 0 + }, + "generator": { + "samples": 14, + "coverage_seconds": 28.0, + "max_sample_gap_seconds": 3.0, + "mean_cpu_cores": 0.25419332142857143, + "throttled_seconds": 0.0, + "throttled_period_fraction": 0.0, + "peak_memory_mib": 97.81640625, + "oom_kills": 0 + } + }, + "pools": { + "api-1": { + "samples": 31, + "acquisitions": 1018, + "acquisition_errors": 0, + "mean_acquisition_ms": 1.2452791031440427, + "max_acquisition_ms": 116.47056099999463, + "max_waiting": 0, + "queued_interval_fraction": 0.0, + "max_total": 16, + "observed_connection_increases": 0, + "observed_connection_decreases": 0, + "event_loop_p99_max_ms": 427.294719 + }, + "api-2": { + "samples": 30, + "acquisitions": 1049, + "acquisition_errors": 0, + "mean_acquisition_ms": 1.5100807569105554, + "max_acquisition_ms": 204.53520199999912, + "max_waiting": 2, + "queued_interval_fraction": 0.06666666666666667, + "max_total": 16, + "observed_connection_increases": 0, + "observed_connection_decreases": 0, + "event_loop_p99_max_ms": 859.308031 + } + }, + "host": { + "samples": 15, + "cpu_some_fraction": 0.56438, + "memory_some_fraction": 0.011997689655172413, + "memory_full_fraction": 0.008962758620689655, + "io_some_fraction": 0.015060655172413792, + "io_full_fraction": 0.003958103448275862, + "min_available_mib": 1191.4453125, + "max_swap_used_mib": 247.6640625 + }, + "postgres": { + "samples": 16, + "max_active": 5, + "max_idle_in_transaction": 7, + "active_wait_observations": { + "Client/ClientRead": 3, + "LWLock/WALWrite": 1, + "no_wait_event/-": 14, + "Lock/transactionid": 1, + "IO/WalSync": 1, + "LWLock/WALInsert": 1 + } + }, + "nginx": { + "samples": 15, + "upstream_changes": 0, + "min_ready": 2, + "max_ready": 2 + }, + "limits_reached": { + "generator_late": false, + "client_capacity": false, + "request_errors": false, + "latency": true + }, + "diagnostics_complete": true + }, + "source_hashes": { + "benchmark": "c83bc5255540c165c10f5495a24c70353e6de36bbd50cdec5e78dfa45bd8aa9e", + "summary": "2569f69fb93db39c9bd3b930d27c06770d57386b73503f983d695bdbfd1d9edc" + } + }, + { + "dataset": "api-cpu", + "variant": "two-small", + "configuration": "two-small", + "manifest": "api-small-growth-20261029", + "label": "two-small-r80-confirmation-21", + "profile": { + "arrival_model": "k6 constant-arrival-rate; one HTTP request per iteration", + "offered_rps": 80, + "duration_seconds": 30, + "warmup_seconds": 10, + "warmup_profile": "same 80/20 workload at target rate", + "read_percent": 80, + "write_percent": 20, + "initial_messages": 30, + "history_limit": 50, + "max_in_flight": 128, + "timeout_ms": 5000, + "automatic_retries": false, + "expected_instances": 2, + "phase": "confirmation" + }, + "measurement": { + "scheduled_slots": 2400, + "client_dropped_slots": 459, + "scheduler_late_slots": 0, + "read": { + "attempted": 1553, + "successful": 1156, + "errors": 397, + "successful_rps": 38.53333333333333, + "successful_latency_ms": { + "p50": 886.5484084999999, + "p95": 3672.3820729999998, + "p99": 4077.9502688500006 + }, + "status_counts": {}, + "error_counts": {}, + "instance_counts": {} + }, + "write": { + "attempted": 388, + "successful": 286, + "errors": 102, + "successful_rps": 9.533333333333333, + "successful_latency_ms": { + "p50": 1591.438888, + "p95": 3752.86014625, + "p99": 4159.082767849998 + }, + "status_counts": {}, + "error_counts": {}, + "instance_counts": {} + }, + "all": { + "attempted": 1941, + "successful": 1442, + "errors": 499, + "successful_rps": 48.06666666666667, + "successful_latency_ms": { + "p50": 1037.0655474999999, + "p95": 3700.5747892000004, + "p99": 4145.45928118 + }, + "status_counts": { + "200": 1156, + "201": 286, + "other": 348, + "network": 151 + }, + "error_counts": {}, + "instance_counts": { + "a6455e4f2e6e": 760, + "94508e170149": 682 + } + } + }, + "timing": { + "measurement_started_epoch_ms": 1793251921398, + "measurement_scheduled_end_epoch_ms": 1793251951398, + "measurement_completed_epoch_ms": 1793251949033 + }, + "client": { + "engine": "k6", + "scheduler_lateness_measured": false, + "raw_dropped_iterations_including_warmup": 546, + "peak_vus": 129, + "max_vus": 128 + }, + "all_latency_ms": { + "p50": 880.3388570000001, + "p95": 5000.846076000001, + "p99": 5012.5568162 + }, + "criterion": { + "delivery_fraction": 0.80875, + "error_fraction": 0.25708397733127253, + "all_request_p95_ms": 5000.846076000001, + "delivery_valid": false, + "slo_pass": false, + "classification": "generator_limited" + }, + "diagnostics": { + "resources": { + "api-1": { + "samples": 31, + "coverage_seconds": 29.177, + "max_sample_gap_seconds": 1.303, + "mean_cpu_cores": 0.3170979881413442, + "throttled_seconds": 7.381507, + "throttled_period_fraction": 0.3867924528301887, + "peak_memory_mib": 213.5234375, + "oom_kills": 0 + }, + "api-2": { + "samples": 30, + "coverage_seconds": 29.508, + "max_sample_gap_seconds": 2.093, + "mean_cpu_cores": 0.30058374000271115, + "throttled_seconds": 8.205326, + "throttled_period_fraction": 0.37777777777777777, + "peak_memory_mib": 207.5859375, + "oom_kills": 0 + }, + "postgres": { + "samples": 15, + "coverage_seconds": 28.0, + "max_sample_gap_seconds": 3.0, + "mean_cpu_cores": 0.3516609642857143, + "throttled_seconds": 0.231139, + "throttled_period_fraction": 0.02364864864864865, + "peak_memory_mib": 273.04296875, + "oom_kills": 0 + }, + "nginx": { + "samples": 14, + "coverage_seconds": 26.0, + "max_sample_gap_seconds": 3.0, + "mean_cpu_cores": 0.13013146153846153, + "throttled_seconds": 0.401791, + "throttled_period_fraction": 0.06741573033707865, + "peak_memory_mib": 12.9765625, + "oom_kills": 0 + }, + "redis": { + "samples": 15, + "coverage_seconds": 27.0, + "max_sample_gap_seconds": 3.0, + "mean_cpu_cores": 0.07257633333333334, + "throttled_seconds": 0.343651, + "throttled_period_fraction": 0.013937282229965157, + "peak_memory_mib": 12.31640625, + "oom_kills": 0 + }, + "generator": { + "samples": 15, + "coverage_seconds": 27.0, + "max_sample_gap_seconds": 3.0, + "mean_cpu_cores": 0.23195422222222223, + "throttled_seconds": 0.0, + "throttled_period_fraction": 0.0, + "peak_memory_mib": 108.3203125, + "oom_kills": 0 + } + }, + "pools": { + "api-1": { + "samples": 31, + "acquisitions": 1725, + "acquisition_errors": 0, + "mean_acquisition_ms": 78.17218664405645, + "max_acquisition_ms": 950.2722860000213, + "max_waiting": 42, + "queued_interval_fraction": 0.3870967741935484, + "max_total": 16, + "observed_connection_increases": 0, + "observed_connection_decreases": 0, + "event_loop_p99_max_ms": 370.671615 + }, + "api-2": { + "samples": 30, + "acquisitions": 1600, + "acquisition_errors": 0, + "mean_acquisition_ms": 103.89893227312474, + "max_acquisition_ms": 1374.4588709999807, + "max_waiting": 38, + "queued_interval_fraction": 0.4, + "max_total": 16, + "observed_connection_increases": 0, + "observed_connection_decreases": 0, + "event_loop_p99_max_ms": 1206.910975 + } + }, + "host": { + "samples": 15, + "cpu_some_fraction": 0.6043923571428571, + "memory_some_fraction": 0.009416035714285714, + "memory_full_fraction": 0.005421392857142857, + "io_some_fraction": 0.019550428571428573, + "io_full_fraction": 0.004051, + "min_available_mib": 1174.94140625, + "max_swap_used_mib": 247.6640625 + }, + "postgres": { + "samples": 16, + "max_active": 10, + "max_idle_in_transaction": 8, + "active_wait_observations": { + "Lock/transactionid": 6, + "no_wait_event/-": 8, + "Client/ClientRead": 1 + } + }, + "nginx": { + "samples": 14, + "upstream_changes": 7, + "min_ready": 0, + "max_ready": 2 + }, + "limits_reached": { + "generator_late": false, + "client_capacity": true, + "request_errors": true, + "latency": true + }, + "diagnostics_complete": true + }, + "source_hashes": { + "benchmark": "a0be6ec4042fd6f8bf714f4a8de9c893bad1f8614fb41c4024fb99ef98f1619e", + "summary": "b186f6a3d93a94e5759f7c9c70123d2bca745b8f9805677ffac26671d48e7a8d" + } + }, + { + "dataset": "api-cpu", + "variant": "two", + "configuration": "two", + "manifest": "api-small-growth-20261029", + "label": "two-r40-confirmation-22", + "profile": { + "arrival_model": "k6 constant-arrival-rate; one HTTP request per iteration", + "offered_rps": 40, + "duration_seconds": 30, + "warmup_seconds": 10, + "warmup_profile": "same 80/20 workload at target rate", + "read_percent": 80, + "write_percent": 20, + "initial_messages": 30, + "history_limit": 50, + "max_in_flight": 128, + "timeout_ms": 5000, + "automatic_retries": false, + "expected_instances": 2, + "phase": "confirmation" + }, + "measurement": { + "scheduled_slots": 1200, + "client_dropped_slots": 0, + "scheduler_late_slots": 0, + "read": { + "attempted": 960, + "successful": 960, + "errors": 0, + "successful_rps": 32, + "successful_latency_ms": { + "p50": 19.56201, + "p95": 662.5630813999999, + "p99": 1318.4142721699995 + }, + "status_counts": {}, + "error_counts": {}, + "instance_counts": {} + }, + "write": { + "attempted": 240, + "successful": 240, + "errors": 0, + "successful_rps": 8, + "successful_latency_ms": { + "p50": 46.667234, + "p95": 1190.8298121999994, + "p99": 2073.8951723499995 + }, + "status_counts": {}, + "error_counts": {}, + "instance_counts": {} + }, + "all": { + "attempted": 1200, + "successful": 1200, + "errors": 0, + "successful_rps": 40, + "successful_latency_ms": { + "p50": 25.912608499999997, + "p95": 776.7075832999998, + "p99": 1450.893997529999 + }, + "status_counts": { + "200": 960, + "201": 240, + "other": 0, + "network": 0 + }, + "error_counts": {}, + "instance_counts": { + "d11039391e3f": 585, + "4db01a2fd57e": 615 + } + } + }, + "timing": { + "measurement_started_epoch_ms": 1793252039092, + "measurement_scheduled_end_epoch_ms": 1793252069092, + "measurement_completed_epoch_ms": 1793252066773 + }, + "client": { + "engine": "k6", + "scheduler_lateness_measured": false, + "raw_dropped_iterations_including_warmup": 0, + "peak_vus": 45, + "max_vus": 128 + }, + "all_latency_ms": { + "p50": 25.912608499999997, + "p95": 776.7075832999998, + "p99": 1450.893997529999 + }, + "criterion": { + "delivery_fraction": 1.0, + "error_fraction": 0.0, + "all_request_p95_ms": 776.7075832999998, + "delivery_valid": true, + "slo_pass": true, + "classification": "pass" + }, + "diagnostics": { + "resources": { + "api-1": { + "samples": 31, + "coverage_seconds": 28.894, + "max_sample_gap_seconds": 1.3, + "mean_cpu_cores": 0.25094815532636533, + "throttled_seconds": 0.116616, + "throttled_period_fraction": 0.0064516129032258064, + "peak_memory_mib": 136.5625, + "oom_kills": 0 + }, + "api-2": { + "samples": 31, + "coverage_seconds": 28.735, + "max_sample_gap_seconds": 1.101, + "mean_cpu_cores": 0.2470229337045415, + "throttled_seconds": 0.210853, + "throttled_period_fraction": 0.003236245954692557, + "peak_memory_mib": 128.7578125, + "oom_kills": 0 + }, + "postgres": { + "samples": 16, + "coverage_seconds": 29.0, + "max_sample_gap_seconds": 3.0, + "mean_cpu_cores": 0.32912351724137934, + "throttled_seconds": 0.123429, + "throttled_period_fraction": 0.030612244897959183, + "peak_memory_mib": 281.47265625, + "oom_kills": 0 + }, + "nginx": { + "samples": 16, + "coverage_seconds": 29.0, + "max_sample_gap_seconds": 3.0, + "mean_cpu_cores": 0.08082465517241379, + "throttled_seconds": 0.226207, + "throttled_period_fraction": 0.023728813559322035, + "peak_memory_mib": 10.7890625, + "oom_kills": 0 + }, + "redis": { + "samples": 15, + "coverage_seconds": 26.0, + "max_sample_gap_seconds": 2.0, + "mean_cpu_cores": 0.05353219230769231, + "throttled_seconds": 0.101791, + "throttled_period_fraction": 0.01060070671378092, + "peak_memory_mib": 11.56640625, + "oom_kills": 0 + }, + "generator": { + "samples": 16, + "coverage_seconds": 28.0, + "max_sample_gap_seconds": 2.0, + "mean_cpu_cores": 0.20346714285714285, + "throttled_seconds": 0.0, + "throttled_period_fraction": 0.0, + "peak_memory_mib": 100.73046875, + "oom_kills": 0 + } + }, + "pools": { + "api-1": { + "samples": 31, + "acquisitions": 993, + "acquisition_errors": 0, + "mean_acquisition_ms": 0.8607491963748352, + "max_acquisition_ms": 88.17715099999623, + "max_waiting": 2, + "queued_interval_fraction": 0.03225806451612903, + "max_total": 16, + "observed_connection_increases": 0, + "observed_connection_decreases": 0, + "event_loop_p99_max_ms": 316.932095 + }, + "api-2": { + "samples": 31, + "acquisitions": 1040, + "acquisition_errors": 0, + "mean_acquisition_ms": 0.6715482326924548, + "max_acquisition_ms": 167.34641600000032, + "max_waiting": 0, + "queued_interval_fraction": 0.0, + "max_total": 16, + "observed_connection_increases": 0, + "observed_connection_decreases": 0, + "event_loop_p99_max_ms": 376.438783 + } + }, + "host": { + "samples": 16, + "cpu_some_fraction": 0.4224538275862069, + "memory_some_fraction": 0.001051, + "memory_full_fraction": 0.00025993103448275864, + "io_some_fraction": 0.011873793103448277, + "io_full_fraction": 0.004439551724137931, + "min_available_mib": 1313.05078125, + "max_swap_used_mib": 247.1640625 + }, + "postgres": { + "samples": 16, + "max_active": 3, + "max_idle_in_transaction": 5, + "active_wait_observations": { + "no_wait_event/-": 15, + "IO/WalSync": 1, + "LWLock/WALWrite": 1 + } + }, + "nginx": { + "samples": 16, + "upstream_changes": 0, + "min_ready": 2, + "max_ready": 2 + }, + "limits_reached": { + "generator_late": false, + "client_capacity": false, + "request_errors": false, + "latency": false + }, + "diagnostics_complete": true + }, + "source_hashes": { + "benchmark": "ec70150b47570066deb419636c64ebc676863e196e703ff586a2e099fea01c97", + "summary": "376bf70d6635338ed0dda4d54bfb57e8b68e89f6c7d800218d534e63c0ef258b" + } + }, + { + "dataset": "api-cpu", + "variant": "two", + "configuration": "two", + "manifest": "api-small-growth-20261029", + "label": "two-r80-confirmation-23", + "profile": { + "arrival_model": "k6 constant-arrival-rate; one HTTP request per iteration", + "offered_rps": 80, + "duration_seconds": 30, + "warmup_seconds": 10, + "warmup_profile": "same 80/20 workload at target rate", + "read_percent": 80, + "write_percent": 20, + "initial_messages": 30, + "history_limit": 50, + "max_in_flight": 128, + "timeout_ms": 5000, + "automatic_retries": false, + "expected_instances": 2, + "phase": "confirmation" + }, + "measurement": { + "scheduled_slots": 2400, + "client_dropped_slots": 72, + "scheduler_late_slots": 0, + "read": { + "attempted": 1863, + "successful": 1863, + "errors": 0, + "successful_rps": 62.1, + "successful_latency_ms": { + "p50": 58.603502999999996, + "p95": 1416.1641305999983, + "p99": 3557.4068273799994 + }, + "status_counts": {}, + "error_counts": {}, + "instance_counts": {} + }, + "write": { + "attempted": 465, + "successful": 465, + "errors": 0, + "successful_rps": 15.5, + "successful_latency_ms": { + "p50": 121.73590499999999, + "p95": 2272.157735399998, + "p99": 4450.598955360001 + }, + "status_counts": {}, + "error_counts": {}, + "instance_counts": {} + }, + "all": { + "attempted": 2328, + "successful": 2328, + "errors": 0, + "successful_rps": 77.6, + "successful_latency_ms": { + "p50": 69.108862, + "p95": 1732.0478621500022, + "p99": 3892.17638994 + }, + "status_counts": { + "200": 1863, + "201": 465, + "other": 0, + "network": 0 + }, + "error_counts": {}, + "instance_counts": { + "4db01a2fd57e": 998, + "d11039391e3f": 1330 + } + } + }, + "timing": { + "measurement_started_epoch_ms": 1793252084957, + "measurement_scheduled_end_epoch_ms": 1793252114957, + "measurement_completed_epoch_ms": 1793252113184 + }, + "client": { + "engine": "k6", + "scheduler_lateness_measured": false, + "raw_dropped_iterations_including_warmup": 66, + "peak_vus": 128, + "max_vus": 128 + }, + "all_latency_ms": { + "p50": 69.108862, + "p95": 1732.0478621500022, + "p99": 3892.17638994 + }, + "criterion": { + "delivery_fraction": 0.97, + "error_fraction": 0.0, + "all_request_p95_ms": 1732.0478621500022, + "delivery_valid": false, + "slo_pass": false, + "classification": "generator_limited" + }, + "diagnostics": { + "resources": { + "api-1": { + "samples": 32, + "coverage_seconds": 29.297, + "max_sample_gap_seconds": 1.209, + "mean_cpu_cores": 0.49616783288391303, + "throttled_seconds": 1.138182, + "throttled_period_fraction": 0.04229607250755287, + "peak_memory_mib": 176.828125, + "oom_kills": 0 + }, + "api-2": { + "samples": 32, + "coverage_seconds": 29.012, + "max_sample_gap_seconds": 1.319, + "mean_cpu_cores": 0.43681318075279196, + "throttled_seconds": 0.502195, + "throttled_period_fraction": 0.03343465045592705, + "peak_memory_mib": 169.2890625, + "oom_kills": 0 + }, + "postgres": { + "samples": 15, + "coverage_seconds": 27.0, + "max_sample_gap_seconds": 3.0, + "mean_cpu_cores": 0.5218088518518519, + "throttled_seconds": 1.419907, + "throttled_period_fraction": 0.09491525423728814, + "peak_memory_mib": 277.859375, + "oom_kills": 0 + }, + "nginx": { + "samples": 16, + "coverage_seconds": 29.0, + "max_sample_gap_seconds": 3.0, + "mean_cpu_cores": 0.1330411724137931, + "throttled_seconds": 0.547722, + "throttled_period_fraction": 0.04487179487179487, + "peak_memory_mib": 11.390625, + "oom_kills": 0 + }, + "redis": { + "samples": 16, + "coverage_seconds": 28.0, + "max_sample_gap_seconds": 2.0, + "mean_cpu_cores": 0.09136721428571429, + "throttled_seconds": 0.420316, + "throttled_period_fraction": 0.0182370820668693, + "peak_memory_mib": 14.6875, + "oom_kills": 0 + }, + "generator": { + "samples": 17, + "coverage_seconds": 28.0, + "max_sample_gap_seconds": 2.0, + "mean_cpu_cores": 0.3503299642857143, + "throttled_seconds": 0.0, + "throttled_period_fraction": 0.0, + "peak_memory_mib": 109.1328125, + "oom_kills": 0 + } + }, + "pools": { + "api-1": { + "samples": 32, + "acquisitions": 2442, + "acquisition_errors": 0, + "mean_acquisition_ms": 51.02331721007393, + "max_acquisition_ms": 2426.692311000006, + "max_waiting": 38, + "queued_interval_fraction": 0.34375, + "max_total": 16, + "observed_connection_increases": 7, + "observed_connection_decreases": 0, + "event_loop_p99_max_ms": 558.366719 + }, + "api-2": { + "samples": 32, + "acquisitions": 1899, + "acquisition_errors": 0, + "mean_acquisition_ms": 57.12761025487102, + "max_acquisition_ms": 2452.5926330000075, + "max_waiting": 44, + "queued_interval_fraction": 0.34375, + "max_total": 16, + "observed_connection_increases": 7, + "observed_connection_decreases": 0, + "event_loop_p99_max_ms": 367.001599 + } + }, + "host": { + "samples": 15, + "cpu_some_fraction": 0.522105962962963, + "memory_some_fraction": 5e-05, + "memory_full_fraction": 3.7037037037037036e-07, + "io_some_fraction": 0.028694333333333332, + "io_full_fraction": 0.008556185185185186, + "min_available_mib": 1232.6015625, + "max_swap_used_mib": 243.6640625 + }, + "postgres": { + "samples": 17, + "max_active": 4, + "max_idle_in_transaction": 17, + "active_wait_observations": { + "no_wait_event/-": 8, + "IO/WalWrite": 1, + "IO/DataFileExtend": 1, + "IO/WalSync": 1, + "Lock/transactionid": 3 + } + }, + "nginx": { + "samples": 16, + "upstream_changes": 2, + "min_ready": 1, + "max_ready": 2 + }, + "limits_reached": { + "generator_late": false, + "client_capacity": false, + "request_errors": false, + "latency": true + }, + "diagnostics_complete": true + }, + "source_hashes": { + "benchmark": "fb03fe6bdb131228fb4f34962f8d9b4a7eb29856e9695ddf9fdd35a7129eaf24", + "summary": "ef88558871db4a7caa155fd7375e3d745488bbd0ce30bd373962a491251cac1c" + } + }, + { + "dataset": "api-cpu", + "variant": "two", + "configuration": "two", + "manifest": "api-small-growth-20261029", + "label": "two-r40-confirmation-24", + "profile": { + "arrival_model": "k6 constant-arrival-rate; one HTTP request per iteration", + "offered_rps": 40, + "duration_seconds": 30, + "warmup_seconds": 10, + "warmup_profile": "same 80/20 workload at target rate", + "read_percent": 80, + "write_percent": 20, + "initial_messages": 30, + "history_limit": 50, + "max_in_flight": 128, + "timeout_ms": 5000, + "automatic_retries": false, + "expected_instances": 2, + "phase": "confirmation" + }, + "measurement": { + "scheduled_slots": 1200, + "client_dropped_slots": 0, + "scheduler_late_slots": 0, + "read": { + "attempted": 961, + "successful": 961, + "errors": 0, + "successful_rps": 32.03333333333333, + "successful_latency_ms": { + "p50": 9.863561, + "p95": 381.005037, + "p99": 814.4727601999997 + }, + "status_counts": {}, + "error_counts": {}, + "instance_counts": {} + }, + "write": { + "attempted": 240, + "successful": 240, + "errors": 0, + "successful_rps": 8, + "successful_latency_ms": { + "p50": 28.527438, + "p95": 656.0217073499996, + "p99": 1168.3423346199977 + }, + "status_counts": {}, + "error_counts": {}, + "instance_counts": {} + }, + "all": { + "attempted": 1201, + "successful": 1201, + "errors": 0, + "successful_rps": 40.03333333333333, + "successful_latency_ms": { + "p50": 13.742251, + "p95": 451.573919, + "p99": 844.77165 + }, + "status_counts": { + "200": 961, + "201": 240, + "other": 0, + "network": 0 + }, + "error_counts": {}, + "instance_counts": { + "4db01a2fd57e": 587, + "d11039391e3f": 614 + } + } + }, + "timing": { + "measurement_started_epoch_ms": 1793252132313, + "measurement_scheduled_end_epoch_ms": 1793252162313, + "measurement_completed_epoch_ms": 1793252160283 + }, + "client": { + "engine": "k6", + "scheduler_lateness_measured": false, + "raw_dropped_iterations_including_warmup": 0, + "peak_vus": 28, + "max_vus": 128 + }, + "all_latency_ms": { + "p50": 13.742251, + "p95": 451.573919, + "p99": 844.77165 + }, + "criterion": { + "delivery_fraction": 1.0008333333333332, + "error_fraction": 0.0, + "all_request_p95_ms": 451.573919, + "delivery_valid": true, + "slo_pass": true, + "classification": "pass" + }, + "diagnostics": { + "resources": { + "api-1": { + "samples": 31, + "coverage_seconds": 28.35, + "max_sample_gap_seconds": 1.098, + "mean_cpu_cores": 0.23189188712522046, + "throttled_seconds": 0.320585, + "throttled_period_fraction": 0.013029315960912053, + "peak_memory_mib": 216.9609375, + "oom_kills": 0 + }, + "api-2": { + "samples": 31, + "coverage_seconds": 28.569, + "max_sample_gap_seconds": 1.222, + "mean_cpu_cores": 0.23974447828065384, + "throttled_seconds": 0.308423, + "throttled_period_fraction": 0.012944983818770227, + "peak_memory_mib": 190.24609375, + "oom_kills": 0 + }, + "postgres": { + "samples": 15, + "coverage_seconds": 27.0, + "max_sample_gap_seconds": 3.0, + "mean_cpu_cores": 0.270069, + "throttled_seconds": 0.21129, + "throttled_period_fraction": 0.03169014084507042, + "peak_memory_mib": 272.84375, + "oom_kills": 0 + }, + "nginx": { + "samples": 16, + "coverage_seconds": 28.0, + "max_sample_gap_seconds": 2.0, + "mean_cpu_cores": 0.09137660714285714, + "throttled_seconds": 0.819458, + "throttled_period_fraction": 0.029900332225913623, + "peak_memory_mib": 9.96875, + "oom_kills": 0 + }, + "redis": { + "samples": 16, + "coverage_seconds": 29.0, + "max_sample_gap_seconds": 3.0, + "mean_cpu_cores": 0.0709783448275862, + "throttled_seconds": 0.464611, + "throttled_period_fraction": 0.02531645569620253, + "peak_memory_mib": 11.6484375, + "oom_kills": 0 + }, + "generator": { + "samples": 15, + "coverage_seconds": 26.0, + "max_sample_gap_seconds": 2.0, + "mean_cpu_cores": 0.19747988461538463, + "throttled_seconds": 0.0, + "throttled_period_fraction": 0.0, + "peak_memory_mib": 97.74609375, + "oom_kills": 0 + } + }, + "pools": { + "api-1": { + "samples": 31, + "acquisitions": 978, + "acquisition_errors": 0, + "mean_acquisition_ms": 1.4155737638039274, + "max_acquisition_ms": 710.0063420000079, + "max_waiting": 0, + "queued_interval_fraction": 0.0, + "max_total": 16, + "observed_connection_increases": 2, + "observed_connection_decreases": 3, + "event_loop_p99_max_ms": 201.719807 + }, + "api-2": { + "samples": 31, + "acquisitions": 959, + "acquisition_errors": 0, + "mean_acquisition_ms": 2.586495384775721, + "max_acquisition_ms": 787.6494320000056, + "max_waiting": 0, + "queued_interval_fraction": 0.0, + "max_total": 16, + "observed_connection_increases": 4, + "observed_connection_decreases": 4, + "event_loop_p99_max_ms": 239.730687 + } + }, + "host": { + "samples": 15, + "cpu_some_fraction": 0.2700871111111111, + "memory_some_fraction": 0.006204481481481482, + "memory_full_fraction": 0.004481962962962963, + "io_some_fraction": 0.013241888888888888, + "io_full_fraction": 0.00812288888888889, + "min_available_mib": 1206.234375, + "max_swap_used_mib": 244.1640625 + }, + "postgres": { + "samples": 16, + "max_active": 1, + "max_idle_in_transaction": 5, + "active_wait_observations": { + "no_wait_event/-": 3 + } + }, + "nginx": { + "samples": 16, + "upstream_changes": 0, + "min_ready": 2, + "max_ready": 2 + }, + "limits_reached": { + "generator_late": false, + "client_capacity": false, + "request_errors": false, + "latency": false + }, + "diagnostics_complete": true + }, + "source_hashes": { + "benchmark": "964f582e35915e1e5da5e46e7dbe325514800080e6d766f813c76cb9f5309d59", + "summary": "187362a3a9e12d422289df625894a9c16860fe37440e0b3aa9d26374e8c00ce4" + } + }, + { + "dataset": "api-cpu", + "variant": "two", + "configuration": "two", + "manifest": "api-small-growth-20261029", + "label": "two-r80-confirmation-25", + "profile": { + "arrival_model": "k6 constant-arrival-rate; one HTTP request per iteration", + "offered_rps": 80, + "duration_seconds": 30, + "warmup_seconds": 10, + "warmup_profile": "same 80/20 workload at target rate", + "read_percent": 80, + "write_percent": 20, + "initial_messages": 30, + "history_limit": 50, + "max_in_flight": 128, + "timeout_ms": 5000, + "automatic_retries": false, + "expected_instances": 2, + "phase": "confirmation" + }, + "measurement": { + "scheduled_slots": 2400, + "client_dropped_slots": 390, + "scheduler_late_slots": 0, + "read": { + "attempted": 1609, + "successful": 1604, + "errors": 5, + "successful_rps": 53.46666666666667, + "successful_latency_ms": { + "p50": 156.55336949999997, + "p95": 3261.1941129999987, + "p99": 4381.849150690002 + }, + "status_counts": {}, + "error_counts": {}, + "instance_counts": {} + }, + "write": { + "attempted": 401, + "successful": 375, + "errors": 26, + "successful_rps": 12.5, + "successful_latency_ms": { + "p50": 249.09276599999998, + "p95": 2546.1460421, + "p99": 3762.626592459999 + }, + "status_counts": {}, + "error_counts": {}, + "instance_counts": {} + }, + "all": { + "attempted": 2010, + "successful": 1979, + "errors": 31, + "successful_rps": 65.96666666666667, + "successful_latency_ms": { + "p50": 171.42565199999999, + "p95": 3153.9972928999987, + "p99": 4344.177250020001 + }, + "status_counts": { + "200": 1604, + "201": 375, + "other": 0, + "network": 31 + }, + "error_counts": {}, + "instance_counts": { + "4db01a2fd57e": 803, + "d11039391e3f": 1176 + } + } + }, + "timing": { + "measurement_started_epoch_ms": 1793252176198, + "measurement_scheduled_end_epoch_ms": 1793252206198, + "measurement_completed_epoch_ms": 1793252203926 + }, + "client": { + "engine": "k6", + "scheduler_lateness_measured": false, + "raw_dropped_iterations_including_warmup": 391, + "peak_vus": 146, + "max_vus": 128 + }, + "all_latency_ms": { + "p50": 181.6638355, + "p95": 3644.38635635, + "p99": 5005.7561646700005 + }, + "criterion": { + "delivery_fraction": 0.8375, + "error_fraction": 0.015422885572139304, + "all_request_p95_ms": 3644.38635635, + "delivery_valid": false, + "slo_pass": false, + "classification": "generator_limited" + }, + "diagnostics": { + "resources": { + "api-1": { + "samples": 30, + "coverage_seconds": 29.284, + "max_sample_gap_seconds": 1.562, + "mean_cpu_cores": 0.49265069662614397, + "throttled_seconds": 1.24513, + "throttled_period_fraction": 0.05379746835443038, + "peak_memory_mib": 259.3125, + "oom_kills": 0 + }, + "api-2": { + "samples": 29, + "coverage_seconds": 28.596, + "max_sample_gap_seconds": 1.676, + "mean_cpu_cores": 0.3916532731850608, + "throttled_seconds": 0.540823, + "throttled_period_fraction": 0.029411764705882353, + "peak_memory_mib": 214.90234375, + "oom_kills": 0 + }, + "postgres": { + "samples": 13, + "coverage_seconds": 26.0, + "max_sample_gap_seconds": 3.0, + "mean_cpu_cores": 0.5575650769230769, + "throttled_seconds": 0.528735, + "throttled_period_fraction": 0.05944055944055944, + "peak_memory_mib": 258.26171875, + "oom_kills": 0 + }, + "nginx": { + "samples": 14, + "coverage_seconds": 28.0, + "max_sample_gap_seconds": 3.0, + "mean_cpu_cores": 0.16773942857142857, + "throttled_seconds": 1.98722, + "throttled_period_fraction": 0.11827956989247312, + "peak_memory_mib": 11.4453125, + "oom_kills": 0 + }, + "redis": { + "samples": 15, + "coverage_seconds": 27.0, + "max_sample_gap_seconds": 3.0, + "mean_cpu_cores": 0.13114774074074073, + "throttled_seconds": 0.348249, + "throttled_period_fraction": 0.036303630363036306, + "peak_memory_mib": 13.79296875, + "oom_kills": 0 + }, + "generator": { + "samples": 14, + "coverage_seconds": 28.0, + "max_sample_gap_seconds": 3.0, + "mean_cpu_cores": 0.40341239285714287, + "throttled_seconds": 0.0, + "throttled_period_fraction": 0.0, + "peak_memory_mib": 107.05859375, + "oom_kills": 0 + } + }, + "pools": { + "api-1": { + "samples": 30, + "acquisitions": 2248, + "acquisition_errors": 0, + "mean_acquisition_ms": 152.3789320391455, + "max_acquisition_ms": 3491.4863750000077, + "max_waiting": 53, + "queued_interval_fraction": 0.3, + "max_total": 16, + "observed_connection_increases": 0, + "observed_connection_decreases": 0, + "event_loop_p99_max_ms": 536.608767 + }, + "api-2": { + "samples": 29, + "acquisitions": 1565, + "acquisition_errors": 0, + "mean_acquisition_ms": 179.1185609233216, + "max_acquisition_ms": 2999.327038999996, + "max_waiting": 42, + "queued_interval_fraction": 0.27586206896551724, + "max_total": 16, + "observed_connection_increases": 0, + "observed_connection_decreases": 0, + "event_loop_p99_max_ms": 1028.128767 + } + }, + "host": { + "samples": 13, + "cpu_some_fraction": 0.5775113076923077, + "memory_some_fraction": 0.03269896153846154, + "memory_full_fraction": 0.013702576923076923, + "io_some_fraction": 0.02365976923076923, + "io_full_fraction": 0.004871, + "min_available_mib": 1132.2109375, + "max_swap_used_mib": 245.921875 + }, + "postgres": { + "samples": 16, + "max_active": 17, + "max_idle_in_transaction": 11, + "active_wait_observations": { + "no_wait_event/-": 28, + "Lock/transactionid": 2, + "Client/ClientRead": 1, + "IO/WalSync": 1 + } + }, + "nginx": { + "samples": 14, + "upstream_changes": 2, + "min_ready": 1, + "max_ready": 2 + }, + "limits_reached": { + "generator_late": false, + "client_capacity": true, + "request_errors": true, + "latency": true + }, + "diagnostics_complete": true + }, + "source_hashes": { + "benchmark": "1f238a66991fde40de9d8c9263a26b2a5de25225656eedb3e2e1456c4d5600be", + "summary": "e947f42bef3a93d04d6004789538723bc5fca6b98ad3f08d2cc672aa35b59afd" + } + }, + { + "dataset": "api-cpu", + "variant": "two", + "configuration": "two", + "manifest": "api-small-growth-20261029", + "label": "two-r40-confirmation-26", + "profile": { + "arrival_model": "k6 constant-arrival-rate; one HTTP request per iteration", + "offered_rps": 40, + "duration_seconds": 30, + "warmup_seconds": 10, + "warmup_profile": "same 80/20 workload at target rate", + "read_percent": 80, + "write_percent": 20, + "initial_messages": 30, + "history_limit": 50, + "max_in_flight": 128, + "timeout_ms": 5000, + "automatic_retries": false, + "expected_instances": 2, + "phase": "confirmation" + }, + "measurement": { + "scheduled_slots": 1200, + "client_dropped_slots": 0, + "scheduler_late_slots": 0, + "read": { + "attempted": 960, + "successful": 960, + "errors": 0, + "successful_rps": 32, + "successful_latency_ms": { + "p50": 15.9329295, + "p95": 363.84156504999993, + "p99": 623.9190440999998 + }, + "status_counts": {}, + "error_counts": {}, + "instance_counts": {} + }, + "write": { + "attempted": 240, + "successful": 240, + "errors": 0, + "successful_rps": 8, + "successful_latency_ms": { + "p50": 41.8288085, + "p95": 592.4278888999999, + "p99": 813.0514136999988 + }, + "status_counts": {}, + "error_counts": {}, + "instance_counts": {} + }, + "all": { + "attempted": 1200, + "successful": 1200, + "errors": 0, + "successful_rps": 40, + "successful_latency_ms": { + "p50": 20.1536085, + "p95": 404.04996024999986, + "p99": 675.41993862 + }, + "status_counts": { + "200": 960, + "201": 240, + "other": 0, + "network": 0 + }, + "error_counts": {}, + "instance_counts": { + "4db01a2fd57e": 582, + "d11039391e3f": 618 + } + } + }, + "timing": { + "measurement_started_epoch_ms": 1793252225140, + "measurement_scheduled_end_epoch_ms": 1793252255140, + "measurement_completed_epoch_ms": 1793252252838 + }, + "client": { + "engine": "k6", + "scheduler_lateness_measured": false, + "raw_dropped_iterations_including_warmup": 0, + "peak_vus": 25, + "max_vus": 128 + }, + "all_latency_ms": { + "p50": 20.1536085, + "p95": 404.04996024999986, + "p99": 675.41993862 + }, + "criterion": { + "delivery_fraction": 1.0, + "error_fraction": 0.0, + "all_request_p95_ms": 404.04996024999986, + "delivery_valid": true, + "slo_pass": true, + "classification": "pass" + }, + "diagnostics": { + "resources": { + "api-1": { + "samples": 34, + "coverage_seconds": 29.246, + "max_sample_gap_seconds": 1.09, + "mean_cpu_cores": 0.24242939205361416, + "throttled_seconds": 0.239121, + "throttled_period_fraction": 0.017857142857142856, + "peak_memory_mib": 261.99609375, + "oom_kills": 0 + }, + "api-2": { + "samples": 32, + "coverage_seconds": 28.64, + "max_sample_gap_seconds": 1.11, + "mean_cpu_cores": 0.25003233240223466, + "throttled_seconds": 0.417383, + "throttled_period_fraction": 0.006060606060606061, + "peak_memory_mib": 236.21875, + "oom_kills": 0 + }, + "postgres": { + "samples": 15, + "coverage_seconds": 27.0, + "max_sample_gap_seconds": 3.0, + "mean_cpu_cores": 0.300782962962963, + "throttled_seconds": 1.044279, + "throttled_period_fraction": 0.045454545454545456, + "peak_memory_mib": 256.08984375, + "oom_kills": 0 + }, + "nginx": { + "samples": 16, + "coverage_seconds": 29.0, + "max_sample_gap_seconds": 3.0, + "mean_cpu_cores": 0.09739820689655172, + "throttled_seconds": 0.488799, + "throttled_period_fraction": 0.04220779220779221, + "peak_memory_mib": 10.00390625, + "oom_kills": 0 + }, + "redis": { + "samples": 15, + "coverage_seconds": 27.0, + "max_sample_gap_seconds": 3.0, + "mean_cpu_cores": 0.076873, + "throttled_seconds": 0.341071, + "throttled_period_fraction": 0.013745704467353952, + "peak_memory_mib": 11.93359375, + "oom_kills": 0 + }, + "generator": { + "samples": 16, + "coverage_seconds": 28.0, + "max_sample_gap_seconds": 2.0, + "mean_cpu_cores": 0.29306510714285716, + "throttled_seconds": 0.0, + "throttled_period_fraction": 0.0, + "peak_memory_mib": 101.02734375, + "oom_kills": 0 + } + }, + "pools": { + "api-1": { + "samples": 34, + "acquisitions": 1008, + "acquisition_errors": 0, + "mean_acquisition_ms": 0.26122824702386943, + "max_acquisition_ms": 24.347486000013305, + "max_waiting": 0, + "queued_interval_fraction": 0.0, + "max_total": 16, + "observed_connection_increases": 0, + "observed_connection_decreases": 4, + "event_loop_p99_max_ms": 164.233215 + }, + "api-2": { + "samples": 32, + "acquisitions": 962, + "acquisition_errors": 0, + "mean_acquisition_ms": 0.2806983856554966, + "max_acquisition_ms": 87.29801299999235, + "max_waiting": 0, + "queued_interval_fraction": 0.0, + "max_total": 16, + "observed_connection_increases": 0, + "observed_connection_decreases": 3, + "event_loop_p99_max_ms": 214.695935 + } + }, + "host": { + "samples": 15, + "cpu_some_fraction": 0.39647848148148146, + "memory_some_fraction": 0.004512148148148148, + "memory_full_fraction": 0.002501666666666667, + "io_some_fraction": 0.020343407407407407, + "io_full_fraction": 0.007891444444444444, + "min_available_mib": 1128.20703125, + "max_swap_used_mib": 245.921875 + }, + "postgres": { + "samples": 18, + "max_active": 9, + "max_idle_in_transaction": 4, + "active_wait_observations": { + "no_wait_event/-": 12, + "LWLock/WALWrite": 1 + } + }, + "nginx": { + "samples": 16, + "upstream_changes": 0, + "min_ready": 2, + "max_ready": 2 + }, + "limits_reached": { + "generator_late": false, + "client_capacity": false, + "request_errors": false, + "latency": false + }, + "diagnostics_complete": true + }, + "source_hashes": { + "benchmark": "e0dc63cda8bf095184f42bb576ff84f694dd8e4d46e99d78c4f1a2449214878c", + "summary": "085defdb7f27d40f0bd6c8e84c64b9636571b7a0b8bf0b782f1df9feb3fabdc2" + } + }, + { + "dataset": "api-cpu", + "variant": "two", + "configuration": "two", + "manifest": "api-small-growth-20261029", + "label": "two-r80-confirmation-27", + "profile": { + "arrival_model": "k6 constant-arrival-rate; one HTTP request per iteration", + "offered_rps": 80, + "duration_seconds": 30, + "warmup_seconds": 10, + "warmup_profile": "same 80/20 workload at target rate", + "read_percent": 80, + "write_percent": 20, + "initial_messages": 30, + "history_limit": 50, + "max_in_flight": 128, + "timeout_ms": 5000, + "automatic_retries": false, + "expected_instances": 2, + "phase": "confirmation" + }, + "measurement": { + "scheduled_slots": 2400, + "client_dropped_slots": 0, + "scheduler_late_slots": 0, + "read": { + "attempted": 1920, + "successful": 1920, + "errors": 0, + "successful_rps": 64, + "successful_latency_ms": { + "p50": 12.974248499999998, + "p95": 308.38232399999987, + "p99": 578.8864745199995 + }, + "status_counts": {}, + "error_counts": {}, + "instance_counts": {} + }, + "write": { + "attempted": 480, + "successful": 480, + "errors": 0, + "successful_rps": 16, + "successful_latency_ms": { + "p50": 35.5593785, + "p95": 576.3110122999998, + "p99": 828.3826895099985 + }, + "status_counts": {}, + "error_counts": {}, + "instance_counts": {} + }, + "all": { + "attempted": 2400, + "successful": 2400, + "errors": 0, + "successful_rps": 80, + "successful_latency_ms": { + "p50": 18.8891145, + "p95": 372.4251258499997, + "p99": 658.5146975299939 + }, + "status_counts": { + "200": 1920, + "201": 480, + "other": 0, + "network": 0 + }, + "error_counts": {}, + "instance_counts": { + "4db01a2fd57e": 1193, + "d11039391e3f": 1207 + } + } + }, + "timing": { + "measurement_started_epoch_ms": 1793252266282, + "measurement_scheduled_end_epoch_ms": 1793252296282, + "measurement_completed_epoch_ms": 1793252294250 + }, + "client": { + "engine": "k6", + "scheduler_lateness_measured": false, + "raw_dropped_iterations_including_warmup": 12, + "peak_vus": 93, + "max_vus": 128 + }, + "all_latency_ms": { + "p50": 18.8891145, + "p95": 372.4251258499997, + "p99": 658.5146975299939 + }, + "criterion": { + "delivery_fraction": 1.0, + "error_fraction": 0.0, + "all_request_p95_ms": 372.4251258499997, + "delivery_valid": true, + "slo_pass": true, + "classification": "pass" + }, + "diagnostics": { + "resources": { + "api-1": { + "samples": 31, + "coverage_seconds": 28.513, + "max_sample_gap_seconds": 1.098, + "mean_cpu_cores": 0.3293300249009224, + "throttled_seconds": 0.244449, + "throttled_period_fraction": 0.00980392156862745, + "peak_memory_mib": 265.03125, + "oom_kills": 0 + }, + "api-2": { + "samples": 31, + "coverage_seconds": 28.574, + "max_sample_gap_seconds": 1.166, + "mean_cpu_cores": 0.3352930986211241, + "throttled_seconds": 0.336818, + "throttled_period_fraction": 0.012944983818770227, + "peak_memory_mib": 237.203125, + "oom_kills": 0 + }, + "postgres": { + "samples": 16, + "coverage_seconds": 28.0, + "max_sample_gap_seconds": 2.0, + "mean_cpu_cores": 0.3887145, + "throttled_seconds": 0.299737, + "throttled_period_fraction": 0.03678929765886288, + "peak_memory_mib": 260.2265625, + "oom_kills": 0 + }, + "nginx": { + "samples": 16, + "coverage_seconds": 28.0, + "max_sample_gap_seconds": 2.0, + "mean_cpu_cores": 0.09689082142857143, + "throttled_seconds": 0.25539, + "throttled_period_fraction": 0.013513513513513514, + "peak_memory_mib": 10.1953125, + "oom_kills": 0 + }, + "redis": { + "samples": 15, + "coverage_seconds": 27.0, + "max_sample_gap_seconds": 3.0, + "mean_cpu_cores": 0.062793, + "throttled_seconds": 0.028162, + "throttled_period_fraction": 0.01048951048951049, + "peak_memory_mib": 14.79296875, + "oom_kills": 0 + }, + "generator": { + "samples": 16, + "coverage_seconds": 28.0, + "max_sample_gap_seconds": 3.0, + "mean_cpu_cores": 0.28253825, + "throttled_seconds": 0.0, + "throttled_period_fraction": 0.0, + "peak_memory_mib": 109.7265625, + "oom_kills": 0 + } + }, + "pools": { + "api-1": { + "samples": 31, + "acquisitions": 2014, + "acquisition_errors": 0, + "mean_acquisition_ms": 0.23264392502517475, + "max_acquisition_ms": 32.96904399996856, + "max_waiting": 0, + "queued_interval_fraction": 0.0, + "max_total": 16, + "observed_connection_increases": 0, + "observed_connection_decreases": 0, + "event_loop_p99_max_ms": 359.137279 + }, + "api-2": { + "samples": 31, + "acquisitions": 1967, + "acquisition_errors": 0, + "mean_acquisition_ms": 0.36896297813939566, + "max_acquisition_ms": 56.036556000006385, + "max_waiting": 0, + "queued_interval_fraction": 0.0, + "max_total": 16, + "observed_connection_increases": 0, + "observed_connection_decreases": 0, + "event_loop_p99_max_ms": 200.802303 + } + }, + "host": { + "samples": 16, + "cpu_some_fraction": 0.4285142142857143, + "memory_some_fraction": 0.007742214285714285, + "memory_full_fraction": 0.0043155357142857145, + "io_some_fraction": 0.018410285714285716, + "io_full_fraction": 0.007106428571428572, + "min_available_mib": 1115.7421875, + "max_swap_used_mib": 245.921875 + }, + "postgres": { + "samples": 16, + "max_active": 3, + "max_idle_in_transaction": 5, + "active_wait_observations": { + "no_wait_event/-": 13, + "IO/WalSync": 1 + } + }, + "nginx": { + "samples": 16, + "upstream_changes": 0, + "min_ready": 2, + "max_ready": 2 + }, + "limits_reached": { + "generator_late": false, + "client_capacity": false, + "request_errors": false, + "latency": false + }, + "diagnostics_complete": true + }, + "source_hashes": { + "benchmark": "24591b79ad2ded9377c6c693f580109595902242436f0ac75c614f433d950c39", + "summary": "6ae1d8564c900e8caf0ce4e4bd4eef5f0575dbf3ae562ab0867a049e9bb782f9" + } + }, + { + "dataset": "api-cpu", + "variant": "four-small", + "configuration": "four-small", + "manifest": "api-small-growth-20261029", + "label": "four-small-r40-confirmation-28", + "profile": { + "arrival_model": "k6 constant-arrival-rate; one HTTP request per iteration", + "offered_rps": 40, + "duration_seconds": 30, + "warmup_seconds": 10, + "warmup_profile": "same 80/20 workload at target rate", + "read_percent": 80, + "write_percent": 20, + "initial_messages": 30, + "history_limit": 50, + "max_in_flight": 128, + "timeout_ms": 5000, + "automatic_retries": false, + "expected_instances": 4, + "phase": "confirmation" + }, + "measurement": { + "scheduled_slots": 1200, + "client_dropped_slots": 57, + "scheduler_late_slots": 0, + "read": { + "attempted": 915, + "successful": 752, + "errors": 163, + "successful_rps": 25.066666666666666, + "successful_latency_ms": { + "p50": 524.840838, + "p95": 4480.976897, + "p99": 4845.5064120100005 + }, + "status_counts": {}, + "error_counts": {}, + "instance_counts": {} + }, + "write": { + "attempted": 228, + "successful": 178, + "errors": 50, + "successful_rps": 5.933333333333334, + "successful_latency_ms": { + "p50": 955.6234910000001, + "p95": 4679.79018205, + "p99": 4884.41159064 + }, + "status_counts": {}, + "error_counts": {}, + "instance_counts": {} + }, + "all": { + "attempted": 1143, + "successful": 930, + "errors": 213, + "successful_rps": 31, + "successful_latency_ms": { + "p50": 563.57299, + "p95": 4513.76266625, + "p99": 4855.86492899 + }, + "status_counts": { + "200": 752, + "201": 178, + "other": 148, + "network": 65 + }, + "error_counts": {}, + "instance_counts": { + "b71829058bf4": 250, + "00f08e33f8a4": 181, + "40355cd63513": 207, + "0578dc6a443b": 292 + } + } + }, + "timing": { + "measurement_started_epoch_ms": 1793252419229, + "measurement_scheduled_end_epoch_ms": 1793252449229, + "measurement_completed_epoch_ms": 1793252447904 + }, + "client": { + "engine": "k6", + "scheduler_lateness_measured": false, + "raw_dropped_iterations_including_warmup": 140, + "peak_vus": 155, + "max_vus": 128 + }, + "all_latency_ms": { + "p50": 517.787028, + "p95": 5002.5158862, + "p99": 5349.34200524 + }, + "criterion": { + "delivery_fraction": 0.9525, + "error_fraction": 0.18635170603674542, + "all_request_p95_ms": 5002.5158862, + "delivery_valid": false, + "slo_pass": false, + "classification": "generator_limited" + }, + "diagnostics": { + "resources": { + "api-1": { + "samples": 30, + "coverage_seconds": 28.22, + "max_sample_gap_seconds": 1.731, + "mean_cpu_cores": 0.17692498228206946, + "throttled_seconds": 13.1872, + "throttled_period_fraction": 0.4774193548387097, + "peak_memory_mib": 106.046875, + "oom_kills": 0 + }, + "api-2": { + "samples": 29, + "coverage_seconds": 29.097, + "max_sample_gap_seconds": 1.705, + "mean_cpu_cores": 0.1928482317764718, + "throttled_seconds": 16.063031, + "throttled_period_fraction": 0.5811688311688312, + "peak_memory_mib": 100.83984375, + "oom_kills": 0 + }, + "api-3": { + "samples": 31, + "coverage_seconds": 28.659, + "max_sample_gap_seconds": 1.709, + "mean_cpu_cores": 0.16060057922467635, + "throttled_seconds": 15.355149, + "throttled_period_fraction": 0.45, + "peak_memory_mib": 101.11328125, + "oom_kills": 0 + }, + "api-4": { + "samples": 30, + "coverage_seconds": 28.64, + "max_sample_gap_seconds": 1.738, + "mean_cpu_cores": 0.20550146648044693, + "throttled_seconds": 17.991186, + "throttled_period_fraction": 0.5443425076452599, + "peak_memory_mib": 101.2109375, + "oom_kills": 0 + }, + "postgres": { + "samples": 15, + "coverage_seconds": 28.0, + "max_sample_gap_seconds": 3.0, + "mean_cpu_cores": 0.32318432142857145, + "throttled_seconds": 0.181899, + "throttled_period_fraction": 0.013745704467353952, + "peak_memory_mib": 257.17578125, + "oom_kills": 0 + }, + "nginx": { + "samples": 14, + "coverage_seconds": 27.0, + "max_sample_gap_seconds": 3.0, + "mean_cpu_cores": 0.13090744444444444, + "throttled_seconds": 1.623067, + "throttled_period_fraction": 0.07777777777777778, + "peak_memory_mib": 12.6640625, + "oom_kills": 0 + }, + "redis": { + "samples": 17, + "coverage_seconds": 29.0, + "max_sample_gap_seconds": 3.0, + "mean_cpu_cores": 0.08201893103448275, + "throttled_seconds": 0.233949, + "throttled_period_fraction": 0.021212121212121213, + "peak_memory_mib": 11.65625, + "oom_kills": 0 + }, + "generator": { + "samples": 17, + "coverage_seconds": 29.0, + "max_sample_gap_seconds": 3.0, + "mean_cpu_cores": 0.30795093103448273, + "throttled_seconds": 0.0, + "throttled_period_fraction": 0.0, + "peak_memory_mib": 99.02734375, + "oom_kills": 0 + } + }, + "pools": { + "api-1": { + "samples": 30, + "acquisitions": 464, + "acquisition_errors": 3, + "mean_acquisition_ms": 66.44158999568982, + "max_acquisition_ms": 1687.3913330000069, + "max_waiting": 3, + "queued_interval_fraction": 0.26666666666666666, + "max_total": 8, + "observed_connection_increases": 1, + "observed_connection_decreases": 1, + "event_loop_p99_max_ms": 3454.009343 + }, + "api-2": { + "samples": 29, + "acquisitions": 578, + "acquisition_errors": 5, + "mean_acquisition_ms": 121.88036597404827, + "max_acquisition_ms": 7713.336667999989, + "max_waiting": 11, + "queued_interval_fraction": 0.2413793103448276, + "max_total": 8, + "observed_connection_increases": 0, + "observed_connection_decreases": 0, + "event_loop_p99_max_ms": 1299.185663 + }, + "api-3": { + "samples": 31, + "acquisitions": 462, + "acquisition_errors": 0, + "mean_acquisition_ms": 85.67717304978345, + "max_acquisition_ms": 2601.5335369999957, + "max_waiting": 15, + "queued_interval_fraction": 0.2903225806451613, + "max_total": 8, + "observed_connection_increases": 0, + "observed_connection_decreases": 0, + "event_loop_p99_max_ms": 1022.361599 + }, + "api-4": { + "samples": 30, + "acquisitions": 631, + "acquisition_errors": 1, + "mean_acquisition_ms": 47.33656948969903, + "max_acquisition_ms": 7659.207901999995, + "max_waiting": 6, + "queued_interval_fraction": 0.23333333333333334, + "max_total": 8, + "observed_connection_increases": 0, + "observed_connection_decreases": 0, + "event_loop_p99_max_ms": 1380.974591 + } + }, + "host": { + "samples": 15, + "cpu_some_fraction": 0.6594500357142857, + "memory_some_fraction": 0.008430642857142857, + "memory_full_fraction": 0.006713035714285714, + "io_some_fraction": 0.018092214285714284, + "io_full_fraction": 0.002925857142857143, + "min_available_mib": 1159.546875, + "max_swap_used_mib": 248.6875 + }, + "postgres": { + "samples": 17, + "max_active": 6, + "max_idle_in_transaction": 8, + "active_wait_observations": { + "Client/ClientRead": 1, + "no_wait_event/-": 13, + "IO/WalSync": 1, + "Lock/transactionid": 1, + "LWLock/BufferContent": 1 + } + }, + "nginx": { + "samples": 14, + "upstream_changes": 5, + "min_ready": 0, + "max_ready": 4 + }, + "limits_reached": { + "generator_late": false, + "client_capacity": false, + "request_errors": true, + "latency": true + }, + "diagnostics_complete": true + }, + "source_hashes": { + "benchmark": "679cc936b8f203bc5324ca684c5bf9dac148d4148c543448409fc334954d15c3", + "summary": "9097713b059295923e460498e1519d64b8e29eb50ea332f3cae499548f611de8" + } + }, + { + "dataset": "api-cpu", + "variant": "four-small", + "configuration": "four-small", + "manifest": "api-small-growth-20261029", + "label": "four-small-r80-confirmation-29", + "profile": { + "arrival_model": "k6 constant-arrival-rate; one HTTP request per iteration", + "offered_rps": 80, + "duration_seconds": 30, + "warmup_seconds": 10, + "warmup_profile": "same 80/20 workload at target rate", + "read_percent": 80, + "write_percent": 20, + "initial_messages": 30, + "history_limit": 50, + "max_in_flight": 128, + "timeout_ms": 5000, + "automatic_retries": false, + "expected_instances": 4, + "phase": "confirmation" + }, + "measurement": { + "scheduled_slots": 2400, + "client_dropped_slots": 895, + "scheduler_late_slots": 0, + "read": { + "attempted": 1204, + "successful": 1066, + "errors": 138, + "successful_rps": 35.53333333333333, + "successful_latency_ms": { + "p50": 1445.8616415000001, + "p95": 4254.5988105, + "p99": 4776.261453799999 + }, + "status_counts": {}, + "error_counts": {}, + "instance_counts": {} + }, + "write": { + "attempted": 301, + "successful": 220, + "errors": 81, + "successful_rps": 7.333333333333333, + "successful_latency_ms": { + "p50": 2280.298056, + "p95": 4598.4033868999995, + "p99": 4866.04326458 + }, + "status_counts": {}, + "error_counts": {}, + "instance_counts": {} + }, + "all": { + "attempted": 1505, + "successful": 1286, + "errors": 219, + "successful_rps": 42.86666666666667, + "successful_latency_ms": { + "p50": 1625.0898905, + "p95": 4334.39354775, + "p99": 4838.7090065 + }, + "status_counts": { + "200": 1066, + "201": 220, + "other": 0, + "network": 219 + }, + "error_counts": {}, + "instance_counts": { + "0578dc6a443b": 179, + "40355cd63513": 409, + "00f08e33f8a4": 409, + "b71829058bf4": 289 + } + } + }, + "timing": { + "measurement_started_epoch_ms": 1793252492376, + "measurement_scheduled_end_epoch_ms": 1793252522376, + "measurement_completed_epoch_ms": 1793252522492 + }, + "client": { + "engine": "k6", + "scheduler_lateness_measured": false, + "raw_dropped_iterations_including_warmup": 1158, + "peak_vus": 156, + "max_vus": 128 + }, + "all_latency_ms": { + "p50": 1906.8484019999999, + "p95": 5011.016073, + "p99": 5060.0643933599995 + }, + "criterion": { + "delivery_fraction": 0.6270833333333333, + "error_fraction": 0.14551495016611296, + "all_request_p95_ms": 5011.016073, + "delivery_valid": false, + "slo_pass": false, + "classification": "generator_limited" + }, + "diagnostics": { + "resources": { + "api-1": { + "samples": 28, + "coverage_seconds": 28.787, + "max_sample_gap_seconds": 1.559, + "mean_cpu_cores": 0.21728203703060409, + "throttled_seconds": 16.210865, + "throttled_period_fraction": 0.6503267973856209, + "peak_memory_mib": 131.23828125, + "oom_kills": 0 + }, + "api-2": { + "samples": 27, + "coverage_seconds": 28.608, + "max_sample_gap_seconds": 1.787, + "mean_cpu_cores": 0.20943578719239372, + "throttled_seconds": 14.553242, + "throttled_period_fraction": 0.6402640264026402, + "peak_memory_mib": 125.99609375, + "oom_kills": 0 + }, + "api-3": { + "samples": 27, + "coverage_seconds": 28.705, + "max_sample_gap_seconds": 2.146, + "mean_cpu_cores": 0.2006682459501829, + "throttled_seconds": 18.087834, + "throttled_period_fraction": 0.5986842105263158, + "peak_memory_mib": 125.1953125, + "oom_kills": 0 + }, + "api-4": { + "samples": 29, + "coverage_seconds": 29.752, + "max_sample_gap_seconds": 2.929, + "mean_cpu_cores": 0.17776989782199515, + "throttled_seconds": 18.510991, + "throttled_period_fraction": 0.535483870967742, + "peak_memory_mib": 124.43359375, + "oom_kills": 0 + }, + "postgres": { + "samples": 15, + "coverage_seconds": 29.0, + "max_sample_gap_seconds": 3.0, + "mean_cpu_cores": 0.4044294482758621, + "throttled_seconds": 0.429459, + "throttled_period_fraction": 0.04113924050632911, + "peak_memory_mib": 244.546875, + "oom_kills": 0 + }, + "nginx": { + "samples": 15, + "coverage_seconds": 29.0, + "max_sample_gap_seconds": 3.0, + "mean_cpu_cores": 0.1281921724137931, + "throttled_seconds": 0.513224, + "throttled_period_fraction": 0.039603960396039604, + "peak_memory_mib": 12.69921875, + "oom_kills": 0 + }, + "redis": { + "samples": 15, + "coverage_seconds": 29.0, + "max_sample_gap_seconds": 3.0, + "mean_cpu_cores": 0.09697710344827586, + "throttled_seconds": 0.344171, + "throttled_period_fraction": 0.02912621359223301, + "peak_memory_mib": 12.171875, + "oom_kills": 0 + }, + "generator": { + "samples": 15, + "coverage_seconds": 29.0, + "max_sample_gap_seconds": 4.0, + "mean_cpu_cores": 0.3084668275862069, + "throttled_seconds": 0.0, + "throttled_period_fraction": 0.0, + "peak_memory_mib": 102.77734375, + "oom_kills": 0 + } + }, + "pools": { + "api-1": { + "samples": 28, + "acquisitions": 897, + "acquisition_errors": 0, + "mean_acquisition_ms": 321.7534509163877, + "max_acquisition_ms": 3579.5382080000127, + "max_waiting": 28, + "queued_interval_fraction": 0.8214285714285714, + "max_total": 8, + "observed_connection_increases": 0, + "observed_connection_decreases": 0, + "event_loop_p99_max_ms": 1081.081855 + }, + "api-2": { + "samples": 27, + "acquisitions": 700, + "acquisition_errors": 0, + "mean_acquisition_ms": 115.90381067999893, + "max_acquisition_ms": 5692.456928, + "max_waiting": 27, + "queued_interval_fraction": 0.6296296296296297, + "max_total": 8, + "observed_connection_increases": 0, + "observed_connection_decreases": 0, + "event_loop_p99_max_ms": 1323.302911 + }, + "api-3": { + "samples": 27, + "acquisitions": 880, + "acquisition_errors": 0, + "mean_acquisition_ms": 365.7295861511366, + "max_acquisition_ms": 2263.7905969999847, + "max_waiting": 34, + "queued_interval_fraction": 0.7777777777777778, + "max_total": 8, + "observed_connection_increases": 0, + "observed_connection_decreases": 0, + "event_loop_p99_max_ms": 1869.611007 + }, + "api-4": { + "samples": 29, + "acquisitions": 703, + "acquisition_errors": 0, + "mean_acquisition_ms": 329.57686050213437, + "max_acquisition_ms": 5098.970216000016, + "max_waiting": 30, + "queued_interval_fraction": 0.4482758620689655, + "max_total": 8, + "observed_connection_increases": 0, + "observed_connection_decreases": 0, + "event_loop_p99_max_ms": 2325.741567 + } + }, + "host": { + "samples": 15, + "cpu_some_fraction": 0.8387952413793104, + "memory_some_fraction": 0.009903517241379311, + "memory_full_fraction": 0.0062041034482758625, + "io_some_fraction": 0.02398158620689655, + "io_full_fraction": 0.0027211724137931035, + "min_available_mib": 1110.44921875, + "max_swap_used_mib": 252.453125 + }, + "postgres": { + "samples": 16, + "max_active": 7, + "max_idle_in_transaction": 10, + "active_wait_observations": { + "Client/ClientRead": 1, + "Lock/transactionid": 17, + "no_wait_event/-": 22, + "LWLock/WALWrite": 1 + } + }, + "nginx": { + "samples": 15, + "upstream_changes": 5, + "min_ready": 1, + "max_ready": 4 + }, + "limits_reached": { + "generator_late": false, + "client_capacity": true, + "request_errors": true, + "latency": true + }, + "diagnostics_complete": true + }, + "source_hashes": { + "benchmark": "bceef8a6af18208fb970ae619db0b2ee08895d6d799a46e39f681944b6752d2a", + "summary": "3c9e9d9e4ea68b3308d1b7cd625d79b9e8ae7b981c3b165613c1cc0742c6a508" + } + }, + { + "dataset": "api-cpu", + "variant": "four-small", + "configuration": "four-small", + "manifest": "api-small-growth-20261029", + "label": "four-small-r40-confirmation-30", + "profile": { + "arrival_model": "k6 constant-arrival-rate; one HTTP request per iteration", + "offered_rps": 40, + "duration_seconds": 30, + "warmup_seconds": 10, + "warmup_profile": "same 80/20 workload at target rate", + "read_percent": 80, + "write_percent": 20, + "initial_messages": 30, + "history_limit": 50, + "max_in_flight": 128, + "timeout_ms": 5000, + "automatic_retries": false, + "expected_instances": 4, + "phase": "confirmation" + }, + "measurement": { + "scheduled_slots": 1200, + "client_dropped_slots": 0, + "scheduler_late_slots": 0, + "read": { + "attempted": 961, + "successful": 961, + "errors": 0, + "successful_rps": 32.03333333333333, + "successful_latency_ms": { + "p50": 11.830629, + "p95": 557.2598929999999, + "p99": 1206.6997307999998 + }, + "status_counts": {}, + "error_counts": {}, + "instance_counts": {} + }, + "write": { + "attempted": 240, + "successful": 240, + "errors": 0, + "successful_rps": 8, + "successful_latency_ms": { + "p50": 33.902486499999995, + "p95": 831.5955444999965, + "p99": 1546.1329273999995 + }, + "status_counts": {}, + "error_counts": {}, + "instance_counts": {} + }, + "all": { + "attempted": 1201, + "successful": 1201, + "errors": 0, + "successful_rps": 40.03333333333333, + "successful_latency_ms": { + "p50": 16.783684, + "p95": 664.626691, + "p99": 1316.7376120000001 + }, + "status_counts": { + "200": 961, + "201": 240, + "other": 0, + "network": 0 + }, + "error_counts": {}, + "instance_counts": { + "b71829058bf4": 306, + "0578dc6a443b": 285, + "00f08e33f8a4": 315, + "40355cd63513": 295 + } + } + }, + "timing": { + "measurement_started_epoch_ms": 1793252544514, + "measurement_scheduled_end_epoch_ms": 1793252574514, + "measurement_completed_epoch_ms": 1793252573008 + }, + "client": { + "engine": "k6", + "scheduler_lateness_measured": false, + "raw_dropped_iterations_including_warmup": 0, + "peak_vus": 41, + "max_vus": 128 + }, + "all_latency_ms": { + "p50": 16.783684, + "p95": 664.626691, + "p99": 1316.7376120000001 + }, + "criterion": { + "delivery_fraction": 1.0008333333333332, + "error_fraction": 0.0, + "all_request_p95_ms": 664.626691, + "delivery_valid": true, + "slo_pass": true, + "classification": "pass" + }, + "diagnostics": { + "resources": { + "api-1": { + "samples": 31, + "coverage_seconds": 29.316, + "max_sample_gap_seconds": 1.466, + "mean_cpu_cores": 0.14005843225542366, + "throttled_seconds": 8.955373, + "throttled_period_fraction": 0.21587301587301588, + "peak_memory_mib": 147.875, + "oom_kills": 0 + }, + "api-2": { + "samples": 31, + "coverage_seconds": 28.95, + "max_sample_gap_seconds": 1.227, + "mean_cpu_cores": 0.13367509499136443, + "throttled_seconds": 7.439752, + "throttled_period_fraction": 0.20447284345047922, + "peak_memory_mib": 143.0703125, + "oom_kills": 0 + }, + "api-3": { + "samples": 31, + "coverage_seconds": 29.163, + "max_sample_gap_seconds": 1.501, + "mean_cpu_cores": 0.13767030140932002, + "throttled_seconds": 8.516285, + "throttled_period_fraction": 0.23397435897435898, + "peak_memory_mib": 139.2734375, + "oom_kills": 0 + }, + "api-4": { + "samples": 31, + "coverage_seconds": 29.184, + "max_sample_gap_seconds": 1.211, + "mean_cpu_cores": 0.1428204495614035, + "throttled_seconds": 10.093155, + "throttled_period_fraction": 0.24600638977635783, + "peak_memory_mib": 143.44921875, + "oom_kills": 0 + }, + "postgres": { + "samples": 16, + "coverage_seconds": 29.0, + "max_sample_gap_seconds": 3.0, + "mean_cpu_cores": 0.2841889310344828, + "throttled_seconds": 0.313689, + "throttled_period_fraction": 0.02903225806451613, + "peak_memory_mib": 235.04296875, + "oom_kills": 0 + }, + "nginx": { + "samples": 16, + "coverage_seconds": 29.0, + "max_sample_gap_seconds": 3.0, + "mean_cpu_cores": 0.08687979310344827, + "throttled_seconds": 0.055523, + "throttled_period_fraction": 0.013071895424836602, + "peak_memory_mib": 10.15234375, + "oom_kills": 0 + }, + "redis": { + "samples": 15, + "coverage_seconds": 27.0, + "max_sample_gap_seconds": 3.0, + "mean_cpu_cores": 0.057056888888888886, + "throttled_seconds": 0.034675, + "throttled_period_fraction": 0.013745704467353952, + "peak_memory_mib": 11.83203125, + "oom_kills": 0 + }, + "generator": { + "samples": 15, + "coverage_seconds": 27.0, + "max_sample_gap_seconds": 3.0, + "mean_cpu_cores": 0.19786177777777778, + "throttled_seconds": 0.0, + "throttled_period_fraction": 0.0, + "peak_memory_mib": 100.12109375, + "oom_kills": 0 + } + }, + "pools": { + "api-1": { + "samples": 31, + "acquisitions": 525, + "acquisition_errors": 0, + "mean_acquisition_ms": 3.9200488247610408, + "max_acquisition_ms": 699.381469999993, + "max_waiting": 0, + "queued_interval_fraction": 0.0, + "max_total": 8, + "observed_connection_increases": 4, + "observed_connection_decreases": 4, + "event_loop_p99_max_ms": 674.234367 + }, + "api-2": { + "samples": 31, + "acquisitions": 490, + "acquisition_errors": 0, + "mean_acquisition_ms": 4.23072684489699, + "max_acquisition_ms": 604.1436289999983, + "max_waiting": 0, + "queued_interval_fraction": 0.0, + "max_total": 8, + "observed_connection_increases": 4, + "observed_connection_decreases": 4, + "event_loop_p99_max_ms": 594.018303 + }, + "api-3": { + "samples": 31, + "acquisitions": 500, + "acquisition_errors": 0, + "mean_acquisition_ms": 5.189824264000635, + "max_acquisition_ms": 798.7874259999953, + "max_waiting": 0, + "queued_interval_fraction": 0.0, + "max_total": 8, + "observed_connection_increases": 4, + "observed_connection_decreases": 4, + "event_loop_p99_max_ms": 343.670783 + }, + "api-4": { + "samples": 31, + "acquisitions": 488, + "acquisition_errors": 0, + "mean_acquisition_ms": 4.909437422131663, + "max_acquisition_ms": 948.2166589999979, + "max_waiting": 0, + "queued_interval_fraction": 0.0, + "max_total": 8, + "observed_connection_increases": 4, + "observed_connection_decreases": 3, + "event_loop_p99_max_ms": 704.118783 + } + }, + "host": { + "samples": 16, + "cpu_some_fraction": 0.5439149310344827, + "memory_some_fraction": 0.019160379310344828, + "memory_full_fraction": 0.011093034482758621, + "io_some_fraction": 0.010744, + "io_full_fraction": 0.002464103448275862, + "min_available_mib": 1075.43359375, + "max_swap_used_mib": 253.9609375 + }, + "postgres": { + "samples": 17, + "max_active": 6, + "max_idle_in_transaction": 5, + "active_wait_observations": { + "no_wait_event/-": 6, + "IO/WalSync": 1, + "Client/ClientRead": 3, + "Lock/transactionid": 1 + } + }, + "nginx": { + "samples": 16, + "upstream_changes": 0, + "min_ready": 4, + "max_ready": 4 + }, + "limits_reached": { + "generator_late": false, + "client_capacity": false, + "request_errors": false, + "latency": false + }, + "diagnostics_complete": true + }, + "source_hashes": { + "benchmark": "b107f21fa084ae932a6c70a42616f870c386dfbe0beb6850dfa1dafb3073115a", + "summary": "a575f5f6b7561b365594a31b33505716e1d55de4d896b1fa3ad9cea293fedf7d" + } + }, + { + "dataset": "api-cpu", + "variant": "four-small", + "configuration": "four-small", + "manifest": "api-small-growth-20261029", + "label": "four-small-r80-confirmation-31", + "profile": { + "arrival_model": "k6 constant-arrival-rate; one HTTP request per iteration", + "offered_rps": 80, + "duration_seconds": 30, + "warmup_seconds": 10, + "warmup_profile": "same 80/20 workload at target rate", + "read_percent": 80, + "write_percent": 20, + "initial_messages": 30, + "history_limit": 50, + "max_in_flight": 128, + "timeout_ms": 5000, + "automatic_retries": false, + "expected_instances": 4, + "phase": "confirmation" + }, + "measurement": { + "scheduled_slots": 2400, + "client_dropped_slots": 191, + "scheduler_late_slots": 0, + "read": { + "attempted": 1768, + "successful": 1768, + "errors": 0, + "successful_rps": 58.93333333333333, + "successful_latency_ms": { + "p50": 567.845025, + "p95": 2400.7390627999994, + "p99": 3759.8127229499987 + }, + "status_counts": {}, + "error_counts": {}, + "instance_counts": {} + }, + "write": { + "attempted": 441, + "successful": 440, + "errors": 1, + "successful_rps": 14.666666666666666, + "successful_latency_ms": { + "p50": 1188.5855815, + "p95": 3568.817972899998, + "p99": 4472.693292309999 + }, + "status_counts": {}, + "error_counts": {}, + "instance_counts": {} + }, + "all": { + "attempted": 2209, + "successful": 2208, + "errors": 1, + "successful_rps": 73.6, + "successful_latency_ms": { + "p50": 645.10074, + "p95": 2796.4947147000003, + "p99": 3875.9293856899994 + }, + "status_counts": { + "200": 1768, + "201": 440, + "other": 0, + "network": 1 + }, + "error_counts": {}, + "instance_counts": { + "b71829058bf4": 593, + "40355cd63513": 618, + "00f08e33f8a4": 401, + "0578dc6a443b": 596 + } + } + }, + "timing": { + "measurement_started_epoch_ms": 1793252596125, + "measurement_scheduled_end_epoch_ms": 1793252626125, + "measurement_completed_epoch_ms": 1793252625382 + }, + "client": { + "engine": "k6", + "scheduler_lateness_measured": false, + "raw_dropped_iterations_including_warmup": 296, + "peak_vus": 161, + "max_vus": 128 + }, + "all_latency_ms": { + "p50": 645.9834989999999, + "p95": 2819.614260199997, + "p99": 3880.3796969600003 + }, + "criterion": { + "delivery_fraction": 0.9204166666666667, + "error_fraction": 0.0004526935264825713, + "all_request_p95_ms": 2819.614260199997, + "delivery_valid": false, + "slo_pass": false, + "classification": "generator_limited" + }, + "diagnostics": { + "resources": { + "api-1": { + "samples": 31, + "coverage_seconds": 29.285, + "max_sample_gap_seconds": 1.184, + "mean_cpu_cores": 0.18552470548062147, + "throttled_seconds": 16.439097, + "throttled_period_fraction": 0.5852842809364549, + "peak_memory_mib": 168.90625, + "oom_kills": 0 + }, + "api-2": { + "samples": 30, + "coverage_seconds": 29.219, + "max_sample_gap_seconds": 1.283, + "mean_cpu_cores": 0.24593463157534481, + "throttled_seconds": 19.738292, + "throttled_period_fraction": 0.7507987220447284, + "peak_memory_mib": 164.52734375, + "oom_kills": 0 + }, + "api-3": { + "samples": 30, + "coverage_seconds": 29.222, + "max_sample_gap_seconds": 1.608, + "mean_cpu_cores": 0.24052467319143112, + "throttled_seconds": 18.919445, + "throttled_period_fraction": 0.7365079365079366, + "peak_memory_mib": 161.84375, + "oom_kills": 0 + }, + "api-4": { + "samples": 29, + "coverage_seconds": 29.094, + "max_sample_gap_seconds": 2.041, + "mean_cpu_cores": 0.24352326940262597, + "throttled_seconds": 21.092346, + "throttled_period_fraction": 0.7643312101910829, + "peak_memory_mib": 169.04296875, + "oom_kills": 0 + }, + "postgres": { + "samples": 15, + "coverage_seconds": 27.0, + "max_sample_gap_seconds": 3.0, + "mean_cpu_cores": 0.4689557777777778, + "throttled_seconds": 1.017696, + "throttled_period_fraction": 0.037037037037037035, + "peak_memory_mib": 229.32421875, + "oom_kills": 0 + }, + "nginx": { + "samples": 16, + "coverage_seconds": 28.0, + "max_sample_gap_seconds": 2.0, + "mean_cpu_cores": 0.10234907142857143, + "throttled_seconds": 0.130125, + "throttled_period_fraction": 0.012987012987012988, + "peak_memory_mib": 11.9140625, + "oom_kills": 0 + }, + "redis": { + "samples": 16, + "coverage_seconds": 29.0, + "max_sample_gap_seconds": 3.0, + "mean_cpu_cores": 0.07263037931034483, + "throttled_seconds": 0.079243, + "throttled_period_fraction": 0.006535947712418301, + "peak_memory_mib": 13.65234375, + "oom_kills": 0 + }, + "generator": { + "samples": 15, + "coverage_seconds": 27.0, + "max_sample_gap_seconds": 3.0, + "mean_cpu_cores": 0.2883186296296296, + "throttled_seconds": 0.0, + "throttled_period_fraction": 0.0, + "peak_memory_mib": 107.63671875, + "oom_kills": 0 + } + }, + "pools": { + "api-1": { + "samples": 31, + "acquisitions": 865, + "acquisition_errors": 0, + "mean_acquisition_ms": 175.97763160809313, + "max_acquisition_ms": 1244.2548720000195, + "max_waiting": 27, + "queued_interval_fraction": 0.5483870967741935, + "max_total": 8, + "observed_connection_increases": 0, + "observed_connection_decreases": 0, + "event_loop_p99_max_ms": 568.852479 + }, + "api-2": { + "samples": 30, + "acquisitions": 1240, + "acquisition_errors": 0, + "mean_acquisition_ms": 163.96964754838837, + "max_acquisition_ms": 1533.830980000028, + "max_waiting": 29, + "queued_interval_fraction": 0.7666666666666667, + "max_total": 8, + "observed_connection_increases": 0, + "observed_connection_decreases": 0, + "event_loop_p99_max_ms": 691.011583 + }, + "api-3": { + "samples": 30, + "acquisitions": 1256, + "acquisition_errors": 0, + "mean_acquisition_ms": 159.4952570191072, + "max_acquisition_ms": 1474.8758969999617, + "max_waiting": 32, + "queued_interval_fraction": 0.6666666666666666, + "max_total": 8, + "observed_connection_increases": 0, + "observed_connection_decreases": 0, + "event_loop_p99_max_ms": 904.396799 + }, + "api-4": { + "samples": 29, + "acquisitions": 1231, + "acquisition_errors": 0, + "mean_acquisition_ms": 183.99565695044836, + "max_acquisition_ms": 2157.7914170000004, + "max_waiting": 31, + "queued_interval_fraction": 0.6896551724137931, + "max_total": 8, + "observed_connection_increases": 0, + "observed_connection_decreases": 0, + "event_loop_p99_max_ms": 1132.462079 + } + }, + "host": { + "samples": 15, + "cpu_some_fraction": 0.8198151481481482, + "memory_some_fraction": 0.002050666666666667, + "memory_full_fraction": 0.00024574074074074076, + "io_some_fraction": 0.020364666666666666, + "io_full_fraction": 0.003091074074074074, + "min_available_mib": 950.92578125, + "max_swap_used_mib": 255.7109375 + }, + "postgres": { + "samples": 16, + "max_active": 6, + "max_idle_in_transaction": 13, + "active_wait_observations": { + "Client/ClientRead": 4, + "no_wait_event/-": 18, + "IO/WalSync": 3, + "Lock/transactionid": 6 + } + }, + "nginx": { + "samples": 16, + "upstream_changes": 2, + "min_ready": 3, + "max_ready": 4 + }, + "limits_reached": { + "generator_late": false, + "client_capacity": true, + "request_errors": false, + "latency": true + }, + "diagnostics_complete": true + }, + "source_hashes": { + "benchmark": "071121f5db602aa6541450aba870635727e08b4a44ae21a3919e2be145af3a05", + "summary": "0f05068c52e55e9de8fb8eef67b01098dd37029d3443fbd5d459b377d68e0809" + } + }, + { + "dataset": "api-cpu", + "variant": "four-small", + "configuration": "four-small", + "manifest": "api-small-growth-20261029", + "label": "four-small-r40-confirmation-32", + "profile": { + "arrival_model": "k6 constant-arrival-rate; one HTTP request per iteration", + "offered_rps": 40, + "duration_seconds": 30, + "warmup_seconds": 10, + "warmup_profile": "same 80/20 workload at target rate", + "read_percent": 80, + "write_percent": 20, + "initial_messages": 30, + "history_limit": 50, + "max_in_flight": 128, + "timeout_ms": 5000, + "automatic_retries": false, + "expected_instances": 4, + "phase": "confirmation" + }, + "measurement": { + "scheduled_slots": 1200, + "client_dropped_slots": 0, + "scheduler_late_slots": 0, + "read": { + "attempted": 961, + "successful": 961, + "errors": 0, + "successful_rps": 32.03333333333333, + "successful_latency_ms": { + "p50": 23.868112999999997, + "p95": 757.4978179999999, + "p99": 1418.6669909999991 + }, + "status_counts": {}, + "error_counts": {}, + "instance_counts": {} + }, + "write": { + "attempted": 240, + "successful": 240, + "errors": 0, + "successful_rps": 8, + "successful_latency_ms": { + "p50": 69.16254550000001, + "p95": 983.9799898999984, + "p99": 1887.2427200599968 + }, + "status_counts": {}, + "error_counts": {}, + "instance_counts": {} + }, + "all": { + "attempted": 1201, + "successful": 1201, + "errors": 0, + "successful_rps": 40.03333333333333, + "successful_latency_ms": { + "p50": 32.074924, + "p95": 808.456865, + "p99": 1587.9421240000001 + }, + "status_counts": { + "200": 961, + "201": 240, + "other": 0, + "network": 0 + }, + "error_counts": {}, + "instance_counts": { + "40355cd63513": 360, + "0578dc6a443b": 287, + "00f08e33f8a4": 272, + "b71829058bf4": 282 + } + } + }, + "timing": { + "measurement_started_epoch_ms": 1793252651490, + "measurement_scheduled_end_epoch_ms": 1793252681490, + "measurement_completed_epoch_ms": 1793252679503 + }, + "client": { + "engine": "k6", + "scheduler_lateness_measured": false, + "raw_dropped_iterations_including_warmup": 0, + "peak_vus": 67, + "max_vus": 128 + }, + "all_latency_ms": { + "p50": 32.074924, + "p95": 808.456865, + "p99": 1587.9421240000001 + }, + "criterion": { + "delivery_fraction": 1.0008333333333332, + "error_fraction": 0.0, + "all_request_p95_ms": 808.456865, + "delivery_valid": true, + "slo_pass": true, + "classification": "pass" + }, + "diagnostics": { + "resources": { + "api-1": { + "samples": 30, + "coverage_seconds": 28.981, + "max_sample_gap_seconds": 1.376, + "mean_cpu_cores": 0.15143921879852318, + "throttled_seconds": 13.544898, + "throttled_period_fraction": 0.29073482428115016, + "peak_memory_mib": 170.1875, + "oom_kills": 0 + }, + "api-2": { + "samples": 31, + "coverage_seconds": 29.167, + "max_sample_gap_seconds": 1.281, + "mean_cpu_cores": 0.15682322487742997, + "throttled_seconds": 14.102426, + "throttled_period_fraction": 0.3089171974522293, + "peak_memory_mib": 165.9609375, + "oom_kills": 0 + }, + "api-3": { + "samples": 31, + "coverage_seconds": 29.125, + "max_sample_gap_seconds": 1.171, + "mean_cpu_cores": 0.14686784549356224, + "throttled_seconds": 5.786518, + "throttled_period_fraction": 0.2747603833865815, + "peak_memory_mib": 184.19921875, + "oom_kills": 0 + }, + "api-4": { + "samples": 30, + "coverage_seconds": 28.914, + "max_sample_gap_seconds": 1.793, + "mean_cpu_cores": 0.162743549837449, + "throttled_seconds": 13.997718, + "throttled_period_fraction": 0.32051282051282054, + "peak_memory_mib": 167.94140625, + "oom_kills": 0 + }, + "postgres": { + "samples": 15, + "coverage_seconds": 29.0, + "max_sample_gap_seconds": 3.0, + "mean_cpu_cores": 0.31956855172413795, + "throttled_seconds": 0.44842, + "throttled_period_fraction": 0.0297029702970297, + "peak_memory_mib": 230.54296875, + "oom_kills": 0 + }, + "nginx": { + "samples": 15, + "coverage_seconds": 27.0, + "max_sample_gap_seconds": 3.0, + "mean_cpu_cores": 0.10113307407407407, + "throttled_seconds": 0.134542, + "throttled_period_fraction": 0.02422145328719723, + "peak_memory_mib": 10.765625, + "oom_kills": 0 + }, + "redis": { + "samples": 15, + "coverage_seconds": 27.0, + "max_sample_gap_seconds": 3.0, + "mean_cpu_cores": 0.08317118518518518, + "throttled_seconds": 0.471283, + "throttled_period_fraction": 0.037037037037037035, + "peak_memory_mib": 11.98046875, + "oom_kills": 0 + }, + "generator": { + "samples": 15, + "coverage_seconds": 28.0, + "max_sample_gap_seconds": 3.0, + "mean_cpu_cores": 0.23411407142857144, + "throttled_seconds": 0.0, + "throttled_period_fraction": 0.0, + "peak_memory_mib": 98.46484375, + "oom_kills": 0 + } + }, + "pools": { + "api-1": { + "samples": 30, + "acquisitions": 455, + "acquisition_errors": 0, + "mean_acquisition_ms": 1.6340465318672563, + "max_acquisition_ms": 96.76912199996877, + "max_waiting": 2, + "queued_interval_fraction": 0.03333333333333333, + "max_total": 8, + "observed_connection_increases": 0, + "observed_connection_decreases": 0, + "event_loop_p99_max_ms": 641.204223 + }, + "api-2": { + "samples": 31, + "acquisitions": 465, + "acquisition_errors": 0, + "mean_acquisition_ms": 2.4383956150579897, + "max_acquisition_ms": 172.03870100004133, + "max_waiting": 4, + "queued_interval_fraction": 0.03225806451612903, + "max_total": 8, + "observed_connection_increases": 0, + "observed_connection_decreases": 0, + "event_loop_p99_max_ms": 583.532543 + }, + "api-3": { + "samples": 31, + "acquisitions": 577, + "acquisition_errors": 0, + "mean_acquisition_ms": 2.8032008492207456, + "max_acquisition_ms": 185.0816900000209, + "max_waiting": 6, + "queued_interval_fraction": 0.03225806451612903, + "max_total": 8, + "observed_connection_increases": 0, + "observed_connection_decreases": 0, + "event_loop_p99_max_ms": 381.943807 + }, + "api-4": { + "samples": 30, + "acquisitions": 457, + "acquisition_errors": 0, + "mean_acquisition_ms": 0.3444512385143379, + "max_acquisition_ms": 42.847257999994326, + "max_waiting": 1, + "queued_interval_fraction": 0.03333333333333333, + "max_total": 8, + "observed_connection_increases": 0, + "observed_connection_decreases": 0, + "event_loop_p99_max_ms": 436.994047 + } + }, + "host": { + "samples": 15, + "cpu_some_fraction": 0.6164351034482759, + "memory_some_fraction": 0.013149241379310344, + "memory_full_fraction": 0.008346620689655172, + "io_some_fraction": 0.014269379310344828, + "io_full_fraction": 0.003305241379310345, + "min_available_mib": 945.0546875, + "max_swap_used_mib": 256.46875 + }, + "postgres": { + "samples": 16, + "max_active": 9, + "max_idle_in_transaction": 4, + "active_wait_observations": { + "Client/ClientRead": 2, + "no_wait_event/-": 20, + "IO/WalSync": 1, + "Lock/transactionid": 1 + } + }, + "nginx": { + "samples": 15, + "upstream_changes": 0, + "min_ready": 4, + "max_ready": 4 + }, + "limits_reached": { + "generator_late": false, + "client_capacity": false, + "request_errors": false, + "latency": false + }, + "diagnostics_complete": true + }, + "source_hashes": { + "benchmark": "53784894e0a3e77055f41f279dc6342776c1da53340a4d3cdc6744d8172effa4", + "summary": "bfde9d8db0a3a02b3d321cca012b7b3ae75106a644c48c50c0b56d3ee823d809" + } + }, + { + "dataset": "api-cpu", + "variant": "four-small", + "configuration": "four-small", + "manifest": "api-small-growth-20261029", + "label": "four-small-r80-confirmation-33", + "profile": { + "arrival_model": "k6 constant-arrival-rate; one HTTP request per iteration", + "offered_rps": 80, + "duration_seconds": 30, + "warmup_seconds": 10, + "warmup_profile": "same 80/20 workload at target rate", + "read_percent": 80, + "write_percent": 20, + "initial_messages": 30, + "history_limit": 50, + "max_in_flight": 128, + "timeout_ms": 5000, + "automatic_retries": false, + "expected_instances": 4, + "phase": "confirmation" + }, + "measurement": { + "scheduled_slots": 2400, + "client_dropped_slots": 858, + "scheduler_late_slots": 0, + "read": { + "attempted": 1234, + "successful": 1170, + "errors": 64, + "successful_rps": 39, + "successful_latency_ms": { + "p50": 1672.544253, + "p95": 4341.73980425, + "p99": 4606.360272529999 + }, + "status_counts": {}, + "error_counts": {}, + "instance_counts": {} + }, + "write": { + "attempted": 308, + "successful": 271, + "errors": 37, + "successful_rps": 9.033333333333333, + "successful_latency_ms": { + "p50": 2648.653402, + "p95": 4596.2787005, + "p99": 4803.3833159000005 + }, + "status_counts": {}, + "error_counts": {}, + "instance_counts": {} + }, + "all": { + "attempted": 1542, + "successful": 1441, + "errors": 101, + "successful_rps": 48.03333333333333, + "successful_latency_ms": { + "p50": 1824.245409, + "p95": 4418.3310790000005, + "p99": 4710.956379199998 + }, + "status_counts": { + "200": 1170, + "201": 271, + "other": 0, + "network": 101 + }, + "error_counts": {}, + "instance_counts": { + "00f08e33f8a4": 371, + "40355cd63513": 313, + "0578dc6a443b": 309, + "b71829058bf4": 448 + } + } + }, + "timing": { + "measurement_started_epoch_ms": 1793252704149, + "measurement_scheduled_end_epoch_ms": 1793252734149, + "measurement_completed_epoch_ms": 1793252734693 + }, + "client": { + "engine": "k6", + "scheduler_lateness_measured": false, + "raw_dropped_iterations_including_warmup": 1027, + "peak_vus": 129, + "max_vus": 128 + }, + "all_latency_ms": { + "p50": 1992.8781975000002, + "p95": 5000.4370198, + "p99": 5161.46256541 + }, + "criterion": { + "delivery_fraction": 0.6425, + "error_fraction": 0.0654993514915694, + "all_request_p95_ms": 5000.4370198, + "delivery_valid": false, + "slo_pass": false, + "classification": "generator_limited" + }, + "diagnostics": { + "resources": { + "api-1": { + "samples": 29, + "coverage_seconds": 29.075, + "max_sample_gap_seconds": 1.91, + "mean_cpu_cores": 0.1825851762682717, + "throttled_seconds": 17.383938, + "throttled_period_fraction": 0.6283783783783784, + "peak_memory_mib": 173.73828125, + "oom_kills": 0 + }, + "api-2": { + "samples": 27, + "coverage_seconds": 28.017, + "max_sample_gap_seconds": 2.417, + "mean_cpu_cores": 0.21050804868472714, + "throttled_seconds": 15.829668, + "throttled_period_fraction": 0.7288135593220338, + "peak_memory_mib": 168.30078125, + "oom_kills": 0 + }, + "api-3": { + "samples": 30, + "coverage_seconds": 29.189, + "max_sample_gap_seconds": 1.581, + "mean_cpu_cores": 0.16040272020281612, + "throttled_seconds": 17.647786, + "throttled_period_fraction": 0.5689655172413793, + "peak_memory_mib": 185.6484375, + "oom_kills": 0 + }, + "api-4": { + "samples": 30, + "coverage_seconds": 29.717, + "max_sample_gap_seconds": 2.182, + "mean_cpu_cores": 0.1590255072853922, + "throttled_seconds": 17.98734, + "throttled_period_fraction": 0.5661016949152542, + "peak_memory_mib": 171.35546875, + "oom_kills": 0 + }, + "postgres": { + "samples": 16, + "coverage_seconds": 29.0, + "max_sample_gap_seconds": 3.0, + "mean_cpu_cores": 0.3575675172413793, + "throttled_seconds": 0.120568, + "throttled_period_fraction": 0.022082018927444796, + "peak_memory_mib": 230.703125, + "oom_kills": 0 + }, + "nginx": { + "samples": 15, + "coverage_seconds": 28.0, + "max_sample_gap_seconds": 3.0, + "mean_cpu_cores": 0.09987385714285714, + "throttled_seconds": 0.319434, + "throttled_period_fraction": 0.04081632653061224, + "peak_memory_mib": 12.68359375, + "oom_kills": 0 + }, + "redis": { + "samples": 15, + "coverage_seconds": 27.0, + "max_sample_gap_seconds": 3.0, + "mean_cpu_cores": 0.08160766666666666, + "throttled_seconds": 0.436198, + "throttled_period_fraction": 0.034129692832764506, + "peak_memory_mib": 12.7734375, + "oom_kills": 0 + }, + "generator": { + "samples": 16, + "coverage_seconds": 29.0, + "max_sample_gap_seconds": 3.0, + "mean_cpu_cores": 0.26453451724137933, + "throttled_seconds": 0.0, + "throttled_period_fraction": 0.0, + "peak_memory_mib": 104.078125, + "oom_kills": 0 + } + }, + "pools": { + "api-1": { + "samples": 29, + "acquisitions": 851, + "acquisition_errors": 0, + "mean_acquisition_ms": 396.2086047191538, + "max_acquisition_ms": 1977.3796219999786, + "max_waiting": 43, + "queued_interval_fraction": 0.6551724137931034, + "max_total": 8, + "observed_connection_increases": 0, + "observed_connection_decreases": 0, + "event_loop_p99_max_ms": 1624.244223 + }, + "api-2": { + "samples": 27, + "acquisitions": 936, + "acquisition_errors": 0, + "mean_acquisition_ms": 323.79146335256604, + "max_acquisition_ms": 3152.993791999994, + "max_waiting": 42, + "queued_interval_fraction": 0.6296296296296297, + "max_total": 8, + "observed_connection_increases": 0, + "observed_connection_decreases": 0, + "event_loop_p99_max_ms": 1528.823807 + }, + "api-3": { + "samples": 30, + "acquisitions": 739, + "acquisition_errors": 0, + "mean_acquisition_ms": 482.47388036806547, + "max_acquisition_ms": 2283.3710200000205, + "max_waiting": 55, + "queued_interval_fraction": 0.6, + "max_total": 8, + "observed_connection_increases": 0, + "observed_connection_decreases": 0, + "event_loop_p99_max_ms": 711.983103 + }, + "api-4": { + "samples": 30, + "acquisitions": 743, + "acquisition_errors": 0, + "mean_acquisition_ms": 519.1135861870781, + "max_acquisition_ms": 2286.6434909999953, + "max_waiting": 54, + "queued_interval_fraction": 0.5666666666666667, + "max_total": 8, + "observed_connection_increases": 0, + "observed_connection_decreases": 0, + "event_loop_p99_max_ms": 725.614591 + } + }, + "host": { + "samples": 16, + "cpu_some_fraction": 0.8039199655172414, + "memory_some_fraction": 0.01935744827586207, + "memory_full_fraction": 0.009100724137931034, + "io_some_fraction": 0.016992586206896552, + "io_full_fraction": 0.0027815172413793105, + "min_available_mib": 871.07421875, + "max_swap_used_mib": 257.21875 + }, + "postgres": { + "samples": 17, + "max_active": 4, + "max_idle_in_transaction": 12, + "active_wait_observations": { + "Lock/transactionid": 5, + "no_wait_event/-": 9, + "Client/ClientRead": 1, + "LWLock/LockManager": 1, + "IO/WalSync": 1 + } + }, + "nginx": { + "samples": 15, + "upstream_changes": 5, + "min_ready": 1, + "max_ready": 4 + }, + "limits_reached": { + "generator_late": false, + "client_capacity": true, + "request_errors": true, + "latency": true + }, + "diagnostics_complete": true + }, + "source_hashes": { + "benchmark": "a8d0841ca652007329fc31201d6ad810072248b44748fb43153a3835a92fa36b", + "summary": "ee17da0313861cdf31b2e94ad02a5ce2e832e7bd3e95a5cfe8e818b3e86c600b" + } + }, + { + "dataset": "api-cpu", + "variant": "four", + "configuration": "four", + "manifest": "api-small-growth-20261029", + "label": "four-r40-confirmation-34", + "profile": { + "arrival_model": "k6 constant-arrival-rate; one HTTP request per iteration", + "offered_rps": 40, + "duration_seconds": 30, + "warmup_seconds": 10, + "warmup_profile": "same 80/20 workload at target rate", + "read_percent": 80, + "write_percent": 20, + "initial_messages": 30, + "history_limit": 50, + "max_in_flight": 128, + "timeout_ms": 5000, + "automatic_retries": false, + "expected_instances": 4, + "phase": "confirmation" + }, + "measurement": { + "scheduled_slots": 1200, + "client_dropped_slots": 0, + "scheduler_late_slots": 0, + "read": { + "attempted": 962, + "successful": 962, + "errors": 0, + "successful_rps": 32.06666666666667, + "successful_latency_ms": { + "p50": 20.370675, + "p95": 1191.1601882499997, + "p99": 2330.3934390599998 + }, + "status_counts": {}, + "error_counts": {}, + "instance_counts": {} + }, + "write": { + "attempted": 240, + "successful": 240, + "errors": 0, + "successful_rps": 8, + "successful_latency_ms": { + "p50": 80.78438349999999, + "p95": 2692.2290646999977, + "p99": 3895.283548379998 + }, + "status_counts": {}, + "error_counts": {}, + "instance_counts": {} + }, + "all": { + "attempted": 1202, + "successful": 1202, + "errors": 0, + "successful_rps": 40.06666666666667, + "successful_latency_ms": { + "p50": 27.289679, + "p95": 1443.624807400003, + "p99": 3055.7631298200004 + }, + "status_counts": { + "200": 962, + "201": 240, + "other": 0, + "network": 0 + }, + "error_counts": {}, + "instance_counts": { + "c61ac847afb7": 293, + "147b78cc1a85": 303, + "064b0e307a1a": 313, + "4976fe957a50": 293 + } + } + }, + "timing": { + "measurement_started_epoch_ms": 1793252863934, + "measurement_scheduled_end_epoch_ms": 1793252893934, + "measurement_completed_epoch_ms": 1793252894294 + }, + "client": { + "engine": "k6", + "scheduler_lateness_measured": false, + "raw_dropped_iterations_including_warmup": 9, + "peak_vus": 127, + "max_vus": 128 + }, + "all_latency_ms": { + "p50": 27.289679, + "p95": 1443.624807400003, + "p99": 3055.7631298200004 + }, + "criterion": { + "delivery_fraction": 1.0016666666666667, + "error_fraction": 0.0, + "all_request_p95_ms": 1443.624807400003, + "delivery_valid": true, + "slo_pass": false, + "classification": "slo_fail" + }, + "diagnostics": { + "resources": { + "api-1": { + "samples": 31, + "coverage_seconds": 28.963, + "max_sample_gap_seconds": 1.156, + "mean_cpu_cores": 0.186774608983876, + "throttled_seconds": 1.935846, + "throttled_period_fraction": 0.08653846153846154, + "peak_memory_mib": 127.6875, + "oom_kills": 0 + }, + "api-2": { + "samples": 31, + "coverage_seconds": 29.435, + "max_sample_gap_seconds": 1.19, + "mean_cpu_cores": 0.18947334805503652, + "throttled_seconds": 1.965751, + "throttled_period_fraction": 0.07911392405063292, + "peak_memory_mib": 99.84765625, + "oom_kills": 0 + }, + "api-3": { + "samples": 31, + "coverage_seconds": 29.516, + "max_sample_gap_seconds": 1.234, + "mean_cpu_cores": 0.18607199485025072, + "throttled_seconds": 0.695563, + "throttled_period_fraction": 0.047021943573667714, + "peak_memory_mib": 104.29296875, + "oom_kills": 0 + }, + "api-4": { + "samples": 30, + "coverage_seconds": 28.647, + "max_sample_gap_seconds": 1.178, + "mean_cpu_cores": 0.18819237616504347, + "throttled_seconds": 1.026392, + "throttled_period_fraction": 0.042071197411003236, + "peak_memory_mib": 99.51171875, + "oom_kills": 0 + }, + "postgres": { + "samples": 15, + "coverage_seconds": 29.0, + "max_sample_gap_seconds": 3.0, + "mean_cpu_cores": 0.32891293103448277, + "throttled_seconds": 0.572055, + "throttled_period_fraction": 0.03184713375796178, + "peak_memory_mib": 238.578125, + "oom_kills": 0 + }, + "nginx": { + "samples": 15, + "coverage_seconds": 28.0, + "max_sample_gap_seconds": 3.0, + "mean_cpu_cores": 0.10353075, + "throttled_seconds": 0.263669, + "throttled_period_fraction": 0.016666666666666666, + "peak_memory_mib": 10.83984375, + "oom_kills": 0 + }, + "redis": { + "samples": 16, + "coverage_seconds": 29.0, + "max_sample_gap_seconds": 3.0, + "mean_cpu_cores": 0.06632527586206896, + "throttled_seconds": 0.143345, + "throttled_period_fraction": 0.015873015873015872, + "peak_memory_mib": 11.96875, + "oom_kills": 0 + }, + "generator": { + "samples": 15, + "coverage_seconds": 27.0, + "max_sample_gap_seconds": 3.0, + "mean_cpu_cores": 0.20665655555555557, + "throttled_seconds": 0.0, + "throttled_period_fraction": 0.0, + "peak_memory_mib": 102.16796875, + "oom_kills": 0 + } + }, + "pools": { + "api-1": { + "samples": 31, + "acquisitions": 515, + "acquisition_errors": 0, + "mean_acquisition_ms": 30.983356077669885, + "max_acquisition_ms": 1543.019564000002, + "max_waiting": 11, + "queued_interval_fraction": 0.0967741935483871, + "max_total": 8, + "observed_connection_increases": 0, + "observed_connection_decreases": 0, + "event_loop_p99_max_ms": 444.334079 + }, + "api-2": { + "samples": 31, + "acquisitions": 516, + "acquisition_errors": 0, + "mean_acquisition_ms": 18.44864234883733, + "max_acquisition_ms": 591.1575569999986, + "max_waiting": 9, + "queued_interval_fraction": 0.12903225806451613, + "max_total": 8, + "observed_connection_increases": 0, + "observed_connection_decreases": 0, + "event_loop_p99_max_ms": 478.937087 + }, + "api-3": { + "samples": 31, + "acquisitions": 506, + "acquisition_errors": 0, + "mean_acquisition_ms": 21.96409646047445, + "max_acquisition_ms": 530.7010040000023, + "max_waiting": 8, + "queued_interval_fraction": 0.12903225806451613, + "max_total": 8, + "observed_connection_increases": 0, + "observed_connection_decreases": 0, + "event_loop_p99_max_ms": 425.983999 + }, + "api-4": { + "samples": 30, + "acquisitions": 485, + "acquisition_errors": 0, + "mean_acquisition_ms": 0.8262130948454778, + "max_acquisition_ms": 99.24698300000455, + "max_waiting": 2, + "queued_interval_fraction": 0.03333333333333333, + "max_total": 8, + "observed_connection_increases": 0, + "observed_connection_decreases": 0, + "event_loop_p99_max_ms": 717.225983 + } + }, + "host": { + "samples": 15, + "cpu_some_fraction": 0.5346226896551725, + "memory_some_fraction": 0.00041755172413793104, + "memory_full_fraction": 5.972413793103448e-05, + "io_some_fraction": 0.025202931034482758, + "io_full_fraction": 0.005462724137931034, + "min_available_mib": 1158.10546875, + "max_swap_used_mib": 256.46875 + }, + "postgres": { + "samples": 17, + "max_active": 13, + "max_idle_in_transaction": 8, + "active_wait_observations": { + "IO/WalSync": 3, + "no_wait_event/-": 12, + "Client/ClientRead": 2, + "Lock/transactionid": 2, + "LWLock/BufferContent": 6, + "LWLock/WALInsert": 2 + } + }, + "nginx": { + "samples": 15, + "upstream_changes": 0, + "min_ready": 4, + "max_ready": 4 + }, + "limits_reached": { + "generator_late": false, + "client_capacity": false, + "request_errors": false, + "latency": true + }, + "diagnostics_complete": true + }, + "source_hashes": { + "benchmark": "16922bd4ba5f3b15777e429b40c2c1b926c5cf776f8e42fac9fae08d9db439a0", + "summary": "bcfe579caaa08d3d635fd7b75c7ae802785447a3e6a802d6e669c0f10fb997df" + } + }, + { + "dataset": "api-cpu", + "variant": "four", + "configuration": "four", + "manifest": "api-small-growth-20261029", + "label": "four-r80-confirmation-35", + "profile": { + "arrival_model": "k6 constant-arrival-rate; one HTTP request per iteration", + "offered_rps": 80, + "duration_seconds": 30, + "warmup_seconds": 10, + "warmup_profile": "same 80/20 workload at target rate", + "read_percent": 80, + "write_percent": 20, + "initial_messages": 30, + "history_limit": 50, + "max_in_flight": 128, + "timeout_ms": 5000, + "automatic_retries": false, + "expected_instances": 4, + "phase": "confirmation" + }, + "measurement": { + "scheduled_slots": 2400, + "client_dropped_slots": 137, + "scheduler_late_slots": 0, + "read": { + "attempted": 1812, + "successful": 1812, + "errors": 0, + "successful_rps": 60.4, + "successful_latency_ms": { + "p50": 33.72033449999999, + "p95": 2721.865361199988, + "p99": 3475.228499649999 + }, + "status_counts": {}, + "error_counts": {}, + "instance_counts": {} + }, + "write": { + "attempted": 451, + "successful": 451, + "errors": 0, + "successful_rps": 15.033333333333333, + "successful_latency_ms": { + "p50": 82.742744, + "p95": 3547.509384, + "p99": 4356.247939999999 + }, + "status_counts": {}, + "error_counts": {}, + "instance_counts": {} + }, + "all": { + "attempted": 2263, + "successful": 2263, + "errors": 0, + "successful_rps": 75.43333333333334, + "successful_latency_ms": { + "p50": 39.859282, + "p95": 2765.0429346000005, + "p99": 3836.9857128000017 + }, + "status_counts": { + "200": 1812, + "201": 451, + "other": 0, + "network": 0 + }, + "error_counts": {}, + "instance_counts": { + "4976fe957a50": 465, + "c61ac847afb7": 587, + "064b0e307a1a": 617, + "147b78cc1a85": 594 + } + } + }, + "timing": { + "measurement_started_epoch_ms": 1793252918477, + "measurement_scheduled_end_epoch_ms": 1793252948477, + "measurement_completed_epoch_ms": 1793252946309 + }, + "client": { + "engine": "k6", + "scheduler_lateness_measured": false, + "raw_dropped_iterations_including_warmup": 208, + "peak_vus": 201, + "max_vus": 128 + }, + "all_latency_ms": { + "p50": 39.859282, + "p95": 2765.0429346000005, + "p99": 3836.9857128000017 + }, + "criterion": { + "delivery_fraction": 0.9429166666666666, + "error_fraction": 0.0, + "all_request_p95_ms": 2765.0429346000005, + "delivery_valid": false, + "slo_pass": false, + "classification": "generator_limited" + }, + "diagnostics": { + "resources": { + "api-1": { + "samples": 30, + "coverage_seconds": 28.413, + "max_sample_gap_seconds": 2.492, + "mean_cpu_cores": 0.2678430647942843, + "throttled_seconds": 1.901245, + "throttled_period_fraction": 0.10365853658536585, + "peak_memory_mib": 151.91796875, + "oom_kills": 0 + }, + "api-2": { + "samples": 31, + "coverage_seconds": 29.47, + "max_sample_gap_seconds": 1.38, + "mean_cpu_cores": 0.2613185273159145, + "throttled_seconds": 1.692763, + "throttled_period_fraction": 0.10946745562130178, + "peak_memory_mib": 123.19921875, + "oom_kills": 0 + }, + "api-3": { + "samples": 31, + "coverage_seconds": 28.405, + "max_sample_gap_seconds": 1.5, + "mean_cpu_cores": 0.25961024467523325, + "throttled_seconds": 1.938126, + "throttled_period_fraction": 0.10397553516819572, + "peak_memory_mib": 129.15625, + "oom_kills": 0 + }, + "api-4": { + "samples": 32, + "coverage_seconds": 29.03, + "max_sample_gap_seconds": 1.182, + "mean_cpu_cores": 0.2321620048225973, + "throttled_seconds": 1.208652, + "throttled_period_fraction": 0.07098765432098765, + "peak_memory_mib": 124.16796875, + "oom_kills": 0 + }, + "postgres": { + "samples": 15, + "coverage_seconds": 28.0, + "max_sample_gap_seconds": 3.0, + "mean_cpu_cores": 0.41786425, + "throttled_seconds": 0.274377, + "throttled_period_fraction": 0.040955631399317405, + "peak_memory_mib": 245.6484375, + "oom_kills": 0 + }, + "nginx": { + "samples": 15, + "coverage_seconds": 27.0, + "max_sample_gap_seconds": 3.0, + "mean_cpu_cores": 0.11974081481481481, + "throttled_seconds": 0.283744, + "throttled_period_fraction": 0.017543859649122806, + "peak_memory_mib": 12.49609375, + "oom_kills": 0 + }, + "redis": { + "samples": 15, + "coverage_seconds": 27.0, + "max_sample_gap_seconds": 3.0, + "mean_cpu_cores": 0.08509325925925926, + "throttled_seconds": 0.165106, + "throttled_period_fraction": 0.020761245674740483, + "peak_memory_mib": 14.28515625, + "oom_kills": 0 + }, + "generator": { + "samples": 16, + "coverage_seconds": 29.0, + "max_sample_gap_seconds": 3.0, + "mean_cpu_cores": 0.275552, + "throttled_seconds": 0.0, + "throttled_period_fraction": 0.0, + "peak_memory_mib": 116.2890625, + "oom_kills": 0 + } + }, + "pools": { + "api-1": { + "samples": 30, + "acquisitions": 1114, + "acquisition_errors": 0, + "mean_acquisition_ms": 105.95947315978422, + "max_acquisition_ms": 3129.1798439999984, + "max_waiting": 19, + "queued_interval_fraction": 0.3333333333333333, + "max_total": 8, + "observed_connection_increases": 0, + "observed_connection_decreases": 0, + "event_loop_p99_max_ms": 1764.753407 + }, + "api-2": { + "samples": 31, + "acquisitions": 1214, + "acquisition_errors": 0, + "mean_acquisition_ms": 109.99606040197742, + "max_acquisition_ms": 1693.2376150000055, + "max_waiting": 24, + "queued_interval_fraction": 0.3225806451612903, + "max_total": 8, + "observed_connection_increases": 0, + "observed_connection_decreases": 0, + "event_loop_p99_max_ms": 673.185791 + }, + "api-3": { + "samples": 31, + "acquisitions": 1153, + "acquisition_errors": 0, + "mean_acquisition_ms": 133.37424083000911, + "max_acquisition_ms": 2083.5396349999937, + "max_waiting": 29, + "queued_interval_fraction": 0.3225806451612903, + "max_total": 8, + "observed_connection_increases": 0, + "observed_connection_decreases": 0, + "event_loop_p99_max_ms": 775.421951 + }, + "api-4": { + "samples": 32, + "acquisitions": 941, + "acquisition_errors": 0, + "mean_acquisition_ms": 187.1121871572791, + "max_acquisition_ms": 1441.5313109999988, + "max_waiting": 30, + "queued_interval_fraction": 0.375, + "max_total": 8, + "observed_connection_increases": 0, + "observed_connection_decreases": 0, + "event_loop_p99_max_ms": 269.221887 + } + }, + "host": { + "samples": 15, + "cpu_some_fraction": 0.5401412142857143, + "memory_some_fraction": 0.017546071428571428, + "memory_full_fraction": 0.008657107142857143, + "io_some_fraction": 0.01414875, + "io_full_fraction": 0.003857, + "min_available_mib": 1072.10546875, + "max_swap_used_mib": 257.7265625 + }, + "postgres": { + "samples": 16, + "max_active": 19, + "max_idle_in_transaction": 12, + "active_wait_observations": { + "no_wait_event/-": 29, + "Lock/transactionid": 8, + "IO/WalSync": 1, + "LWLock/WALWrite": 10, + "IO/WalWrite": 1 + } + }, + "nginx": { + "samples": 15, + "upstream_changes": 2, + "min_ready": 3, + "max_ready": 4 + }, + "limits_reached": { + "generator_late": false, + "client_capacity": true, + "request_errors": false, + "latency": true + }, + "diagnostics_complete": true + }, + "source_hashes": { + "benchmark": "8481e46f3e527e36c17543f9f1de16a534d5d5c532179cf07402c75225a25e41", + "summary": "463b10ee9f87dfb3ea451f9e12b6c4e685c905e643d2cd227266bf4646ab58a8" + } + }, + { + "dataset": "api-cpu", + "variant": "four", + "configuration": "four", + "manifest": "api-small-growth-20261029", + "label": "four-r40-confirmation-36", + "profile": { + "arrival_model": "k6 constant-arrival-rate; one HTTP request per iteration", + "offered_rps": 40, + "duration_seconds": 30, + "warmup_seconds": 10, + "warmup_profile": "same 80/20 workload at target rate", + "read_percent": 80, + "write_percent": 20, + "initial_messages": 30, + "history_limit": 50, + "max_in_flight": 128, + "timeout_ms": 5000, + "automatic_retries": false, + "expected_instances": 4, + "phase": "confirmation" + }, + "measurement": { + "scheduled_slots": 1200, + "client_dropped_slots": 0, + "scheduler_late_slots": 0, + "read": { + "attempted": 960, + "successful": 960, + "errors": 0, + "successful_rps": 32, + "successful_latency_ms": { + "p50": 13.276375, + "p95": 604.4981405999991, + "p99": 997.0410156599991 + }, + "status_counts": {}, + "error_counts": {}, + "instance_counts": {} + }, + "write": { + "attempted": 240, + "successful": 240, + "errors": 0, + "successful_rps": 8, + "successful_latency_ms": { + "p50": 37.7553295, + "p95": 1225.4169800499994, + "p99": 1777.9044948199992 + }, + "status_counts": {}, + "error_counts": {}, + "instance_counts": {} + }, + "all": { + "attempted": 1200, + "successful": 1200, + "errors": 0, + "successful_rps": 40, + "successful_latency_ms": { + "p50": 18.764722999999996, + "p95": 678.1664768499995, + "p99": 1272.8332105600002 + }, + "status_counts": { + "200": 960, + "201": 240, + "other": 0, + "network": 0 + }, + "error_counts": {}, + "instance_counts": { + "064b0e307a1a": 289, + "c61ac847afb7": 308, + "147b78cc1a85": 295, + "4976fe957a50": 308 + } + } + }, + "timing": { + "measurement_started_epoch_ms": 1793252972188, + "measurement_scheduled_end_epoch_ms": 1793253002188, + "measurement_completed_epoch_ms": 1793252999852 + }, + "client": { + "engine": "k6", + "scheduler_lateness_measured": false, + "raw_dropped_iterations_including_warmup": 0, + "peak_vus": 40, + "max_vus": 128 + }, + "all_latency_ms": { + "p50": 18.764722999999996, + "p95": 678.1664768499995, + "p99": 1272.8332105600002 + }, + "criterion": { + "delivery_fraction": 1.0, + "error_fraction": 0.0, + "all_request_p95_ms": 678.1664768499995, + "delivery_valid": true, + "slo_pass": true, + "classification": "pass" + }, + "diagnostics": { + "resources": { + "api-1": { + "samples": 33, + "coverage_seconds": 28.516, + "max_sample_gap_seconds": 1.185, + "mean_cpu_cores": 0.14603839949502034, + "throttled_seconds": 0.573191, + "throttled_period_fraction": 0.03058103975535168, + "peak_memory_mib": 171.984375, + "oom_kills": 0 + }, + "api-2": { + "samples": 33, + "coverage_seconds": 29.32, + "max_sample_gap_seconds": 1.1, + "mean_cpu_cores": 0.18019771487039563, + "throttled_seconds": 4.667139, + "throttled_period_fraction": 0.09523809523809523, + "peak_memory_mib": 125.14453125, + "oom_kills": 0 + }, + "api-3": { + "samples": 33, + "coverage_seconds": 29.151, + "max_sample_gap_seconds": 1.097, + "mean_cpu_cores": 0.1652625638914617, + "throttled_seconds": 4.322397, + "throttled_period_fraction": 0.06646525679758308, + "peak_memory_mib": 165.65234375, + "oom_kills": 0 + }, + "api-4": { + "samples": 33, + "coverage_seconds": 29.504, + "max_sample_gap_seconds": 1.189, + "mean_cpu_cores": 0.15265445363340563, + "throttled_seconds": 1.306923, + "throttled_period_fraction": 0.0471976401179941, + "peak_memory_mib": 159.37890625, + "oom_kills": 0 + }, + "postgres": { + "samples": 16, + "coverage_seconds": 28.0, + "max_sample_gap_seconds": 3.0, + "mean_cpu_cores": 0.3159538571428571, + "throttled_seconds": 0.297405, + "throttled_period_fraction": 0.03492063492063492, + "peak_memory_mib": 237.0390625, + "oom_kills": 0 + }, + "nginx": { + "samples": 16, + "coverage_seconds": 28.0, + "max_sample_gap_seconds": 3.0, + "mean_cpu_cores": 0.093769, + "throttled_seconds": 0.067888, + "throttled_period_fraction": 0.009933774834437087, + "peak_memory_mib": 10.37109375, + "oom_kills": 0 + }, + "redis": { + "samples": 16, + "coverage_seconds": 27.0, + "max_sample_gap_seconds": 3.0, + "mean_cpu_cores": 0.08140255555555556, + "throttled_seconds": 0.152438, + "throttled_period_fraction": 0.028938906752411574, + "peak_memory_mib": 11.94140625, + "oom_kills": 0 + }, + "generator": { + "samples": 17, + "coverage_seconds": 29.0, + "max_sample_gap_seconds": 3.0, + "mean_cpu_cores": 0.2904438620689655, + "throttled_seconds": 0.0, + "throttled_period_fraction": 0.0, + "peak_memory_mib": 98.3828125, + "oom_kills": 0 + } + }, + "pools": { + "api-1": { + "samples": 33, + "acquisitions": 483, + "acquisition_errors": 0, + "mean_acquisition_ms": 3.167017385094052, + "max_acquisition_ms": 767.4073639999842, + "max_waiting": 0, + "queued_interval_fraction": 0.0, + "max_total": 8, + "observed_connection_increases": 2, + "observed_connection_decreases": 0, + "event_loop_p99_max_ms": 224.657407 + }, + "api-2": { + "samples": 33, + "acquisitions": 489, + "acquisition_errors": 0, + "mean_acquisition_ms": 0.14567921267965703, + "max_acquisition_ms": 15.722225999983493, + "max_waiting": 1, + "queued_interval_fraction": 0.030303030303030304, + "max_total": 8, + "observed_connection_increases": 0, + "observed_connection_decreases": 0, + "event_loop_p99_max_ms": 298.319871 + }, + "api-3": { + "samples": 33, + "acquisitions": 520, + "acquisition_errors": 0, + "mean_acquisition_ms": 0.6289394423079032, + "max_acquisition_ms": 159.53184499999043, + "max_waiting": 0, + "queued_interval_fraction": 0.0, + "max_total": 8, + "observed_connection_increases": 0, + "observed_connection_decreases": 1, + "event_loop_p99_max_ms": 266.469375 + }, + "api-4": { + "samples": 33, + "acquisitions": 507, + "acquisition_errors": 0, + "mean_acquisition_ms": 0.9381183846145882, + "max_acquisition_ms": 381.9269090000016, + "max_waiting": 0, + "queued_interval_fraction": 0.0, + "max_total": 8, + "observed_connection_increases": 1, + "observed_connection_decreases": 0, + "event_loop_p99_max_ms": 255.459327 + } + }, + "host": { + "samples": 16, + "cpu_some_fraction": 0.46821142857142856, + "memory_some_fraction": 0.018032642857142858, + "memory_full_fraction": 0.007301357142857143, + "io_some_fraction": 0.025561678571428572, + "io_full_fraction": 0.007065, + "min_available_mib": 1043.015625, + "max_swap_used_mib": 257.9765625 + }, + "postgres": { + "samples": 17, + "max_active": 13, + "max_idle_in_transaction": 3, + "active_wait_observations": { + "no_wait_event/-": 26, + "LWLock/BufferContent": 2 + } + }, + "nginx": { + "samples": 16, + "upstream_changes": 0, + "min_ready": 4, + "max_ready": 4 + }, + "limits_reached": { + "generator_late": false, + "client_capacity": false, + "request_errors": false, + "latency": false + }, + "diagnostics_complete": true + }, + "source_hashes": { + "benchmark": "59252501325b0971ac44baf2635b114e7dfcfe5f5d03ec79ad0cfce49a2524e8", + "summary": "f1c14106ddbe4da2849d986fd0316f54677147e618548ee3149c14a61370b224" + } + }, + { + "dataset": "api-cpu", + "variant": "four", + "configuration": "four", + "manifest": "api-small-growth-20261029", + "label": "four-r80-confirmation-37", + "profile": { + "arrival_model": "k6 constant-arrival-rate; one HTTP request per iteration", + "offered_rps": 80, + "duration_seconds": 30, + "warmup_seconds": 10, + "warmup_profile": "same 80/20 workload at target rate", + "read_percent": 80, + "write_percent": 20, + "initial_messages": 30, + "history_limit": 50, + "max_in_flight": 128, + "timeout_ms": 5000, + "automatic_retries": false, + "expected_instances": 4, + "phase": "confirmation" + }, + "measurement": { + "scheduled_slots": 2400, + "client_dropped_slots": 293, + "scheduler_late_slots": 0, + "read": { + "attempted": 1686, + "successful": 1686, + "errors": 0, + "successful_rps": 56.2, + "successful_latency_ms": { + "p50": 187.324542, + "p95": 2632.3097845, + "p99": 3105.8342729500023 + }, + "status_counts": {}, + "error_counts": {}, + "instance_counts": {} + }, + "write": { + "attempted": 421, + "successful": 418, + "errors": 3, + "successful_rps": 13.933333333333334, + "successful_latency_ms": { + "p50": 322.505266, + "p95": 3782.219462899998, + "p99": 4668.2225660799995 + }, + "status_counts": {}, + "error_counts": {}, + "instance_counts": {} + }, + "all": { + "attempted": 2107, + "successful": 2104, + "errors": 3, + "successful_rps": 70.13333333333334, + "successful_latency_ms": { + "p50": 213.502144, + "p95": 2947.47390755, + "p99": 3767.175285259999 + }, + "status_counts": { + "200": 1686, + "201": 418, + "other": 0, + "network": 3 + }, + "error_counts": {}, + "instance_counts": { + "4976fe957a50": 595, + "147b78cc1a85": 542, + "064b0e307a1a": 368, + "c61ac847afb7": 599 + } + } + }, + "timing": { + "measurement_started_epoch_ms": 1793253014126, + "measurement_scheduled_end_epoch_ms": 1793253044126, + "measurement_completed_epoch_ms": 1793253041922 + }, + "client": { + "engine": "k6", + "scheduler_lateness_measured": false, + "raw_dropped_iterations_including_warmup": 466, + "peak_vus": 148, + "max_vus": 128 + }, + "all_latency_ms": { + "p50": 218.233932, + "p95": 2950.8826460999994, + "p99": 3873.8377928600007 + }, + "criterion": { + "delivery_fraction": 0.8779166666666667, + "error_fraction": 0.0014238253440911248, + "all_request_p95_ms": 2950.8826460999994, + "delivery_valid": false, + "slo_pass": false, + "classification": "generator_limited" + }, + "diagnostics": { + "resources": { + "api-1": { + "samples": 30, + "coverage_seconds": 28.627, + "max_sample_gap_seconds": 1.185, + "mean_cpu_cores": 0.27038613895972335, + "throttled_seconds": 2.682899, + "throttled_period_fraction": 0.1461038961038961, + "peak_memory_mib": 174.46875, + "oom_kills": 0 + }, + "api-2": { + "samples": 30, + "coverage_seconds": 28.045, + "max_sample_gap_seconds": 1.235, + "mean_cpu_cores": 0.1853335353895525, + "throttled_seconds": 1.30054, + "throttled_period_fraction": 0.07931034482758621, + "peak_memory_mib": 126.41015625, + "oom_kills": 0 + }, + "api-3": { + "samples": 30, + "coverage_seconds": 29.058, + "max_sample_gap_seconds": 1.53, + "mean_cpu_cores": 0.27715434647945486, + "throttled_seconds": 3.252508, + "throttled_period_fraction": 0.14376996805111822, + "peak_memory_mib": 168.10546875, + "oom_kills": 0 + }, + "api-4": { + "samples": 29, + "coverage_seconds": 28.627, + "max_sample_gap_seconds": 1.615, + "mean_cpu_cores": 0.26756394313061094, + "throttled_seconds": 2.613637, + "throttled_period_fraction": 0.12786885245901639, + "peak_memory_mib": 162.93359375, + "oom_kills": 0 + }, + "postgres": { + "samples": 14, + "coverage_seconds": 26.0, + "max_sample_gap_seconds": 3.0, + "mean_cpu_cores": 0.47014373076923077, + "throttled_seconds": 0.167389, + "throttled_period_fraction": 0.031914893617021274, + "peak_memory_mib": 239.87890625, + "oom_kills": 0 + }, + "nginx": { + "samples": 15, + "coverage_seconds": 28.0, + "max_sample_gap_seconds": 3.0, + "mean_cpu_cores": 0.12268660714285715, + "throttled_seconds": 0.105997, + "throttled_period_fraction": 0.017543859649122806, + "peak_memory_mib": 12.75, + "oom_kills": 0 + }, + "redis": { + "samples": 16, + "coverage_seconds": 29.0, + "max_sample_gap_seconds": 3.0, + "mean_cpu_cores": 0.08269237931034483, + "throttled_seconds": 0.005154, + "throttled_period_fraction": 0.0064516129032258064, + "peak_memory_mib": 14.61328125, + "oom_kills": 0 + }, + "generator": { + "samples": 15, + "coverage_seconds": 28.0, + "max_sample_gap_seconds": 3.0, + "mean_cpu_cores": 0.28446810714285714, + "throttled_seconds": 0.0, + "throttled_period_fraction": 0.0, + "peak_memory_mib": 119.1328125, + "oom_kills": 0 + } + }, + "pools": { + "api-1": { + "samples": 30, + "acquisitions": 1085, + "acquisition_errors": 0, + "mean_acquisition_ms": 226.53878039631275, + "max_acquisition_ms": 1477.9215289999847, + "max_waiting": 33, + "queued_interval_fraction": 0.5666666666666667, + "max_total": 8, + "observed_connection_increases": 0, + "observed_connection_decreases": 0, + "event_loop_p99_max_ms": 569.376767 + }, + "api-2": { + "samples": 30, + "acquisitions": 726, + "acquisition_errors": 0, + "mean_acquisition_ms": 134.9292667809914, + "max_acquisition_ms": 1389.1994619999896, + "max_waiting": 29, + "queued_interval_fraction": 0.26666666666666666, + "max_total": 8, + "observed_connection_increases": 0, + "observed_connection_decreases": 0, + "event_loop_p99_max_ms": 404.750335 + }, + "api-3": { + "samples": 30, + "acquisitions": 1184, + "acquisition_errors": 0, + "mean_acquisition_ms": 209.90008701773468, + "max_acquisition_ms": 1097.988355999987, + "max_waiting": 29, + "queued_interval_fraction": 0.5666666666666667, + "max_total": 8, + "observed_connection_increases": 0, + "observed_connection_decreases": 0, + "event_loop_p99_max_ms": 540.016639 + }, + "api-4": { + "samples": 29, + "acquisitions": 1179, + "acquisition_errors": 0, + "mean_acquisition_ms": 193.00349765224797, + "max_acquisition_ms": 1495.9323379999842, + "max_waiting": 28, + "queued_interval_fraction": 0.5172413793103449, + "max_total": 8, + "observed_connection_increases": 0, + "observed_connection_decreases": 0, + "event_loop_p99_max_ms": 741.867519 + } + }, + "host": { + "samples": 14, + "cpu_some_fraction": 0.6977150769230769, + "memory_some_fraction": 0.025373076923076922, + "memory_full_fraction": 0.01143473076923077, + "io_some_fraction": 0.02454773076923077, + "io_full_fraction": 0.004109615384615384, + "min_available_mib": 986.69140625, + "max_swap_used_mib": 258.4765625 + }, + "postgres": { + "samples": 17, + "max_active": 14, + "max_idle_in_transaction": 9, + "active_wait_observations": { + "IO/WalSync": 3, + "Lock/transactionid": 8, + "LWLock/WALWrite": 4, + "no_wait_event/-": 33, + "Client/ClientRead": 3, + "IO/WalWrite": 1, + "LWLock/WALInsert": 1, + "LWLock/BufferContent": 5 + } + }, + "nginx": { + "samples": 15, + "upstream_changes": 2, + "min_ready": 3, + "max_ready": 4 + }, + "limits_reached": { + "generator_late": false, + "client_capacity": true, + "request_errors": false, + "latency": true + }, + "diagnostics_complete": true + }, + "source_hashes": { + "benchmark": "f7e18004a428bc39084a04def872bf613d7ba4bc6ad74d6f7ed37ef075f8d8d0", + "summary": "8a15fb2352a66880eecf67e62c5ee994871de18a9f832a17b534014facc782e6" + } + }, + { + "dataset": "api-cpu", + "variant": "four", + "configuration": "four", + "manifest": "api-small-growth-20261029", + "label": "four-r40-confirmation-38", + "profile": { + "arrival_model": "k6 constant-arrival-rate; one HTTP request per iteration", + "offered_rps": 40, + "duration_seconds": 30, + "warmup_seconds": 10, + "warmup_profile": "same 80/20 workload at target rate", + "read_percent": 80, + "write_percent": 20, + "initial_messages": 30, + "history_limit": 50, + "max_in_flight": 128, + "timeout_ms": 5000, + "automatic_retries": false, + "expected_instances": 4, + "phase": "confirmation" + }, + "measurement": { + "scheduled_slots": 1200, + "client_dropped_slots": 0, + "scheduler_late_slots": 0, + "read": { + "attempted": 961, + "successful": 961, + "errors": 0, + "successful_rps": 32.03333333333333, + "successful_latency_ms": { + "p50": 21.19621, + "p95": 786.205144, + "p99": 1276.828046199999 + }, + "status_counts": {}, + "error_counts": {}, + "instance_counts": {} + }, + "write": { + "attempted": 240, + "successful": 240, + "errors": 0, + "successful_rps": 8, + "successful_latency_ms": { + "p50": 56.005873, + "p95": 1555.3231531, + "p99": 2160.1066866999986 + }, + "status_counts": {}, + "error_counts": {}, + "instance_counts": {} + }, + "all": { + "attempted": 1201, + "successful": 1201, + "errors": 0, + "successful_rps": 40.03333333333333, + "successful_latency_ms": { + "p50": 28.576715, + "p95": 1044.026936, + "p99": 1622.646796 + }, + "status_counts": { + "200": 961, + "201": 240, + "other": 0, + "network": 0 + }, + "error_counts": {}, + "instance_counts": { + "4976fe957a50": 296, + "064b0e307a1a": 302, + "c61ac847afb7": 304, + "147b78cc1a85": 299 + } + } + }, + "timing": { + "measurement_started_epoch_ms": 1793253060896, + "measurement_scheduled_end_epoch_ms": 1793253090896, + "measurement_completed_epoch_ms": 1793253088492 + }, + "client": { + "engine": "k6", + "scheduler_lateness_measured": false, + "raw_dropped_iterations_including_warmup": 0, + "peak_vus": 50, + "max_vus": 128 + }, + "all_latency_ms": { + "p50": 28.576715, + "p95": 1044.026936, + "p99": 1622.646796 + }, + "criterion": { + "delivery_fraction": 1.0008333333333332, + "error_fraction": 0.0, + "all_request_p95_ms": 1044.026936, + "delivery_valid": true, + "slo_pass": false, + "classification": "slo_fail" + }, + "diagnostics": { + "resources": { + "api-1": { + "samples": 31, + "coverage_seconds": 28.733, + "max_sample_gap_seconds": 1.239, + "mean_cpu_cores": 0.14980395364215363, + "throttled_seconds": 1.619804, + "throttled_period_fraction": 0.041935483870967745, + "peak_memory_mib": 193.0546875, + "oom_kills": 0 + }, + "api-2": { + "samples": 31, + "coverage_seconds": 28.598, + "max_sample_gap_seconds": 1.122, + "mean_cpu_cores": 0.14295394782851947, + "throttled_seconds": 0.570804, + "throttled_period_fraction": 0.03896103896103896, + "peak_memory_mib": 150.5703125, + "oom_kills": 0 + }, + "api-3": { + "samples": 31, + "coverage_seconds": 28.653, + "max_sample_gap_seconds": 1.162, + "mean_cpu_cores": 0.152200397864098, + "throttled_seconds": 1.04238, + "throttled_period_fraction": 0.048701298701298704, + "peak_memory_mib": 171.8515625, + "oom_kills": 0 + }, + "api-4": { + "samples": 31, + "coverage_seconds": 28.852, + "max_sample_gap_seconds": 1.276, + "mean_cpu_cores": 0.13469430195480384, + "throttled_seconds": 0.417985, + "throttled_period_fraction": 0.03571428571428571, + "peak_memory_mib": 184.03125, + "oom_kills": 0 + }, + "postgres": { + "samples": 15, + "coverage_seconds": 28.0, + "max_sample_gap_seconds": 3.0, + "mean_cpu_cores": 0.30819364285714285, + "throttled_seconds": 0.061306, + "throttled_period_fraction": 0.00980392156862745, + "peak_memory_mib": 241.28515625, + "oom_kills": 0 + }, + "nginx": { + "samples": 16, + "coverage_seconds": 29.0, + "max_sample_gap_seconds": 3.0, + "mean_cpu_cores": 0.09743762068965517, + "throttled_seconds": 0.365704, + "throttled_period_fraction": 0.016181229773462782, + "peak_memory_mib": 10.32421875, + "oom_kills": 0 + }, + "redis": { + "samples": 15, + "coverage_seconds": 28.0, + "max_sample_gap_seconds": 3.0, + "mean_cpu_cores": 0.07585685714285714, + "throttled_seconds": 0.265169, + "throttled_period_fraction": 0.02702702702702703, + "peak_memory_mib": 13.15234375, + "oom_kills": 0 + }, + "generator": { + "samples": 16, + "coverage_seconds": 29.0, + "max_sample_gap_seconds": 3.0, + "mean_cpu_cores": 0.22616879310344828, + "throttled_seconds": 0.0, + "throttled_period_fraction": 0.0, + "peak_memory_mib": 101.890625, + "oom_kills": 0 + } + }, + "pools": { + "api-1": { + "samples": 31, + "acquisitions": 487, + "acquisition_errors": 0, + "mean_acquisition_ms": 1.0109056201223208, + "max_acquisition_ms": 76.99305799999274, + "max_waiting": 1, + "queued_interval_fraction": 0.03225806451612903, + "max_total": 8, + "observed_connection_increases": 0, + "observed_connection_decreases": 0, + "event_loop_p99_max_ms": 560.463871 + }, + "api-2": { + "samples": 31, + "acquisitions": 485, + "acquisition_errors": 0, + "mean_acquisition_ms": 1.5552345340206173, + "max_acquisition_ms": 139.61983000003966, + "max_waiting": 2, + "queued_interval_fraction": 0.03225806451612903, + "max_total": 8, + "observed_connection_increases": 0, + "observed_connection_decreases": 0, + "event_loop_p99_max_ms": 313.786367 + }, + "api-3": { + "samples": 31, + "acquisitions": 507, + "acquisition_errors": 0, + "mean_acquisition_ms": 1.0681287731784277, + "max_acquisition_ms": 102.36154900002293, + "max_waiting": 2, + "queued_interval_fraction": 0.03225806451612903, + "max_total": 8, + "observed_connection_increases": 0, + "observed_connection_decreases": 0, + "event_loop_p99_max_ms": 341.573631 + }, + "api-4": { + "samples": 31, + "acquisitions": 499, + "acquisition_errors": 0, + "mean_acquisition_ms": 2.249495651306051, + "max_acquisition_ms": 146.1191069999477, + "max_waiting": 2, + "queued_interval_fraction": 0.06451612903225806, + "max_total": 8, + "observed_connection_increases": 0, + "observed_connection_decreases": 0, + "event_loop_p99_max_ms": 308.805631 + } + }, + "host": { + "samples": 15, + "cpu_some_fraction": 0.5372631785714286, + "memory_some_fraction": 0.022342821428571427, + "memory_full_fraction": 0.008703107142857143, + "io_some_fraction": 0.017196464285714287, + "io_full_fraction": 0.004038857142857143, + "min_available_mib": 942.16015625, + "max_swap_used_mib": 258.4765625 + }, + "postgres": { + "samples": 16, + "max_active": 18, + "max_idle_in_transaction": 4, + "active_wait_observations": { + "no_wait_event/-": 39, + "IO/WalSync": 1, + "Lock/transactionid": 3, + "LWLock/BufferContent": 2, + "LWLock/WALWrite": 3, + "Client/ClientRead": 1 + } + }, + "nginx": { + "samples": 16, + "upstream_changes": 0, + "min_ready": 4, + "max_ready": 4 + }, + "limits_reached": { + "generator_late": false, + "client_capacity": false, + "request_errors": false, + "latency": true + }, + "diagnostics_complete": true + }, + "source_hashes": { + "benchmark": "27e6c3140d79d440f2be425ebb411d4dd63938f79580e4f176f7cf5d6a9e78d3", + "summary": "c3e4714f5b5e896e8cc446806ff1267461c0cdb772f31fb8d004c2bc052c7a18" + } + }, + { + "dataset": "api-cpu", + "variant": "four", + "configuration": "four", + "manifest": "api-small-growth-20261029", + "label": "four-r80-confirmation-39", + "profile": { + "arrival_model": "k6 constant-arrival-rate; one HTTP request per iteration", + "offered_rps": 80, + "duration_seconds": 30, + "warmup_seconds": 10, + "warmup_profile": "same 80/20 workload at target rate", + "read_percent": 80, + "write_percent": 20, + "initial_messages": 30, + "history_limit": 50, + "max_in_flight": 128, + "timeout_ms": 5000, + "automatic_retries": false, + "expected_instances": 4, + "phase": "confirmation" + }, + "measurement": { + "scheduled_slots": 2400, + "client_dropped_slots": 94, + "scheduler_late_slots": 0, + "read": { + "attempted": 1845, + "successful": 1845, + "errors": 0, + "successful_rps": 61.5, + "successful_latency_ms": { + "p50": 152.555291, + "p95": 1713.1115461999998, + "p99": 2105.502111679999 + }, + "status_counts": {}, + "error_counts": {}, + "instance_counts": {} + }, + "write": { + "attempted": 461, + "successful": 461, + "errors": 0, + "successful_rps": 15.366666666666667, + "successful_latency_ms": { + "p50": 389.585016, + "p95": 2911.5137959999997, + "p99": 3602.725143799998 + }, + "status_counts": {}, + "error_counts": {}, + "instance_counts": {} + }, + "all": { + "attempted": 2306, + "successful": 2306, + "errors": 0, + "successful_rps": 76.86666666666666, + "successful_latency_ms": { + "p50": 178.069107, + "p95": 2106.622289, + "p99": 2973.419937949996 + }, + "status_counts": { + "200": 1845, + "201": 461, + "other": 0, + "network": 0 + }, + "error_counts": {}, + "instance_counts": { + "c61ac847afb7": 580, + "064b0e307a1a": 578, + "147b78cc1a85": 573, + "4976fe957a50": 575 + } + } + }, + "timing": { + "measurement_started_epoch_ms": 1793253111255, + "measurement_scheduled_end_epoch_ms": 1793253141255, + "measurement_completed_epoch_ms": 1793253138897 + }, + "client": { + "engine": "k6", + "scheduler_lateness_measured": false, + "raw_dropped_iterations_including_warmup": 95, + "peak_vus": 128, + "max_vus": 128 + }, + "all_latency_ms": { + "p50": 178.069107, + "p95": 2106.622289, + "p99": 2973.419937949996 + }, + "criterion": { + "delivery_fraction": 0.9608333333333333, + "error_fraction": 0.0, + "all_request_p95_ms": 2106.622289, + "delivery_valid": false, + "slo_pass": false, + "classification": "generator_limited" + }, + "diagnostics": { + "resources": { + "api-1": { + "samples": 32, + "coverage_seconds": 28.399, + "max_sample_gap_seconds": 1.37, + "mean_cpu_cores": 0.2368696785098067, + "throttled_seconds": 1.096949, + "throttled_period_fraction": 0.04833836858006042, + "peak_memory_mib": 213.40234375, + "oom_kills": 0 + }, + "api-2": { + "samples": 33, + "coverage_seconds": 28.61, + "max_sample_gap_seconds": 1.218, + "mean_cpu_cores": 0.24043303040894792, + "throttled_seconds": 1.436624, + "throttled_period_fraction": 0.057057057057057055, + "peak_memory_mib": 169.4765625, + "oom_kills": 0 + }, + "api-3": { + "samples": 32, + "coverage_seconds": 29.003, + "max_sample_gap_seconds": 1.242, + "mean_cpu_cores": 0.2441508809433507, + "throttled_seconds": 0.711848, + "throttled_period_fraction": 0.05621301775147929, + "peak_memory_mib": 172.40234375, + "oom_kills": 0 + }, + "api-4": { + "samples": 32, + "coverage_seconds": 29.174, + "max_sample_gap_seconds": 1.241, + "mean_cpu_cores": 0.24552327414821418, + "throttled_seconds": 0.524055, + "throttled_period_fraction": 0.04437869822485207, + "peak_memory_mib": 186.453125, + "oom_kills": 0 + }, + "postgres": { + "samples": 16, + "coverage_seconds": 29.0, + "max_sample_gap_seconds": 3.0, + "mean_cpu_cores": 0.46597120689655175, + "throttled_seconds": 0.269297, + "throttled_period_fraction": 0.026706231454005934, + "peak_memory_mib": 241.16015625, + "oom_kills": 0 + }, + "nginx": { + "samples": 15, + "coverage_seconds": 27.0, + "max_sample_gap_seconds": 3.0, + "mean_cpu_cores": 0.11277233333333334, + "throttled_seconds": 0.191635, + "throttled_period_fraction": 0.02711864406779661, + "peak_memory_mib": 11.19921875, + "oom_kills": 0 + }, + "redis": { + "samples": 17, + "coverage_seconds": 28.0, + "max_sample_gap_seconds": 3.0, + "mean_cpu_cores": 0.084553, + "throttled_seconds": 0.171716, + "throttled_period_fraction": 0.012121212121212121, + "peak_memory_mib": 14.9375, + "oom_kills": 0 + }, + "generator": { + "samples": 16, + "coverage_seconds": 27.0, + "max_sample_gap_seconds": 3.0, + "mean_cpu_cores": 0.30925837037037035, + "throttled_seconds": 0.0, + "throttled_period_fraction": 0.0, + "peak_memory_mib": 112.12890625, + "oom_kills": 0 + } + }, + "pools": { + "api-1": { + "samples": 32, + "acquisitions": 1125, + "acquisition_errors": 0, + "mean_acquisition_ms": 121.74003910844436, + "max_acquisition_ms": 1945.2478230000124, + "max_waiting": 23, + "queued_interval_fraction": 0.375, + "max_total": 8, + "observed_connection_increases": 2, + "observed_connection_decreases": 2, + "event_loop_p99_max_ms": 382.992383 + }, + "api-2": { + "samples": 33, + "acquisitions": 1140, + "acquisition_errors": 0, + "mean_acquisition_ms": 112.20207406929765, + "max_acquisition_ms": 2399.325087000034, + "max_waiting": 23, + "queued_interval_fraction": 0.3939393939393939, + "max_total": 8, + "observed_connection_increases": 2, + "observed_connection_decreases": 2, + "event_loop_p99_max_ms": 583.008255 + }, + "api-3": { + "samples": 32, + "acquisitions": 1142, + "acquisition_errors": 0, + "mean_acquisition_ms": 111.46380255078662, + "max_acquisition_ms": 1670.8331159999943, + "max_waiting": 25, + "queued_interval_fraction": 0.40625, + "max_total": 8, + "observed_connection_increases": 1, + "observed_connection_decreases": 0, + "event_loop_p99_max_ms": 311.164927 + }, + "api-4": { + "samples": 32, + "acquisitions": 1168, + "acquisition_errors": 0, + "mean_acquisition_ms": 101.13833596318409, + "max_acquisition_ms": 2485.8673680000356, + "max_waiting": 22, + "queued_interval_fraction": 0.40625, + "max_total": 8, + "observed_connection_increases": 0, + "observed_connection_decreases": 0, + "event_loop_p99_max_ms": 370.671615 + } + }, + "host": { + "samples": 16, + "cpu_some_fraction": 0.6560908275862068, + "memory_some_fraction": 0.01428451724137931, + "memory_full_fraction": 0.009479137931034482, + "io_some_fraction": 0.01956048275862069, + "io_full_fraction": 0.005960931034482759, + "min_available_mib": 916.62109375, + "max_swap_used_mib": 258.734375 + }, + "postgres": { + "samples": 16, + "max_active": 11, + "max_idle_in_transaction": 10, + "active_wait_observations": { + "Client/ClientRead": 13, + "LWLock/LockManager": 1, + "no_wait_event/-": 23, + "Lock/transactionid": 8, + "IO/WalSync": 2, + "LWLock/WALWrite": 3, + "LWLock/BufferContent": 1, + "LWLock/WALInsert": 1 + } + }, + "nginx": { + "samples": 15, + "upstream_changes": 0, + "min_ready": 4, + "max_ready": 4 + }, + "limits_reached": { + "generator_late": false, + "client_capacity": false, + "request_errors": false, + "latency": true + }, + "diagnostics_complete": true + }, + "source_hashes": { + "benchmark": "32b9341ebd8780167753b98928d418cb07caa2bdfdfb9ef617caa4ecc3fd9545", + "summary": "e06d323c7a560498cbcefd7311443cba7232b2cd3e2be6a1781b8a7626555ba9" + } + }, + { + "dataset": "pg-cpu", + "variant": "pg0.5", + "configuration": "four", + "manifest": "diagnostics-v3-linux-20261028", + "label": "four-r60-repeat1", + "profile": { + "arrival_model": "scheduled open loop; late or over-capacity slots dropped", + "offered_rps": 60, + "duration_seconds": 120, + "warmup_seconds": 20, + "warmup_profile": "read only", + "read_percent": 80, + "write_percent": 20, + "initial_messages": 30, + "history_limit": 50, + "max_in_flight": 64, + "timeout_ms": 5000, + "automatic_retries": false, + "expected_instances": 4 + }, + "measurement": { + "scheduled_slots": 7200, + "client_dropped_slots": 498, + "scheduler_late_slots": 453, + "read": { + "attempted": 5355, + "successful": 5329, + "errors": 26, + "successful_rps": 44.408, + "status_counts": { + "200": 5329, + "network": 26 + }, + "error_counts": { + "timeout": 26 + }, + "instance_counts": { + "331a9f18faa1": 1328, + "48e242801a29": 1349, + "5f50e56fe9a0": 1312, + "0be78ec84035": 1340 + }, + "successful_latency_ms": { + "p50": 20.31, + "p95": 363.614, + "p99": 1666.116 + } + }, + "write": { + "attempted": 1347, + "successful": 1340, + "errors": 7, + "successful_rps": 11.167, + "status_counts": { + "201": 1340, + "network": 7 + }, + "error_counts": { + "timeout": 7 + }, + "instance_counts": { + "0be78ec84035": 340, + "331a9f18faa1": 318, + "5f50e56fe9a0": 345, + "48e242801a29": 337 + }, + "successful_latency_ms": { + "p50": 53.271, + "p95": 1158.461, + "p99": 3087.749 + } + }, + "all": { + "attempted": 6702, + "successful": 6669, + "errors": 33, + "successful_rps": 55.575, + "status_counts": { + "200": 5329, + "201": 1340, + "network": 33 + }, + "error_counts": { + "timeout": 33 + }, + "instance_counts": { + "331a9f18faa1": 1646, + "48e242801a29": 1686, + "5f50e56fe9a0": 1657, + "0be78ec84035": 1680 + }, + "successful_latency_ms": { + "p50": 25.463, + "p95": 576.18, + "p99": 2086.454 + } + } + }, + "timing": { + "measurement_started_epoch_ms": 1793197196934, + "measurement_scheduled_end_epoch_ms": 1793197316934, + "measurement_completed_epoch_ms": 1793197312829 + }, + "client": { + "cpu_seconds": 21.981, + "rss_before_mib": 119.23, + "rss_after_mib": 154.23, + "event_loop_delay_ms": { + "mean": 23.095, + "p99": 68.682 + } + }, + "all_latency_ms": null, + "criterion": null, + "diagnostics": { + "resources": { + "api-1": { + "samples": 118, + "coverage_seconds": 116.151, + "max_sample_gap_seconds": 1.212, + "mean_cpu_cores": 0.16792331533951493, + "throttled_seconds": 5.358086, + "throttled_period_fraction": 0.04829308909242298, + "peak_memory_mib": 101.4296875, + "oom_kills": 0 + }, + "api-2": { + "samples": 119, + "coverage_seconds": 117.111, + "max_sample_gap_seconds": 1.102, + "mean_cpu_cores": 0.16577038877645994, + "throttled_seconds": 4.087681, + "throttled_period_fraction": 0.040429042904290426, + "peak_memory_mib": 102.3046875, + "oom_kills": 0 + }, + "api-3": { + "samples": 119, + "coverage_seconds": 117.033, + "max_sample_gap_seconds": 1.132, + "mean_cpu_cores": 0.16109235002093428, + "throttled_seconds": 4.568926, + "throttled_period_fraction": 0.0371900826446281, + "peak_memory_mib": 102.0546875, + "oom_kills": 0 + }, + "api-4": { + "samples": 119, + "coverage_seconds": 117.311, + "max_sample_gap_seconds": 1.317, + "mean_cpu_cores": 0.15691420241921047, + "throttled_seconds": 4.252021, + "throttled_period_fraction": 0.03642384105960265, + "peak_memory_mib": 106.28125, + "oom_kills": 0 + }, + "postgres": { + "samples": 57, + "coverage_seconds": 118.0, + "max_sample_gap_seconds": 4.0, + "mean_cpu_cores": 0.3220422288135593, + "throttled_seconds": 67.856006, + "throttled_period_fraction": 0.33305369127516776, + "peak_memory_mib": 267.37109375, + "oom_kills": 0 + }, + "nginx": { + "samples": 60, + "coverage_seconds": 119.0, + "max_sample_gap_seconds": 4.0, + "mean_cpu_cores": 0.08847147899159664, + "throttled_seconds": 0.642138, + "throttled_period_fraction": 0.015780730897009966, + "peak_memory_mib": 11.2890625, + "oom_kills": 0 + }, + "redis": { + "samples": 61, + "coverage_seconds": 119.0, + "max_sample_gap_seconds": 3.0, + "mean_cpu_cores": 0.05647594957983193, + "throttled_seconds": 0.540971, + "throttled_period_fraction": 0.009764035801464606, + "peak_memory_mib": 15.28515625, + "oom_kills": 0 + } + }, + "pools": { + "api-1": { + "samples": 118, + "acquisitions": 2934, + "acquisition_errors": 5, + "mean_acquisition_ms": 24.031120874233114, + "max_acquisition_ms": 5022.990372, + "max_waiting": 1, + "queued_interval_fraction": 0.025423728813559324, + "max_total": 15, + "observed_connection_increases": 20, + "observed_connection_decreases": 17, + "event_loop_p99_max_ms": 367.525887 + }, + "api-2": { + "samples": 119, + "acquisitions": 2855, + "acquisition_errors": 5, + "mean_acquisition_ms": 23.717839687214884, + "max_acquisition_ms": 5003.739866999997, + "max_waiting": 2, + "queued_interval_fraction": 0.04201680672268908, + "max_total": 15, + "observed_connection_increases": 17, + "observed_connection_decreases": 14, + "event_loop_p99_max_ms": 568.328191 + }, + "api-3": { + "samples": 119, + "acquisitions": 2845, + "acquisition_errors": 4, + "mean_acquisition_ms": 21.616691746221846, + "max_acquisition_ms": 5022.497073000006, + "max_waiting": 1, + "queued_interval_fraction": 0.04201680672268908, + "max_total": 15, + "observed_connection_increases": 17, + "observed_connection_decreases": 14, + "event_loop_p99_max_ms": 531.365887 + }, + "api-4": { + "samples": 119, + "acquisitions": 2779, + "acquisition_errors": 6, + "mean_acquisition_ms": 25.093788774379355, + "max_acquisition_ms": 5009.711042999988, + "max_waiting": 1, + "queued_interval_fraction": 0.025210084033613446, + "max_total": 15, + "observed_connection_increases": 19, + "observed_connection_decreases": 16, + "event_loop_p99_max_ms": 434.110463 + } + }, + "host": { + "samples": 57, + "cpu_some_fraction": 0.5256348644067796, + "memory_some_fraction": 0.0013586101694915255, + "memory_full_fraction": 0.0009279576271186441, + "io_some_fraction": 0.012464627118644067, + "io_full_fraction": 0.004047491525423729, + "min_available_mib": 1150.01953125, + "max_swap_used_mib": 184.59375 + }, + "postgres": { + "samples": 62, + "max_active": 24, + "max_idle_in_transaction": 6, + "active_wait_observations": { + "no_wait_event/-": 110, + "IPC/ProcarrayGroupUpdate": 1, + "Lock/transactionid": 14, + "LWLock/ProcArray": 1, + "LWLock/BufferContent": 2, + "LWLock/WALInsert": 2, + "IO/WalWrite": 2, + "LWLock/WALWrite": 19, + "IO/WalSync": 5, + "Client/ClientRead": 1, + "LWLock/LockManager": 1 + } + }, + "nginx": { + "samples": 60, + "upstream_changes": 0, + "min_ready": 4, + "max_ready": 4 + }, + "limits_reached": { + "generator_late": true, + "client_capacity": false, + "request_errors": false, + "latency": false + }, + "diagnostics_complete": true + }, + "source_hashes": { + "benchmark": "ff5fcb279fc57ac8c21e952437233af5e33a3dda8ef1ac9ddbeed7bf0d8aee80", + "summary": "5e482e6a38678bf463579d5bb139eabc01ccea07d0cac8707312870aa16b59a5" + } + }, + { + "dataset": "pg-cpu", + "variant": "pg0.5", + "configuration": "four", + "manifest": "diagnostics-v3-linux-20261028", + "label": "four-r60-repeat2", + "profile": { + "arrival_model": "scheduled open loop; late or over-capacity slots dropped", + "offered_rps": 60, + "duration_seconds": 120, + "warmup_seconds": 20, + "warmup_profile": "read only", + "read_percent": 80, + "write_percent": 20, + "initial_messages": 30, + "history_limit": 50, + "max_in_flight": 64, + "timeout_ms": 5000, + "automatic_retries": false, + "expected_instances": 4 + }, + "measurement": { + "scheduled_slots": 7200, + "client_dropped_slots": 1260, + "scheduler_late_slots": 1093, + "read": { + "attempted": 4752, + "successful": 4701, + "errors": 51, + "successful_rps": 39.175, + "status_counts": { + "200": 4701, + "network": 51 + }, + "error_counts": { + "timeout": 50, + "network_or_parse": 1 + }, + "instance_counts": { + "5f50e56fe9a0": 1157, + "331a9f18faa1": 1268, + "48e242801a29": 1188, + "0be78ec84035": 1088 + }, + "successful_latency_ms": { + "p50": 62.166, + "p95": 1101.837, + "p99": 2377.929 + } + }, + "write": { + "attempted": 1188, + "successful": 1163, + "errors": 25, + "successful_rps": 9.692, + "status_counts": { + "201": 1163, + "503": 1, + "network": 24 + }, + "error_counts": { + "timeout": 24, + "http_503": 1 + }, + "instance_counts": { + "0be78ec84035": 294, + "48e242801a29": 292, + "5f50e56fe9a0": 286, + "331a9f18faa1": 292 + }, + "successful_latency_ms": { + "p50": 174.244, + "p95": 2942.631, + "p99": 4262.368 + } + }, + "all": { + "attempted": 5940, + "successful": 5864, + "errors": 76, + "successful_rps": 48.867, + "status_counts": { + "200": 4701, + "201": 1163, + "503": 1, + "network": 75 + }, + "error_counts": { + "timeout": 74, + "http_503": 1, + "network_or_parse": 1 + }, + "instance_counts": { + "5f50e56fe9a0": 1443, + "331a9f18faa1": 1560, + "48e242801a29": 1480, + "0be78ec84035": 1382 + }, + "successful_latency_ms": { + "p50": 75.384, + "p95": 1570.711, + "p99": 3408.81 + } + } + }, + "timing": { + "measurement_started_epoch_ms": 1793197361362, + "measurement_scheduled_end_epoch_ms": 1793197481362, + "measurement_completed_epoch_ms": 1793197477152 + }, + "client": { + "cpu_seconds": 27.586, + "rss_before_mib": 116.934, + "rss_after_mib": 144.559, + "event_loop_delay_ms": { + "mean": 26.35, + "p99": 106.955 + } + }, + "all_latency_ms": null, + "criterion": null, + "diagnostics": { + "resources": { + "api-1": { + "samples": 117, + "coverage_seconds": 117.172, + "max_sample_gap_seconds": 1.424, + "mean_cpu_cores": 0.1815734305124091, + "throttled_seconds": 7.718689, + "throttled_period_fraction": 0.06611570247933884, + "peak_memory_mib": 133.05078125, + "oom_kills": 0 + }, + "api-2": { + "samples": 120, + "coverage_seconds": 118.639, + "max_sample_gap_seconds": 1.289, + "mean_cpu_cores": 0.18053264946602718, + "throttled_seconds": 5.709105, + "throttled_period_fraction": 0.06326034063260341, + "peak_memory_mib": 124.58203125, + "oom_kills": 0 + }, + "api-3": { + "samples": 119, + "coverage_seconds": 118.624, + "max_sample_gap_seconds": 1.482, + "mean_cpu_cores": 0.18128013724035608, + "throttled_seconds": 6.785475, + "throttled_period_fraction": 0.06792144026186579, + "peak_memory_mib": 126.88671875, + "oom_kills": 0 + }, + "api-4": { + "samples": 119, + "coverage_seconds": 118.506, + "max_sample_gap_seconds": 1.197, + "mean_cpu_cores": 0.18959452685939954, + "throttled_seconds": 8.033622, + "throttled_period_fraction": 0.07136997538966366, + "peak_memory_mib": 128.86328125, + "oom_kills": 0 + }, + "postgres": { + "samples": 47, + "coverage_seconds": 118.0, + "max_sample_gap_seconds": 7.0, + "mean_cpu_cores": 0.3908916525423729, + "throttled_seconds": 116.008205, + "throttled_period_fraction": 0.5467445742904842, + "peak_memory_mib": 277.22265625, + "oom_kills": 0 + }, + "nginx": { + "samples": 58, + "coverage_seconds": 118.0, + "max_sample_gap_seconds": 3.0, + "mean_cpu_cores": 0.11460483050847457, + "throttled_seconds": 3.249869, + "throttled_period_fraction": 0.04564666103127642, + "peak_memory_mib": 11.87109375, + "oom_kills": 0 + }, + "redis": { + "samples": 59, + "coverage_seconds": 117.0, + "max_sample_gap_seconds": 3.0, + "mean_cpu_cores": 0.08312675213675214, + "throttled_seconds": 1.255317, + "throttled_period_fraction": 0.022295623451692816, + "peak_memory_mib": 13.671875, + "oom_kills": 0 + } + }, + "pools": { + "api-1": { + "samples": 117, + "acquisitions": 2593, + "acquisition_errors": 11, + "mean_acquisition_ms": 39.34637219436931, + "max_acquisition_ms": 5595.55362999998, + "max_waiting": 2, + "queued_interval_fraction": 0.10256410256410256, + "max_total": 15, + "observed_connection_increases": 21, + "observed_connection_decreases": 17, + "event_loop_p99_max_ms": 781.713407 + }, + "api-2": { + "samples": 120, + "acquisitions": 2553, + "acquisition_errors": 15, + "mean_acquisition_ms": 49.67722545240859, + "max_acquisition_ms": 5288.426494000014, + "max_waiting": 3, + "queued_interval_fraction": 0.14166666666666666, + "max_total": 15, + "observed_connection_increases": 18, + "observed_connection_decreases": 13, + "event_loop_p99_max_ms": 840.433663 + }, + "api-3": { + "samples": 119, + "acquisitions": 2453, + "acquisition_errors": 10, + "mean_acquisition_ms": 49.64774810069355, + "max_acquisition_ms": 6618.169393999997, + "max_waiting": 3, + "queued_interval_fraction": 0.09243697478991597, + "max_total": 15, + "observed_connection_increases": 27, + "observed_connection_decreases": 23, + "event_loop_p99_max_ms": 860.880895 + }, + "api-4": { + "samples": 119, + "acquisitions": 2683, + "acquisition_errors": 11, + "mean_acquisition_ms": 37.78017616548584, + "max_acquisition_ms": 5145.373484999989, + "max_waiting": 2, + "queued_interval_fraction": 0.10084033613445378, + "max_total": 15, + "observed_connection_increases": 21, + "observed_connection_decreases": 16, + "event_loop_p99_max_ms": 282.591231 + } + }, + "host": { + "samples": 47, + "cpu_some_fraction": 0.6941428050847458, + "memory_some_fraction": 0.020453584745762712, + "memory_full_fraction": 0.007449161016949152, + "io_some_fraction": 0.02138427966101695, + "io_full_fraction": 0.0040489152542372885, + "min_available_mib": 1083.01953125, + "max_swap_used_mib": 190.1015625 + }, + "postgres": { + "samples": 62, + "max_active": 38, + "max_idle_in_transaction": 7, + "active_wait_observations": { + "IO/WalSync": 10, + "no_wait_event/-": 215, + "Client/ClientRead": 26, + "LWLock/WALWrite": 32, + "LWLock/BufferContent": 55, + "LWLock/MultiXactMemberSLRU": 1, + "Lock/transactionid": 42, + "IO/WalWrite": 3, + "LWLock/LockManager": 2, + "LWLock/MultiXactOffsetSLRU": 1, + "LWLock/WALInsert": 1 + } + }, + "nginx": { + "samples": 58, + "upstream_changes": 2, + "min_ready": 3, + "max_ready": 4 + }, + "limits_reached": { + "generator_late": true, + "client_capacity": false, + "request_errors": true, + "latency": true + }, + "diagnostics_complete": true + }, + "source_hashes": { + "benchmark": "2e37307e24eca171767f0f581a8ee763bf0f1376a94ab1b5981b09b2469e45cf", + "summary": "d6feba042c1c2dd025334bcd73e7ac1800ea65377746a037b855a22f7b036ac8" + } + }, + { + "dataset": "pg-cpu", + "variant": "pg0.5", + "configuration": "four", + "manifest": "diagnostics-v3-linux-20261028", + "label": "four-r60-repeat3", + "profile": { + "arrival_model": "scheduled open loop; late or over-capacity slots dropped", + "offered_rps": 60, + "duration_seconds": 120, + "warmup_seconds": 20, + "warmup_profile": "read only", + "read_percent": 80, + "write_percent": 20, + "initial_messages": 30, + "history_limit": 50, + "max_in_flight": 64, + "timeout_ms": 5000, + "automatic_retries": false, + "expected_instances": 4 + }, + "measurement": { + "scheduled_slots": 7200, + "client_dropped_slots": 710, + "scheduler_late_slots": 648, + "read": { + "attempted": 5199, + "successful": 5192, + "errors": 7, + "successful_rps": 43.267, + "status_counts": { + "200": 5192, + "network": 7 + }, + "error_counts": { + "timeout": 7 + }, + "instance_counts": { + "331a9f18faa1": 1300, + "0be78ec84035": 1268, + "5f50e56fe9a0": 1302, + "48e242801a29": 1322 + }, + "successful_latency_ms": { + "p50": 20.208, + "p95": 595.91, + "p99": 1769.275 + } + }, + "write": { + "attempted": 1291, + "successful": 1286, + "errors": 5, + "successful_rps": 10.717, + "status_counts": { + "201": 1286, + "network": 5 + }, + "error_counts": { + "timeout": 5 + }, + "instance_counts": { + "48e242801a29": 319, + "331a9f18faa1": 313, + "0be78ec84035": 334, + "5f50e56fe9a0": 320 + }, + "successful_latency_ms": { + "p50": 52.499, + "p95": 1759.857, + "p99": 3025.671 + } + }, + "all": { + "attempted": 6490, + "successful": 6478, + "errors": 12, + "successful_rps": 53.983, + "status_counts": { + "200": 5192, + "201": 1286, + "network": 12 + }, + "error_counts": { + "timeout": 12 + }, + "instance_counts": { + "331a9f18faa1": 1613, + "0be78ec84035": 1602, + "5f50e56fe9a0": 1622, + "48e242801a29": 1641 + }, + "successful_latency_ms": { + "p50": 25.401, + "p95": 825.578, + "p99": 2398.068 + } + } + }, + "timing": { + "measurement_started_epoch_ms": 1793197521554, + "measurement_scheduled_end_epoch_ms": 1793197641554, + "measurement_completed_epoch_ms": 1793197637312 + }, + "client": { + "cpu_seconds": 23.649, + "rss_before_mib": 115.535, + "rss_after_mib": 151.16, + "event_loop_delay_ms": { + "mean": 23.724, + "p99": 85.721 + } + }, + "all_latency_ms": null, + "criterion": null, + "diagnostics": { + "resources": { + "api-1": { + "samples": 119, + "coverage_seconds": 117.635, + "max_sample_gap_seconds": 1.191, + "mean_cpu_cores": 0.148522735580397, + "throttled_seconds": 3.703965, + "throttled_period_fraction": 0.03792250618301731, + "peak_memory_mib": 152.69921875, + "oom_kills": 0 + }, + "api-2": { + "samples": 120, + "coverage_seconds": 118.129, + "max_sample_gap_seconds": 1.285, + "mean_cpu_cores": 0.15037768033251783, + "throttled_seconds": 4.964364, + "throttled_period_fraction": 0.04194078947368421, + "peak_memory_mib": 146.39453125, + "oom_kills": 0 + }, + "api-3": { + "samples": 120, + "coverage_seconds": 118.094, + "max_sample_gap_seconds": 1.216, + "mean_cpu_cores": 0.1482396142056328, + "throttled_seconds": 3.244934, + "throttled_period_fraction": 0.03536184210526316, + "peak_memory_mib": 147.94140625, + "oom_kills": 0 + }, + "api-4": { + "samples": 119, + "coverage_seconds": 117.739, + "max_sample_gap_seconds": 1.515, + "mean_cpu_cores": 0.15541140998309821, + "throttled_seconds": 8.147442, + "throttled_period_fraction": 0.051894563426688634, + "peak_memory_mib": 151.046875, + "oom_kills": 0 + }, + "postgres": { + "samples": 55, + "coverage_seconds": 119.0, + "max_sample_gap_seconds": 5.0, + "mean_cpu_cores": 0.340874731092437, + "throttled_seconds": 78.045488, + "throttled_period_fraction": 0.3823286540049546, + "peak_memory_mib": 267.171875, + "oom_kills": 0 + }, + "nginx": { + "samples": 59, + "coverage_seconds": 118.0, + "max_sample_gap_seconds": 3.0, + "mean_cpu_cores": 0.09489711016949152, + "throttled_seconds": 0.893814, + "throttled_period_fraction": 0.02164862614487927, + "peak_memory_mib": 10.72265625, + "oom_kills": 0 + }, + "redis": { + "samples": 60, + "coverage_seconds": 117.0, + "max_sample_gap_seconds": 3.0, + "mean_cpu_cores": 0.06867701709401709, + "throttled_seconds": 1.254546, + "throttled_period_fraction": 0.027115858668857847, + "peak_memory_mib": 14.25, + "oom_kills": 0 + } + }, + "pools": { + "api-1": { + "samples": 119, + "acquisitions": 2766, + "acquisition_errors": 0, + "mean_acquisition_ms": 9.455243046638433, + "max_acquisition_ms": 4352.507818999991, + "max_waiting": 3, + "queued_interval_fraction": 0.04201680672268908, + "max_total": 15, + "observed_connection_increases": 13, + "observed_connection_decreases": 7, + "event_loop_p99_max_ms": 408.158207 + }, + "api-2": { + "samples": 120, + "acquisitions": 2747, + "acquisition_errors": 0, + "mean_acquisition_ms": 9.103584307971822, + "max_acquisition_ms": 3560.2266610000515, + "max_waiting": 2, + "queued_interval_fraction": 0.041666666666666664, + "max_total": 15, + "observed_connection_increases": 13, + "observed_connection_decreases": 10, + "event_loop_p99_max_ms": 296.747007 + }, + "api-3": { + "samples": 120, + "acquisitions": 2740, + "acquisition_errors": 0, + "mean_acquisition_ms": 9.719532112408421, + "max_acquisition_ms": 3618.387018999958, + "max_waiting": 3, + "queued_interval_fraction": 0.041666666666666664, + "max_total": 15, + "observed_connection_increases": 15, + "observed_connection_decreases": 12, + "event_loop_p99_max_ms": 290.979839 + }, + "api-4": { + "samples": 119, + "acquisitions": 2721, + "acquisition_errors": 1, + "mean_acquisition_ms": 12.769552708563289, + "max_acquisition_ms": 5014.031811999972, + "max_waiting": 2, + "queued_interval_fraction": 0.04201680672268908, + "max_total": 15, + "observed_connection_increases": 15, + "observed_connection_decreases": 11, + "event_loop_p99_max_ms": 1005.584383 + } + }, + "host": { + "samples": 55, + "cpu_some_fraction": 0.5290928487394958, + "memory_some_fraction": 0.009364218487394958, + "memory_full_fraction": 0.005180714285714286, + "io_some_fraction": 0.01646294117647059, + "io_full_fraction": 0.005403277310924369, + "min_available_mib": 1022.703125, + "max_swap_used_mib": 194.625 + }, + "postgres": { + "samples": 63, + "max_active": 37, + "max_idle_in_transaction": 10, + "active_wait_observations": { + "no_wait_event/-": 139, + "Client/ClientRead": 30, + "IO/WalSync": 6, + "LWLock/WALWrite": 2, + "Lock/transactionid": 9, + "LWLock/LockManager": 1, + "LWLock/BufferContent": 10 + } + }, + "nginx": { + "samples": 59, + "upstream_changes": 0, + "min_ready": 4, + "max_ready": 4 + }, + "limits_reached": { + "generator_late": true, + "client_capacity": false, + "request_errors": false, + "latency": false + }, + "diagnostics_complete": true + }, + "source_hashes": { + "benchmark": "eb9e4deb1b95a3048130cbb0b967a2b76e639b7f0cd70f557d384fdf9f64ea04", + "summary": "09805de8aaf5227b47cbe99752489212c62cd8e0e368e7e27e3ff71864ad7cdd" + } + }, + { + "dataset": "pg-cpu", + "variant": "pg1", + "configuration": "four", + "manifest": "diagnostics-pg1cpu-linux-20261028", + "label": "four-r60-repeat1", + "profile": { + "arrival_model": "scheduled open loop; late or over-capacity slots dropped", + "offered_rps": 60, + "duration_seconds": 120, + "warmup_seconds": 20, + "warmup_profile": "read only", + "read_percent": 80, + "write_percent": 20, + "initial_messages": 30, + "history_limit": 50, + "max_in_flight": 64, + "timeout_ms": 5000, + "automatic_retries": false, + "expected_instances": 4 + }, + "measurement": { + "scheduled_slots": 7200, + "client_dropped_slots": 587, + "scheduler_late_slots": 587, + "read": { + "attempted": 5297, + "successful": 5297, + "errors": 0, + "successful_rps": 44.142, + "status_counts": { + "200": 5297 + }, + "error_counts": {}, + "instance_counts": { + "be15ed8d3392": 1332, + "e61ee4a43c4b": 1317, + "5fb62b603f9e": 1302, + "34ba7a14aac3": 1346 + }, + "successful_latency_ms": { + "p50": 13.876, + "p95": 164.158, + "p99": 707.086 + } + }, + "write": { + "attempted": 1316, + "successful": 1316, + "errors": 0, + "successful_rps": 10.967, + "status_counts": { + "201": 1316 + }, + "error_counts": {}, + "instance_counts": { + "34ba7a14aac3": 317, + "be15ed8d3392": 313, + "5fb62b603f9e": 344, + "e61ee4a43c4b": 342 + }, + "successful_latency_ms": { + "p50": 35.947, + "p95": 349.996, + "p99": 1078.626 + } + }, + "all": { + "attempted": 6613, + "successful": 6613, + "errors": 0, + "successful_rps": 55.108, + "status_counts": { + "200": 5297, + "201": 1316 + }, + "error_counts": {}, + "instance_counts": { + "be15ed8d3392": 1645, + "e61ee4a43c4b": 1659, + "5fb62b603f9e": 1646, + "34ba7a14aac3": 1663 + }, + "successful_latency_ms": { + "p50": 17.841, + "p95": 208.134, + "p99": 803.385 + } + } + }, + "timing": { + "measurement_started_epoch_ms": 1793198371487, + "measurement_scheduled_end_epoch_ms": 1793198491487, + "measurement_completed_epoch_ms": 1793198487103 + }, + "client": { + "cpu_seconds": 22.224, + "rss_before_mib": 117.918, + "rss_after_mib": 161.668, + "event_loop_delay_ms": { + "mean": 23.499, + "p99": 66.945 + } + }, + "all_latency_ms": null, + "criterion": null, + "diagnostics": { + "resources": { + "api-1": { + "samples": 118, + "coverage_seconds": 116.338, + "max_sample_gap_seconds": 1.18, + "mean_cpu_cores": 0.1665732950540666, + "throttled_seconds": 4.939522, + "throttled_period_fraction": 0.05062240663900415, + "peak_memory_mib": 99.546875, + "oom_kills": 0 + }, + "api-2": { + "samples": 117, + "coverage_seconds": 115.875, + "max_sample_gap_seconds": 1.154, + "mean_cpu_cores": 0.16440107874865156, + "throttled_seconds": 3.426667, + "throttled_period_fraction": 0.04326123128119801, + "peak_memory_mib": 101.3125, + "oom_kills": 0 + }, + "api-3": { + "samples": 118, + "coverage_seconds": 116.77, + "max_sample_gap_seconds": 1.21, + "mean_cpu_cores": 0.16684060974565385, + "throttled_seconds": 6.082282, + "throttled_period_fraction": 0.055463576158940396, + "peak_memory_mib": 103.9921875, + "oom_kills": 0 + }, + "api-4": { + "samples": 119, + "coverage_seconds": 117.512, + "max_sample_gap_seconds": 1.266, + "mean_cpu_cores": 0.16329397848730343, + "throttled_seconds": 3.321907, + "throttled_period_fraction": 0.0411522633744856, + "peak_memory_mib": 105.4296875, + "oom_kills": 0 + }, + "postgres": { + "samples": 61, + "coverage_seconds": 118.0, + "max_sample_gap_seconds": 3.0, + "mean_cpu_cores": 0.3187262966101695, + "throttled_seconds": 1.596404, + "throttled_period_fraction": 0.029925187032418952, + "peak_memory_mib": 118.35546875, + "oom_kills": 0 + }, + "nginx": { + "samples": 61, + "coverage_seconds": 119.0, + "max_sample_gap_seconds": 3.0, + "mean_cpu_cores": 0.093946, + "throttled_seconds": 1.302192, + "throttled_period_fraction": 0.024267782426778243, + "peak_memory_mib": 10.265625, + "oom_kills": 0 + }, + "redis": { + "samples": 60, + "coverage_seconds": 118.0, + "max_sample_gap_seconds": 3.0, + "mean_cpu_cores": 0.06268794915254237, + "throttled_seconds": 0.872732, + "throttled_period_fraction": 0.018760195758564437, + "peak_memory_mib": 15.76953125, + "oom_kills": 0 + } + }, + "pools": { + "api-1": { + "samples": 118, + "acquisitions": 2788, + "acquisition_errors": 0, + "mean_acquisition_ms": 0.653248172883868, + "max_acquisition_ms": 591.7856449999963, + "max_waiting": 0, + "queued_interval_fraction": 0.0, + "max_total": 6, + "observed_connection_increases": 3, + "observed_connection_decreases": 3, + "event_loop_p99_max_ms": 377.749503 + }, + "api-2": { + "samples": 117, + "acquisitions": 2753, + "acquisition_errors": 0, + "mean_acquisition_ms": 1.365682045404879, + "max_acquisition_ms": 1132.4204190000019, + "max_waiting": 0, + "queued_interval_fraction": 0.0, + "max_total": 7, + "observed_connection_increases": 4, + "observed_connection_decreases": 4, + "event_loop_p99_max_ms": 308.281343 + }, + "api-3": { + "samples": 118, + "acquisitions": 2713, + "acquisition_errors": 0, + "mean_acquisition_ms": 0.8309651525988347, + "max_acquisition_ms": 764.862071999989, + "max_waiting": 0, + "queued_interval_fraction": 0.0, + "max_total": 6, + "observed_connection_increases": 3, + "observed_connection_decreases": 4, + "event_loop_p99_max_ms": 379.584511 + }, + "api-4": { + "samples": 119, + "acquisitions": 2756, + "acquisition_errors": 0, + "mean_acquisition_ms": 0.9719972184327342, + "max_acquisition_ms": 1023.8122350000194, + "max_waiting": 0, + "queued_interval_fraction": 0.0, + "max_total": 6, + "observed_connection_increases": 4, + "observed_connection_decreases": 4, + "event_loop_p99_max_ms": 387.973119 + } + }, + "host": { + "samples": 61, + "cpu_some_fraction": 0.43279896610169494, + "memory_some_fraction": 0.0010656271186440679, + "memory_full_fraction": 0.0005450677966101695, + "io_some_fraction": 0.01738413559322034, + "io_full_fraction": 0.006792101694915254, + "min_available_mib": 1272.5390625, + "max_swap_used_mib": 186.625 + }, + "postgres": { + "samples": 63, + "max_active": 4, + "max_idle_in_transaction": 4, + "active_wait_observations": { + "IO/WalSync": 4, + "no_wait_event/-": 20, + "Client/ClientRead": 1 + } + }, + "nginx": { + "samples": 61, + "upstream_changes": 0, + "min_ready": 4, + "max_ready": 4 + }, + "limits_reached": { + "generator_late": true, + "client_capacity": false, + "request_errors": false, + "latency": false + }, + "diagnostics_complete": true + }, + "source_hashes": { + "benchmark": "90cf4be0589ef832e40bb8cc2147db54f0230c2cfae0894efa8dbaa06cfa35ab", + "summary": "ef6b12f1886e087f7921c423b8509e4fde1b3470b69e243a6b1d6e656e9db98c" + } + }, + { + "dataset": "pg-cpu", + "variant": "pg1", + "configuration": "four", + "manifest": "diagnostics-pg1cpu-linux-20261028", + "label": "four-r60-repeat2", + "profile": { + "arrival_model": "scheduled open loop; late or over-capacity slots dropped", + "offered_rps": 60, + "duration_seconds": 120, + "warmup_seconds": 20, + "warmup_profile": "read only", + "read_percent": 80, + "write_percent": 20, + "initial_messages": 30, + "history_limit": 50, + "max_in_flight": 64, + "timeout_ms": 5000, + "automatic_retries": false, + "expected_instances": 4 + }, + "measurement": { + "scheduled_slots": 7200, + "client_dropped_slots": 1009, + "scheduler_late_slots": 1009, + "read": { + "attempted": 4950, + "successful": 4950, + "errors": 0, + "successful_rps": 41.25, + "status_counts": { + "200": 4950 + }, + "error_counts": {}, + "instance_counts": { + "e61ee4a43c4b": 1219, + "be15ed8d3392": 1248, + "5fb62b603f9e": 1250, + "34ba7a14aac3": 1233 + }, + "successful_latency_ms": { + "p50": 19.437, + "p95": 239.587, + "p99": 869.141 + } + }, + "write": { + "attempted": 1241, + "successful": 1241, + "errors": 0, + "successful_rps": 10.342, + "status_counts": { + "201": 1241 + }, + "error_counts": {}, + "instance_counts": { + "34ba7a14aac3": 318, + "5fb62b603f9e": 311, + "e61ee4a43c4b": 318, + "be15ed8d3392": 294 + }, + "successful_latency_ms": { + "p50": 48.643, + "p95": 465.964, + "p99": 967.574 + } + }, + "all": { + "attempted": 6191, + "successful": 6191, + "errors": 0, + "successful_rps": 51.592, + "status_counts": { + "200": 4950, + "201": 1241 + }, + "error_counts": {}, + "instance_counts": { + "e61ee4a43c4b": 1537, + "be15ed8d3392": 1542, + "5fb62b603f9e": 1561, + "34ba7a14aac3": 1551 + }, + "successful_latency_ms": { + "p50": 25.284, + "p95": 296.119, + "p99": 886.275 + } + } + }, + "timing": { + "measurement_started_epoch_ms": 1793198530287, + "measurement_scheduled_end_epoch_ms": 1793198650287, + "measurement_completed_epoch_ms": 1793198645973 + }, + "client": { + "cpu_seconds": 25.327, + "rss_before_mib": 118.332, + "rss_after_mib": 163.707, + "event_loop_delay_ms": { + "mean": 25.833, + "p99": 100.598 + } + }, + "all_latency_ms": null, + "criterion": null, + "diagnostics": { + "resources": { + "api-1": { + "samples": 117, + "coverage_seconds": 116.855, + "max_sample_gap_seconds": 1.448, + "mean_cpu_cores": 0.17169424500449273, + "throttled_seconds": 3.69389, + "throttled_period_fraction": 0.037159372419488024, + "peak_memory_mib": 122.515625, + "oom_kills": 0 + }, + "api-2": { + "samples": 118, + "coverage_seconds": 116.943, + "max_sample_gap_seconds": 1.369, + "mean_cpu_cores": 0.17386221492521997, + "throttled_seconds": 7.354441, + "throttled_period_fraction": 0.05037159372419488, + "peak_memory_mib": 121.0703125, + "oom_kills": 0 + }, + "api-3": { + "samples": 119, + "coverage_seconds": 118.008, + "max_sample_gap_seconds": 1.256, + "mean_cpu_cores": 0.1751291437868619, + "throttled_seconds": 4.681769, + "throttled_period_fraction": 0.04590163934426229, + "peak_memory_mib": 121.64453125, + "oom_kills": 0 + }, + "api-4": { + "samples": 119, + "coverage_seconds": 118.496, + "max_sample_gap_seconds": 1.213, + "mean_cpu_cores": 0.175487763300027, + "throttled_seconds": 3.429532, + "throttled_period_fraction": 0.04337152209492635, + "peak_memory_mib": 124.828125, + "oom_kills": 0 + }, + "postgres": { + "samples": 56, + "coverage_seconds": 117.0, + "max_sample_gap_seconds": 4.0, + "mean_cpu_cores": 0.38550305128205126, + "throttled_seconds": 4.616826, + "throttled_period_fraction": 0.05091819699499165, + "peak_memory_mib": 121.6171875, + "oom_kills": 0 + }, + "nginx": { + "samples": 56, + "coverage_seconds": 117.0, + "max_sample_gap_seconds": 4.0, + "mean_cpu_cores": 0.11664049572649572, + "throttled_seconds": 1.983068, + "throttled_period_fraction": 0.037162162162162164, + "peak_memory_mib": 10.390625, + "oom_kills": 0 + }, + "redis": { + "samples": 60, + "coverage_seconds": 119.0, + "max_sample_gap_seconds": 3.0, + "mean_cpu_cores": 0.07161271428571428, + "throttled_seconds": 0.543117, + "throttled_period_fraction": 0.013039934800325998, + "peak_memory_mib": 14.0703125, + "oom_kills": 0 + } + }, + "pools": { + "api-1": { + "samples": 117, + "acquisitions": 2579, + "acquisition_errors": 0, + "mean_acquisition_ms": 0.9478219259399987, + "max_acquisition_ms": 596.5484099999885, + "max_waiting": 0, + "queued_interval_fraction": 0.0, + "max_total": 6, + "observed_connection_increases": 7, + "observed_connection_decreases": 5, + "event_loop_p99_max_ms": 703.594495 + }, + "api-2": { + "samples": 118, + "acquisitions": 2625, + "acquisition_errors": 0, + "mean_acquisition_ms": 1.171612272761374, + "max_acquisition_ms": 664.7052580000018, + "max_waiting": 0, + "queued_interval_fraction": 0.0, + "max_total": 5, + "observed_connection_increases": 5, + "observed_connection_decreases": 3, + "event_loop_p99_max_ms": 493.355007 + }, + "api-3": { + "samples": 119, + "acquisitions": 2589, + "acquisition_errors": 0, + "mean_acquisition_ms": 1.5616015596753114, + "max_acquisition_ms": 1145.562442000024, + "max_waiting": 0, + "queued_interval_fraction": 0.0, + "max_total": 6, + "observed_connection_increases": 5, + "observed_connection_decreases": 4, + "event_loop_p99_max_ms": 478.412799 + }, + "api-4": { + "samples": 119, + "acquisitions": 2619, + "acquisition_errors": 0, + "mean_acquisition_ms": 1.0178724944633817, + "max_acquisition_ms": 914.6306479999912, + "max_waiting": 0, + "queued_interval_fraction": 0.0, + "max_total": 5, + "observed_connection_increases": 4, + "observed_connection_decreases": 2, + "event_loop_p99_max_ms": 395.837439 + } + }, + "host": { + "samples": 56, + "cpu_some_fraction": 0.5180482820512821, + "memory_some_fraction": 0.0004277777777777778, + "memory_full_fraction": 6.97008547008547e-05, + "io_some_fraction": 0.020678094017094018, + "io_full_fraction": 0.006402059829059829, + "min_available_mib": 1205.90234375, + "max_swap_used_mib": 186.625 + }, + "postgres": { + "samples": 62, + "max_active": 5, + "max_idle_in_transaction": 4, + "active_wait_observations": { + "no_wait_event/-": 27, + "IO/WalSync": 4, + "Client/ClientRead": 6, + "LWLock/WALWrite": 1, + "IO/WalWrite": 1 + } + }, + "nginx": { + "samples": 56, + "upstream_changes": 0, + "min_ready": 4, + "max_ready": 4 + }, + "limits_reached": { + "generator_late": true, + "client_capacity": false, + "request_errors": false, + "latency": false + }, + "diagnostics_complete": true + }, + "source_hashes": { + "benchmark": "50894c08fd2ba8c45f45db69692f3beb63f138cb2d80e7341871f353f820b03d", + "summary": "c506695cea4d5820f603f428d043024aac4b5389e33e77369ce209fc7f972109" + } + }, + { + "dataset": "pg-cpu", + "variant": "pg1", + "configuration": "four", + "manifest": "diagnostics-pg1cpu-linux-20261028", + "label": "four-r60-repeat3", + "profile": { + "arrival_model": "scheduled open loop; late or over-capacity slots dropped", + "offered_rps": 60, + "duration_seconds": 120, + "warmup_seconds": 20, + "warmup_profile": "read only", + "read_percent": 80, + "write_percent": 20, + "initial_messages": 30, + "history_limit": 50, + "max_in_flight": 64, + "timeout_ms": 5000, + "automatic_retries": false, + "expected_instances": 4 + }, + "measurement": { + "scheduled_slots": 7200, + "client_dropped_slots": 922, + "scheduler_late_slots": 922, + "read": { + "attempted": 5020, + "successful": 5020, + "errors": 0, + "successful_rps": 41.833, + "status_counts": { + "200": 5020 + }, + "error_counts": {}, + "instance_counts": { + "5fb62b603f9e": 1195, + "e61ee4a43c4b": 1309, + "be15ed8d3392": 1263, + "34ba7a14aac3": 1253 + }, + "successful_latency_ms": { + "p50": 19.407, + "p95": 401.24, + "p99": 1299.258 + } + }, + "write": { + "attempted": 1258, + "successful": 1257, + "errors": 1, + "successful_rps": 10.475, + "status_counts": { + "201": 1257, + "network": 1 + }, + "error_counts": { + "timeout": 1 + }, + "instance_counts": { + "34ba7a14aac3": 319, + "be15ed8d3392": 316, + "e61ee4a43c4b": 298, + "5fb62b603f9e": 324 + }, + "successful_latency_ms": { + "p50": 48.145, + "p95": 932.164, + "p99": 1700.749 + } + }, + "all": { + "attempted": 6278, + "successful": 6277, + "errors": 1, + "successful_rps": 52.308, + "status_counts": { + "200": 5020, + "201": 1257, + "network": 1 + }, + "error_counts": { + "timeout": 1 + }, + "instance_counts": { + "5fb62b603f9e": 1519, + "e61ee4a43c4b": 1607, + "be15ed8d3392": 1579, + "34ba7a14aac3": 1572 + }, + "successful_latency_ms": { + "p50": 24.799, + "p95": 551.315, + "p99": 1469.251 + } + } + }, + "timing": { + "measurement_started_epoch_ms": 1793198688925, + "measurement_scheduled_end_epoch_ms": 1793198808925, + "measurement_completed_epoch_ms": 1793198804580 + }, + "client": { + "cpu_seconds": 24.363, + "rss_before_mib": 112.418, + "rss_after_mib": 142.668, + "event_loop_delay_ms": { + "mean": 25.242, + "p99": 101.843 + } + }, + "all_latency_ms": null, + "criterion": null, + "diagnostics": { + "resources": { + "api-1": { + "samples": 117, + "coverage_seconds": 116.459, + "max_sample_gap_seconds": 1.315, + "mean_cpu_cores": 0.16688968649911126, + "throttled_seconds": 4.476638, + "throttled_period_fraction": 0.040697674418604654, + "peak_memory_mib": 148.52734375, + "oom_kills": 0 + }, + "api-2": { + "samples": 117, + "coverage_seconds": 117.27, + "max_sample_gap_seconds": 1.381, + "mean_cpu_cores": 0.17299946277820413, + "throttled_seconds": 5.458094, + "throttled_period_fraction": 0.055234954657873044, + "peak_memory_mib": 146.33984375, + "oom_kills": 0 + }, + "api-3": { + "samples": 118, + "coverage_seconds": 117.557, + "max_sample_gap_seconds": 1.248, + "mean_cpu_cores": 0.17460921085090636, + "throttled_seconds": 3.657855, + "throttled_period_fraction": 0.04118616144975288, + "peak_memory_mib": 146.28125, + "oom_kills": 0 + }, + "api-4": { + "samples": 119, + "coverage_seconds": 118.186, + "max_sample_gap_seconds": 1.29, + "mean_cpu_cores": 0.1693705007361278, + "throttled_seconds": 6.298416, + "throttled_period_fraction": 0.05016447368421053, + "peak_memory_mib": 150.578125, + "oom_kills": 0 + }, + "postgres": { + "samples": 57, + "coverage_seconds": 118.0, + "max_sample_gap_seconds": 3.0, + "mean_cpu_cores": 0.3920775338983051, + "throttled_seconds": 9.08627, + "throttled_period_fraction": 0.08009909165978531, + "peak_memory_mib": 190.1015625, + "oom_kills": 0 + }, + "nginx": { + "samples": 59, + "coverage_seconds": 118.0, + "max_sample_gap_seconds": 3.0, + "mean_cpu_cores": 0.09739886440677967, + "throttled_seconds": 1.046133, + "throttled_period_fraction": 0.01680672268907563, + "peak_memory_mib": 10.11328125, + "oom_kills": 0 + }, + "redis": { + "samples": 59, + "coverage_seconds": 117.0, + "max_sample_gap_seconds": 3.0, + "mean_cpu_cores": 0.07318558974358974, + "throttled_seconds": 0.905089, + "throttled_period_fraction": 0.018196856906534328, + "peak_memory_mib": 13.4609375, + "oom_kills": 0 + } + }, + "pools": { + "api-1": { + "samples": 117, + "acquisitions": 2616, + "acquisition_errors": 0, + "mean_acquisition_ms": 10.19151241743175, + "max_acquisition_ms": 3475.491917999985, + "max_waiting": 0, + "queued_interval_fraction": 0.0, + "max_total": 12, + "observed_connection_increases": 18, + "observed_connection_decreases": 11, + "event_loop_p99_max_ms": 359.661567 + }, + "api-2": { + "samples": 117, + "acquisitions": 2594, + "acquisition_errors": 0, + "mean_acquisition_ms": 13.281310714341114, + "max_acquisition_ms": 3227.9049480000394, + "max_waiting": 0, + "queued_interval_fraction": 0.0, + "max_total": 14, + "observed_connection_increases": 17, + "observed_connection_decreases": 11, + "event_loop_p99_max_ms": 623.378431 + }, + "api-3": { + "samples": 118, + "acquisitions": 2669, + "acquisition_errors": 0, + "mean_acquisition_ms": 9.706383951292901, + "max_acquisition_ms": 3735.115244000044, + "max_waiting": 0, + "queued_interval_fraction": 0.0, + "max_total": 12, + "observed_connection_increases": 16, + "observed_connection_decreases": 10, + "event_loop_p99_max_ms": 717.225983 + }, + "api-4": { + "samples": 119, + "acquisitions": 2680, + "acquisition_errors": 0, + "mean_acquisition_ms": 9.047744611566891, + "max_acquisition_ms": 3121.520862000005, + "max_waiting": 0, + "queued_interval_fraction": 0.0, + "max_total": 12, + "observed_connection_increases": 16, + "observed_connection_decreases": 10, + "event_loop_p99_max_ms": 455.081983 + } + }, + "host": { + "samples": 57, + "cpu_some_fraction": 0.5254273220338983, + "memory_some_fraction": 0.015125220338983052, + "memory_full_fraction": 0.006291889830508475, + "io_some_fraction": 0.020917830508474577, + "io_full_fraction": 0.006642686440677966, + "min_available_mib": 1034.00390625, + "max_swap_used_mib": 193.50390625 + }, + "postgres": { + "samples": 63, + "max_active": 14, + "max_idle_in_transaction": 4, + "active_wait_observations": { + "no_wait_event/-": 57, + "LWLock/BufferContent": 4, + "Lock/transactionid": 1, + "LWLock/WALWrite": 3, + "IO/WalSync": 4, + "LWLock/BufferMapping": 1 + } + }, + "nginx": { + "samples": 59, + "upstream_changes": 0, + "min_ready": 4, + "max_ready": 4 + }, + "limits_reached": { + "generator_late": true, + "client_capacity": false, + "request_errors": false, + "latency": false + }, + "diagnostics_complete": true + }, + "source_hashes": { + "benchmark": "b3e6f42111e330d07f300e66ad90cdb08c99ac2c80783829823aa6f2bf466dd6", + "summary": "8f463d5219d9082b421fb126d86daa4af09f5bfcab2b3920441190e62b981229" + } + }, + { + "dataset": "pool-limit", + "variant": "pool60", + "configuration": "four", + "manifest": "pool15-four-r100-short-20261028", + "label": "four-r100-repeat1", + "profile": { + "arrival_model": "scheduled open loop; late or over-capacity slots dropped", + "offered_rps": 100, + "duration_seconds": 60, + "warmup_seconds": 15, + "warmup_profile": "read only", + "read_percent": 80, + "write_percent": 20, + "initial_messages": 30, + "history_limit": 50, + "max_in_flight": 64, + "timeout_ms": 5000, + "automatic_retries": false, + "expected_instances": 4 + }, + "measurement": { + "scheduled_slots": 6000, + "client_dropped_slots": 2247, + "scheduler_late_slots": 1497, + "read": { + "attempted": 2989, + "successful": 2619, + "errors": 370, + "successful_rps": 43.65, + "status_counts": { + "200": 2619, + "503": 345, + "network": 25 + }, + "error_counts": { + "timeout": 24, + "http_503": 345, + "network_or_parse": 1 + }, + "instance_counts": { + "7532994d79e7": 837, + "58a985cadd20": 778, + "f1d70f064d3d": 682, + "2b56974d2849": 667 + }, + "successful_latency_ms": { + "p50": 39.943, + "p95": 1326.247, + "p99": 3981.667 + } + }, + "write": { + "attempted": 764, + "successful": 646, + "errors": 118, + "successful_rps": 10.767, + "status_counts": { + "201": 646, + "503": 95, + "network": 23 + }, + "error_counts": { + "timeout": 23, + "http_503": 95 + }, + "instance_counts": { + "58a985cadd20": 198, + "7532994d79e7": 193, + "2b56974d2849": 177, + "f1d70f064d3d": 173 + }, + "successful_latency_ms": { + "p50": 94.895, + "p95": 2641.461, + "p99": 3593.925 + } + }, + "all": { + "attempted": 3753, + "successful": 3265, + "errors": 488, + "successful_rps": 54.417, + "status_counts": { + "200": 2619, + "201": 646, + "503": 440, + "network": 48 + }, + "error_counts": { + "timeout": 47, + "http_503": 440, + "network_or_parse": 1 + }, + "instance_counts": { + "7532994d79e7": 1030, + "58a985cadd20": 976, + "f1d70f064d3d": 855, + "2b56974d2849": 844 + }, + "successful_latency_ms": { + "p50": 49.021, + "p95": 1712.812, + "p99": 3905.626 + } + } + }, + "timing": { + "measurement_started_epoch_ms": 1793209117061, + "measurement_scheduled_end_epoch_ms": 1793209177061, + "measurement_completed_epoch_ms": 1793209174456 + }, + "client": { + "cpu_seconds": 12.474, + "rss_before_mib": 124.305, + "rss_after_mib": 154.43, + "event_loop_delay_ms": { + "mean": 27.137, + "p99": 118.882 + } + }, + "all_latency_ms": null, + "criterion": null, + "diagnostics": { + "resources": { + "api-1": { + "samples": 59, + "coverage_seconds": 58.001, + "max_sample_gap_seconds": 1.452, + "mean_cpu_cores": 0.1971701177565904, + "throttled_seconds": 2.775701, + "throttled_period_fraction": 0.048903878583473864, + "peak_memory_mib": 104.7734375, + "oom_kills": 0 + }, + "api-2": { + "samples": 59, + "coverage_seconds": 58.329, + "max_sample_gap_seconds": 1.55, + "mean_cpu_cores": 0.2018246326869996, + "throttled_seconds": 2.49892, + "throttled_period_fraction": 0.06925675675675676, + "peak_memory_mib": 111.5859375, + "oom_kills": 0 + }, + "api-3": { + "samples": 60, + "coverage_seconds": 59.093, + "max_sample_gap_seconds": 1.16, + "mean_cpu_cores": 0.22171661618127358, + "throttled_seconds": 3.934024, + "throttled_period_fraction": 0.09283387622149837, + "peak_memory_mib": 106.91796875, + "oom_kills": 0 + }, + "api-4": { + "samples": 59, + "coverage_seconds": 58.949, + "max_sample_gap_seconds": 1.619, + "mean_cpu_cores": 0.2158580637500212, + "throttled_seconds": 4.633068, + "throttled_period_fraction": 0.08333333333333333, + "peak_memory_mib": 110.9609375, + "oom_kills": 0 + }, + "postgres": { + "samples": 25, + "coverage_seconds": 57.0, + "max_sample_gap_seconds": 4.0, + "mean_cpu_cores": 0.5837867719298245, + "throttled_seconds": 20.51956, + "throttled_period_fraction": 0.24006908462867013, + "peak_memory_mib": 274.10546875, + "oom_kills": 0 + }, + "nginx": { + "samples": 30, + "coverage_seconds": 58.0, + "max_sample_gap_seconds": 3.0, + "mean_cpu_cores": 0.09499568965517241, + "throttled_seconds": 0.244299, + "throttled_period_fraction": 0.008710801393728223, + "peak_memory_mib": 10.58984375, + "oom_kills": 0 + }, + "redis": { + "samples": 30, + "coverage_seconds": 58.0, + "max_sample_gap_seconds": 3.0, + "mean_cpu_cores": 0.06721737931034483, + "throttled_seconds": 0.199894, + "throttled_period_fraction": 0.006688963210702341, + "peak_memory_mib": 14.69140625, + "oom_kills": 0 + } + }, + "pools": { + "api-1": { + "samples": 59, + "acquisitions": 1376, + "acquisition_errors": 109, + "mean_acquisition_ms": 173.42717426380833, + "max_acquisition_ms": 6248.307425999999, + "max_waiting": 2, + "queued_interval_fraction": 0.2542372881355932, + "max_total": 15, + "observed_connection_increases": 15, + "observed_connection_decreases": 15, + "event_loop_p99_max_ms": 717.225983 + }, + "api-2": { + "samples": 59, + "acquisitions": 1395, + "acquisition_errors": 96, + "mean_acquisition_ms": 151.68743115125463, + "max_acquisition_ms": 5783.0653170000005, + "max_waiting": 3, + "queued_interval_fraction": 0.288135593220339, + "max_total": 15, + "observed_connection_increases": 13, + "observed_connection_decreases": 11, + "event_loop_p99_max_ms": 631.242751 + }, + "api-3": { + "samples": 60, + "acquisitions": 1759, + "acquisition_errors": 108, + "mean_acquisition_ms": 131.64392432802705, + "max_acquisition_ms": 5519.7606929999965, + "max_waiting": 6, + "queued_interval_fraction": 0.3333333333333333, + "max_total": 15, + "observed_connection_increases": 17, + "observed_connection_decreases": 4, + "event_loop_p99_max_ms": 478.674943 + }, + "api-4": { + "samples": 59, + "acquisitions": 1665, + "acquisition_errors": 105, + "mean_acquisition_ms": 138.07638583123128, + "max_acquisition_ms": 5705.4157119999945, + "max_waiting": 7, + "queued_interval_fraction": 0.3559322033898305, + "max_total": 15, + "observed_connection_increases": 23, + "observed_connection_decreases": 10, + "event_loop_p99_max_ms": 672.137215 + } + }, + "host": { + "samples": 25, + "cpu_some_fraction": 0.6708071052631579, + "memory_some_fraction": 0.030209912280701755, + "memory_full_fraction": 0.00924736842105263, + "io_some_fraction": 0.02684040350877193, + "io_full_fraction": 0.005909877192982456, + "min_available_mib": 1151.65625, + "max_swap_used_mib": 228.0234375 + }, + "postgres": { + "samples": 8, + "max_active": 45, + "max_idle_in_transaction": 7, + "active_wait_observations": { + "no_wait_event/-": 60, + "Client/ClientRead": 7, + "Lock/transactionid": 8, + "LWLock/WALWrite": 6, + "IO/WalSync": 1, + "LWLock/BufferContent": 37, + "LWLock/MultiXactOffsetSLRU": 1 + } + }, + "nginx": { + "samples": 30, + "upstream_changes": 2, + "min_ready": 2, + "max_ready": 4 + }, + "limits_reached": { + "generator_late": true, + "client_capacity": true, + "request_errors": true, + "latency": true + }, + "diagnostics_complete": true + }, + "source_hashes": { + "benchmark": "46457496ec3a1a86316645c3680badb3cfbfa4f5b9c10081c9121da1d17d855c", + "summary": "e12d4d26edbbb5fda286515d71cc52bcbb1f47671c905499684ac59ee7cf54ef" + } + }, + { + "dataset": "pool-limit", + "variant": "pool60", + "configuration": "four", + "manifest": "pool15-four-r100-short-20261028", + "label": "four-r100-repeat2", + "profile": { + "arrival_model": "scheduled open loop; late or over-capacity slots dropped", + "offered_rps": 100, + "duration_seconds": 60, + "warmup_seconds": 15, + "warmup_profile": "read only", + "read_percent": 80, + "write_percent": 20, + "initial_messages": 30, + "history_limit": 50, + "max_in_flight": 64, + "timeout_ms": 5000, + "automatic_retries": false, + "expected_instances": 4 + }, + "measurement": { + "scheduled_slots": 6000, + "client_dropped_slots": 964, + "scheduler_late_slots": 964, + "read": { + "attempted": 4030, + "successful": 4030, + "errors": 0, + "successful_rps": 67.167, + "status_counts": { + "200": 4030 + }, + "error_counts": {}, + "instance_counts": { + "7532994d79e7": 990, + "2b56974d2849": 993, + "f1d70f064d3d": 1021, + "58a985cadd20": 1026 + }, + "successful_latency_ms": { + "p50": 18.269, + "p95": 202.191, + "p99": 370.842 + } + }, + "write": { + "attempted": 1006, + "successful": 1006, + "errors": 0, + "successful_rps": 16.767, + "status_counts": { + "201": 1006 + }, + "error_counts": {}, + "instance_counts": { + "58a985cadd20": 258, + "f1d70f064d3d": 253, + "7532994d79e7": 237, + "2b56974d2849": 258 + }, + "successful_latency_ms": { + "p50": 42.522, + "p95": 407.798, + "p99": 644.468 + } + }, + "all": { + "attempted": 5036, + "successful": 5036, + "errors": 0, + "successful_rps": 83.933, + "status_counts": { + "200": 4030, + "201": 1006 + }, + "error_counts": {}, + "instance_counts": { + "7532994d79e7": 1227, + "2b56974d2849": 1251, + "f1d70f064d3d": 1274, + "58a985cadd20": 1284 + }, + "successful_latency_ms": { + "p50": 23.084, + "p95": 263.596, + "p99": 461.061 + } + } + }, + "timing": { + "measurement_started_epoch_ms": 1793209228942, + "measurement_scheduled_end_epoch_ms": 1793209288942, + "measurement_completed_epoch_ms": 1793209286693 + }, + "client": { + "cpu_seconds": 14.8, + "rss_before_mib": 122.188, + "rss_after_mib": 154.563, + "event_loop_delay_ms": { + "mean": 24.655, + "p99": 80.347 + } + }, + "all_latency_ms": null, + "criterion": null, + "diagnostics": { + "resources": { + "api-1": { + "samples": 61, + "coverage_seconds": 59.503, + "max_sample_gap_seconds": 1.108, + "mean_cpu_cores": 0.216344201132716, + "throttled_seconds": 3.423008, + "throttled_period_fraction": 0.06320907617504051, + "peak_memory_mib": 124.765625, + "oom_kills": 0 + }, + "api-2": { + "samples": 60, + "coverage_seconds": 58.923, + "max_sample_gap_seconds": 1.18, + "mean_cpu_cores": 0.2136278533000696, + "throttled_seconds": 3.88221, + "throttled_period_fraction": 0.06188925081433225, + "peak_memory_mib": 129.09375, + "oom_kills": 0 + }, + "api-3": { + "samples": 60, + "coverage_seconds": 58.835, + "max_sample_gap_seconds": 1.183, + "mean_cpu_cores": 0.22347626412849494, + "throttled_seconds": 6.190169, + "throttled_period_fraction": 0.07540983606557378, + "peak_memory_mib": 126.32421875, + "oom_kills": 0 + }, + "api-4": { + "samples": 60, + "coverage_seconds": 58.632, + "max_sample_gap_seconds": 1.094, + "mean_cpu_cores": 0.21324686178196206, + "throttled_seconds": 3.81767, + "throttled_period_fraction": 0.04926108374384237, + "peak_memory_mib": 127.66015625, + "oom_kills": 0 + }, + "postgres": { + "samples": 30, + "coverage_seconds": 58.0, + "max_sample_gap_seconds": 3.0, + "mean_cpu_cores": 0.4340725172413793, + "throttled_seconds": 1.450094, + "throttled_period_fraction": 0.05695142378559464, + "peak_memory_mib": 168.43359375, + "oom_kills": 0 + }, + "nginx": { + "samples": 30, + "coverage_seconds": 57.0, + "max_sample_gap_seconds": 3.0, + "mean_cpu_cores": 0.111389, + "throttled_seconds": 0.485613, + "throttled_period_fraction": 0.018456375838926176, + "peak_memory_mib": 9.5, + "oom_kills": 0 + }, + "redis": { + "samples": 31, + "coverage_seconds": 59.0, + "max_sample_gap_seconds": 3.0, + "mean_cpu_cores": 0.06688762711864407, + "throttled_seconds": 0.315541, + "throttled_period_fraction": 0.01468189233278956, + "peak_memory_mib": 15.9296875, + "oom_kills": 0 + } + }, + "pools": { + "api-1": { + "samples": 61, + "acquisitions": 2139, + "acquisition_errors": 0, + "mean_acquisition_ms": 0.17467498363695808, + "max_acquisition_ms": 55.2644539999892, + "max_waiting": 0, + "queued_interval_fraction": 0.0, + "max_total": 5, + "observed_connection_increases": 0, + "observed_connection_decreases": 0, + "event_loop_p99_max_ms": 172.359679 + }, + "api-2": { + "samples": 60, + "acquisitions": 2111, + "acquisition_errors": 0, + "mean_acquisition_ms": 0.18235157129320254, + "max_acquisition_ms": 24.859587999992073, + "max_waiting": 0, + "queued_interval_fraction": 0.0, + "max_total": 5, + "observed_connection_increases": 0, + "observed_connection_decreases": 1, + "event_loop_p99_max_ms": 293.339135 + }, + "api-3": { + "samples": 60, + "acquisitions": 2080, + "acquisition_errors": 0, + "mean_acquisition_ms": 0.2318082874996085, + "max_acquisition_ms": 77.9617600000056, + "max_waiting": 0, + "queued_interval_fraction": 0.0, + "max_total": 6, + "observed_connection_increases": 0, + "observed_connection_decreases": 2, + "event_loop_p99_max_ms": 218.234879 + }, + "api-4": { + "samples": 60, + "acquisitions": 2146, + "acquisition_errors": 0, + "mean_acquisition_ms": 0.2965253331782534, + "max_acquisition_ms": 169.6050680000044, + "max_waiting": 0, + "queued_interval_fraction": 0.0, + "max_total": 6, + "observed_connection_increases": 1, + "observed_connection_decreases": 2, + "event_loop_p99_max_ms": 143.785983 + } + }, + "host": { + "samples": 30, + "cpu_some_fraction": 0.5335681034482759, + "memory_some_fraction": 9.886206896551725e-05, + "memory_full_fraction": 1.2448275862068965e-05, + "io_some_fraction": 0.019689379310344826, + "io_full_fraction": 0.006145706896551724, + "min_available_mib": 1207.375, + "max_swap_used_mib": 204.5234375 + }, + "postgres": { + "samples": 31, + "max_active": 4, + "max_idle_in_transaction": 2, + "active_wait_observations": { + "no_wait_event/-": 27, + "IO/WalSync": 2, + "Client/ClientRead": 3, + "IO/DataFileRead": 1 + } + }, + "nginx": { + "samples": 30, + "upstream_changes": 0, + "min_ready": 4, + "max_ready": 4 + }, + "limits_reached": { + "generator_late": true, + "client_capacity": false, + "request_errors": false, + "latency": false + }, + "diagnostics_complete": true + }, + "source_hashes": { + "benchmark": "a83f18417d2fea378fe6d129730c4d2791578e92ce2bd14c48da362d695b2f2e", + "summary": "5579e738c69688a87c5334504c432e505f85f87f1a614cc0bd0ed697cd98b2c0" + } + }, + { + "dataset": "pool-limit", + "variant": "pool60", + "configuration": "four", + "manifest": "pool15-four-r100-short-20261028", + "label": "four-r100-repeat3", + "profile": { + "arrival_model": "scheduled open loop; late or over-capacity slots dropped", + "offered_rps": 100, + "duration_seconds": 60, + "warmup_seconds": 15, + "warmup_profile": "read only", + "read_percent": 80, + "write_percent": 20, + "initial_messages": 30, + "history_limit": 50, + "max_in_flight": 64, + "timeout_ms": 5000, + "automatic_retries": false, + "expected_instances": 4 + }, + "measurement": { + "scheduled_slots": 6000, + "client_dropped_slots": 854, + "scheduler_late_slots": 854, + "read": { + "attempted": 4106, + "successful": 4106, + "errors": 0, + "successful_rps": 68.433, + "status_counts": { + "200": 4106 + }, + "error_counts": {}, + "instance_counts": { + "58a985cadd20": 976, + "7532994d79e7": 1073, + "2b56974d2849": 1057, + "f1d70f064d3d": 1000 + }, + "successful_latency_ms": { + "p50": 21.617, + "p95": 223.738, + "p99": 633.061 + } + }, + "write": { + "attempted": 1040, + "successful": 1040, + "errors": 0, + "successful_rps": 17.333, + "status_counts": { + "201": 1040 + }, + "error_counts": {}, + "instance_counts": { + "f1d70f064d3d": 253, + "58a985cadd20": 265, + "7532994d79e7": 262, + "2b56974d2849": 260 + }, + "successful_latency_ms": { + "p50": 58.969, + "p95": 438.972, + "p99": 955.66 + } + }, + "all": { + "attempted": 5146, + "successful": 5146, + "errors": 0, + "successful_rps": 85.767, + "status_counts": { + "200": 4106, + "201": 1040 + }, + "error_counts": {}, + "instance_counts": { + "58a985cadd20": 1241, + "7532994d79e7": 1335, + "2b56974d2849": 1317, + "f1d70f064d3d": 1253 + }, + "successful_latency_ms": { + "p50": 26.017, + "p95": 288.733, + "p99": 710.623 + } + } + }, + "timing": { + "measurement_started_epoch_ms": 1793209337413, + "measurement_scheduled_end_epoch_ms": 1793209397413, + "measurement_completed_epoch_ms": 1793209394776 + }, + "client": { + "cpu_seconds": 14.955, + "rss_before_mib": 118.832, + "rss_after_mib": 146.457, + "event_loop_delay_ms": { + "mean": 24.251, + "p99": 77.07 + } + }, + "all_latency_ms": null, + "criterion": null, + "diagnostics": { + "resources": { + "api-1": { + "samples": 59, + "coverage_seconds": 57.348, + "max_sample_gap_seconds": 1.104, + "mean_cpu_cores": 0.21924349584989886, + "throttled_seconds": 3.811106, + "throttled_period_fraction": 0.06020066889632107, + "peak_memory_mib": 146.9296875, + "oom_kills": 0 + }, + "api-2": { + "samples": 59, + "coverage_seconds": 57.522, + "max_sample_gap_seconds": 1.128, + "mean_cpu_cores": 0.21636269601196065, + "throttled_seconds": 5.309513, + "throttled_period_fraction": 0.06688963210702341, + "peak_memory_mib": 149.8671875, + "oom_kills": 0 + }, + "api-3": { + "samples": 59, + "coverage_seconds": 57.953, + "max_sample_gap_seconds": 1.35, + "mean_cpu_cores": 0.21642078926026262, + "throttled_seconds": 4.592038, + "throttled_period_fraction": 0.0512396694214876, + "peak_memory_mib": 148.13671875, + "oom_kills": 0 + }, + "api-4": { + "samples": 60, + "coverage_seconds": 58.678, + "max_sample_gap_seconds": 1.266, + "mean_cpu_cores": 0.21168991785677768, + "throttled_seconds": 5.187013, + "throttled_period_fraction": 0.062193126022913256, + "peak_memory_mib": 149.44140625, + "oom_kills": 0 + }, + "postgres": { + "samples": 30, + "coverage_seconds": 58.0, + "max_sample_gap_seconds": 3.0, + "mean_cpu_cores": 0.44118370689655173, + "throttled_seconds": 1.965392, + "throttled_period_fraction": 0.048903878583473864, + "peak_memory_mib": 201.85546875, + "oom_kills": 0 + }, + "nginx": { + "samples": 30, + "coverage_seconds": 58.0, + "max_sample_gap_seconds": 3.0, + "mean_cpu_cores": 0.10774413793103449, + "throttled_seconds": 0.05501, + "throttled_period_fraction": 0.005076142131979695, + "peak_memory_mib": 10.04296875, + "oom_kills": 0 + }, + "redis": { + "samples": 31, + "coverage_seconds": 59.0, + "max_sample_gap_seconds": 3.0, + "mean_cpu_cores": 0.06579893220338984, + "throttled_seconds": 0.288703, + "throttled_period_fraction": 0.01631321370309951, + "peak_memory_mib": 16.91796875, + "oom_kills": 0 + } + }, + "pools": { + "api-1": { + "samples": 59, + "acquisitions": 2252, + "acquisition_errors": 0, + "mean_acquisition_ms": 4.158850316162867, + "max_acquisition_ms": 1933.7572619999992, + "max_waiting": 0, + "queued_interval_fraction": 0.0, + "max_total": 10, + "observed_connection_increases": 7, + "observed_connection_decreases": 5, + "event_loop_p99_max_ms": 229.638143 + }, + "api-2": { + "samples": 59, + "acquisitions": 2102, + "acquisition_errors": 0, + "mean_acquisition_ms": 4.114356411988275, + "max_acquisition_ms": 1850.1404239999829, + "max_waiting": 0, + "queued_interval_fraction": 0.0, + "max_total": 10, + "observed_connection_increases": 7, + "observed_connection_decreases": 4, + "event_loop_p99_max_ms": 625.999871 + }, + "api-3": { + "samples": 59, + "acquisitions": 2251, + "acquisition_errors": 0, + "mean_acquisition_ms": 3.0539893860513323, + "max_acquisition_ms": 1627.5971640000353, + "max_waiting": 0, + "queued_interval_fraction": 0.0, + "max_total": 9, + "observed_connection_increases": 6, + "observed_connection_decreases": 4, + "event_loop_p99_max_ms": 125.829119 + }, + "api-4": { + "samples": 60, + "acquisitions": 2116, + "acquisition_errors": 0, + "mean_acquisition_ms": 3.6434232131382167, + "max_acquisition_ms": 1568.8833520000335, + "max_waiting": 0, + "queued_interval_fraction": 0.0, + "max_total": 9, + "observed_connection_increases": 8, + "observed_connection_decreases": 4, + "event_loop_p99_max_ms": 306.184191 + } + }, + "host": { + "samples": 30, + "cpu_some_fraction": 0.540543, + "memory_some_fraction": 0.00926005172413793, + "memory_full_fraction": 0.004849344827586207, + "io_some_fraction": 0.01844556896551724, + "io_full_fraction": 0.006445310344827586, + "min_available_mib": 1100.1015625, + "max_swap_used_mib": 205.8984375 + }, + "postgres": { + "samples": 32, + "max_active": 12, + "max_idle_in_transaction": 3, + "active_wait_observations": { + "IO/WalSync": 2, + "no_wait_event/-": 28, + "Client/ClientRead": 7, + "Lock/transactionid": 1, + "LWLock/WALInsert": 1 + } + }, + "nginx": { + "samples": 30, + "upstream_changes": 0, + "min_ready": 4, + "max_ready": 4 + }, + "limits_reached": { + "generator_late": true, + "client_capacity": false, + "request_errors": false, + "latency": false + }, + "diagnostics_complete": true + }, + "source_hashes": { + "benchmark": "78119a645616e7c91761e4b89e4ae8ce2f71877606184a6ac6e0ba44dd9e9a70", + "summary": "57ee3d566ba7fbe100cb3c9985951c0e220aad34f357eeedbba35bdb16776410" + } + }, + { + "dataset": "pool-limit", + "variant": "pool32", + "configuration": "four", + "manifest": "pool8-four-r100-short-20261028", + "label": "four-r100-repeat1", + "profile": { + "arrival_model": "scheduled open loop; late or over-capacity slots dropped", + "offered_rps": 100, + "duration_seconds": 60, + "warmup_seconds": 15, + "warmup_profile": "read only", + "read_percent": 80, + "write_percent": 20, + "initial_messages": 30, + "history_limit": 50, + "max_in_flight": 64, + "timeout_ms": 5000, + "automatic_retries": false, + "expected_instances": 4 + }, + "measurement": { + "scheduled_slots": 6000, + "client_dropped_slots": 1442, + "scheduler_late_slots": 1440, + "read": { + "attempted": 3638, + "successful": 3638, + "errors": 0, + "successful_rps": 60.633, + "status_counts": { + "200": 3638 + }, + "error_counts": {}, + "instance_counts": { + "08d305faa51b": 903, + "1cfdac196b57": 924, + "061f64fa625e": 897, + "3dadb549bbea": 914 + }, + "successful_latency_ms": { + "p50": 39.019, + "p95": 455.321, + "p99": 1084.559 + } + }, + "write": { + "attempted": 920, + "successful": 920, + "errors": 0, + "successful_rps": 15.333, + "status_counts": { + "201": 920 + }, + "error_counts": {}, + "instance_counts": { + "3dadb549bbea": 236, + "061f64fa625e": 224, + "08d305faa51b": 231, + "1cfdac196b57": 229 + }, + "successful_latency_ms": { + "p50": 101.927, + "p95": 1214.872, + "p99": 2114.101 + } + }, + "all": { + "attempted": 4558, + "successful": 4558, + "errors": 0, + "successful_rps": 75.967, + "status_counts": { + "200": 3638, + "201": 920 + }, + "error_counts": {}, + "instance_counts": { + "08d305faa51b": 1134, + "1cfdac196b57": 1153, + "061f64fa625e": 1121, + "3dadb549bbea": 1150 + }, + "successful_latency_ms": { + "p50": 46.854, + "p95": 573.083, + "p99": 1464.894 + } + } + }, + "timing": { + "measurement_started_epoch_ms": 1793209549540, + "measurement_scheduled_end_epoch_ms": 1793209609540, + "measurement_completed_epoch_ms": 1793209606680 + }, + "client": { + "cpu_seconds": 15.352, + "rss_before_mib": 110.918, + "rss_after_mib": 148.918, + "event_loop_delay_ms": { + "mean": 27.157, + "p99": 106.955 + } + }, + "all_latency_ms": null, + "criterion": null, + "diagnostics": { + "resources": { + "api-1": { + "samples": 58, + "coverage_seconds": 57.072, + "max_sample_gap_seconds": 1.39, + "mean_cpu_cores": 0.252103465797589, + "throttled_seconds": 3.124067, + "throttled_period_fraction": 0.0903010033444816, + "peak_memory_mib": 102.7265625, + "oom_kills": 0 + }, + "api-2": { + "samples": 58, + "coverage_seconds": 57.269, + "max_sample_gap_seconds": 1.491, + "mean_cpu_cores": 0.2513566327332414, + "throttled_seconds": 3.323936, + "throttled_period_fraction": 0.07166666666666667, + "peak_memory_mib": 103.9140625, + "oom_kills": 0 + }, + "api-3": { + "samples": 59, + "coverage_seconds": 58.225, + "max_sample_gap_seconds": 1.437, + "mean_cpu_cores": 0.24408128810648347, + "throttled_seconds": 3.89805, + "throttled_period_fraction": 0.07894736842105263, + "peak_memory_mib": 103.8203125, + "oom_kills": 0 + }, + "api-4": { + "samples": 59, + "coverage_seconds": 58.171, + "max_sample_gap_seconds": 1.307, + "mean_cpu_cores": 0.25190842516030326, + "throttled_seconds": 4.260268, + "throttled_period_fraction": 0.09752066115702479, + "peak_memory_mib": 106.69140625, + "oom_kills": 0 + }, + "postgres": { + "samples": 30, + "coverage_seconds": 58.0, + "max_sample_gap_seconds": 3.0, + "mean_cpu_cores": 0.4833926896551724, + "throttled_seconds": 1.035048, + "throttled_period_fraction": 0.043478260869565216, + "peak_memory_mib": 200.52734375, + "oom_kills": 0 + }, + "nginx": { + "samples": 30, + "coverage_seconds": 58.0, + "max_sample_gap_seconds": 3.0, + "mean_cpu_cores": 0.11254374137931035, + "throttled_seconds": 0.270449, + "throttled_period_fraction": 0.013422818791946308, + "peak_memory_mib": 9.98828125, + "oom_kills": 0 + }, + "redis": { + "samples": 31, + "coverage_seconds": 59.0, + "max_sample_gap_seconds": 3.0, + "mean_cpu_cores": 0.08440242372881356, + "throttled_seconds": 0.947346, + "throttled_period_fraction": 0.027419354838709678, + "peak_memory_mib": 15.16796875, + "oom_kills": 0 + } + }, + "pools": { + "api-1": { + "samples": 58, + "acquisitions": 1942, + "acquisition_errors": 0, + "mean_acquisition_ms": 2.7582365123584256, + "max_acquisition_ms": 1381.9369469999947, + "max_waiting": 4, + "queued_interval_fraction": 0.06896551724137931, + "max_total": 8, + "observed_connection_increases": 2, + "observed_connection_decreases": 2, + "event_loop_p99_max_ms": 772.800511 + }, + "api-2": { + "samples": 58, + "acquisitions": 1954, + "acquisition_errors": 0, + "mean_acquisition_ms": 6.336559779426878, + "max_acquisition_ms": 2066.838763000007, + "max_waiting": 4, + "queued_interval_fraction": 0.05172413793103448, + "max_total": 8, + "observed_connection_increases": 6, + "observed_connection_decreases": 3, + "event_loop_p99_max_ms": 587.202559 + }, + "api-3": { + "samples": 59, + "acquisitions": 1960, + "acquisition_errors": 0, + "mean_acquisition_ms": 3.9162246494899517, + "max_acquisition_ms": 1403.717929999999, + "max_waiting": 5, + "queued_interval_fraction": 0.06779661016949153, + "max_total": 8, + "observed_connection_increases": 3, + "observed_connection_decreases": 3, + "event_loop_p99_max_ms": 503.316479 + }, + "api-4": { + "samples": 59, + "acquisitions": 1908, + "acquisition_errors": 0, + "mean_acquisition_ms": 3.676728856394058, + "max_acquisition_ms": 1995.036970000001, + "max_waiting": 3, + "queued_interval_fraction": 0.06779661016949153, + "max_total": 8, + "observed_connection_increases": 3, + "observed_connection_decreases": 3, + "event_loop_p99_max_ms": 449.052671 + } + }, + "host": { + "samples": 30, + "cpu_some_fraction": 0.6161899310344827, + "memory_some_fraction": 0.00029913793103448274, + "memory_full_fraction": 9.1e-05, + "io_some_fraction": 0.023744844827586205, + "io_full_fraction": 0.006326379310344828, + "min_available_mib": 1196.47265625, + "max_swap_used_mib": 203.3984375 + }, + "postgres": { + "samples": 31, + "max_active": 6, + "max_idle_in_transaction": 10, + "active_wait_observations": { + "no_wait_event/-": 27, + "Client/ClientRead": 3, + "Lock/transactionid": 3, + "IO/WalSync": 1 + } + }, + "nginx": { + "samples": 30, + "upstream_changes": 0, + "min_ready": 4, + "max_ready": 4 + }, + "limits_reached": { + "generator_late": true, + "client_capacity": false, + "request_errors": false, + "latency": false + }, + "diagnostics_complete": true + }, + "source_hashes": { + "benchmark": "6939eff6e6a30b73d88c27c233d9bfc84cbad25bec2362877a3301ec992fe928", + "summary": "3ead2cb473f055d09c2771f4acfe58f08b43a1f9c20f0fceebf1d968f4d71166" + } + }, + { + "dataset": "pool-limit", + "variant": "pool32", + "configuration": "four", + "manifest": "pool8-four-r100-short-20261028", + "label": "four-r100-repeat2", + "profile": { + "arrival_model": "scheduled open loop; late or over-capacity slots dropped", + "offered_rps": 100, + "duration_seconds": 60, + "warmup_seconds": 15, + "warmup_profile": "read only", + "read_percent": 80, + "write_percent": 20, + "initial_messages": 30, + "history_limit": 50, + "max_in_flight": 64, + "timeout_ms": 5000, + "automatic_retries": false, + "expected_instances": 4 + }, + "measurement": { + "scheduled_slots": 6000, + "client_dropped_slots": 1073, + "scheduler_late_slots": 1023, + "read": { + "attempted": 3930, + "successful": 3928, + "errors": 2, + "successful_rps": 65.467, + "status_counts": { + "200": 3928, + "network": 2 + }, + "error_counts": { + "timeout": 2 + }, + "instance_counts": { + "08d305faa51b": 968, + "061f64fa625e": 1026, + "1cfdac196b57": 984, + "3dadb549bbea": 950 + }, + "successful_latency_ms": { + "p50": 17.56, + "p95": 305.209, + "p99": 1495.365 + } + }, + "write": { + "attempted": 997, + "successful": 995, + "errors": 2, + "successful_rps": 16.583, + "status_counts": { + "201": 995, + "network": 2 + }, + "error_counts": { + "timeout": 2 + }, + "instance_counts": { + "3dadb549bbea": 262, + "08d305faa51b": 266, + "061f64fa625e": 234, + "1cfdac196b57": 233 + }, + "successful_latency_ms": { + "p50": 46.852, + "p95": 626.395, + "p99": 3029.012 + } + }, + "all": { + "attempted": 4927, + "successful": 4923, + "errors": 4, + "successful_rps": 82.05, + "status_counts": { + "200": 3928, + "201": 995, + "network": 4 + }, + "error_counts": { + "timeout": 4 + }, + "instance_counts": { + "08d305faa51b": 1234, + "061f64fa625e": 1260, + "1cfdac196b57": 1217, + "3dadb549bbea": 1212 + }, + "successful_latency_ms": { + "p50": 22.419, + "p95": 389.339, + "p99": 1936.349 + } + } + }, + "timing": { + "measurement_started_epoch_ms": 1793209657642, + "measurement_scheduled_end_epoch_ms": 1793209717642, + "measurement_completed_epoch_ms": 1793209714769 + }, + "client": { + "cpu_seconds": 14.828, + "rss_before_mib": 120.047, + "rss_after_mib": 151.172, + "event_loop_delay_ms": { + "mean": 25.016, + "p99": 83.034 + } + }, + "all_latency_ms": null, + "criterion": null, + "diagnostics": { + "resources": { + "api-1": { + "samples": 59, + "coverage_seconds": 57.892, + "max_sample_gap_seconds": 1.623, + "mean_cpu_cores": 0.22765691287224488, + "throttled_seconds": 3.074434, + "throttled_period_fraction": 0.06919275123558484, + "peak_memory_mib": 119.31640625, + "oom_kills": 0 + }, + "api-2": { + "samples": 59, + "coverage_seconds": 57.732, + "max_sample_gap_seconds": 1.63, + "mean_cpu_cores": 0.2170841301184785, + "throttled_seconds": 3.914253, + "throttled_period_fraction": 0.049586776859504134, + "peak_memory_mib": 120.484375, + "oom_kills": 0 + }, + "api-3": { + "samples": 60, + "coverage_seconds": 58.13, + "max_sample_gap_seconds": 1.101, + "mean_cpu_cores": 0.2284381214519181, + "throttled_seconds": 4.816034, + "throttled_period_fraction": 0.07881773399014778, + "peak_memory_mib": 122.15625, + "oom_kills": 0 + }, + "api-4": { + "samples": 60, + "coverage_seconds": 58.159, + "max_sample_gap_seconds": 1.173, + "mean_cpu_cores": 0.2112992658058082, + "throttled_seconds": 2.905101, + "throttled_period_fraction": 0.05601317957166392, + "peak_memory_mib": 124.18359375, + "oom_kills": 0 + }, + "postgres": { + "samples": 30, + "coverage_seconds": 59.0, + "max_sample_gap_seconds": 3.0, + "mean_cpu_cores": 0.423828186440678, + "throttled_seconds": 0.742384, + "throttled_period_fraction": 0.03523489932885906, + "peak_memory_mib": 201.1953125, + "oom_kills": 0 + }, + "nginx": { + "samples": 31, + "coverage_seconds": 59.0, + "max_sample_gap_seconds": 3.0, + "mean_cpu_cores": 0.10248649152542373, + "throttled_seconds": 0.068942, + "throttled_period_fraction": 0.010101010101010102, + "peak_memory_mib": 10.03515625, + "oom_kills": 0 + }, + "redis": { + "samples": 31, + "coverage_seconds": 58.0, + "max_sample_gap_seconds": 3.0, + "mean_cpu_cores": 0.06337655172413793, + "throttled_seconds": 0.081849, + "throttled_period_fraction": 0.009852216748768473, + "peak_memory_mib": 16.18359375, + "oom_kills": 0 + } + }, + "pools": { + "api-1": { + "samples": 59, + "acquisitions": 2124, + "acquisition_errors": 0, + "mean_acquisition_ms": 12.368857922316868, + "max_acquisition_ms": 3857.9849770000146, + "max_waiting": 8, + "queued_interval_fraction": 0.05084745762711865, + "max_total": 8, + "observed_connection_increases": 4, + "observed_connection_decreases": 2, + "event_loop_p99_max_ms": 661.127167 + }, + "api-2": { + "samples": 59, + "acquisitions": 2022, + "acquisition_errors": 0, + "mean_acquisition_ms": 13.862558198318515, + "max_acquisition_ms": 3854.679811000009, + "max_waiting": 10, + "queued_interval_fraction": 0.06779661016949153, + "max_total": 8, + "observed_connection_increases": 6, + "observed_connection_decreases": 4, + "event_loop_p99_max_ms": 668.991487 + }, + "api-3": { + "samples": 60, + "acquisitions": 2040, + "acquisition_errors": 0, + "mean_acquisition_ms": 12.19384891568662, + "max_acquisition_ms": 2095.6584079999884, + "max_waiting": 8, + "queued_interval_fraction": 0.05, + "max_total": 8, + "observed_connection_increases": 5, + "observed_connection_decreases": 3, + "event_loop_p99_max_ms": 528.482303 + }, + "api-4": { + "samples": 60, + "acquisitions": 2087, + "acquisition_errors": 0, + "mean_acquisition_ms": 11.251923414470452, + "max_acquisition_ms": 2503.8654249999963, + "max_waiting": 8, + "queued_interval_fraction": 0.08333333333333333, + "max_total": 8, + "observed_connection_increases": 5, + "observed_connection_decreases": 3, + "event_loop_p99_max_ms": 332.660735 + } + }, + "host": { + "samples": 30, + "cpu_some_fraction": 0.5059918474576272, + "memory_some_fraction": 0.00019147457627118644, + "memory_full_fraction": 4.350847457627119e-05, + "io_some_fraction": 0.018565745762711864, + "io_full_fraction": 0.005833627118644068, + "min_available_mib": 1197.41015625, + "max_swap_used_mib": 203.3984375 + }, + "postgres": { + "samples": 31, + "max_active": 11, + "max_idle_in_transaction": 8, + "active_wait_observations": { + "no_wait_event/-": 36, + "Lock/transactionid": 3, + "IO/WalSync": 3, + "LWLock/WALWrite": 1 + } + }, + "nginx": { + "samples": 31, + "upstream_changes": 0, + "min_ready": 4, + "max_ready": 4 + }, + "limits_reached": { + "generator_late": true, + "client_capacity": false, + "request_errors": false, + "latency": false + }, + "diagnostics_complete": true + }, + "source_hashes": { + "benchmark": "b585e407f0fc8f2919c84558ee739510f58e4cf174be7106a7caf81fdf371550", + "summary": "99e1d6079c99a3fd3110a045dc2e43857a3d5006a13a0b880570af49b87ac8a5" + } + }, + { + "dataset": "pool-limit", + "variant": "pool32", + "configuration": "four", + "manifest": "pool8-four-r100-short-20261028", + "label": "four-r100-repeat3", + "profile": { + "arrival_model": "scheduled open loop; late or over-capacity slots dropped", + "offered_rps": 100, + "duration_seconds": 60, + "warmup_seconds": 15, + "warmup_profile": "read only", + "read_percent": 80, + "write_percent": 20, + "initial_messages": 30, + "history_limit": 50, + "max_in_flight": 64, + "timeout_ms": 5000, + "automatic_retries": false, + "expected_instances": 4 + }, + "measurement": { + "scheduled_slots": 6000, + "client_dropped_slots": 938, + "scheduler_late_slots": 938, + "read": { + "attempted": 4042, + "successful": 4042, + "errors": 0, + "successful_rps": 67.367, + "status_counts": { + "200": 4042 + }, + "error_counts": {}, + "instance_counts": { + "1cfdac196b57": 1020, + "08d305faa51b": 986, + "3dadb549bbea": 1020, + "061f64fa625e": 1016 + }, + "successful_latency_ms": { + "p50": 16.501, + "p95": 314.486, + "p99": 725.874 + } + }, + "write": { + "attempted": 1020, + "successful": 1020, + "errors": 0, + "successful_rps": 17, + "status_counts": { + "201": 1020 + }, + "error_counts": {}, + "instance_counts": { + "061f64fa625e": 257, + "3dadb549bbea": 258, + "08d305faa51b": 260, + "1cfdac196b57": 245 + }, + "successful_latency_ms": { + "p50": 42.719, + "p95": 847.234, + "p99": 1640.669 + } + }, + "all": { + "attempted": 5062, + "successful": 5062, + "errors": 0, + "successful_rps": 84.367, + "status_counts": { + "200": 4042, + "201": 1020 + }, + "error_counts": {}, + "instance_counts": { + "1cfdac196b57": 1265, + "08d305faa51b": 1246, + "3dadb549bbea": 1278, + "061f64fa625e": 1273 + }, + "successful_latency_ms": { + "p50": 20.843, + "p95": 373.895, + "p99": 1093.443 + } + } + }, + "timing": { + "measurement_started_epoch_ms": 1793209756533, + "measurement_scheduled_end_epoch_ms": 1793209816533, + "measurement_completed_epoch_ms": 1793209813622 + }, + "client": { + "cpu_seconds": 15.064, + "rss_before_mib": 116.906, + "rss_after_mib": 139.781, + "event_loop_delay_ms": { + "mean": 24.528, + "p99": 79.233 + } + }, + "all_latency_ms": null, + "criterion": null, + "diagnostics": { + "resources": { + "api-1": { + "samples": 59, + "coverage_seconds": 56.88, + "max_sample_gap_seconds": 1.105, + "mean_cpu_cores": 0.20456021448663853, + "throttled_seconds": 2.391704, + "throttled_period_fraction": 0.048576214405360134, + "peak_memory_mib": 144.078125, + "oom_kills": 0 + }, + "api-2": { + "samples": 59, + "coverage_seconds": 57.09, + "max_sample_gap_seconds": 1.162, + "mean_cpu_cores": 0.21179679453494482, + "throttled_seconds": 2.115434, + "throttled_period_fraction": 0.05509181969949917, + "peak_memory_mib": 142.72265625, + "oom_kills": 0 + }, + "api-3": { + "samples": 60, + "coverage_seconds": 58.174, + "max_sample_gap_seconds": 1.094, + "mean_cpu_cores": 0.20416309691614812, + "throttled_seconds": 4.122597, + "throttled_period_fraction": 0.05237315875613748, + "peak_memory_mib": 152.03125, + "oom_kills": 0 + }, + "api-4": { + "samples": 60, + "coverage_seconds": 57.889, + "max_sample_gap_seconds": 1.14, + "mean_cpu_cores": 0.2094068648620636, + "throttled_seconds": 2.628798, + "throttled_period_fraction": 0.049586776859504134, + "peak_memory_mib": 150.6953125, + "oom_kills": 0 + }, + "postgres": { + "samples": 30, + "coverage_seconds": 59.0, + "max_sample_gap_seconds": 3.0, + "mean_cpu_cores": 0.4455904406779661, + "throttled_seconds": 2.065477, + "throttled_period_fraction": 0.060655737704918035, + "peak_memory_mib": 207.91015625, + "oom_kills": 0 + }, + "nginx": { + "samples": 30, + "coverage_seconds": 58.0, + "max_sample_gap_seconds": 3.0, + "mean_cpu_cores": 0.10805894827586207, + "throttled_seconds": 0.327994, + "throttled_period_fraction": 0.015254237288135594, + "peak_memory_mib": 9.69921875, + "oom_kills": 0 + }, + "redis": { + "samples": 31, + "coverage_seconds": 59.0, + "max_sample_gap_seconds": 3.0, + "mean_cpu_cores": 0.07472084745762712, + "throttled_seconds": 0.308052, + "throttled_period_fraction": 0.017770597738287562, + "peak_memory_mib": 15.28125, + "oom_kills": 0 + } + }, + "pools": { + "api-1": { + "samples": 59, + "acquisitions": 2076, + "acquisition_errors": 0, + "mean_acquisition_ms": 4.9476130067428645, + "max_acquisition_ms": 3043.877718999982, + "max_waiting": 6, + "queued_interval_fraction": 0.06779661016949153, + "max_total": 8, + "observed_connection_increases": 6, + "observed_connection_decreases": 3, + "event_loop_p99_max_ms": 283.377663 + }, + "api-2": { + "samples": 59, + "acquisitions": 2157, + "acquisition_errors": 0, + "mean_acquisition_ms": 6.8012673435333335, + "max_acquisition_ms": 2971.8534809999983, + "max_waiting": 4, + "queued_interval_fraction": 0.06779661016949153, + "max_total": 8, + "observed_connection_increases": 6, + "observed_connection_decreases": 3, + "event_loop_p99_max_ms": 276.299775 + }, + "api-3": { + "samples": 60, + "acquisitions": 2084, + "acquisition_errors": 0, + "mean_acquisition_ms": 4.991144291747311, + "max_acquisition_ms": 2359.953813, + "max_waiting": 4, + "queued_interval_fraction": 0.06666666666666667, + "max_total": 8, + "observed_connection_increases": 6, + "observed_connection_decreases": 3, + "event_loop_p99_max_ms": 222.035967 + }, + "api-4": { + "samples": 60, + "acquisitions": 2140, + "acquisition_errors": 0, + "mean_acquisition_ms": 4.813520840653431, + "max_acquisition_ms": 2936.2913730000146, + "max_waiting": 3, + "queued_interval_fraction": 0.05, + "max_total": 8, + "observed_connection_increases": 6, + "observed_connection_decreases": 2, + "event_loop_p99_max_ms": 452.460543 + } + }, + "host": { + "samples": 30, + "cpu_some_fraction": 0.49169627118644066, + "memory_some_fraction": 0.021591525423728813, + "memory_full_fraction": 0.008481135593220338, + "io_some_fraction": 0.020023457627118643, + "io_full_fraction": 0.006704338983050847, + "min_available_mib": 1071.921875, + "max_swap_used_mib": 207.6484375 + }, + "postgres": { + "samples": 31, + "max_active": 21, + "max_idle_in_transaction": 5, + "active_wait_observations": { + "IO/WalSync": 2, + "no_wait_event/-": 39, + "Lock/transactionid": 3, + "LWLock/BufferContent": 9, + "LWLock/WALInsert": 2, + "Client/ClientRead": 1 + } + }, + "nginx": { + "samples": 30, + "upstream_changes": 0, + "min_ready": 4, + "max_ready": 4 + }, + "limits_reached": { + "generator_late": true, + "client_capacity": false, + "request_errors": false, + "latency": false + }, + "diagnostics_complete": true + }, + "source_hashes": { + "benchmark": "99e5aa03101721b671d6b42d1c1098f7fd4f00fe251baf73161bb23023be2dfc", + "summary": "91225b7d28f8e12680c9c82d5cddd0330f1c45602529e15ec8e9e94c4a86bcdf" + } + }, + { + "dataset": "pg-upper-cpu", + "variant": "pg1", + "configuration": "two", + "manifest": "api-small-db-control-20261029/pg1", + "label": "two-r80-confirmation-4", + "profile": { + "arrival_model": "k6 constant-arrival-rate; one HTTP request per iteration", + "offered_rps": 80, + "duration_seconds": 30, + "warmup_seconds": 30, + "warmup_profile": "same 80/20 workload at target rate", + "read_percent": 80, + "write_percent": 20, + "initial_messages": 30, + "history_limit": 50, + "max_in_flight": 128, + "timeout_ms": 5000, + "automatic_retries": false, + "expected_instances": 2, + "phase": "confirmation" + }, + "measurement": { + "scheduled_slots": 2400, + "client_dropped_slots": 0, + "scheduler_late_slots": 0, + "read": { + "attempted": 1921, + "successful": 1921, + "errors": 0, + "successful_rps": 64.03333333333333, + "successful_latency_ms": { + "p50": 21.779306000000002, + "p95": 753.4655680000001, + "p99": 979.8981925999996 + }, + "status_counts": {}, + "error_counts": {}, + "instance_counts": {} + }, + "write": { + "attempted": 480, + "successful": 480, + "errors": 0, + "successful_rps": 16, + "successful_latency_ms": { + "p50": 42.065611499999996, + "p95": 936.7580401999991, + "p99": 1144.158399709999 + }, + "status_counts": {}, + "error_counts": {}, + "instance_counts": {} + }, + "all": { + "attempted": 2401, + "successful": 2401, + "errors": 0, + "successful_rps": 80.03333333333333, + "successful_latency_ms": { + "p50": 28.122368, + "p95": 793.449891, + "p99": 1037.210309 + }, + "status_counts": { + "200": 1921, + "201": 480, + "other": 0, + "network": 0 + }, + "error_counts": {}, + "instance_counts": { + "6c358b8fb4fa": 1221, + "7151619a6e77": 1180 + } + } + }, + "timing": { + "measurement_started_epoch_ms": 1793253510569, + "measurement_scheduled_end_epoch_ms": 1793253540569, + "measurement_completed_epoch_ms": 1793253538134 + }, + "client": { + "engine": "k6", + "scheduler_lateness_measured": false, + "raw_dropped_iterations_including_warmup": 303, + "peak_vus": 128, + "max_vus": 128 + }, + "all_latency_ms": { + "p50": 28.122368, + "p95": 793.449891, + "p99": 1037.210309 + }, + "criterion": { + "delivery_fraction": 1.0004166666666667, + "error_fraction": 0.0, + "all_request_p95_ms": 793.449891, + "delivery_valid": true, + "slo_pass": true, + "classification": "pass" + }, + "diagnostics": { + "resources": { + "api-1": { + "samples": 31, + "coverage_seconds": 28.763, + "max_sample_gap_seconds": 1.103, + "mean_cpu_cores": 0.40536213190557313, + "throttled_seconds": 0.609024, + "throttled_period_fraction": 0.028846153846153848, + "peak_memory_mib": 125.0703125, + "oom_kills": 0 + }, + "api-2": { + "samples": 31, + "coverage_seconds": 29.11, + "max_sample_gap_seconds": 1.205, + "mean_cpu_cores": 0.42321978701477153, + "throttled_seconds": 0.573146, + "throttled_period_fraction": 0.03164556962025317, + "peak_memory_mib": 126.8359375, + "oom_kills": 0 + }, + "postgres": { + "samples": 16, + "coverage_seconds": 29.0, + "max_sample_gap_seconds": 3.0, + "mean_cpu_cores": 0.4253926551724138, + "throttled_seconds": 0.37223, + "throttled_period_fraction": 0.035830618892508145, + "peak_memory_mib": 243.45703125, + "oom_kills": 0 + }, + "nginx": { + "samples": 16, + "coverage_seconds": 28.0, + "max_sample_gap_seconds": 2.0, + "mean_cpu_cores": 0.11989110714285714, + "throttled_seconds": 0.422447, + "throttled_period_fraction": 0.022950819672131147, + "peak_memory_mib": 10.90234375, + "oom_kills": 0 + }, + "redis": { + "samples": 15, + "coverage_seconds": 27.0, + "max_sample_gap_seconds": 3.0, + "mean_cpu_cores": 0.08588577777777778, + "throttled_seconds": 0.093606, + "throttled_period_fraction": 0.013793103448275862, + "peak_memory_mib": 14.45703125, + "oom_kills": 0 + }, + "generator": { + "samples": 15, + "coverage_seconds": 27.0, + "max_sample_gap_seconds": 3.0, + "mean_cpu_cores": 0.3719548888888889, + "throttled_seconds": 0.0, + "throttled_period_fraction": 0.0, + "peak_memory_mib": 107.265625, + "oom_kills": 0 + } + }, + "pools": { + "api-1": { + "samples": 31, + "acquisitions": 2081, + "acquisition_errors": 0, + "mean_acquisition_ms": 0.7199686251802722, + "max_acquisition_ms": 61.683193000004394, + "max_waiting": 0, + "queued_interval_fraction": 0.0, + "max_total": 16, + "observed_connection_increases": 0, + "observed_connection_decreases": 0, + "event_loop_p99_max_ms": 661.651455 + }, + "api-2": { + "samples": 31, + "acquisitions": 2160, + "acquisition_errors": 0, + "mean_acquisition_ms": 0.8565289648151924, + "max_acquisition_ms": 73.76368899999943, + "max_waiting": 5, + "queued_interval_fraction": 0.03225806451612903, + "max_total": 16, + "observed_connection_increases": 0, + "observed_connection_decreases": 0, + "event_loop_p99_max_ms": 421.789695 + } + }, + "host": { + "samples": 16, + "cpu_some_fraction": 0.4679261724137931, + "memory_some_fraction": 3.493103448275862e-05, + "memory_full_fraction": 1.196551724137931e-05, + "io_some_fraction": 0.024171241379310343, + "io_full_fraction": 0.006642172413793103, + "min_available_mib": 1309.94140625, + "max_swap_used_mib": 257.484375 + }, + "postgres": { + "samples": 16, + "max_active": 4, + "max_idle_in_transaction": 5, + "active_wait_observations": { + "IO/WalSync": 2, + "no_wait_event/-": 9, + "Client/ClientRead": 1 + } + }, + "nginx": { + "samples": 16, + "upstream_changes": 0, + "min_ready": 2, + "max_ready": 2 + }, + "limits_reached": { + "generator_late": false, + "client_capacity": false, + "request_errors": false, + "latency": false + }, + "diagnostics_complete": true + }, + "source_hashes": { + "benchmark": "91672e43835084a97102df941d7e5f2cea5b799434e532bf14fbd707520dd2d6", + "summary": "9c0131b95bca89f04bbb31bf69d4a8d4887027bbeb4ed13ac15503d18329034c" + } + }, + { + "dataset": "pg-upper-cpu", + "variant": "pg1", + "configuration": "two", + "manifest": "api-small-db-control-20261029/pg1", + "label": "two-r80-confirmation-5", + "profile": { + "arrival_model": "k6 constant-arrival-rate; one HTTP request per iteration", + "offered_rps": 80, + "duration_seconds": 30, + "warmup_seconds": 30, + "warmup_profile": "same 80/20 workload at target rate", + "read_percent": 80, + "write_percent": 20, + "initial_messages": 30, + "history_limit": 50, + "max_in_flight": 128, + "timeout_ms": 5000, + "automatic_retries": false, + "expected_instances": 2, + "phase": "confirmation" + }, + "measurement": { + "scheduled_slots": 2400, + "client_dropped_slots": 31, + "scheduler_late_slots": 0, + "read": { + "attempted": 1896, + "successful": 1896, + "errors": 0, + "successful_rps": 63.2, + "successful_latency_ms": { + "p50": 64.42531249999999, + "p95": 1969.9356985, + "p99": 4108.95331445 + }, + "status_counts": {}, + "error_counts": {}, + "instance_counts": {} + }, + "write": { + "attempted": 473, + "successful": 473, + "errors": 0, + "successful_rps": 15.766666666666667, + "successful_latency_ms": { + "p50": 109.785656, + "p95": 2125.143391, + "p99": 3540.7829355599865 + }, + "status_counts": {}, + "error_counts": {}, + "instance_counts": {} + }, + "all": { + "attempted": 2369, + "successful": 2369, + "errors": 0, + "successful_rps": 78.96666666666667, + "successful_latency_ms": { + "p50": 72.155286, + "p95": 2026.0931697999993, + "p99": 4108.34764632 + }, + "status_counts": { + "200": 1896, + "201": 473, + "other": 0, + "network": 0 + }, + "error_counts": {}, + "instance_counts": { + "6c358b8fb4fa": 1402, + "7151619a6e77": 967 + } + } + }, + "timing": { + "measurement_started_epoch_ms": 1793253575496, + "measurement_scheduled_end_epoch_ms": 1793253605496, + "measurement_completed_epoch_ms": 1793253603074 + }, + "client": { + "engine": "k6", + "scheduler_lateness_measured": false, + "raw_dropped_iterations_including_warmup": 116, + "peak_vus": 127, + "max_vus": 128 + }, + "all_latency_ms": { + "p50": 72.155286, + "p95": 2026.0931697999993, + "p99": 4108.34764632 + }, + "criterion": { + "delivery_fraction": 0.9870833333333333, + "error_fraction": 0.0, + "all_request_p95_ms": 2026.0931697999993, + "delivery_valid": true, + "slo_pass": false, + "classification": "slo_fail" + }, + "diagnostics": { + "resources": { + "api-1": { + "samples": 32, + "coverage_seconds": 29.858, + "max_sample_gap_seconds": 1.195, + "mean_cpu_cores": 0.3619315091432782, + "throttled_seconds": 0.461945, + "throttled_period_fraction": 0.03194888178913738, + "peak_memory_mib": 168.26953125, + "oom_kills": 0 + }, + "api-2": { + "samples": 30, + "coverage_seconds": 28.033, + "max_sample_gap_seconds": 1.227, + "mean_cpu_cores": 0.47014853922163163, + "throttled_seconds": 1.053729, + "throttled_period_fraction": 0.0594059405940594, + "peak_memory_mib": 165.14453125, + "oom_kills": 0 + }, + "postgres": { + "samples": 16, + "coverage_seconds": 29.0, + "max_sample_gap_seconds": 3.0, + "mean_cpu_cores": 0.445373724137931, + "throttled_seconds": 0.407124, + "throttled_period_fraction": 0.038461538461538464, + "peak_memory_mib": 262.19921875, + "oom_kills": 0 + }, + "nginx": { + "samples": 16, + "coverage_seconds": 29.0, + "max_sample_gap_seconds": 3.0, + "mean_cpu_cores": 0.11103606896551724, + "throttled_seconds": 0.296499, + "throttled_period_fraction": 0.020134228187919462, + "peak_memory_mib": 11.546875, + "oom_kills": 0 + }, + "redis": { + "samples": 16, + "coverage_seconds": 28.0, + "max_sample_gap_seconds": 2.0, + "mean_cpu_cores": 0.08516610714285715, + "throttled_seconds": 0.386096, + "throttled_period_fraction": 0.022653721682847898, + "peak_memory_mib": 14.72265625, + "oom_kills": 0 + }, + "generator": { + "samples": 16, + "coverage_seconds": 28.0, + "max_sample_gap_seconds": 2.0, + "mean_cpu_cores": 0.3069467142857143, + "throttled_seconds": 0.0, + "throttled_period_fraction": 0.0, + "peak_memory_mib": 109.2578125, + "oom_kills": 0 + } + }, + "pools": { + "api-1": { + "samples": 32, + "acquisitions": 1771, + "acquisition_errors": 0, + "mean_acquisition_ms": 58.592462528515156, + "max_acquisition_ms": 557.728191000002, + "max_waiting": 37, + "queued_interval_fraction": 0.21875, + "max_total": 16, + "observed_connection_increases": 0, + "observed_connection_decreases": 0, + "event_loop_p99_max_ms": 372.506623 + }, + "api-2": { + "samples": 30, + "acquisitions": 2570, + "acquisition_errors": 0, + "mean_acquisition_ms": 28.54192866225553, + "max_acquisition_ms": 411.6546340000059, + "max_waiting": 32, + "queued_interval_fraction": 0.26666666666666666, + "max_total": 16, + "observed_connection_increases": 0, + "observed_connection_decreases": 0, + "event_loop_p99_max_ms": 588.775423 + } + }, + "host": { + "samples": 16, + "cpu_some_fraction": 0.49438555172413795, + "memory_some_fraction": 2.3517241379310344e-05, + "memory_full_fraction": 9.137931034482758e-06, + "io_some_fraction": 0.022507689655172414, + "io_full_fraction": 0.005627931034482759, + "min_available_mib": 1225.953125, + "max_swap_used_mib": 253.484375 + }, + "postgres": { + "samples": 16, + "max_active": 7, + "max_idle_in_transaction": 13, + "active_wait_observations": { + "no_wait_event/-": 17, + "Lock/transactionid": 2, + "Client/ClientRead": 2, + "LWLock/WALInsert": 1 + } + }, + "nginx": { + "samples": 16, + "upstream_changes": 2, + "min_ready": 1, + "max_ready": 2 + }, + "limits_reached": { + "generator_late": false, + "client_capacity": false, + "request_errors": false, + "latency": true + }, + "diagnostics_complete": true + }, + "source_hashes": { + "benchmark": "fbc54e356c1dfbee7731edbd1bc18e1d5e3b4763f9b88ad7ee9234801df8212a", + "summary": "c16c73d0c18850e602db7df684eb6b3e052195eeb6d0b0ed66dc743318243108" + } + }, + { + "dataset": "pg-upper-cpu", + "variant": "pg1", + "configuration": "two", + "manifest": "api-small-db-control-20261029/pg1", + "label": "two-r80-confirmation-6", + "profile": { + "arrival_model": "k6 constant-arrival-rate; one HTTP request per iteration", + "offered_rps": 80, + "duration_seconds": 30, + "warmup_seconds": 30, + "warmup_profile": "same 80/20 workload at target rate", + "read_percent": 80, + "write_percent": 20, + "initial_messages": 30, + "history_limit": 50, + "max_in_flight": 128, + "timeout_ms": 5000, + "automatic_retries": false, + "expected_instances": 2, + "phase": "confirmation" + }, + "measurement": { + "scheduled_slots": 2400, + "client_dropped_slots": 0, + "scheduler_late_slots": 0, + "read": { + "attempted": 1921, + "successful": 1921, + "errors": 0, + "successful_rps": 64.03333333333333, + "successful_latency_ms": { + "p50": 27.617425, + "p95": 616.961017, + "p99": 1040.4474827999995 + }, + "status_counts": {}, + "error_counts": {}, + "instance_counts": {} + }, + "write": { + "attempted": 480, + "successful": 480, + "errors": 0, + "successful_rps": 16, + "successful_latency_ms": { + "p50": 69.58418, + "p95": 1064.3888691499997, + "p99": 1635.9160932699995 + }, + "status_counts": {}, + "error_counts": {}, + "instance_counts": {} + }, + "all": { + "attempted": 2401, + "successful": 2401, + "errors": 0, + "successful_rps": 80.03333333333333, + "successful_latency_ms": { + "p50": 35.408502, + "p95": 744.1695299999999, + "p99": 1372.70999 + }, + "status_counts": { + "200": 1921, + "201": 480, + "other": 0, + "network": 0 + }, + "error_counts": {}, + "instance_counts": { + "6c358b8fb4fa": 1209, + "7151619a6e77": 1192 + } + } + }, + "timing": { + "measurement_started_epoch_ms": 1793253642173, + "measurement_scheduled_end_epoch_ms": 1793253672173, + "measurement_completed_epoch_ms": 1793253669770 + }, + "client": { + "engine": "k6", + "scheduler_lateness_measured": false, + "raw_dropped_iterations_including_warmup": 0, + "peak_vus": 80, + "max_vus": 128 + }, + "all_latency_ms": { + "p50": 35.408502, + "p95": 744.1695299999999, + "p99": 1372.70999 + }, + "criterion": { + "delivery_fraction": 1.0004166666666667, + "error_fraction": 0.0, + "all_request_p95_ms": 744.1695299999999, + "delivery_valid": true, + "slo_pass": true, + "classification": "pass" + }, + "diagnostics": { + "resources": { + "api-1": { + "samples": 31, + "coverage_seconds": 28.841, + "max_sample_gap_seconds": 1.153, + "mean_cpu_cores": 0.38504188481675394, + "throttled_seconds": 0.652726, + "throttled_period_fraction": 0.025559105431309903, + "peak_memory_mib": 207.5546875, + "oom_kills": 0 + }, + "api-2": { + "samples": 31, + "coverage_seconds": 28.907, + "max_sample_gap_seconds": 1.2, + "mean_cpu_cores": 0.3793237624104888, + "throttled_seconds": 0.371953, + "throttled_period_fraction": 0.022435897435897436, + "peak_memory_mib": 186.34375, + "oom_kills": 0 + }, + "postgres": { + "samples": 15, + "coverage_seconds": 26.0, + "max_sample_gap_seconds": 3.0, + "mean_cpu_cores": 0.4581740384615385, + "throttled_seconds": 0.887759, + "throttled_period_fraction": 0.05190311418685121, + "peak_memory_mib": 270.90234375, + "oom_kills": 0 + }, + "nginx": { + "samples": 15, + "coverage_seconds": 27.0, + "max_sample_gap_seconds": 3.0, + "mean_cpu_cores": 0.10185314814814815, + "throttled_seconds": 0.055273, + "throttled_period_fraction": 0.010714285714285714, + "peak_memory_mib": 11.21484375, + "oom_kills": 0 + }, + "redis": { + "samples": 16, + "coverage_seconds": 28.0, + "max_sample_gap_seconds": 3.0, + "mean_cpu_cores": 0.06793207142857142, + "throttled_seconds": 0.069828, + "throttled_period_fraction": 0.009900990099009901, + "peak_memory_mib": 15.23828125, + "oom_kills": 0 + }, + "generator": { + "samples": 16, + "coverage_seconds": 28.0, + "max_sample_gap_seconds": 2.0, + "mean_cpu_cores": 0.28356189285714284, + "throttled_seconds": 0.0, + "throttled_period_fraction": 0.0, + "peak_memory_mib": 111.24609375, + "oom_kills": 0 + } + }, + "pools": { + "api-1": { + "samples": 31, + "acquisitions": 2058, + "acquisition_errors": 0, + "mean_acquisition_ms": 8.441638188533018, + "max_acquisition_ms": 1644.8288900000043, + "max_waiting": 19, + "queued_interval_fraction": 0.12903225806451613, + "max_total": 16, + "observed_connection_increases": 0, + "observed_connection_decreases": 0, + "event_loop_p99_max_ms": 337.117183 + }, + "api-2": { + "samples": 31, + "acquisitions": 2106, + "acquisition_errors": 0, + "mean_acquisition_ms": 7.09215369183254, + "max_acquisition_ms": 1084.8051559999876, + "max_waiting": 18, + "queued_interval_fraction": 0.0967741935483871, + "max_total": 16, + "observed_connection_increases": 0, + "observed_connection_decreases": 0, + "event_loop_p99_max_ms": 254.803967 + } + }, + "host": { + "samples": 15, + "cpu_some_fraction": 0.537610923076923, + "memory_some_fraction": 4.788461538461539e-05, + "memory_full_fraction": 4.253846153846154e-05, + "io_some_fraction": 0.022494346153846153, + "io_full_fraction": 0.006812692307692308, + "min_available_mib": 1170.99609375, + "max_swap_used_mib": 253.484375 + }, + "postgres": { + "samples": 17, + "max_active": 11, + "max_idle_in_transaction": 5, + "active_wait_observations": { + "LWLock/BufferContent": 1, + "no_wait_event/-": 19, + "IO/WalSync": 2, + "LWLock/WALWrite": 1 + } + }, + "nginx": { + "samples": 15, + "upstream_changes": 0, + "min_ready": 2, + "max_ready": 2 + }, + "limits_reached": { + "generator_late": false, + "client_capacity": false, + "request_errors": false, + "latency": false + }, + "diagnostics_complete": true + }, + "source_hashes": { + "benchmark": "deed892f7931c01e05cf20cd847194a9a063cb7c70a5e1c2f3c71615a469421f", + "summary": "80d250d2072a99d8f16ab44a27e281ed49b2521defec6dce8cffba2ab502ad88" + } + }, + { + "dataset": "pg-upper-cpu", + "variant": "pg2", + "configuration": "two", + "manifest": "api-small-db-control-20261029/pg2", + "label": "two-r80-confirmation-4", + "profile": { + "arrival_model": "k6 constant-arrival-rate; one HTTP request per iteration", + "offered_rps": 80, + "duration_seconds": 30, + "warmup_seconds": 30, + "warmup_profile": "same 80/20 workload at target rate", + "read_percent": 80, + "write_percent": 20, + "initial_messages": 30, + "history_limit": 50, + "max_in_flight": 128, + "timeout_ms": 5000, + "automatic_retries": false, + "expected_instances": 2, + "phase": "confirmation" + }, + "measurement": { + "scheduled_slots": 2400, + "client_dropped_slots": 74, + "scheduler_late_slots": 0, + "read": { + "attempted": 1861, + "successful": 1861, + "errors": 0, + "successful_rps": 62.03333333333333, + "successful_latency_ms": { + "p50": 21.034196, + "p95": 1877.057238, + "p99": 2856.6241264 + }, + "status_counts": {}, + "error_counts": {}, + "instance_counts": {} + }, + "write": { + "attempted": 465, + "successful": 465, + "errors": 0, + "successful_rps": 15.5, + "successful_latency_ms": { + "p50": 49.407120000000006, + "p95": 2656.4849977999984, + "p99": 3799.3444754000006 + }, + "status_counts": {}, + "error_counts": {}, + "instance_counts": {} + }, + "all": { + "attempted": 2326, + "successful": 2326, + "errors": 0, + "successful_rps": 77.53333333333333, + "successful_latency_ms": { + "p50": 26.308654, + "p95": 2121.76918975, + "p99": 3430.25811825 + }, + "status_counts": { + "200": 1861, + "201": 465, + "other": 0, + "network": 0 + }, + "error_counts": {}, + "instance_counts": { + "dbba0607a507": 1179, + "7ab084a1dd0a": 1147 + } + } + }, + "timing": { + "measurement_started_epoch_ms": 1793253871482, + "measurement_scheduled_end_epoch_ms": 1793253901482, + "measurement_completed_epoch_ms": 1793253900058 + }, + "client": { + "engine": "k6", + "scheduler_lateness_measured": false, + "raw_dropped_iterations_including_warmup": 324, + "peak_vus": 128, + "max_vus": 128 + }, + "all_latency_ms": { + "p50": 26.308654, + "p95": 2121.76918975, + "p99": 3430.25811825 + }, + "criterion": { + "delivery_fraction": 0.9691666666666666, + "error_fraction": 0.0, + "all_request_p95_ms": 2121.76918975, + "delivery_valid": false, + "slo_pass": false, + "classification": "generator_limited" + }, + "diagnostics": { + "resources": { + "api-1": { + "samples": 31, + "coverage_seconds": 28.913, + "max_sample_gap_seconds": 1.157, + "mean_cpu_cores": 0.3940063985058624, + "throttled_seconds": 0.342957, + "throttled_period_fraction": 0.03257328990228013, + "peak_memory_mib": 127.6171875, + "oom_kills": 0 + }, + "api-2": { + "samples": 29, + "coverage_seconds": 28.296, + "max_sample_gap_seconds": 1.901, + "mean_cpu_cores": 0.3993731269437376, + "throttled_seconds": 0.615319, + "throttled_period_fraction": 0.02622950819672131, + "peak_memory_mib": 124.13671875, + "oom_kills": 0 + }, + "postgres": { + "samples": 15, + "coverage_seconds": 26.0, + "max_sample_gap_seconds": 2.0, + "mean_cpu_cores": 0.4538005769230769, + "throttled_seconds": 0.0, + "throttled_period_fraction": 0.0, + "peak_memory_mib": 297.5078125, + "oom_kills": 0 + }, + "nginx": { + "samples": 16, + "coverage_seconds": 28.0, + "max_sample_gap_seconds": 2.0, + "mean_cpu_cores": 0.09419675, + "throttled_seconds": 0.02154, + "throttled_period_fraction": 0.003424657534246575, + "peak_memory_mib": 11.203125, + "oom_kills": 0 + }, + "redis": { + "samples": 16, + "coverage_seconds": 29.0, + "max_sample_gap_seconds": 3.0, + "mean_cpu_cores": 0.08058562068965518, + "throttled_seconds": 0.04525, + "throttled_period_fraction": 0.009708737864077669, + "peak_memory_mib": 14.19921875, + "oom_kills": 0 + }, + "generator": { + "samples": 16, + "coverage_seconds": 29.0, + "max_sample_gap_seconds": 3.0, + "mean_cpu_cores": 0.26271489655172414, + "throttled_seconds": 0.0, + "throttled_period_fraction": 0.0, + "peak_memory_mib": 105.28515625, + "oom_kills": 0 + } + }, + "pools": { + "api-1": { + "samples": 31, + "acquisitions": 2091, + "acquisition_errors": 0, + "mean_acquisition_ms": 17.692390588713877, + "max_acquisition_ms": 789.9243309999874, + "max_waiting": 14, + "queued_interval_fraction": 0.2903225806451613, + "max_total": 16, + "observed_connection_increases": 0, + "observed_connection_decreases": 0, + "event_loop_p99_max_ms": 718.798847 + }, + "api-2": { + "samples": 29, + "acquisitions": 2045, + "acquisition_errors": 0, + "mean_acquisition_ms": 26.586306794132145, + "max_acquisition_ms": 1123.8243430000002, + "max_waiting": 19, + "queued_interval_fraction": 0.27586206896551724, + "max_total": 16, + "observed_connection_increases": 0, + "observed_connection_decreases": 0, + "event_loop_p99_max_ms": 1087.373311 + } + }, + "host": { + "samples": 15, + "cpu_some_fraction": 0.4654303846153846, + "memory_some_fraction": 1.792307692307692e-05, + "memory_full_fraction": 2.1538461538461538e-06, + "io_some_fraction": 0.020640153846153846, + "io_full_fraction": 0.006474038461538462, + "min_available_mib": 1256.484375, + "max_swap_used_mib": 242.234375 + }, + "postgres": { + "samples": 16, + "max_active": 5, + "max_idle_in_transaction": 10, + "active_wait_observations": { + "Client/ClientRead": 2, + "no_wait_event/-": 14, + "IO/WalSync": 1, + "LWLock/WALWrite": 2, + "Lock/transactionid": 1 + } + }, + "nginx": { + "samples": 16, + "upstream_changes": 0, + "min_ready": 2, + "max_ready": 2 + }, + "limits_reached": { + "generator_late": false, + "client_capacity": false, + "request_errors": false, + "latency": true + }, + "diagnostics_complete": true + }, + "source_hashes": { + "benchmark": "2f216cdf0c146e8e476708cd7295795bc4aaa772e5924244ae4e1510624e740d", + "summary": "51fab6377eb31ed37cf439ed2fa7dc83823424852c99f440ba299574aa3470ca" + } + }, + { + "dataset": "pg-upper-cpu", + "variant": "pg2", + "configuration": "two", + "manifest": "api-small-db-control-20261029/pg2", + "label": "two-r80-confirmation-5", + "profile": { + "arrival_model": "k6 constant-arrival-rate; one HTTP request per iteration", + "offered_rps": 80, + "duration_seconds": 30, + "warmup_seconds": 30, + "warmup_profile": "same 80/20 workload at target rate", + "read_percent": 80, + "write_percent": 20, + "initial_messages": 30, + "history_limit": 50, + "max_in_flight": 128, + "timeout_ms": 5000, + "automatic_retries": false, + "expected_instances": 2, + "phase": "confirmation" + }, + "measurement": { + "scheduled_slots": 2400, + "client_dropped_slots": 94, + "scheduler_late_slots": 0, + "read": { + "attempted": 1845, + "successful": 1583, + "errors": 262, + "successful_rps": 52.766666666666666, + "successful_latency_ms": { + "p50": 115.900598, + "p95": 1421.549182899998, + "p99": 3925.5455695 + }, + "status_counts": {}, + "error_counts": {}, + "instance_counts": {} + }, + "write": { + "attempted": 461, + "successful": 395, + "errors": 66, + "successful_rps": 13.166666666666666, + "successful_latency_ms": { + "p50": 223.69877, + "p95": 2362.0337399999976, + "p99": 4464.75089472 + }, + "status_counts": {}, + "error_counts": {}, + "instance_counts": {} + }, + "all": { + "attempted": 2306, + "successful": 1978, + "errors": 328, + "successful_rps": 65.93333333333334, + "successful_latency_ms": { + "p50": 128.46333049999998, + "p95": 1639.3791287499998, + "p99": 4067.77854259 + }, + "status_counts": { + "200": 1583, + "201": 395, + "other": 327, + "network": 1 + }, + "error_counts": {}, + "instance_counts": { + "7ab084a1dd0a": 1005, + "dbba0607a507": 973 + } + } + }, + "timing": { + "measurement_started_epoch_ms": 1793253938915, + "measurement_scheduled_end_epoch_ms": 1793253968915, + "measurement_completed_epoch_ms": 1793253966515 + }, + "client": { + "engine": "k6", + "scheduler_lateness_measured": false, + "raw_dropped_iterations_including_warmup": 95, + "peak_vus": 128, + "max_vus": 128 + }, + "all_latency_ms": { + "p50": 105.90291400000001, + "p95": 1555.304007, + "p99": 4000.4448428499904 + }, + "criterion": { + "delivery_fraction": 0.9608333333333333, + "error_fraction": 0.1422376409366869, + "all_request_p95_ms": 1555.304007, + "delivery_valid": false, + "slo_pass": false, + "classification": "generator_limited" + }, + "diagnostics": { + "resources": { + "api-1": { + "samples": 30, + "coverage_seconds": 28.583, + "max_sample_gap_seconds": 1.273, + "mean_cpu_cores": 0.38202889829619, + "throttled_seconds": 0.563337, + "throttled_period_fraction": 0.019672131147540985, + "peak_memory_mib": 166.6484375, + "oom_kills": 0 + }, + "api-2": { + "samples": 30, + "coverage_seconds": 28.27, + "max_sample_gap_seconds": 1.157, + "mean_cpu_cores": 0.3940354085603113, + "throttled_seconds": 0.598199, + "throttled_period_fraction": 0.029605263157894735, + "peak_memory_mib": 162.49609375, + "oom_kills": 0 + }, + "postgres": { + "samples": 14, + "coverage_seconds": 27.0, + "max_sample_gap_seconds": 3.0, + "mean_cpu_cores": 0.47419825925925924, + "throttled_seconds": 0.0, + "throttled_period_fraction": 0.0, + "peak_memory_mib": 307.85546875, + "oom_kills": 0 + }, + "nginx": { + "samples": 15, + "coverage_seconds": 27.0, + "max_sample_gap_seconds": 3.0, + "mean_cpu_cores": 0.14466866666666667, + "throttled_seconds": 0.136982, + "throttled_period_fraction": 0.030612244897959183, + "peak_memory_mib": 12.30859375, + "oom_kills": 0 + }, + "redis": { + "samples": 16, + "coverage_seconds": 29.0, + "max_sample_gap_seconds": 3.0, + "mean_cpu_cores": 0.09034572413793103, + "throttled_seconds": 0.042319, + "throttled_period_fraction": 0.009584664536741214, + "peak_memory_mib": 15.15625, + "oom_kills": 0 + }, + "generator": { + "samples": 16, + "coverage_seconds": 28.0, + "max_sample_gap_seconds": 3.0, + "mean_cpu_cores": 0.45161375, + "throttled_seconds": 0.0, + "throttled_period_fraction": 0.0, + "peak_memory_mib": 107.63671875, + "oom_kills": 0 + } + }, + "pools": { + "api-1": { + "samples": 30, + "acquisitions": 1792, + "acquisition_errors": 0, + "mean_acquisition_ms": 34.294248044642536, + "max_acquisition_ms": 569.1812029999855, + "max_waiting": 26, + "queued_interval_fraction": 0.2, + "max_total": 16, + "observed_connection_increases": 0, + "observed_connection_decreases": 0, + "event_loop_p99_max_ms": 632.815615 + }, + "api-2": { + "samples": 30, + "acquisitions": 1800, + "acquisition_errors": 0, + "mean_acquisition_ms": 32.74424398555635, + "max_acquisition_ms": 650.2920369999774, + "max_waiting": 21, + "queued_interval_fraction": 0.23333333333333334, + "max_total": 16, + "observed_connection_increases": 0, + "observed_connection_decreases": 0, + "event_loop_p99_max_ms": 572.522495 + } + }, + "host": { + "samples": 14, + "cpu_some_fraction": 0.5873266296296297, + "memory_some_fraction": 1.7296296296296297e-05, + "memory_full_fraction": 1.3962962962962963e-05, + "io_some_fraction": 0.019640703703703705, + "io_full_fraction": 0.004309259259259259, + "min_available_mib": 1229.65234375, + "max_swap_used_mib": 242.234375 + }, + "postgres": { + "samples": 16, + "max_active": 5, + "max_idle_in_transaction": 15, + "active_wait_observations": { + "IO/WalSync": 1, + "Lock/transactionid": 3, + "no_wait_event/-": 17 + } + }, + "nginx": { + "samples": 15, + "upstream_changes": 2, + "min_ready": 0, + "max_ready": 2 + }, + "limits_reached": { + "generator_late": false, + "client_capacity": false, + "request_errors": true, + "latency": true + }, + "diagnostics_complete": true + }, + "source_hashes": { + "benchmark": "e782d549758ee0821962c3763d5df881099d3171c0ec7f698d8d6e1053c336f7", + "summary": "a6b7de19629a710300181ad52cc6a4aa6a004ac8a3d1ae11ef24c4e111cb38cf" + } + }, + { + "dataset": "pg-upper-cpu", + "variant": "pg2", + "configuration": "two", + "manifest": "api-small-db-control-20261029/pg2", + "label": "two-r80-confirmation-6", + "profile": { + "arrival_model": "k6 constant-arrival-rate; one HTTP request per iteration", + "offered_rps": 80, + "duration_seconds": 30, + "warmup_seconds": 30, + "warmup_profile": "same 80/20 workload at target rate", + "read_percent": 80, + "write_percent": 20, + "initial_messages": 30, + "history_limit": 50, + "max_in_flight": 128, + "timeout_ms": 5000, + "automatic_retries": false, + "expected_instances": 2, + "phase": "confirmation" + }, + "measurement": { + "scheduled_slots": 2400, + "client_dropped_slots": 1, + "scheduler_late_slots": 0, + "read": { + "attempted": 1920, + "successful": 1920, + "errors": 0, + "successful_rps": 64, + "successful_latency_ms": { + "p50": 17.364385, + "p95": 652.9945433499998, + "p99": 1212.3882701999999 + }, + "status_counts": {}, + "error_counts": {}, + "instance_counts": {} + }, + "write": { + "attempted": 479, + "successful": 479, + "errors": 0, + "successful_rps": 15.966666666666667, + "successful_latency_ms": { + "p50": 41.716138, + "p95": 978.9388010999996, + "p99": 1397.7014033399998 + }, + "status_counts": {}, + "error_counts": {}, + "instance_counts": {} + }, + "all": { + "attempted": 2399, + "successful": 2399, + "errors": 0, + "successful_rps": 79.96666666666667, + "successful_latency_ms": { + "p50": 21.56194, + "p95": 712.7126198999999, + "p99": 1247.7373979799997 + }, + "status_counts": { + "200": 1920, + "201": 479, + "other": 0, + "network": 0 + }, + "error_counts": {}, + "instance_counts": { + "dbba0607a507": 1215, + "7ab084a1dd0a": 1184 + } + } + }, + "timing": { + "measurement_started_epoch_ms": 1793254004762, + "measurement_scheduled_end_epoch_ms": 1793254034762, + "measurement_completed_epoch_ms": 1793254032639 + }, + "client": { + "engine": "k6", + "scheduler_lateness_measured": false, + "raw_dropped_iterations_including_warmup": 36, + "peak_vus": 99, + "max_vus": 128 + }, + "all_latency_ms": { + "p50": 21.56194, + "p95": 712.7126198999999, + "p99": 1247.7373979799997 + }, + "criterion": { + "delivery_fraction": 0.9995833333333334, + "error_fraction": 0.0, + "all_request_p95_ms": 712.7126198999999, + "delivery_valid": true, + "slo_pass": true, + "classification": "pass" + }, + "diagnostics": { + "resources": { + "api-1": { + "samples": 31, + "coverage_seconds": 29.136, + "max_sample_gap_seconds": 1.3, + "mean_cpu_cores": 0.38189717188358047, + "throttled_seconds": 0.876918, + "throttled_period_fraction": 0.028846153846153848, + "peak_memory_mib": 169.10546875, + "oom_kills": 0 + }, + "api-2": { + "samples": 31, + "coverage_seconds": 28.803, + "max_sample_gap_seconds": 1.204, + "mean_cpu_cores": 0.3827058639725029, + "throttled_seconds": 0.818319, + "throttled_period_fraction": 0.04220779220779221, + "peak_memory_mib": 185.77734375, + "oom_kills": 0 + }, + "postgres": { + "samples": 16, + "coverage_seconds": 28.0, + "max_sample_gap_seconds": 2.0, + "mean_cpu_cores": 0.46384507142857145, + "throttled_seconds": 0.0, + "throttled_period_fraction": 0.0, + "peak_memory_mib": 313.56640625, + "oom_kills": 0 + }, + "nginx": { + "samples": 15, + "coverage_seconds": 27.0, + "max_sample_gap_seconds": 3.0, + "mean_cpu_cores": 0.11060207407407407, + "throttled_seconds": 0.075479, + "throttled_period_fraction": 0.013888888888888888, + "peak_memory_mib": 10.4453125, + "oom_kills": 0 + }, + "redis": { + "samples": 16, + "coverage_seconds": 28.0, + "max_sample_gap_seconds": 2.0, + "mean_cpu_cores": 0.07068932142857143, + "throttled_seconds": 0.069802, + "throttled_period_fraction": 0.009868421052631578, + "peak_memory_mib": 15.328125, + "oom_kills": 0 + }, + "generator": { + "samples": 15, + "coverage_seconds": 27.0, + "max_sample_gap_seconds": 3.0, + "mean_cpu_cores": 0.33152985185185185, + "throttled_seconds": 0.0, + "throttled_period_fraction": 0.0, + "peak_memory_mib": 107.66015625, + "oom_kills": 0 + } + }, + "pools": { + "api-1": { + "samples": 31, + "acquisitions": 2042, + "acquisition_errors": 0, + "mean_acquisition_ms": 0.8538428966706686, + "max_acquisition_ms": 555.7582619999885, + "max_waiting": 0, + "queued_interval_fraction": 0.0, + "max_total": 16, + "observed_connection_increases": 1, + "observed_connection_decreases": 1, + "event_loop_p99_max_ms": 630.194175 + }, + "api-2": { + "samples": 31, + "acquisitions": 2007, + "acquisition_errors": 0, + "mean_acquisition_ms": 1.466452709516449, + "max_acquisition_ms": 443.63514299999224, + "max_waiting": 1, + "queued_interval_fraction": 0.03225806451612903, + "max_total": 16, + "observed_connection_increases": 4, + "observed_connection_decreases": 4, + "event_loop_p99_max_ms": 446.955519 + } + }, + "host": { + "samples": 16, + "cpu_some_fraction": 0.46342039285714287, + "memory_some_fraction": 4.642857142857143e-06, + "memory_full_fraction": 1.7857142857142858e-07, + "io_some_fraction": 0.016806214285714285, + "io_full_fraction": 0.005041785714285714, + "min_available_mib": 1201.30859375, + "max_swap_used_mib": 242.234375 + }, + "postgres": { + "samples": 16, + "max_active": 12, + "max_idle_in_transaction": 8, + "active_wait_observations": { + "no_wait_event/-": 29, + "Client/ClientRead": 2, + "Lock/transactionid": 1 + } + }, + "nginx": { + "samples": 15, + "upstream_changes": 0, + "min_ready": 2, + "max_ready": 2 + }, + "limits_reached": { + "generator_late": false, + "client_capacity": false, + "request_errors": false, + "latency": false + }, + "diagnostics_complete": true + }, + "source_hashes": { + "benchmark": "b246d72045472b519ff44583cde386e3cfc8bb253d07ff608e6bf7fa5274b883", + "summary": "5ad38f64643d6488d07ffdc0bfbb3d63047d03d9d49d27abe31520e40ad2d7e3" + } + } + ] +} diff --git a/evidence/scaling.csv b/evidence/scaling.csv new file mode 100644 index 00000000..4d537077 --- /dev/null +++ b/evidence/scaling.csv @@ -0,0 +1,55 @@ +dataset,variant,label,replicas,api_cpu,api_ram_mib,pool_total,pg_cpu,pg_ram_mib,offered_rps,duration_seconds,warmup_seconds,attempted,successful,errors,successful_rps,attempted_rps,delivery_fraction,delivery_valid,p50_ms,p95_ms,p99_ms,all_request_p95_ms,api_cpu_cores,api_peak_memory_mib_sum,api_max_throttle_percent,pg_cpu_cores,pg_peak_memory_mib,pg_throttle_percent,host_cpu_pressure_percent,acquisition_mean_ms,acquisition_errors,pool_max_waiting,nginx_min_ready,diagnostics_complete +api-cpu,one-small,one-small-r40-confirmation-4,1,1.0,1024.0,32,1.0,512.0,40,30,10,1201,1201,0,40.03333333333333,40.03333333333333,1.0008333333333332,True,26.847786,1363.2556869999999,1703.2769420000002,1363.2556869999999,0.4689939283545841,180.99609375,6.64451827242525,0.33446107407407405,246.28125,4.10958904109589,40.80378148148148,0.5064286857716331,0,0,1,True +api-cpu,one-small,one-small-r80-confirmation-5,1,1.0,1024.0,32,1.0,512.0,80,30,10,2221,1145,1076,38.166666666666664,74.03333333333333,0.9254166666666667,False,675.249624,3612.0851274,4642.559255439987,3913.775195,0.5187701269052575,220.72265625,9.00900900900901,0.3064097142857143,254.94921875,2.9661016949152543,48.179525,35.72717908921662,0,29,0,True +api-cpu,one-small,one-small-r40-confirmation-6,1,1.0,1024.0,32,1.0,512.0,40,30,10,1201,1201,0,40.03333333333333,40.03333333333333,1.0008333333333332,True,86.459411,1682.559437,2313.335861,1682.559437,0.5015700869077656,242.703125,6.188925081433225,0.46909210344827584,253.98828125,14.057507987220447,51.16733103448276,5.8440807538536665,0,8,1,True +api-cpu,one-small,one-small-r80-confirmation-7,1,1.0,1024.0,32,1.0,512.0,80,30,10,2213,1736,477,57.86666666666667,73.76666666666667,0.9220833333333334,False,146.5581615,2659.44941475,4480.5786870500015,2288.1632106000006,0.46460503597122305,243.12109375,4.487179487179487,0.36433525925925925,262.03125,3.4615384615384617,45.44102222222222,3.753992680559904,0,4,0,True +api-cpu,one-small,one-small-r40-confirmation-8,1,1.0,1024.0,32,1.0,512.0,40,30,10,1201,1201,0,40.03333333333333,40.03333333333333,1.0008333333333332,True,70.035875,1322.7580870000002,2087.550949,1322.7580870000002,0.5208842712940144,242.90234375,3.7900874635568513,0.41083307142857145,264.1015625,7.023411371237458,49.05793571428572,0.7800225128654482,0,0,1,True +api-cpu,one-small,one-small-r80-confirmation-9,1,1.0,1024.0,32,1.0,512.0,80,30,10,2401,2259,142,75.3,80.03333333333333,1.0004166666666667,True,23.386415,623.2823438999998,816.6689335600003,623.018676,0.5334591003791113,244.5078125,2.229299363057325,0.39796175862068967,285.01171875,2.2435897435897436,38.453079310344826,0.3408927703400665,0,0,1,True +api-cpu,one,one-r40-confirmation-10,1,2.0,1024.0,32,1.0,512.0,40,30,10,1201,1158,43,38.6,40.03333333333333,1.0008333333333332,True,28.589108000000003,2413.214785799998,3846.0589049900004,2319.3248719999997,0.4332059223037218,200.88671875,0.0,0.3532345,283.921875,12.927756653992395,39.199192857142855,16.47106694684052,0,8,0,True +api-cpu,one,one-r80-confirmation-11,1,2.0,1024.0,32,1.0,512.0,80,30,10,2270,1554,716,51.8,75.66666666666667,0.9458333333333333,False,150.2324305,1506.410031149999,2727.858566280001,1849.6533385999996,0.5490057858528841,222.453125,0.33112582781456956,0.370641,289.72265625,5.535055350553505,50.593651724137935,14.885148709623188,0,18,0,True +api-cpu,one,one-r40-confirmation-12,1,2.0,1024.0,32,1.0,512.0,40,30,10,1201,1201,0,40.03333333333333,40.03333333333333,1.0008333333333332,True,18.939717,418.903777,957.1179070000001,418.903777,0.3838068209416091,244.421875,0.0,0.2989388571428571,291.7734375,3.040540540540541,40.00857857142857,0.48221057456625477,0,0,1,True +api-cpu,one,one-r80-confirmation-13,1,2.0,1024.0,32,1.0,512.0,80,30,10,2400,2400,0,80.0,80.0,1.0,True,205.252095,1378.379113749999,2144.6287917899995,1378.379113749999,0.6651004694501743,244.953125,0.0,0.49829189285714287,301.0703125,6.0606060606060606,46.72890714285714,3.464600104437483,0,10,1,True +api-cpu,one,one-r40-confirmation-14,1,2.0,1024.0,32,1.0,512.0,40,30,10,1201,1201,0,40.03333333333333,40.03333333333333,1.0008333333333332,True,17.859334999999998,751.296029,1386.120503,751.296029,0.35999272408798466,245.04296875,0.0,0.34728475862068964,299.8671875,7.540983606557377,34.73657931034483,0.27413348812545674,0,0,1,True +api-cpu,one,one-r80-confirmation-15,1,2.0,1024.0,32,1.0,512.0,80,30,10,2369,2369,0,78.96666666666667,78.96666666666667,0.9870833333333333,True,38.92324300000001,966.6013613999995,1567.104490280001,966.6013613999995,0.577001595871108,245.30078125,0.2932551319648094,0.4352526666666667,302.50390625,3.4482758620689653,43.26645185185185,0.42102274316591715,0,0,1,True +api-cpu,two-small,two-small-r40-confirmation-16,2,1.0,1024.0,32,1.0,512.0,40,30,10,1201,1201,0,40.03333333333333,40.03333333333333,1.0008333333333332,True,48.445418,1118.8671709999999,1544.904627,1118.8671709999999,0.5745100966367777,248.95703125,21.172638436482085,0.30872242857142856,302.90234375,2.5179856115107913,54.86230357142857,0.6318267755826504,0,1,1,True +api-cpu,two-small,two-small-r80-confirmation-17,2,1.0,1024.0,32,1.0,512.0,80,30,10,2371,1713,658,57.1,79.03333333333333,0.9879166666666667,True,25.045635,691.4786511999989,1143.6126581199976,588.881168,0.6049542357784888,330.078125,21.5625,0.33328606896551727,293.62109375,3.4013605442176873,54.181648275862074,41.866071340397994,0,33,0,True +api-cpu,two-small,two-small-r40-confirmation-18,2,1.0,1024.0,32,1.0,512.0,40,30,10,1206,1206,0,40.2,40.2,1.005,True,93.989056,1757.4142032500001,2544.2509913000004,1757.4142032500001,0.5981754698234121,373.01171875,18.38006230529595,0.4452461111111111,276.8125,7.357859531772576,62.34872962962963,2.1698786494695783,0,10,2,True +api-cpu,two-small,two-small-r80-confirmation-19,2,1.0,1024.0,32,1.0,512.0,80,30,10,1647,1174,473,39.13333333333333,54.9,0.68625,False,1051.8127515,4573.172054199999,4829.25868523,5009.7729897,0.6464339585556628,377.83984375,51.006711409395976,0.399076,274.375,3.3112582781456954,60.90348571428571,156.04911624711062,0,42,0,True +api-cpu,two-small,two-small-r40-confirmation-20,2,1.0,1024.0,32,1.0,512.0,40,30,10,1201,1201,0,40.03333333333333,40.03333333333333,1.0008333333333332,True,62.321341000000004,1338.075269,1721.736195,1338.075269,0.5502207297293924,398.22265625,18.83116883116883,0.38870475862068965,274.83203125,4.777070063694268,56.438,1.3796656221576238,0,2,2,True +api-cpu,two-small,two-small-r80-confirmation-21,2,1.0,1024.0,32,1.0,512.0,80,30,10,1941,1442,499,48.06666666666667,64.7,0.80875,False,1037.0655474999999,3700.5747892000004,4145.45928118,5000.846076000001,0.6176817281440554,421.109375,38.67924528301887,0.3516609642857143,273.04296875,2.364864864864865,60.43923571428571,90.55197401443517,0,42,0,True +api-cpu,two,two-r40-confirmation-22,2,2.0,1024.0,32,1.0,512.0,40,30,10,1200,1200,0,40.0,40.0,1.0,True,25.912608499999997,776.7075832999998,1450.893997529999,776.7075832999998,0.4979710890309068,265.3203125,0.6451612903225806,0.32912351724137934,281.47265625,3.061224489795918,42.24538275862069,0.7639616891295447,0,2,2,True +api-cpu,two,two-r80-confirmation-23,2,2.0,1024.0,32,1.0,512.0,80,30,10,2328,2328,0,77.6,77.6,0.97,False,69.108862,1732.0478621500022,3892.17638994,1732.0478621500022,0.9329810136367049,346.1171875,4.229607250755287,0.5218088518518519,277.859375,9.491525423728813,52.210596296296295,53.69368175558641,0,44,1,True +api-cpu,two,two-r40-confirmation-24,2,2.0,1024.0,32,1.0,512.0,40,30,10,1201,1201,0,40.03333333333333,40.03333333333333,1.0008333333333332,True,13.742251,451.573919,844.77165,451.573919,0.4716363654058743,407.20703125,1.3029315960912053,0.270069,272.84375,3.169014084507042,27.00871111111111,1.9952917991740617,0,0,2,True +api-cpu,two,two-r80-confirmation-25,2,2.0,1024.0,32,1.0,512.0,80,30,10,2010,1979,31,65.96666666666667,67.0,0.8375,False,171.42565199999999,3153.9972928999987,4344.177250020001,3644.38635635,0.8843039698112047,474.21484375,5.379746835443038,0.5575650769230769,258.26171875,5.944055944055944,57.75113076923078,163.35389117991014,0,53,1,True +api-cpu,two,two-r40-confirmation-26,2,2.0,1024.0,32,1.0,512.0,40,30,10,1200,1200,0,40.0,40.0,1.0,True,20.1536085,404.04996024999986,675.41993862,404.04996024999986,0.4924617244558488,498.21484375,1.7857142857142856,0.300782962962963,256.08984375,4.545454545454546,39.64784814814814,0.270736000000329,0,0,2,True +api-cpu,two,two-r80-confirmation-27,2,2.0,1024.0,32,1.0,512.0,80,30,10,2400,2400,0,80.0,80.0,1.0,True,18.8891145,372.4251258499997,658.5146975299939,372.4251258499997,0.6646231235220466,502.234375,1.2944983818770228,0.3887145,260.2265625,3.678929765886288,42.85142142857143,0.2999987548356928,0,0,2,True +api-cpu,four-small,four-small-r40-confirmation-28,4,1.0,1024.0,32,1.0,512.0,40,30,10,1143,930,213,31.0,38.1,0.9525,False,563.57299,4513.76266625,4855.86492899,5002.5158862,0.7358752597636645,409.2109375,58.11688311688312,0.32318432142857145,257.17578125,1.3745704467353952,65.94500357142857,79.96626631756442,9,15,0,True +api-cpu,four-small,four-small-r80-confirmation-29,4,1.0,1024.0,32,1.0,512.0,80,30,10,1505,1286,219,42.86666666666667,50.166666666666664,0.6270833333333333,False,1625.0898905,4334.39354775,4838.7090065,5011.016073,0.8051559679951759,506.86328125,65.0326797385621,0.4044294482758621,244.546875,4.113924050632911,83.87952413793104,290.3396483314464,0,34,1,True +api-cpu,four-small,four-small-r40-confirmation-30,4,1.0,1024.0,32,1.0,512.0,40,30,10,1201,1201,0,40.03333333333333,40.03333333333333,1.0008333333333332,True,16.783684,664.626691,1316.7376120000001,664.626691,0.5542242782175116,573.66796875,24.600638977635782,0.2841889310344828,235.04296875,2.903225806451613,54.391493103448276,4.554068587618393,0,0,4,True +api-cpu,four-small,four-small-r80-confirmation-31,4,1.0,1024.0,32,1.0,512.0,80,30,10,2209,2208,1,73.6,73.63333333333334,0.9204166666666667,False,645.10074,2796.4947147000003,3875.9293856899994,2819.614260199997,0.9155072796500234,664.3203125,76.43312101910828,0.4689557777777778,229.32421875,3.7037037037037033,81.98151481481482,170.3762436461243,0,32,3,True +api-cpu,four-small,four-small-r40-confirmation-32,4,1.0,1024.0,32,1.0,512.0,40,30,10,1201,1201,0,40.03333333333333,40.03333333333333,1.0008333333333332,True,32.074924,808.456865,1587.9421240000001,808.456865,0.6178738390069644,688.2890625,32.05128205128205,0.31956855172413795,230.54296875,2.9702970297029703,61.64351034482759,1.8690922410455422,0,6,4,True +api-cpu,four-small,four-small-r80-confirmation-33,4,1.0,1024.0,32,1.0,512.0,80,30,10,1542,1441,101,48.03333333333333,51.4,0.6425,False,1824.245409,4418.3310790000005,4710.956379199998,5000.4370198,0.7125214524412071,699.04296875,72.88135593220339,0.3575675172413793,230.703125,2.2082018927444795,80.39199655172415,422.90973522269843,0,55,1,True +api-cpu,four,four-r40-confirmation-34,4,2.0,1024.0,32,1.0,512.0,40,30,10,1202,1202,0,40.06666666666667,40.06666666666667,1.0016666666666667,True,27.289679,1443.624807400003,3055.7631298200004,1443.624807400003,0.7505123280542068,431.33984375,8.653846153846153,0.32891293103448277,238.578125,3.1847133757961785,53.46226896551725,18.29400296340266,0,11,4,True +api-cpu,four,four-r80-confirmation-35,4,2.0,1024.0,32,1.0,512.0,80,30,10,2263,2263,0,75.43333333333334,75.43333333333334,0.9429166666666666,False,39.859282,2765.0429346000005,3836.9857128000017,2765.0429346000005,1.0209338416080294,528.44140625,10.946745562130179,0.41786425,245.6484375,4.09556313993174,54.01412142857143,131.48510588421536,0,30,3,True +api-cpu,four,four-r40-confirmation-36,4,2.0,1024.0,32,1.0,512.0,40,30,10,1200,1200,0,40.0,40.0,1.0,True,18.764722999999996,678.1664768499995,1272.8332105600002,678.1664768499995,0.6441531318902833,622.16015625,9.523809523809524,0.3159538571428571,237.0390625,3.492063492063492,46.82114285714285,1.2023917273639246,0,1,4,True +api-cpu,four,four-r80-confirmation-37,4,2.0,1024.0,32,1.0,512.0,80,30,10,2107,2104,3,70.13333333333334,70.23333333333333,0.8779166666666667,False,213.502144,2947.47390755,3767.175285259999,2950.8826460999994,1.0004379639593417,631.91796875,14.61038961038961,0.47014373076923077,239.87890625,3.1914893617021276,69.7715076923077,196.41256616530842,0,33,3,True +api-cpu,four,four-r40-confirmation-38,4,2.0,1024.0,32,1.0,512.0,40,30,10,1201,1201,0,40.03333333333333,40.03333333333333,1.0008333333333332,True,28.576715,1044.026936,1622.646796,1044.026936,0.579652601289575,699.5078125,4.870129870129871,0.30819364285714285,241.28515625,0.9803921568627451,53.72631785714286,1.4715062709821798,0,2,4,True +api-cpu,four,four-r80-confirmation-39,4,2.0,1024.0,32,1.0,512.0,80,30,10,2306,2306,0,76.86666666666666,76.86666666666666,0.9608333333333333,False,178.069107,2106.622289,2973.419937949996,2106.622289,0.9669768640103195,741.734375,5.7057057057057055,0.46597120689655175,241.16015625,2.6706231454005933,65.60908275862069,111.53861144349652,0,25,4,True +pg-cpu,pg0.5,four-r60-repeat1,4,2.0,1024.0,60,0.5,512.0,60,120,20,6702,6669,33,55.575,55.85,0.9308333333333333,False,25.463,576.18,2086.454,,0.6517002565561196,412.0703125,4.8293089092422985,0.3220422288135593,267.37109375,33.30536912751678,52.56348644067796,23.609644087794603,20,2,4,True +pg-cpu,pg0.5,four-r60-repeat2,4,2.0,1024.0,60,0.5,512.0,60,120,20,5940,5864,76,48.86666666666667,49.5,0.825,False,75.384,1570.711,3408.81,,0.7329807440781919,513.3828125,7.136997538966367,0.3908916525423729,277.22265625,54.67445742904842,69.41428050847458,43.96043944981507,47,3,3,True +pg-cpu,pg0.5,four-r60-repeat3,4,2.0,1024.0,60,0.5,512.0,60,120,20,6490,6478,12,53.983333333333334,54.083333333333336,0.9013888888888889,False,25.401,825.578,2398.068,,0.6025514401016459,598.08203125,5.189456342668864,0.340874731092437,267.171875,38.232865400495456,52.90928487394958,10.25498626471663,1,3,4,True +pg-cpu,pg1,four-r60-repeat1,4,2.0,1024.0,60,1.0,512.0,60,120,20,6613,6613,0,55.108333333333334,55.108333333333334,0.9184722222222222,False,17.841,208.134,803.385,,0.6611089620356754,410.28125,5.546357615894039,0.3187262966101695,118.35546875,2.9925187032418954,43.279896610169494,0.9549692434151781,0,0,4,True +pg-cpu,pg1,four-r60-repeat2,4,2.0,1024.0,60,1.0,512.0,60,120,20,6191,6191,0,51.59166666666667,51.59166666666667,0.8598611111111111,False,25.284,296.119,886.275,,0.6961733670166016,490.05859375,5.037159372419488,0.38550305128205126,121.6171875,5.091819699499165,51.8048282051282,1.1744822766036151,0,0,4,True +pg-cpu,pg1,four-r60-repeat3,4,2.0,1024.0,60,1.0,512.0,60,120,20,6278,6277,1,52.30833333333333,52.31666666666667,0.8719444444444444,False,24.799,551.315,1469.251,,0.6838688608643495,591.7265625,5.523495465787304,0.3920775338983051,190.1015625,8.00990916597853,52.54273220338983,10.537646633393535,0,0,4,True +pool-limit,pool60,four-r100-repeat1,4,2.0,1024.0,60,1.0,512.0,100,60,15,3753,3265,488,54.416666666666664,62.55,0.6255,False,49.021,1712.812,3905.626,,0.8365694303748847,434.23828125,9.283387622149837,0.5837867719298245,274.10546875,24.006908462867013,67.08071052631578,147.1668448014528,418,7,2,True +pool-limit,pool60,four-r100-repeat2,4,2.0,1024.0,60,1.0,512.0,100,60,15,5036,5036,0,83.93333333333334,83.93333333333334,0.8393333333333334,False,23.084,263.596,461.061,,0.8666951803432426,507.84375,7.540983606557377,0.4340725172413793,168.43359375,5.6951423785594635,53.356810344827586,0.22145806512495533,0,0,4,True +pool-limit,pool60,four-r100-repeat3,4,2.0,1024.0,60,1.0,512.0,100,60,15,5146,5146,0,85.76666666666667,85.76666666666667,0.8576666666666667,False,26.017,288.733,710.623,,0.8637168989788998,594.375,6.688963210702341,0.44118370689655173,201.85546875,4.8903878583473865,54.0543,3.7378880537782533,0,0,4,True +pool-limit,pool32,four-r100-repeat1,4,2.0,1024.0,32,1.0,512.0,100,60,15,4558,4558,0,75.96666666666667,75.96666666666667,0.7596666666666667,False,46.854,573.083,1464.894,,0.9994498117976172,417.15234375,9.75206611570248,0.4833926896551724,200.52734375,4.3478260869565215,61.618993103448275,4.1768588468573355,0,5,4,True +pool-limit,pool32,four-r100-repeat2,4,2.0,1024.0,32,1.0,512.0,100,60,15,4927,4923,4,82.05,82.11666666666666,0.8211666666666667,False,22.419,389.339,1936.349,,0.8844784302484496,486.140625,7.8817733990147785,0.423828186440678,201.1953125,3.523489932885906,50.59918474576271,12.409012795600338,0,10,4,True +pool-limit,pool32,four-r100-repeat3,4,2.0,1024.0,32,1.0,512.0,100,60,15,5062,5062,0,84.36666666666666,84.36666666666666,0.8436666666666667,False,20.843,373.895,1093.443,,0.829926970799795,589.52734375,5.509181969949917,0.4455904406779661,207.91015625,6.065573770491803,49.169627118644065,5.397192570060225,0,6,4,True +pg-upper-cpu,pg1,two-r80-confirmation-4,2,2.0,1024.0,32,1.0,512.0,80,30,30,2401,2401,0,80.03333333333333,80.03333333333333,1.0004166666666667,True,28.122368,793.449891,1037.210309,793.449891,0.8285819189203447,251.90625,3.1645569620253164,0.4253926551724138,243.45703125,3.5830618892508146,46.79261724137931,0.7895206962982697,0,5,2,True +pg-upper-cpu,pg1,two-r80-confirmation-5,2,2.0,1024.0,32,1.0,512.0,80,30,30,2369,2369,0,78.96666666666667,78.96666666666667,0.9870833333333333,True,72.155286,2026.0931697999993,4108.34764632,2026.0931697999993,0.8320800483649098,333.4140625,5.9405940594059405,0.445373724137931,262.19921875,3.8461538461538463,49.43855517241379,40.801660400828624,0,37,1,True +pg-upper-cpu,pg1,two-r80-confirmation-6,2,2.0,1024.0,32,1.0,512.0,80,30,30,2401,2401,0,80.03333333333333,80.03333333333333,1.0004166666666667,True,35.408502,744.1695299999999,1372.70999,744.1695299999999,0.7643656472272428,393.8984375,2.5559105431309903,0.4581740384615385,270.90234375,5.190311418685121,53.7610923076923,7.759117931556264,0,19,2,True +pg-upper-cpu,pg2,two-r80-confirmation-4,2,2.0,1024.0,32,2.0,512.0,80,30,30,2326,2326,0,77.53333333333333,77.53333333333333,0.9691666666666666,False,26.308654,2121.76918975,3430.25811825,2121.76918975,0.7933795254496,251.75390625,3.257328990228013,0.4538005769230769,297.5078125,0.0,46.54303846153846,22.08989025991319,0,19,2,True +pg-upper-cpu,pg2,two-r80-confirmation-5,2,2.0,1024.0,32,2.0,512.0,80,30,30,2306,1978,328,65.93333333333334,76.86666666666666,0.9608333333333333,False,128.46333049999998,1639.3791287499998,4067.77854259,1555.304007,0.7760643068565013,329.14453125,2.9605263157894735,0.47419825925925924,307.85546875,0.0,58.73266296296297,33.51751995267285,0,26,0,True +pg-upper-cpu,pg2,two-r80-confirmation-6,2,2.0,1024.0,32,2.0,512.0,80,30,30,2399,2399,0,79.96666666666667,79.96666666666667,0.9995833333333334,True,21.56194,712.7126198999999,1247.7373979799997,712.7126198999999,0.7646030358560834,354.8828125,4.220779220779221,0.46384507142857145,313.56640625,0.0,46.342039285714286,1.1575000698940525,0,1,2,True diff --git a/evidence/scaling.png b/evidence/scaling.png new file mode 100644 index 00000000..f50bc151 Binary files /dev/null and b/evidence/scaling.png differ diff --git a/infra/nginx.conf b/infra/nginx.conf new file mode 100644 index 00000000..ca6481e3 --- /dev/null +++ b/infra/nginx.conf @@ -0,0 +1,23 @@ +events {} + +http { + upstream api { + least_conn; + zone api 64k; + include /etc/nginx/ready-upstreams.conf; + } + + server { + listen 80; + + location / { + proxy_pass http://api; + proxy_http_version 1.1; + proxy_set_header Host $host; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto $scheme; + proxy_connect_timeout 2s; + proxy_read_timeout 30s; + } + } +} diff --git a/infra/start-nginx.sh b/infra/start-nginx.sh new file mode 100755 index 00000000..d846ac67 --- /dev/null +++ b/infra/start-nginx.sh @@ -0,0 +1,71 @@ +#!/bin/sh +set -eu + +upstreams=/etc/nginx/ready-upstreams.conf +printf 'server 127.0.0.1:9 down;\n' > "$upstreams" + +check_ready() { + state=/tmp/nginx-readiness.state + probes=/tmp/nginx-readiness-probes + mkdir -p "$probes" + : > "$state" + sleep 2 + while :; do + next="${upstreams}.next" + previous="${upstreams}.previous" + : > "${state}.next" + printf 'server 127.0.0.1:9 down;\n' > "$next" + + addresses=$(getent ahostsv4 api | awk '{print $1}' | sort -u) + for address in $addresses; do + ( + if wget -q -T 1 -t 1 -O /dev/null "http://${address}:8080/health/ready"; then + printf '1\n' + else + printf '0\n' + fi > "$probes/$address" + ) & + done + wait + + for address in $addresses; do + record=$(awk -v address="$address" '$1 == address {print $2, $3, $4}' "$state") + set -- ${record:-0 0 0} + ready=$1 + successes=$2 + failures=$3 + if [ "$(cat "$probes/$address")" = 1 ]; then + failures=0 + if [ "$successes" -lt 2 ]; then successes=$((successes + 1)); fi + if [ "$successes" -ge 2 ]; then ready=1; fi + else + successes=0 + if [ "$failures" -lt 2 ]; then failures=$((failures + 1)); fi + if [ "$failures" -ge 2 ]; then ready=0; fi + fi + printf '%s %s %s %s\n' "$address" "$ready" "$successes" "$failures" >> "${state}.next" + if [ "$ready" -eq 1 ]; then + printf 'server %s:8080 max_fails=2 fail_timeout=2s;\n' "$address" >> "$next" + fi + done + mv "${state}.next" "$state" + + if cmp -s "$next" "$upstreams"; then + rm -f "$next" + else + cp "$upstreams" "$previous" + mv "$next" "$upstreams" + if nginx -t -q && nginx -s reload; then + rm -f "$previous" + else + mv "$previous" "$upstreams" + printf 'Could not reload Nginx readiness upstreams\n' >&2 + fi + fi + + sleep 2 + done +} + +check_ready & +exec nginx -g 'daemon off;' diff --git a/jest.config.ts b/jest.config.ts new file mode 100644 index 00000000..82bea3de --- /dev/null +++ b/jest.config.ts @@ -0,0 +1,31 @@ +import type { Config } from 'jest'; +import { pathsToModuleNameMapper } from 'ts-jest'; +import ts from 'typescript'; + +const { config: tsconfig } = ts.readConfigFile( + './tsconfig.json', + ts.sys.readFile, +); +const paths = tsconfig?.compilerOptions?.paths ?? {}; + +const config: Config = { + moduleFileExtensions: ['js', 'json', 'ts'], + rootDir: '.', + testRegex: '.*\\.spec\\.ts$', + transform: { + '^.+\\.(t|j)s$': 'ts-jest', + }, + moduleNameMapper: { + ...pathsToModuleNameMapper(paths, { prefix: '/' }), + '^(\\.{1,2}/.*)\\.js$': '$1', + }, + collectCoverageFrom: [ + 'src/**/*.(t|j)s', + 'libs/**/*.(t|j)s', + 'apps/**/*.(t|j)s', + ], + coverageDirectory: './coverage', + testEnvironment: 'node', +}; + +export default config; diff --git a/nest-cli.json b/nest-cli.json new file mode 100644 index 00000000..f9aa683b --- /dev/null +++ b/nest-cli.json @@ -0,0 +1,8 @@ +{ + "$schema": "https://json.schemastore.org/nest-cli", + "collection": "@nestjs/schematics", + "sourceRoot": "src", + "compilerOptions": { + "deleteOutDir": true + } +} diff --git a/package.json b/package.json new file mode 100644 index 00000000..755d48da --- /dev/null +++ b/package.json @@ -0,0 +1,76 @@ +{ + "name": "mtusi2026lab1-fork", + "version": "0.0.1", + "description": "", + "author": "", + "private": true, + "license": "UNLICENSED", + "scripts": { + "db:generate": "prisma generate", + "db:validate": "prisma validate", + "db:migrate": "prisma migrate dev", + "db:deploy": "prisma migrate deploy", + "test:persistence": "pnpm build && node --test test/persistence.mjs", + "test:cache": "pnpm build && node --test test/cache.mjs", + "test:resilience": "pnpm build && node --test test/resilience.mjs", + "test:idempotency": "pnpm build && node --test test/idempotency.mjs", + "test:pagination": "pnpm build && node --test test/message-pagination.mjs", + "prebuild": "pnpm db:generate", + "prestart:dev": "pnpm db:generate", + "prestart": "pnpm db:generate", + "pretest": "pnpm db:generate", + "build": "nest build", + "deploy": "nest deploy", + "format": "prettier --write \"src/**/*.ts\"", + "start": "nest start", + "start:dev": "nest start --watch", + "start:debug": "nest start --debug --watch", + "start:prod": "node dist/main", + "lint": "oxlint --type-aware src/", + "test": "node --experimental-vm-modules ./node_modules/jest/bin/jest.js", + "test:watch": "node --experimental-vm-modules ./node_modules/jest/bin/jest.js --watch", + "test:cov": "node --experimental-vm-modules ./node_modules/jest/bin/jest.js --coverage", + "test:debug": "node --inspect-brk --experimental-vm-modules -r tsconfig-paths/register -r ts-node/register node_modules/.bin/jest --runInBand" + }, + "dependencies": { + "@fastify/static": "^10.1.4", + "@nestjs/common": "^12.0.1", + "@nestjs/core": "^12.0.1", + "@nestjs/platform-fastify": "12.0.1", + "@nestjs/swagger": "^12.0.1", + "@prisma/adapter-pg": "^7.10.0", + "@prisma/client": "^7.10.0", + "@scalar/nestjs-api-reference": "^1.2.19", + "dotenv": "^18.0.7", + "fastify": "5.12.1", + "ioredis": "^6.0.0", + "nestjs-pino": "^5.2.0", + "pg": "^8.23.1", + "pino-http": "^11.0.0", + "reflect-metadata": "^0.2.2", + "rxjs": "^7.8.1" + }, + "devDependencies": { + "@nestjs/cli": "^12.0.0", + "@nestjs/mau": "^0.2.6", + "@nestjs/schematics": "^12.0.0", + "@nestjs/testing": "^12.0.1", + "@types/jest": "^30.0.0", + "@types/node": "^24.0.0", + "@types/pg": "^8.23.1", + "@types/supertest": "^7.0.0", + "jest": "^30.0.0", + "oxlint": "^1.58.0", + "oxlint-tsgolint": "^7.0.2001", + "pino-pretty": "^13.1.3", + "prettier": "^3.4.2", + "prisma": "7.10.0", + "source-map-support": "^0.5.21", + "supertest": "^7.0.0", + "ts-jest": "^29.4.0", + "ts-loader": "^9.5.2", + "ts-node": "^10.9.2", + "tsconfig-paths": "^4.2.0", + "typescript": "^6.0.2" + } +} diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml new file mode 100644 index 00000000..10e66cae --- /dev/null +++ b/pnpm-lock.yaml @@ -0,0 +1,7698 @@ +lockfileVersion: '9.0' + +settings: + autoInstallPeers: true + excludeLinksFromLockfile: false + +importers: + + .: + dependencies: + '@fastify/static': + specifier: ^10.1.4 + version: 10.1.4 + '@nestjs/common': + specifier: ^12.0.1 + version: 12.0.4(reflect-metadata@0.2.2)(rxjs@7.8.2) + '@nestjs/core': + specifier: ^12.0.1 + version: 12.0.4(@nestjs/common@12.0.4(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/platform-express@12.0.4)(reflect-metadata@0.2.2)(rxjs@7.8.2) + '@nestjs/platform-fastify': + specifier: 12.0.1 + version: 12.0.1(@fastify/static@10.1.4)(@nestjs/common@12.0.4(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/core@12.0.4) + '@nestjs/swagger': + specifier: ^12.0.1 + version: 12.0.1(@fastify/static@10.1.4)(@nestjs/common@12.0.4(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/core@12.0.4)(reflect-metadata@0.2.2) + '@prisma/adapter-pg': + specifier: ^7.10.0 + version: 7.10.0 + '@prisma/client': + specifier: ^7.10.0 + version: 7.10.0(prisma@7.10.0(@types/react@19.3.0)(react-dom@19.3.0(react@19.3.0))(react@19.3.0)(typescript@6.0.3))(typescript@6.0.3) + '@scalar/nestjs-api-reference': + specifier: ^1.2.19 + version: 1.2.19 + dotenv: + specifier: ^18.0.7 + version: 18.0.7 + fastify: + specifier: 5.12.1 + version: 5.12.1 + ioredis: + specifier: ^6.0.0 + version: 6.0.0 + nestjs-pino: + specifier: ^5.2.0 + version: 5.2.0(@nestjs/common@12.0.4(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/core@12.0.4)(pino-http@11.0.0)(pino@10.3.1)(rxjs@7.8.2) + pg: + specifier: ^8.23.1 + version: 8.23.1 + pino-http: + specifier: ^11.0.0 + version: 11.0.0 + reflect-metadata: + specifier: ^0.2.2 + version: 0.2.2 + rxjs: + specifier: ^7.8.1 + version: 7.8.2 + devDependencies: + '@nestjs/cli': + specifier: ^12.0.0 + version: 12.0.3(@types/node@24.13.6)(prettier@3.9.8)(ts-loader@9.6.2(typescript@6.0.3)(webpack@5.111.1))(webpack@5.111.1) + '@nestjs/mau': + specifier: ^0.2.6 + version: 0.2.8 + '@nestjs/schematics': + specifier: ^12.0.0 + version: 12.0.4(chokidar@5.0.0)(prettier@3.9.8)(typescript@6.0.3) + '@nestjs/testing': + specifier: ^12.0.1 + version: 12.0.4(@nestjs/common@12.0.4(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/core@12.0.4)(@nestjs/platform-express@12.0.4) + '@types/jest': + specifier: ^30.0.0 + version: 30.0.0 + '@types/node': + specifier: ^24.0.0 + version: 24.13.6 + '@types/pg': + specifier: ^8.23.1 + version: 8.23.1 + '@types/supertest': + specifier: ^7.0.0 + version: 7.2.1 + jest: + specifier: ^30.0.0 + version: 30.5.2(@types/node@24.13.6)(ts-node@10.9.2(@types/node@24.13.6)(typescript@6.0.3)) + oxlint: + specifier: ^1.58.0 + version: 1.83.0(oxlint-tsgolint@7.0.2002) + oxlint-tsgolint: + specifier: ^7.0.2001 + version: 7.0.2002 + pino-pretty: + specifier: ^13.1.3 + version: 13.1.3 + prettier: + specifier: ^3.4.2 + version: 3.9.8 + prisma: + specifier: 7.10.0 + version: 7.10.0(@types/react@19.3.0)(react-dom@19.3.0(react@19.3.0))(react@19.3.0)(typescript@6.0.3) + source-map-support: + specifier: ^0.5.21 + version: 0.5.21 + supertest: + specifier: ^7.0.0 + version: 7.2.2 + ts-jest: + specifier: ^29.4.0 + version: 29.4.12(@babel/core@7.29.7)(@jest/transform@30.5.2)(@jest/types@30.5.1)(babel-jest@30.5.2(@babel/core@7.29.7))(jest-util@30.5.1)(jest@30.5.2(@types/node@24.13.6)(ts-node@10.9.2(@types/node@24.13.6)(typescript@6.0.3)))(typescript@6.0.3) + ts-loader: + specifier: ^9.5.2 + version: 9.6.2(typescript@6.0.3)(webpack@5.111.1) + ts-node: + specifier: ^10.9.2 + version: 10.9.2(@types/node@24.13.6)(typescript@6.0.3) + tsconfig-paths: + specifier: ^4.2.0 + version: 4.2.0 + typescript: + specifier: ^6.0.2 + version: 6.0.3 + +packages: + + '@angular-devkit/core@22.1.8': + resolution: {integrity: sha512-34lsgg2FwMVBX7nR/ZqzRUcdvdYPvSB8XAEr2GudXAyZwLI9ehzfQlagAWR/gEb8p4uCFZW0r7uU0toxydq4Rw==} + engines: {node: ^22.22.3 || ^24.15.0 || >=26.0.0, npm: ^6.11.0 || ^7.5.6 || >=8.0.0, yarn: '>= 1.13.0'} + peerDependencies: + chokidar: ^5.0.0 + peerDependenciesMeta: + chokidar: + optional: true + + '@angular-devkit/schematics-cli@22.1.8': + resolution: {integrity: sha512-SsGG8ompVzprmYE9sHi2L7DYZ+i1sD+YDfun6Rg2vkTCusejtD4SSGVxwuR6++dT22ZpN16OqUTmii/0bhE4xA==} + engines: {node: ^22.22.3 || ^24.15.0 || >=26.0.0, npm: ^6.11.0 || ^7.5.6 || >=8.0.0, yarn: '>= 1.13.0'} + hasBin: true + + '@angular-devkit/schematics@22.1.8': + resolution: {integrity: sha512-Pv3cPa/44kvEwYcqwx4Ns5dhIDmcFNSHhbpheqiEG1Z/u4e2t4zHKDtE3eHZB+8o+IcC7xJj+d+AqGR44RoZDA==} + engines: {node: ^22.22.3 || ^24.15.0 || >=26.0.0, npm: ^6.11.0 || ^7.5.6 || >=8.0.0, yarn: '>= 1.13.0'} + + '@babel/code-frame@7.29.7': + resolution: {integrity: sha512-Aup7aUOfpbAUg2ROOJN6Iw5f9DMBlzu0mIkm/malLQFN/YQgO48wCj0Kxa3sEHJvPVFg7siR+qRInwXd2qhQKw==} + engines: {node: '>=6.9.0'} + + '@babel/compat-data@7.29.7': + resolution: {integrity: sha512-locTkQyKvwIEgBzVrn8693ebc97F2U8ZHjbXwDXJ5Fn2TCpNwTlKcaKLkdHop5c/icOFE7qt7Q9JC5hnKNa6Gg==} + engines: {node: '>=6.9.0'} + + '@babel/core@7.29.7': + resolution: {integrity: sha512-RgHBCvtjbOK2gXSNBNIkNoEc9qoVEtau3hj8gEqKQuL3HZAibKarWFEI3Lfm6EYKkLalOh8eSrj9b+ch9H/VBA==} + engines: {node: '>=6.9.0'} + + '@babel/generator@7.29.8': + resolution: {integrity: sha512-gZbepsdh3WDtgZKWL+vTPh71LSBrm/Y4/QDZBVCcYfmeTEEuoOYwlSy+G1StfJg+/Zy550u/3TATbm7qDbbMtg==} + engines: {node: '>=6.9.0'} + + '@babel/helper-compilation-targets@7.29.7': + resolution: {integrity: sha512-wem6WaBj4NaVYVdNhLPPVacES6ZJ+KBBfSkTMD3YZxbP3rm3Di85tJU5ljaUNhaOynt+Aj0xruhYuzQBt8n71g==} + engines: {node: '>=6.9.0'} + + '@babel/helper-globals@7.29.7': + resolution: {integrity: sha512-3nQVUAtvkKH9zahfWgw96Jc/uFOmjACE1kQz82E2lqWmHBgjzbNlsC22nuQTfahmWeQtTq5nQ/4Nnd2A1wj4zA==} + engines: {node: '>=6.9.0'} + + '@babel/helper-module-imports@7.29.7': + resolution: {integrity: sha512-ejHwrQQYcm9xnTivShn2IDOlIzInN34AXskvq9QicvCtEzq1Vzclu/tKF8Jq1Cg8JG2GL6/EmjgsCT7lXepE3g==} + engines: {node: '>=6.9.0'} + + '@babel/helper-module-transforms@7.29.7': + resolution: {integrity: sha512-UPUVSyXbOh627KiCIGQSgwWzGeBKLkaJ9PJEdrngIwMSzxLR4jS4+f1f1jb7VzBbg8nFLaYotvVPFCTqdrmTAg==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0 + + '@babel/helper-plugin-utils@7.29.7': + resolution: {integrity: sha512-G7sHYigPY17oO5SYWnfD/0MTBwVR781S/JI643e/JhUYgVgWE/61SoW3NH9KWUKyKq5LVh3npif99Wkt6j86Jw==} + engines: {node: '>=6.9.0'} + + '@babel/helper-string-parser@7.29.7': + resolution: {integrity: sha512-Pb5ijPrZ89GDH8223L4UP8i6QApWxs04RbPQJTeWDV0/keR2E36MeKnyr6LYmUUvqRRI+Iv87SuF1W6ErINzYw==} + engines: {node: '>=6.9.0'} + + '@babel/helper-validator-identifier@7.29.7': + resolution: {integrity: sha512-qehxGkRj55h/ff8EMaJ+cYhyaKlHIxqYDn682wQD7RNp9UujOQsHog2uS0r2vzr4pW+sXf90NeeayjcNaX3fFg==} + engines: {node: '>=6.9.0'} + + '@babel/helper-validator-option@7.29.7': + resolution: {integrity: sha512-N9ZErrD+yW5geCDtBqnOoxmR8+tNKiGuxKlDpuJxfsqpa2dFcexaziGAE/qoHLiDDreVNMupxGmSoNlyvsA3gw==} + engines: {node: '>=6.9.0'} + + '@babel/helpers@7.29.7': + resolution: {integrity: sha512-1k2lAGRMfHTcwuNYcCNUmaUffmQv8KWMfh2iJUUeRlwlwH4FdNG7mfPI10NPfLHJFThE4Tyr4mv7kTNZOiPuBg==} + engines: {node: '>=6.9.0'} + + '@babel/parser@7.29.9': + resolution: {integrity: sha512-CjXrNHTnvqBVqHgdBysY3vk2T8tpJHb5/RMeHJBTyVa9xgugCB0CJTx/3oO8RV2QRQP391RWpB7D6hLjm8V9uA==} + engines: {node: '>=6.0.0'} + hasBin: true + + '@babel/plugin-syntax-async-generators@7.8.4': + resolution: {integrity: sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw==} + peerDependencies: + '@babel/core': ^7.0.0-0 + + '@babel/plugin-syntax-bigint@7.8.3': + resolution: {integrity: sha512-wnTnFlG+YxQm3vDxpGE57Pj0srRU4sHE/mDkt1qv2YJJSeUAec2ma4WLUnUPeKjyrfntVwe/N6dCXpU+zL3Npg==} + peerDependencies: + '@babel/core': ^7.0.0-0 + + '@babel/plugin-syntax-class-properties@7.12.13': + resolution: {integrity: sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA==} + peerDependencies: + '@babel/core': ^7.0.0-0 + + '@babel/plugin-syntax-class-static-block@7.14.5': + resolution: {integrity: sha512-b+YyPmr6ldyNnM6sqYeMWE+bgJcJpO6yS4QD7ymxgH34GBPNDM/THBh8iunyvKIZztiwLH4CJZ0RxTk9emgpjw==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + + '@babel/plugin-syntax-import-attributes@7.29.7': + resolution: {integrity: sha512-zGYcYfq/WmZ4V+kBIXQon9dSSc8ircGZqw9ZaNhhGj9nZkeBu1jHLBDQqYYi5WA9uawvA2sIMbry2nCFhf5Djg==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + + '@babel/plugin-syntax-import-meta@7.10.4': + resolution: {integrity: sha512-Yqfm+XDx0+Prh3VSeEQCPU81yC+JWZ2pDPFSS4ZdpfZhp4MkFMaDC1UqseovEKwSUpnIL7+vK+Clp7bfh0iD7g==} + peerDependencies: + '@babel/core': ^7.0.0-0 + + '@babel/plugin-syntax-json-strings@7.8.3': + resolution: {integrity: sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA==} + peerDependencies: + '@babel/core': ^7.0.0-0 + + '@babel/plugin-syntax-jsx@7.29.7': + resolution: {integrity: sha512-TSu8+mHCoEaaCDEZ0I3+6mvTBYR4PCxQwf2z9/r5Tbztv6NaLR3B9thGTTxX2WGuGHJqRiAbKPeGTJ5XWXVg6A==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + + '@babel/plugin-syntax-logical-assignment-operators@7.10.4': + resolution: {integrity: sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig==} + peerDependencies: + '@babel/core': ^7.0.0-0 + + '@babel/plugin-syntax-nullish-coalescing-operator@7.8.3': + resolution: {integrity: sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ==} + peerDependencies: + '@babel/core': ^7.0.0-0 + + '@babel/plugin-syntax-numeric-separator@7.10.4': + resolution: {integrity: sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug==} + peerDependencies: + '@babel/core': ^7.0.0-0 + + '@babel/plugin-syntax-object-rest-spread@7.8.3': + resolution: {integrity: sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA==} + peerDependencies: + '@babel/core': ^7.0.0-0 + + '@babel/plugin-syntax-optional-catch-binding@7.8.3': + resolution: {integrity: sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q==} + peerDependencies: + '@babel/core': ^7.0.0-0 + + '@babel/plugin-syntax-optional-chaining@7.8.3': + resolution: {integrity: sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg==} + peerDependencies: + '@babel/core': ^7.0.0-0 + + '@babel/plugin-syntax-private-property-in-object@7.14.5': + resolution: {integrity: sha512-0wVnp9dxJ72ZUJDV27ZfbSj6iHLoytYZmh3rFcxNnvsJF3ktkzLDZPy/mA17HGsaQT3/DQsWYX1f1QGWkCoVUg==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + + '@babel/plugin-syntax-top-level-await@7.14.5': + resolution: {integrity: sha512-hx++upLv5U1rgYfwe1xBQUhRmU41NEvpUvrp8jkrSCdvGSnM5/qdRMtylJ6PG5OFkBaHkbTAKTnd3/YyESRHFw==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + + '@babel/plugin-syntax-typescript@7.29.7': + resolution: {integrity: sha512-ngr+82Sh0xMz25TPCZi+nC2iTzjfCdWS2ONXTp/PtSCHCgaCNBpdMqgvJ2ccdLlClVZ7sisIgB914j/JFe+RZA==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + + '@babel/template@7.29.7': + resolution: {integrity: sha512-puq+Gf35oI24FeN11LkoUQFqv9uwNeWpxXZi/Ji3rRIoKAzKnxRaZ+Gkj0vKS9ZCiTESfng1N9LyOyXvo+m+Gg==} + engines: {node: '>=6.9.0'} + + '@babel/traverse@7.29.8': + resolution: {integrity: sha512-I5z7H3bf/41ktsNVLtpN0wAa336HkqIHQ5BuPLEhTkt1jVSyZpeNKIzTgEWmlxjdg81R0IgUCcaE+Ok3NvrfZg==} + engines: {node: '>=6.9.0'} + + '@babel/types@7.29.8': + resolution: {integrity: sha512-Vj1jF3cPfxg7OAfoI7QnVKLoILlm2JF9pnVHrX8qx7AHMiYWT+NDAA7jChlNgRS4WTLc/fD1lXLmPixluj+3Gg==} + engines: {node: '>=6.9.0'} + + '@bcoe/v8-coverage@0.2.3': + resolution: {integrity: sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==} + + '@borewit/text-codec@0.2.2': + resolution: {integrity: sha512-DDaRehssg1aNrH4+2hnj1B7vnUGEjU6OIlyRdkMd0aUdIUvKXrJfXsy8LVtXAy7DRvYVluWbMspsRhz2lcW0mQ==} + + '@colors/colors@1.5.0': + resolution: {integrity: sha512-ooWCrlZP11i8GImSjTHYHLkvFDP48nS4+204nGb1RiX/WXYHmJA2III9/e2DWVabCESdW7hBAEzHRqUn9OUVvQ==} + engines: {node: '>=0.1.90'} + + '@cspotcode/source-map-support@0.8.1': + resolution: {integrity: sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==} + engines: {node: '>=12'} + + '@electric-sql/pglite-socket@0.1.3': + resolution: {integrity: sha512-LAciWM0M1dCL8hlsxu2venbVZcdxema0BtDfpWYVqr+Y468UADw0pFWidhKw1M8sfJ8rdLT71tjMmnirf/IZRQ==} + hasBin: true + peerDependencies: + '@electric-sql/pglite': 0.4.3 + + '@electric-sql/pglite-tools@0.3.3': + resolution: {integrity: sha512-AlzLJTRJ8+UFgK8CmxIpyIpJ0+YaFw02IiOSdYrqxwPXdSyeIShz8aa9Tq+tYFXdPwcaMp/Fc80mQZ1dkOQ/wg==} + peerDependencies: + '@electric-sql/pglite': 0.4.3 + + '@electric-sql/pglite@0.4.3': + resolution: {integrity: sha512-ichuWTgtd4mOM1G4SpyGJa5trT03lWbMypDV0fUXUCXg5hiHqVAz/bZyV68NqmkLB7WcYmj1RMJVSp8HV/v/ZQ==} + + '@emnapi/core@1.10.0': + resolution: {integrity: sha512-yq6OkJ4p82CAfPl0u9mQebQHKPJkY7WrIuk205cTYnYe+k2Z8YBh11FrbRG/H6ihirqcacOgl2BIO8oyMQLeXw==} + + '@emnapi/runtime@1.10.0': + resolution: {integrity: sha512-ewvYlk86xUoGI0zQRNq/mC+16R1QeDlKQy21Ki3oSYXNgLb45GV1P6A0M+/s6nyCuNDqe5VpaY84BzXGwVbwFA==} + + '@emnapi/wasi-threads@1.2.1': + resolution: {integrity: sha512-uTII7OYF+/Mes/MrcIOYp5yOtSMLBWSIoLPpcgwipoiKbli6k322tcoFsxoIIxPDqW01SQGAgko4EzZi2BNv2w==} + + '@fastify/accept-negotiator@2.1.0': + resolution: {integrity: sha512-F3EVbzWt+xcnVaOHmWyIlpuFtbxOln7HDZQsh09MtMmMm/CipMayNt8hnIL8VQi54u2ZociDbf+iluGYkf7B1A==} + + '@fastify/ajv-compiler@4.0.6': + resolution: {integrity: sha512-NtuzM0SfaMJbGlnjr9LWQUN5LzgSrbB8tf/wRZNas+4E1O/Nmzl53e7ruT61HDZyRCJGC6FxIogmNZO1c5ETBA==} + + '@fastify/cors@11.3.0': + resolution: {integrity: sha512-ggQGua+xHv1MvePbPr0v//xLYEsCXbWspquXCJS9Ot5YoRXq8J8ZWzHnxDBVnbtXosvistXo6LtNzOJswf64Fw==} + + '@fastify/error@4.2.0': + resolution: {integrity: sha512-RSo3sVDXfHskiBZKBPRgnQTtIqpi/7zhJOEmAxCiBcM7d0uwdGdxLlsCaLzGs8v8NnxIRlfG0N51p5yFaOentQ==} + + '@fastify/fast-json-stringify-compiler@5.1.0': + resolution: {integrity: sha512-PxcYtKLbQ8Z+yApiqjK8FwxIwvEj38k2OiLc17u8dkJSlmfi2wHHPaSnaoqBPQqtvF8YVsDgDpP2snDCfFrpfw==} + + '@fastify/formbody@9.0.0': + resolution: {integrity: sha512-T/af26CSrUARBCvsEmv+DJLPfZlrRKESzqironxP1j7qzuLyKcoZtj6MuTGShuKx1THXugoie2oFbUJxXfGFzA==} + + '@fastify/forwarded@3.0.2': + resolution: {integrity: sha512-NE8HgKLgYejV9lDpqkEFaDKMLYelJBVfHekhB0UKvX0ghagXRJqg68feg8er1NPXxG4N9i6vPxzt8E+3wHfcmA==} + + '@fastify/merge-json-schemas@0.2.1': + resolution: {integrity: sha512-OA3KGBCy6KtIvLf8DINC5880o5iBlDX4SxzLQS8HorJAbqluzLRn80UXU0bxZn7UOFhFgpRJDasfwn9nG4FG4A==} + + '@fastify/proxy-addr@5.1.1': + resolution: {integrity: sha512-zv07Y9GEuDsJPegZoDFd4SDWaZOW8N2pa0GSrYmKpId/tjt1Hgo3BjZBVjdVpfVrHaA+Qv5jawtS2O50J5xM9g==} + + '@fastify/send@4.1.1': + resolution: {integrity: sha512-BYo+EiaKwlxH+WetGk6hAs1d39iP0y1gqB8lGF/qwkJ9ZZ/cBY1vx5NvExb9Sc3yRMFjD5X4Eyh4e4+TzRkzdw==} + + '@fastify/static@10.1.4': + resolution: {integrity: sha512-YWYmXV0c3t/3DDyV32kRXJTgTY16FOkqtQ4mmBjbkWeukGR5n+Sr+7ppknNpS7hiRPrLU9zcySZZ1nLJVHTZkg==} + + '@inquirer/ansi@2.0.8': + resolution: {integrity: sha512-WpQM+Ti6Z40EFwwt+uL2p4UabT+W179zHp6HhLVOzfbwnVn05IPO/eXIZXGNqcT1jbQ15SujNLzQ39k4QPPxBQ==} + engines: {node: '>=23.5.0 || ^22.13.0 || ^20.17.0'} + + '@inquirer/checkbox@5.2.5': + resolution: {integrity: sha512-bRt8J8m+Fot9CXv+zNQGXUq2ET0MggR1fPz7v6edN6MFYmsbfGnMmkmWZJEegMKqrAC8ej/o1sqisHZXZJMAfQ==} + engines: {node: '>=23.5.0 || ^22.13.0 || ^20.17.0'} + peerDependencies: + '@types/node': '>=18' + peerDependenciesMeta: + '@types/node': + optional: true + + '@inquirer/confirm@6.3.2': + resolution: {integrity: sha512-Xvr/0HggjddPtGppuqVmxhTw+Hr8PvsZ/k0HmOEaAqQEt80OITNkFWnsdNmyT0/eM4Ab+iJLx2R8rctlEyfSVg==} + engines: {node: '>=23.5.0 || ^22.13.0 || ^20.17.0'} + peerDependencies: + '@types/node': '>=18' + peerDependenciesMeta: + '@types/node': + optional: true + + '@inquirer/core@12.0.3': + resolution: {integrity: sha512-wsSy0sznmXwkty+2PzZwx00Cazc/E0r0B7mAzdGROz2Ct+DFZXaK7WDjGZvgjRldxH5ZhFVfF2lgkYrqgOw2KA==} + engines: {node: '>=23.5.0 || ^22.13.0 || ^20.17.0'} + peerDependencies: + '@types/node': '>=18' + peerDependenciesMeta: + '@types/node': + optional: true + + '@inquirer/editor@5.3.3': + resolution: {integrity: sha512-YsKkS2q63IiLtaDK/9nqzdComN97SDQrmKiyNggN+ceP4ty+Z6VwyTz3FpjeUWeW1Efss2xHFKCC9sx7hnrsxg==} + engines: {node: '>=23.5.0 || ^22.13.0 || ^20.17.0'} + peerDependencies: + '@types/node': '>=18' + peerDependenciesMeta: + '@types/node': + optional: true + + '@inquirer/expand@5.1.5': + resolution: {integrity: sha512-uHuXLmXW+TtIfT/9vSBotypAkqn1n34Ul+CLGPos/xANyO4Ff5xZzkYhbKR4NEcfVK4a9mHQOpwVZzluSHFRGw==} + engines: {node: '>=23.5.0 || ^22.13.0 || ^20.17.0'} + peerDependencies: + '@types/node': '>=18' + peerDependenciesMeta: + '@types/node': + optional: true + + '@inquirer/external-editor@3.0.5': + resolution: {integrity: sha512-f3QQJRIX5ZEneBHNUIuPjmbdzHnmRFJA8r2dkcb8q+OM5Uv5KtnuAttQumnrjcBVBM3mcTX1CkmtAkU58VRZxg==} + engines: {node: '>=23.5.0 || ^22.13.0 || ^20.17.0'} + peerDependencies: + '@types/node': '>=18' + peerDependenciesMeta: + '@types/node': + optional: true + + '@inquirer/figures@2.0.9': + resolution: {integrity: sha512-EAWgUTGQ/Umgga51dE3B2PUHbufuXarDfg86uVgoSgNHNNQnyFKcOrQLWVqYMghuSyHh8+2HUH0Js9cTC1WAdg==} + engines: {node: '>=23.5.0 || ^22.13.0 || ^20.17.0'} + + '@inquirer/input@5.1.6': + resolution: {integrity: sha512-HtcJhB2QFVXbLuJ5S3syhNbTUVxYvwqV4VRBDkQceBloC9bmTViUoRFP5PbSaDZb3HzfPmpuU/gG4ybVBz4FHA==} + engines: {node: '>=23.5.0 || ^22.13.0 || ^20.17.0'} + peerDependencies: + '@types/node': '>=18' + peerDependenciesMeta: + '@types/node': + optional: true + + '@inquirer/number@4.2.3': + resolution: {integrity: sha512-6Yuwh1NGSbu1Lo4N1EWjXs1jKRntLg/ZCwhmeorEHde90v1XxAozdbd4Iu30eOQLW+6h1hp2O9ujNfLSbTPJnA==} + engines: {node: '>=23.5.0 || ^22.13.0 || ^20.17.0'} + peerDependencies: + '@types/node': '>=18' + peerDependenciesMeta: + '@types/node': + optional: true + + '@inquirer/password@5.2.2': + resolution: {integrity: sha512-W9zYdyzogK+6110mqwaSJWCBu2yA5Q/OfnGSjjZB1bNpHlmUozXxTl0+QOZBNeVd6Qo81/qT75gW05gLAtITxw==} + engines: {node: '>=23.5.0 || ^22.13.0 || ^20.17.0'} + peerDependencies: + '@types/node': '>=18' + peerDependenciesMeta: + '@types/node': + optional: true + + '@inquirer/prompts@8.5.2': + resolution: {integrity: sha512-IYR/3C/paEVVQYQvdDlFZVjRCJVYHHON0XXMH91KO9GSxs0TdKYWlUdvfQl2EfAHDxUaN3IBffkE/BDTh5nJ6g==} + engines: {node: '>=23.5.0 || ^22.13.0 || ^20.17.0'} + peerDependencies: + '@types/node': '>=18' + peerDependenciesMeta: + '@types/node': + optional: true + + '@inquirer/prompts@8.7.2': + resolution: {integrity: sha512-QoRB4wFIjgH5iOhSjoIKMkTvSHDuV+O3OITlIqAYO0oK5x364GJILXiMBvlPiE+klg7Xx9tq5XVqQHcGUDYYPA==} + engines: {node: '>=23.5.0 || ^22.13.0 || ^20.17.0'} + peerDependencies: + '@types/node': '>=18' + peerDependenciesMeta: + '@types/node': + optional: true + + '@inquirer/rawlist@5.3.5': + resolution: {integrity: sha512-1oHky1ONfCOwNrnkQGDE1oaSij/3fI6HFMSf2H/WsGO2lEyDX9My82iggITSy9ddSZ8yk8j9v41OI0fVoSIoaA==} + engines: {node: '>=23.5.0 || ^22.13.0 || ^20.17.0'} + peerDependencies: + '@types/node': '>=18' + peerDependenciesMeta: + '@types/node': + optional: true + + '@inquirer/search@4.3.3': + resolution: {integrity: sha512-fyuIU1Nbpvwlikjg3gXwJFDI11+EFjqQ7P+iByfmivIKQ1vmaykNrD/vy5unHuUqUpsOsnvJ25//tPF7E/RBRA==} + engines: {node: '>=23.5.0 || ^22.13.0 || ^20.17.0'} + peerDependencies: + '@types/node': '>=18' + peerDependenciesMeta: + '@types/node': + optional: true + + '@inquirer/select@5.2.5': + resolution: {integrity: sha512-9kc15hr8r/kI+3DO/xLog5nOzTz1jqsHXa6JBFzmQKhkoJ8Slda1I1L/uD8ZSZ9tF1yp79wwXe7mclvX1rqR2Q==} + engines: {node: '>=23.5.0 || ^22.13.0 || ^20.17.0'} + peerDependencies: + '@types/node': '>=18' + peerDependenciesMeta: + '@types/node': + optional: true + + '@inquirer/type@4.1.1': + resolution: {integrity: sha512-yJoHYrMnxIsJZCY+0Vb66Dy3he3kL3e2wOBKhoSwWWAzZAY82emlxwgprCtp6yRixvNRNq9ztfRWQYPNr3Go7A==} + engines: {node: '>=23.5.0 || ^22.13.0 || ^20.17.0'} + peerDependencies: + '@types/node': '>=18' + peerDependenciesMeta: + '@types/node': + optional: true + + '@ioredis/commands@2.0.0': + resolution: {integrity: sha512-vrx0AE/T0h7cRZwfo1M39Cr+ZhZrkf0V8mQN75wucKCxCLD9l/VX6no3gFvrLqD1IlG/1LtzWovqEw3t0Vr9zg==} + + '@isaacs/cliui@8.0.2': + resolution: {integrity: sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==} + engines: {node: '>=12'} + + '@istanbuljs/load-nyc-config@1.1.0': + resolution: {integrity: sha512-VjeHSlIzpv/NyD3N0YuHfXOPDIixcA1q2ZV98wsMqcYlPmv2n3Yb2lYP9XMElnaFVXg5A7YLTeLu6V84uQDjmQ==} + engines: {node: '>=8'} + + '@istanbuljs/schema@0.1.6': + resolution: {integrity: sha512-+Sg6GCR/wy1oSmQDFq4LQDAhm3ETKnorxN+y5nbLULOR3P0c14f2Wurzj3/xqPXtasLFfHd5iRFQ7AJt4KH2cw==} + engines: {node: '>=8'} + + '@jest/console@30.5.2': + resolution: {integrity: sha512-e8sQC4pCMHPBrPX7Hk8TJr+DM5dkUnImSTNag8SEWFAFAF6xIz4AJvCKapnrdHnZxep4bxw4PhG+ZbimYBMyKw==} + engines: {node: ^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0} + + '@jest/core@30.5.2': + resolution: {integrity: sha512-/jqvFWoJF7LV1a6AUpYMbMm+2yIYsHJfR474H0SCzr9k8tnO/jl9wRg6zSG6lxgf6EozNlCG4amFzWsbZSvvZA==} + engines: {node: ^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0} + peerDependencies: + node-notifier: ^8.0.1 || ^9.0.0 || ^10.0.0 + peerDependenciesMeta: + node-notifier: + optional: true + + '@jest/diff-sequences@30.5.0': + resolution: {integrity: sha512-OsqBjHXCn8cadasoAZBP6nWYvMsRhpMzGXTpxJ5aO04NlbdhIz+FVe3q49l0AwVhsz/cEmIpBes6gAFl1/dWQg==} + engines: {node: ^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0} + + '@jest/environment@30.5.2': + resolution: {integrity: sha512-nwFPOUMbmsjNNRCpnJpB9HbSZu4C07wDDds++5j+j1MezzPLxMPDdbdUVjr2o4RULDOValnDd70taPFI1EtxAg==} + engines: {node: ^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0} + + '@jest/expect-utils@30.5.2': + resolution: {integrity: sha512-d/HOLSrJUlBIl6n3LzOa7cjW3xdePm5H5gQw2lixZ/0h157l9sw3mLblzFqnPcTbhDzhRQdBOX3A3KcG73nm5Q==} + engines: {node: ^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0} + + '@jest/expect@30.5.2': + resolution: {integrity: sha512-2E+1Pg6jJxbRjLNLpciC71iri/3qsKJL222/aXJEFwC0VdUSvfS+JZQQLEVjUYYc8t8pQu2MGE3cF2+bNTYRsg==} + engines: {node: ^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0} + + '@jest/fake-timers@30.5.2': + resolution: {integrity: sha512-GKk0h0tKT5SpDPxDhPg3r9mm5s8/YCBzVNMOGdRiQXwUiMsjU10mVPlMaQstH6/cu50vOb8N9oQUMETHuwwxKw==} + engines: {node: ^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0} + + '@jest/get-type@30.5.0': + resolution: {integrity: sha512-9/2VUPitAjmBzbvDvqrxmvB7BzWsBW0WmkkojX1ODuxX1NLGxx9gfaZpHB0z8DtJ9uhGNmZG/VXBhf8uO0OV8Q==} + engines: {node: ^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0} + + '@jest/globals@30.5.2': + resolution: {integrity: sha512-62zfS+dL+M5aTNHXCNLyqD+j4oqxTIzDYrZbpqMP8Yn+gvlAGyzC6BSPNb1ZmFOakV1RtFYX/O3FCQXSWmQdgg==} + engines: {node: ^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0} + + '@jest/pattern@30.5.0': + resolution: {integrity: sha512-HdNQYSdRTEBNrginaqzQtTjG0HRMfrra/z6Ok7uL3S87vSlarIVohEsJsSj5edu3MiHoHjAkvPROz5ZjoKai+w==} + engines: {node: ^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0} + + '@jest/reporters@30.5.2': + resolution: {integrity: sha512-ev6E9iG73twQcfAfoTnviuYkr3yOrYbzAtMFCimv2fxHXPIp9PBt2u1wNMt0aYWgl8FPwIcS8oqRJg6alnht4Q==} + engines: {node: ^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0} + peerDependencies: + node-notifier: ^8.0.1 || ^9.0.0 || ^10.0.0 + peerDependenciesMeta: + node-notifier: + optional: true + + '@jest/schemas@30.5.0': + resolution: {integrity: sha512-/hunigyNpc4RCjC0VaW3f5RCUZVM2+WQ65qP7z083Gmvac7or2LI50XVNOtE4YPgBpV0yxYiAgorAPGniCoJmg==} + engines: {node: ^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0} + + '@jest/snapshot-utils@30.5.1': + resolution: {integrity: sha512-V3wnxNtiVmw5PPVg433Cn3VdXnsOeu/ofLw3KC04Bn2y1wIlU5kozXQn48rhrgj/02LrCVtntTEF1yBha0XSUw==} + engines: {node: ^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0} + + '@jest/source-map@30.5.2': + resolution: {integrity: sha512-c5CehvkbfHX6yyNg7bMn2ylqlp9AHXuZ/3hPH/Lh5bxD/vefd/lV9HBjMqXef9yQNqkdwyZvkLSVSwB38hy8Qw==} + engines: {node: ^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0} + + '@jest/test-result@30.5.2': + resolution: {integrity: sha512-eO6YU5rsLfs60ne694e0IAmRgeBnoA8mu0nlxXDbl/1j5km0o2vO9/VbbUIKIH+WRKKEI+ELgwraRGn2Lhep8g==} + engines: {node: ^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0} + + '@jest/test-sequencer@30.5.2': + resolution: {integrity: sha512-bmij8jZyYAC47ExT2GeP7PcrlwSNS+Bp3KeRuBH88gpcxqDv6fljN8PemS4J/lLZ79xb6mpaennQTTq0zUAVVg==} + engines: {node: ^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0} + + '@jest/transform@30.5.2': + resolution: {integrity: sha512-LBGwmaE886C41jDZ65eqR1YbXM7642MK3ZhTowZd5+xDlrDLuf4ePuDdDmVSvcr8NTVJ3MqxLkMbUCzuigUaoQ==} + engines: {node: ^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0} + + '@jest/types@30.5.1': + resolution: {integrity: sha512-LvVYn83nnXPl+Rg98nvcFgjx6nRMTArhSn6RAX/w3ELn54S8A42TYZvsCMdGUqTM8S0wyXbtlQdU6Hi6dykj9g==} + engines: {node: ^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0} + + '@jridgewell/gen-mapping@0.3.13': + resolution: {integrity: sha512-2kkt/7niJ6MgEPxF0bYdQ6etZaA+fQvDcLKckhy1yIQOzaoKjBBjSj63/aLVjYE3qhRt5dvM+uUyfCg6UKCBbA==} + + '@jridgewell/remapping@2.3.5': + resolution: {integrity: sha512-LI9u/+laYG4Ds1TDKSJW2YPrIlcVYOwi2fUC6xB43lueCjgxV4lffOCZCtYFiH6TNOX+tQKXx97T4IKHbhyHEQ==} + + '@jridgewell/resolve-uri@3.1.2': + resolution: {integrity: sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==} + engines: {node: '>=6.0.0'} + + '@jridgewell/source-map@0.3.11': + resolution: {integrity: sha512-ZMp1V8ZFcPG5dIWnQLr3NSI1MiCU7UETdS/A0G8V/XWHvJv3ZsFqutJn1Y5RPmAPX6F3BiE397OqveU/9NCuIA==} + + '@jridgewell/sourcemap-codec@1.6.0': + resolution: {integrity: sha512-T7jf+5zgsZHwNJ4lvQ7/aezbyk0nNX+zJVWpmHA7VYsEx7a7qr5Rg5IbtJFqkgze5Y2sruq1RUY8Q837Od7iFw==} + + '@jridgewell/trace-mapping@0.3.31': + resolution: {integrity: sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw==} + + '@jridgewell/trace-mapping@0.3.9': + resolution: {integrity: sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==} + + '@lukeed/csprng@1.1.0': + resolution: {integrity: sha512-Z7C/xXCiGWsg0KuKsHTKJxbWhpI3Vs5GwLfOean7MGyVFGqdRgBbAjOCh6u4bbjPc/8MJ2pZmK/0DLdCbivLDA==} + engines: {node: '>=8'} + + '@lukeed/ms@2.0.2': + resolution: {integrity: sha512-9I2Zn6+NJLfaGoz9jN3lpwDgAYvfGeNYdbAIjJOqzs4Tpc+VU3Jqq4IofSUBKajiDS8k9fZIg18/z13mpk1bsA==} + engines: {node: '>=8'} + + '@microsoft/tsdoc@0.16.0': + resolution: {integrity: sha512-xgAyonlVVS+q7Vc7qLW0UrJU7rSFcETRWsqdXZtjzRU8dF+6CkozTK4V4y1LwOX7j8r/vHphjDeMeGI4tNGeGA==} + + '@napi-rs/wasm-runtime@1.2.4': + resolution: {integrity: sha512-AJxoUD2/15ESHbvpcyjU274nsAPLuOtPHCk0vKJM5pj//Fg/B1FXNWjPnXTT9PymCYYiHo4zPj0ZomXBKhoy7g==} + engines: {node: ^20.19.0 || ^22.13.0 || >=23.5.0} + peerDependencies: + '@emnapi/core': ^1.7.1 || ^2.0.0-alpha.4 + '@emnapi/runtime': ^1.7.1 || ^2.0.0-alpha.4 + + '@nestjs/cli@12.0.3': + resolution: {integrity: sha512-HofsPoiWsx6gZ7/IivaZJrgsq/3CTCb4FkCQzFu/Q3J2V+4xC7GYnit/HNB66EfuY8j3gWJCzasMKmF5VugmOA==} + engines: {node: '>= 20.11'} + hasBin: true + peerDependencies: + '@rspack/core': ^1.7.7 || ^2.1.10 + '@swc/cli': ^0.8.0 + '@swc/core': ^1.15.18 + fork-ts-checker-webpack-plugin: ^9.1.0 + ts-loader: ^9.5.4 + tsconfig-paths-webpack-plugin: ^4.2.0 + webpack: ^5.105.4 + webpack-node-externals: ^3.0.0 + peerDependenciesMeta: + '@rspack/core': + optional: true + '@swc/cli': + optional: true + '@swc/core': + optional: true + fork-ts-checker-webpack-plugin: + optional: true + ts-loader: + optional: true + tsconfig-paths-webpack-plugin: + optional: true + webpack: + optional: true + webpack-node-externals: + optional: true + + '@nestjs/common@12.0.4': + resolution: {integrity: sha512-maEf5KhcQMCXQW9/SsLDDoFO0l73sbwBmiaCRrkqrFHyNG9ekN8CoYbzcvlboNKgiydWx8pogoFnuOEl8+7+tw==} + peerDependencies: + class-transformer: '>=0.4.1' + class-validator: '>=0.13.2' + reflect-metadata: ^0.1.12 || ^0.2.0 + rxjs: ^7.1.0 + peerDependenciesMeta: + class-transformer: + optional: true + class-validator: + optional: true + + '@nestjs/core@12.0.4': + resolution: {integrity: sha512-3jd8RaYxYAs8OxjHdTOgxmS9vUm3I9JFnRrgBxdQAVbHjyRx/QYiGnuVCmuUBm4AOHPMij/I74xfg8En3Erm7A==} + engines: {node: '>= 20'} + peerDependencies: + '@nestjs/common': ^12.0.0 + '@nestjs/microservices': ^12.0.0 + '@nestjs/platform-express': ^12.0.0 + '@nestjs/websockets': ^12.0.0 + reflect-metadata: ^0.1.12 || ^0.2.0 + rxjs: ^7.1.0 + peerDependenciesMeta: + '@nestjs/microservices': + optional: true + '@nestjs/platform-express': + optional: true + '@nestjs/websockets': + optional: true + + '@nestjs/mapped-types@12.0.0': + resolution: {integrity: sha512-aX7lxZcqXldtnSr0bgT2ZPQvpTpIwBMW1GMX29o4s3q02vmq6JoTYuPW0GwYXa8BiFMRX7WbGZVDA703pNqOMQ==} + engines: {node: '>=20.19.0'} + peerDependencies: + '@nestjs/common': ^10.0.0 || ^11.0.0 || ^12.0.0 + class-transformer: ^0.4.0 || ^0.5.0 + class-validator: ^0.13.0 || ^0.14.0 || ^0.15.0 + reflect-metadata: ^0.1.12 || ^0.2.0 + peerDependenciesMeta: + class-transformer: + optional: true + class-validator: + optional: true + + '@nestjs/mau@0.2.8': + resolution: {integrity: sha512-nIb0i3c/KhKEbxZfYMEKv9Mcvk5miBdZcexnvkgnAUhoMO2BUjOGT+Khf2cZzu7B51Y7v01NG2JVl/HdQEUQ6w==} + engines: {node: '>= 20.0.0'} + hasBin: true + + '@nestjs/platform-express@12.0.4': + resolution: {integrity: sha512-oL6zHjeMeqwKoAlY1Y+bpCfFy6Yat6wfWnmcTgp7IE3A6TAftu6Vgu/eRi9VY5bErw4dMcYGtzvxvKP1QXr8JA==} + peerDependencies: + '@nestjs/common': ^12.0.0 + '@nestjs/core': ^12.0.0 + + '@nestjs/platform-fastify@12.0.1': + resolution: {integrity: sha512-LqR0kOahuZAei3wJK+SJfHc9o9H/OSdA7gMSMaW+Kfjy6GtpTNPdfpHeq3w2PuiPgUGk2QIX/dqUAYntJ5arSw==} + peerDependencies: + '@fastify/static': ^10.1.2 + '@fastify/view': ^10.0.0 || ^11.0.0 || ^12.0.0 + '@nestjs/common': ^12.0.0 + '@nestjs/core': ^12.0.0 + peerDependenciesMeta: + '@fastify/static': + optional: true + '@fastify/view': + optional: true + + '@nestjs/schematics@12.0.4': + resolution: {integrity: sha512-iUQkaQKoKmcUgu0TZQwDnlHXs8RgeIf3Tzay6s8lfANtmu/3SQZFzg7eXbB/I2iN4I/nnngQb2Pnr3mqQRW7kw==} + engines: {node: ^22.22.3 || ^24.15.0 || >=26.0.0} + peerDependencies: + prettier: ^3.0.0 + typescript: '>=6.0.0' + peerDependenciesMeta: + prettier: + optional: true + + '@nestjs/swagger@12.0.1': + resolution: {integrity: sha512-fQ0WyutSSHedO9HzSkOFKFaRygYNGBno5EggcZljs+KL8tHzPPTO5oyJpaf3BoOKFGGsN/0B13EbIpH2pkPx8g==} + engines: {node: ^20.19.0 || >=22.12.0} + peerDependencies: + '@fastify/static': ^8.0.0 || ^9.0.0 || ^10.0.0 + '@nestjs/common': ^12.0.0 + '@nestjs/core': ^12.0.0 + class-transformer: '*' + class-validator: '*' + reflect-metadata: ^0.1.12 || ^0.2.0 + peerDependenciesMeta: + '@fastify/static': + optional: true + class-transformer: + optional: true + class-validator: + optional: true + + '@nestjs/testing@12.0.4': + resolution: {integrity: sha512-cL1vfg0VyEd1cHEge6gcppLsptYiCYRxjseuvelIX++ddgzeg9hIQQdg0sT7CJrBIJxI1dt6+7PW6NHbl3laYQ==} + peerDependencies: + '@nestjs/common': ^12.0.0 + '@nestjs/core': ^12.0.0 + '@nestjs/microservices': ^12.0.0 + '@nestjs/platform-express': ^12.0.0 + peerDependenciesMeta: + '@nestjs/microservices': + optional: true + '@nestjs/platform-express': + optional: true + + '@noble/hashes@1.8.0': + resolution: {integrity: sha512-jCs9ldd7NwzpgXDIf6P3+NrHh9/sD6CQdxHyjQI+h/6rDNo88ypBxxz45UDuZHz9r3tNz7N/VInSVoVdtXEI4A==} + engines: {node: ^14.21.3 || >=16} + + '@oxlint-tsgolint/darwin-arm64@7.0.2002': + resolution: {integrity: sha512-E3yYb/tI+5M3SqGgKwrwUD0nmjA2FMGD1xFbma46qi8Y7+nPTlGY6bZk/hqxijc9Vda/tdtUxQ2d5zGIEX9qlg==} + cpu: [arm64] + os: [darwin] + + '@oxlint-tsgolint/darwin-x64@7.0.2002': + resolution: {integrity: sha512-qEaMySdvzs8faaJwMO4dFtPFCa+degFCz+HbkFQ0REcIJqJ16KmC0smt30FAI9TeEHCoAtz6sU/6acJvi4uaxg==} + cpu: [x64] + os: [darwin] + + '@oxlint-tsgolint/linux-arm64@7.0.2002': + resolution: {integrity: sha512-bqPObCNIR6tDQSc0Xn9Nu7EfWRXFB+qFzADRl/q6YA8zT9YUg3pGUbmicV2hV91uLpiot74so9ocGjx35SaX6w==} + cpu: [arm64] + os: [linux] + + '@oxlint-tsgolint/linux-x64@7.0.2002': + resolution: {integrity: sha512-E5CcRALAYdiQMbdYjEqlLOiYuEdt21RtXiyxIoD8bfypdfkpWppacijKOR4i0DtLXFRVwCGQggZBWk5bOIpU1A==} + cpu: [x64] + os: [linux] + + '@oxlint-tsgolint/win32-arm64@7.0.2002': + resolution: {integrity: sha512-L+ul0ZFDiz/ZmTwCQ1J/qS7S6s45ktiaFqb+ZIzx+1sSdtdRxm8/H0+p4VDQYrCKBFzKNb6VjUlm48bNEe3BUg==} + cpu: [arm64] + os: [win32] + + '@oxlint-tsgolint/win32-x64@7.0.2002': + resolution: {integrity: sha512-zkZeJfo4UmYiCzj77u85eCDpdxOiQiSAsV6j9Pvj5e7Vu5+MvwLtK1xmVutE77tJmUJ3eBOSXHR6WgY4AwHHGQ==} + cpu: [x64] + os: [win32] + + '@oxlint/binding-android-arm-eabi@1.83.0': + resolution: {integrity: sha512-0yGY24EwsLk5YDe6F+VkmZyRHSwJDALa3nIrPpq7FXmp2lV2d0TzvBCGeZk+wgiULRGr5blhyr4QMp5KCXJUqA==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm] + os: [android] + + '@oxlint/binding-android-arm64@1.83.0': + resolution: {integrity: sha512-hHfJ0vc17A4iUjH5p9BsTUPYbYRNxGpvD2lbu1aBRk54bzNIx9o5TtYF39QPZcV95DagZd+4DEAw2RH3G2ZsMg==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [android] + + '@oxlint/binding-darwin-arm64@1.83.0': + resolution: {integrity: sha512-hsOjYjszLb/3zym/TkzUMPAoQlTJcuzSyEPOAyA+skXJIX9M0o+4JfOtqopX/Vf4hSLrJ98j0nvFo23gzk8auQ==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [darwin] + + '@oxlint/binding-darwin-x64@1.83.0': + resolution: {integrity: sha512-mjh5oH2EA+wl5yRJYT9K9G61O2zFlpuv+yf2JwZOi0+dq2FnTUtm1h8i+5Ik0fXPWIu/k84I1psZR9aQsLAnyA==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [darwin] + + '@oxlint/binding-freebsd-x64@1.83.0': + resolution: {integrity: sha512-fNHr64/YaO8YssuoDVC8+F4Uk5enR86q5uxfHkQrjAPs1dbAILOrD2uaud+J7MO8Fx774g44ERLD0IGIvZE48w==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [freebsd] + + '@oxlint/binding-linux-arm-gnueabihf@1.83.0': + resolution: {integrity: sha512-Qpwy3zzAwMj+8/lyYItHmkSMwbkprFNWTK7jPYDOxSyxEhaSLOWYUTCMkjF334J8/WD0nznCCsoBbIH6hpsuIw==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm] + os: [linux] + + '@oxlint/binding-linux-arm-musleabihf@1.83.0': + resolution: {integrity: sha512-s+BirYLFq7JL2k9sP0XI3ZXJ9dYvJ8sX3jLCLoag7tt+zrSHpZxP0jqznfL+Gdgwu7ay0dYgGYJXrQvq3iWloA==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm] + os: [linux] + + '@oxlint/binding-linux-arm64-gnu@1.83.0': + resolution: {integrity: sha512-7lihXt3vKr+GIyapNbHrnFHm/biiW30le6Zv/DExbAFPF6YwCQXVFlONPFehxs0CpGO4CBfYPM9rdDT+XMoIlg==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [linux] + + '@oxlint/binding-linux-arm64-musl@1.83.0': + resolution: {integrity: sha512-q63JalLYVkZiZvls1z3PPUnpmQluOMXp0khqQMznCeAPLGydfNY8JhvuA4WlK57JfrvikU8wB5lPVveqpIXvew==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [linux] + + '@oxlint/binding-linux-ppc64-gnu@1.83.0': + resolution: {integrity: sha512-krQmDF+dRbxvdqVPV88ZuOoPPu8X5BuqDA8Hd+qcS4YMRQCb+nexA57DazgGsc/rGdKBe3QmV0mnv0bdpW/p5g==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [ppc64] + os: [linux] + + '@oxlint/binding-linux-riscv64-gnu@1.83.0': + resolution: {integrity: sha512-MmOl8Y6txEAXZU1RG8Rr264jQ6D7VPmqFsU/45x/FeWsGe32hklTqGrLE6UxHzp5Rjt0wP+20tY8YXKgSFB3mw==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [riscv64] + os: [linux] + + '@oxlint/binding-linux-riscv64-musl@1.83.0': + resolution: {integrity: sha512-u1rMymh0W3JZkq370kzQsYPULGWqhE09pZRqnZvUSoYaI9pVO5yVX+iYIslmWuEgwuzH9YAaOsScJiobWCHoOw==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [riscv64] + os: [linux] + + '@oxlint/binding-linux-s390x-gnu@1.83.0': + resolution: {integrity: sha512-y0zK3HNwGysu7rqtE+BQG/d0bx5gh/KwlOtghN8oWeK1KcWzeaLqtZrbm8owqdma1lFyrce/hTO5ismuNu+INQ==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [s390x] + os: [linux] + + '@oxlint/binding-linux-x64-gnu@1.83.0': + resolution: {integrity: sha512-rS5gM0NgD7ngmuJmbIehsidtrOwKkLFwCQbKEeb9KuyQrrWNq5Zkn0uV6AYdXOMJ0grrWEiLwBuvMxt8w5vsNw==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [linux] + + '@oxlint/binding-linux-x64-musl@1.83.0': + resolution: {integrity: sha512-W2IH4EtpcPaWcvNGCA95YoDg4vxqE/ZiPCi3arrxEEpsK7+JQN9WYwrlYFx9pcdP6KPXqRqkv3zdQPHcx7b6YQ==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [linux] + + '@oxlint/binding-openharmony-arm64@1.83.0': + resolution: {integrity: sha512-6LyKkUyoajssTPLlZmDbZIbu4IZ5B4bGuRUnBgCGpEvHP3FQMaYITncHA/unPUo7q+Z+pIu2HhdkQ+8d1SG7iA==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [openharmony] + + '@oxlint/binding-win32-arm64-msvc@1.83.0': + resolution: {integrity: sha512-Uz/fObEtF0jmNJQJ8CGRBKfefYstS0/wjD3s6IGzP8nUwsJykHQJBiN3npHwKiGRGn/vvBEgNr4B3cCzmmatvg==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [win32] + + '@oxlint/binding-win32-ia32-msvc@1.83.0': + resolution: {integrity: sha512-u7XcvPW6Bk58tY5iWs2ESb0vJjoE/kuSpHxopbwp/p3ZtWVQXZ6wor5w3ssVTHOqd/v8b+QdhSFWQ4grEUNWpA==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [ia32] + os: [win32] + + '@oxlint/binding-win32-x64-msvc@1.83.0': + resolution: {integrity: sha512-LZRubd7ph13QmAg4fFecTYVZkiYbROR2Htaxh/ufWRkDhPOm2wrwaEYR89e0YpPFD3dqBrPoxS7myBw5hmYA7Q==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [win32] + + '@paralleldrive/cuid2@2.3.1': + resolution: {integrity: sha512-XO7cAxhnTZl0Yggq6jOgjiOHhbgcO4NqFqwSmQpjK3b6TEE6Uj/jfSk6wzYyemh3+I0sHirKSetjQwn5cZktFw==} + + '@parcel/watcher-android-arm64@2.6.0': + resolution: {integrity: sha512-trgpLSCKRC/huFjXX/Smh+0sWe4+YtKfktIToiMl59ghz7z+qkH6kMvNnUbLyRs9N11t8l4svSCs1+5B3rOAhA==} + engines: {node: '>= 10.0.0'} + cpu: [arm64] + os: [android] + + '@parcel/watcher-darwin-arm64@2.6.0': + resolution: {integrity: sha512-Y3QV0gl7Q1zbfueunkWIERICbEojQFCgpyG7YqOGNFLsckXyI1xu9mAIUpKY9QBYzBtSkN8dBPwd3yiAO9ovMw==} + engines: {node: '>= 10.0.0'} + cpu: [arm64] + os: [darwin] + + '@parcel/watcher-darwin-x64@2.6.0': + resolution: {integrity: sha512-Ohv6OpzhUfKYD7Beb8kDvG0jbIxORCYY1JRdZnaBtnjjkJxgD7ZVL0nw2sCYd0yTMKTvz3nnTnOF3cDifK+kvw==} + engines: {node: '>= 10.0.0'} + cpu: [x64] + os: [darwin] + + '@parcel/watcher-freebsd-x64@2.6.0': + resolution: {integrity: sha512-5HmXvDgs8VK+74jF9y9/2FE3/OnlcKmc56tjmSrEuZjpSZOGL+fvAu+HKJBdPs9uwoP2hE6TlSUpXZ/C5jUFmQ==} + engines: {node: '>= 10.0.0'} + cpu: [x64] + os: [freebsd] + + '@parcel/watcher-linux-arm-glibc@2.6.0': + resolution: {integrity: sha512-Ps/hui3A+vMbjdqlqAowK2ZL8+BO8dBjxeWXj6npTBs3jx4wWmbPpaLuqwrQrSqIVMCnpWo238bJ1U37GhQOYg==} + engines: {node: '>= 10.0.0'} + cpu: [arm] + os: [linux] + + '@parcel/watcher-linux-arm-musl@2.6.0': + resolution: {integrity: sha512-9c6AUHgHoG+IY88MRIHupztQiQnrbqHYQjkM2btA+Bf/wQnQMuiD0Wfk1EVv3TlNT3x41uU71rn6E4xh/+zvkw==} + engines: {node: '>= 10.0.0'} + cpu: [arm] + os: [linux] + + '@parcel/watcher-linux-arm64-glibc@2.6.0': + resolution: {integrity: sha512-yHRqS2owEXe6Hic9z6Mh1ECsCd+ODVOGvZDyciqRd21+v+o+DnXMOrw50DSpIG2sb8GPEaPPmfeCAWKPJdq46g==} + engines: {node: '>= 10.0.0'} + cpu: [arm64] + os: [linux] + + '@parcel/watcher-linux-arm64-musl@2.6.0': + resolution: {integrity: sha512-WhB2e/V7rqdHHWZusBSPuy5Ei8S6lSz6FE5TKKQz5h3a0O+C+mhY7vxU9b/stqvMb8beLnPY82ZrFTLKs+SrKA==} + engines: {node: '>= 10.0.0'} + cpu: [arm64] + os: [linux] + + '@parcel/watcher-linux-x64-glibc@2.6.0': + resolution: {integrity: sha512-ulGE6x6Oz6iAwg75T8YQSoguBWasniIbX+QWpaYPcCnDOpdWX3k+4xbEYPZVLxOuoJI+svJJPD3sEj8G7lrQ3A==} + engines: {node: '>= 10.0.0'} + cpu: [x64] + os: [linux] + + '@parcel/watcher-linux-x64-musl@2.6.0': + resolution: {integrity: sha512-tkBYKt7YQrjIJWYDnto2YgO8MRkjlMTSNoRHzsXinBqbLdeOM3L32wPZJvIZxqaLMfSlS/4sUjH/6STVP/XDLw==} + engines: {node: '>= 10.0.0'} + cpu: [x64] + os: [linux] + + '@parcel/watcher-win32-arm64@2.6.0': + resolution: {integrity: sha512-gIZAP23jaHjGWasY/TY6yL7NHFClf0Ga7FN+iINvk+KN94rhm94lYZhFsbYFNcA04/onvGD9kKmiJLJB2HbNwQ==} + engines: {node: '>= 10.0.0'} + cpu: [arm64] + os: [win32] + + '@parcel/watcher-win32-x64@2.6.0': + resolution: {integrity: sha512-cA+/pXV2YkfxlIcXOQ5fSWqAzzPyD78/x5qbK/I0vUkrlYHA8TIz+MXjAbGouguKVSI4bOmkTSJ1/poVSsgt+A==} + engines: {node: '>= 10.0.0'} + cpu: [x64] + os: [win32] + + '@parcel/watcher@2.6.0': + resolution: {integrity: sha512-7FNeNl8NCE7aINx7WXiKQrPYZWC/hvrTsmk6zmxbI7LTXE7hVek/n8AfVgpe2y82zl3w0HvCHN0bVKMBoJcC0w==} + engines: {node: '>= 10.0.0'} + + '@pinojs/redact@0.4.0': + resolution: {integrity: sha512-k2ENnmBugE/rzQfEcdWHcCY+/FM3VLzH9cYEsbdsoqrvzAKRhUZeRNhAZvB8OitQJ1TBed3yqWtdjzS6wJKBwg==} + + '@pkgjs/parseargs@0.11.0': + resolution: {integrity: sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==} + engines: {node: '>=14'} + + '@pkgr/core@0.3.6': + resolution: {integrity: sha512-SEeaJLb3qBNF/OaXnaR1NmmBbFYk1zC0ZH/52fATcRPLFg/p791YrcyFFy44Bo9sLaGuSuLp5Q6axbb/O+v/RA==} + engines: {node: ^14.18.0 || >=16.0.0} + + '@prisma/adapter-pg@7.10.0': + resolution: {integrity: sha512-N7nwSor0HO1Kz6xBv0TPAjAPysKK0fac6p4fVN3ensLOuzc/83Fgmln5k92eK/cvzqdkSR/2kkAqlbcdwVrwpw==} + + '@prisma/client-runtime-utils@7.10.0': + resolution: {integrity: sha512-cnCy7lUV8/CctgKVEmqAbSLAmwqJdE/qAlqTBk/0NDk59zEb2cZ0M0M0E4vVPnqbSEYudRroQDvOWfUZH6RIfw==} + + '@prisma/client@7.10.0': + resolution: {integrity: sha512-Ubw/QS9JGIBSBUsyxAUQuK/Jcu0Tsva7le7QbLd91Kix9yJvYDdj5QkwgEbbZniH80dd+sziQcALPc+HnvQC8Q==} + engines: {node: ^20.19 || ^22.12 || >=24.0} + peerDependencies: + prisma: '*' + typescript: '>=5.4.0' + peerDependenciesMeta: + prisma: + optional: true + typescript: + optional: true + + '@prisma/config@7.10.0': + resolution: {integrity: sha512-Rcg828gIRE3HOQ3pOATFjV5d/P0U9OIobxhd/IMxlfWjA4vru0eGwb0AIwFw0rmcLMVShohZYWPixVxkBHsxUA==} + + '@prisma/debug@7.10.0': + resolution: {integrity: sha512-caygJKtltmRIgdJ3jRpkOr7yM4DW6zxo5uOmojKWFb3asnxWoRkQOwZmXBgD8FZp4htrX+nMpcWqDwzlQ1+Y4g==} + + '@prisma/debug@7.2.0': + resolution: {integrity: sha512-YSGTiSlBAVJPzX4ONZmMotL+ozJwQjRmZweQNIq/ER0tQJKJynNkRB3kyvt37eOfsbMCXk3gnLF6J9OJ4QWftw==} + + '@prisma/dev@0.24.17': + resolution: {integrity: sha512-UvdZzmpFwknnfreh6Jije84ekkYGPYEJhXG1tFzCsCfQyzJifrOo38eZc0qajzvaC6OLUOrN9ML5XfCnEZL9DA==} + + '@prisma/driver-adapter-utils@7.10.0': + resolution: {integrity: sha512-u8zkcRLlaryO652T4qavBg0HmzNW5tSKdsCn6hc1PhWAp/J6k0vrxLuUs+b9o+HcjsK7Dfa01o4OFSn0frauJA==} + + '@prisma/engines-version@7.10.0-4.0edf323efd1d98336f3f0a68684b56f689b900d3': + resolution: {integrity: sha512-8OJ6RuZTZ06eFUOtBwxVmv8XMmOW6HWN5F+uxUbZkGxR0Bfab1dfAdXaHPmR5mb59E+fmUo8IOzXlbLY1SClbw==} + + '@prisma/engines@7.10.0': + resolution: {integrity: sha512-KNumN6NHFwybvfdYzTee9pqwx5PvknpWAaHn6L5NsbrKdl+SQrsVZs9opKs6U6SAsvB26HDt3WybRjOhgoWOYQ==} + + '@prisma/fetch-engine@7.10.0': + resolution: {integrity: sha512-Zqyu8DY14t6W/xwmAxUYWCXtHrvQnSvT644EAZSsdM8NSmCS74vJJbBKdVsK3ucFpnUWkEpbO1a0CxJXrg130g==} + + '@prisma/get-platform@7.10.0': + resolution: {integrity: sha512-0bra1LFYi8xNw0yqV62bHJNQk4BKleOngZiqPWIQc7a3+9q6rqsnqJ15BuepP8943PFMvtmgnP52juZsyYkA6w==} + + '@prisma/get-platform@7.2.0': + resolution: {integrity: sha512-k1V0l0Td1732EHpAfi2eySTezyllok9dXb6UQanajkJQzPUGi3vO2z7jdkz67SypFTdmbnyGYxvEvYZdZsMAVA==} + + '@prisma/query-plan-executor@7.2.0': + resolution: {integrity: sha512-EOZmNzcV8uJ0mae3DhTsiHgoNCuu1J9mULQpGCh62zN3PxPTd+qI9tJvk5jOst8WHKQNwJWR3b39t0XvfBB0WQ==} + + '@prisma/streams-local@0.1.11': + resolution: {integrity: sha512-0TcebL559MByKqTJ+SsrFIEg228iw8UCVRFckzgfRSiJqczhs+MuAgWOF9lnOIV/IVqvu+KMnFTH0eDeTQMpUg==} + engines: {bun: '>=1.2.0', node: '>=22.0.0'} + + '@prisma/studio-core@0.33.0': + resolution: {integrity: sha512-V2fX/nKEymNTrHXwfP26PGjoLStO35Ogu+ex7CFJbLrMYEcZxxZpiSNOs7px23Hk5mzLWvM5RsqG6Ka+rha+wg==} + engines: {node: ^20.19 || ^22.12 || >=24.0, pnpm: '8'} + peerDependencies: + '@types/react': ^18.0.0 || ^19.0.0 + react: ^18.0.0 || ^19.0.0 + react-dom: ^18.0.0 || ^19.0.0 + + '@radix-ui/primitive@1.1.3': + resolution: {integrity: sha512-JTF99U/6XIjCBo0wqkU5sK10glYe27MRRsfwoiq5zzOEZLHU3A3KCMa5X/azekYRCJ0HlwI0crAXS/5dEHTzDg==} + + '@radix-ui/react-compose-refs@1.1.2': + resolution: {integrity: sha512-z4eqJvfiNnFMHIIvXP3CY57y2WJs5g2v3X0zm9mEJkrkNv4rDxu+sg9Jh8EkXyeqBkB7SOcboo9dMVqhyrACIg==} + peerDependencies: + '@types/react': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true + + '@radix-ui/react-primitive@2.1.3': + resolution: {integrity: sha512-m9gTwRkhy2lvCPe6QJp4d3G1TYEUHn/FzJUtq9MjH46an1wJU+GdoGC5VLof8RX8Ft/DlpshApkhswDLZzHIcQ==} + peerDependencies: + '@types/react': '*' + '@types/react-dom': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true + '@types/react-dom': + optional: true + + '@radix-ui/react-slot@1.2.3': + resolution: {integrity: sha512-aeNmHnBxbi2St0au6VBVC7JXFlhLlOnvIIlePNniyUNAClzmtAUEY8/pBiK3iHjufOlwA+c20/8jngo7xcrg8A==} + peerDependencies: + '@types/react': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true + + '@radix-ui/react-toggle@1.1.10': + resolution: {integrity: sha512-lS1odchhFTeZv3xwHH31YPObmJn8gOg7Lq12inrr0+BH/l3Tsq32VfjqH1oh80ARM3mlkfMic15n0kg4sD1poQ==} + peerDependencies: + '@types/react': '*' + '@types/react-dom': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true + '@types/react-dom': + optional: true + + '@radix-ui/react-use-controllable-state@1.2.2': + resolution: {integrity: sha512-BjasUjixPFdS+NKkypcyyN5Pmg83Olst0+c6vGov0diwTEo6mgdqVR6hxcEgFuh4QrAs7Rc+9KuGJ9TVCj0Zzg==} + peerDependencies: + '@types/react': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true + + '@radix-ui/react-use-effect-event@0.0.2': + resolution: {integrity: sha512-Qp8WbZOBe+blgpuUT+lw2xheLP8q0oatc9UpmiemEICxGvFLYmHm9QowVZGHtJlGbS6A6yJ3iViad/2cVjnOiA==} + peerDependencies: + '@types/react': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true + + '@radix-ui/react-use-layout-effect@1.1.1': + resolution: {integrity: sha512-RbJRS4UWQFkzHTTwVymMTUv8EqYhOp8dOOviLj2ugtTiXRaRQS7GLGxZTLL1jWhMeoSCf5zmcZkqTl9IiYfXcQ==} + peerDependencies: + '@types/react': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true + + '@scalar/client-side-rendering@0.4.1': + resolution: {integrity: sha512-4Ha2ihIPFwmhheSU6U9DlpjgRQ2YOqq2JSmc4ubT2ERApaA/HzuZ1IMyLXDvRICI+KbDducfGw5th9O+TQf+6A==} + engines: {node: '>=22'} + + '@scalar/helpers@0.12.0': + resolution: {integrity: sha512-rcX0rFLiWWc0VBr/E+HkatubL0I0ZzxASQkd3032NWEMAEfNd2TiJ9kH46HwbSAOOl696ghxymWegjpjjvxwzA==} + engines: {node: '>=22'} + + '@scalar/nestjs-api-reference@1.2.19': + resolution: {integrity: sha512-DYaZv+JQrLxG5B439+sHY0UbYwqwLip5bHYGnJhfO1SXKcjWCbNxwOV0yIxp8VGR+96g+pc2LPww7/b8ma0oEQ==} + engines: {node: '>=22'} + + '@scalar/schemas@0.10.0': + resolution: {integrity: sha512-jFqfd+oqqlTfs87V+QkIrR9DiRv+/h1x3GzSGbGe1qrM6togeXwvVG4aurn+LZ+Ej9of54/6FmoI8DPuLOKx7A==} + engines: {node: '>=22'} + + '@scalar/types@0.20.0': + resolution: {integrity: sha512-+05slk/Q6MRMqEQt6eM77Jt9DnDPAvfcc/6r7mbrXhIqJSp3oAPrixpAnp1knBSlFaxgixcK/GMKw9QDfD+Zgg==} + engines: {node: '>=22'} + + '@scalar/validation@0.6.3': + resolution: {integrity: sha512-j3s9XPv8Wo1EG5/naBi4XGF0uXYQ2A3QZNI0NKWgCMxRHVrDJGlZEYymcHDHY7fquRm73P8U3c8xqJqB5yad6w==} + engines: {node: '>=20'} + + '@scarf/scarf@1.4.0': + resolution: {integrity: sha512-xxeapPiUXdZAE3che6f3xogoJPeZgig6omHEy1rIY5WVsB3H2BHNnZH+gHG6x91SCWyQCzWGsuL2Hh3ClO5/qQ==} + + '@sinclair/typebox@0.34.52': + resolution: {integrity: sha512-XiMQh7qqVlxZzcVD+kkGMNGMzcTrDMLWI7S4x7z1MkCkbDPrekpZXEUK0eZqZFMuHQg2a2DZOcDIh9o5v3Gonw==} + + '@sindresorhus/is@4.6.0': + resolution: {integrity: sha512-t09vSN3MdfsyCHoFcTRCH/iUtG7OJ0CsjzB8cjAmKc/va/kIgeDI/TxsigdncE/4be734m0cvIYwNaV4i2XqAw==} + engines: {node: '>=10'} + + '@sinonjs/commons@3.0.1': + resolution: {integrity: sha512-K3mCHKQ9sVh8o1C9cxkwxaOmXoAMlDxC1mYyHrjqOWEcBjYr76t96zL2zlj5dUGZ3HSw240X1qgH3Mjf1yJWpQ==} + + '@sinonjs/fake-timers@15.4.0': + resolution: {integrity: sha512-DsG+8/LscQIQg68J6Ef3dv10u6nVyetYn923s3/sus5eaGfTo1of5WMZSLf0UJc9KDuKPilPH0UDJCjvNbDNCA==} + + '@standard-schema/spec@1.1.0': + resolution: {integrity: sha512-l2aFy5jALhniG5HgqrD6jXLi/rUWrKvqN/qJx6yoJsgKhblVd+iqqU4RCXavm/jPityDo5TCvKMnpjKnOriy0w==} + + '@tokenizer/inflate@0.4.1': + resolution: {integrity: sha512-2mAv+8pkG6GIZiF1kNg1jAjh27IDxEPKwdGul3snfztFerfPGI1LjDezZp3i7BElXompqEtPmoPx6c2wgtWsOA==} + engines: {node: '>=18'} + + '@tokenizer/token@0.3.0': + resolution: {integrity: sha512-OvjF+z51L3ov0OyAU0duzsYuvO01PH7x4t6DJx+guahgTnBHkhJdG7soQeTSFLWN3efnHyibZ4Z8l2EuWwJN3A==} + + '@tsconfig/node10@1.0.13': + resolution: {integrity: sha512-gcLdvR9HO1ZJBypsOGqaP6TFEzb6vIta0KSTLt9NAQ6pXQO3cRgSVyCN6pzYqI9DlJgY71XKO0dpDhCf08b3pg==} + + '@tsconfig/node12@1.0.11': + resolution: {integrity: sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==} + + '@tsconfig/node14@1.0.3': + resolution: {integrity: sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==} + + '@tsconfig/node16@1.0.4': + resolution: {integrity: sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA==} + + '@tybys/wasm-util@0.10.4': + resolution: {integrity: sha512-W3c4gRigFS0T/Ma4qIYF3GDAc5AQdHb1yL5znJT1Zv1YaD9Kitx656wBjvr19qbiosmZT8lWDM5BEMynUqX65A==} + + '@types/babel__core@7.20.5': + resolution: {integrity: sha512-qoQprZvz5wQFJwMDqeseRXWv3rqMvhgpbXFfVyWhbx9X47POIA6i/+dXefEmZKoAgOaTdaIgNSMqMIU61yRyzA==} + + '@types/babel__generator@7.27.0': + resolution: {integrity: sha512-ufFd2Xi92OAVPYsy+P4n7/U7e68fex0+Ee8gSG9KX7eo084CWiQ4sdxktvdl0bOPupXtVJPY19zk6EwWqUQ8lg==} + + '@types/babel__template@7.4.4': + resolution: {integrity: sha512-h/NUaSyG5EyxBIp8YRxo4RMe2/qQgvyowRwVMzhYhBCONbW8PUsg4lkFMrhgZhUe5z3L3MiLDuvyJ/CaPa2A8A==} + + '@types/babel__traverse@7.28.0': + resolution: {integrity: sha512-8PvcXf70gTDZBgt9ptxJ8elBeBjcLOAcOtoO/mPJjtji1+CdGbHgm77om1GrsPxsiE+uXIpNSK64UYaIwQXd4Q==} + + '@types/cookiejar@2.1.5': + resolution: {integrity: sha512-he+DHOWReW0nghN24E1WUqM0efK4kI9oTqDm6XmK8ZPe2djZ90BSNdGnIyCLzCPw7/pogPlGbzI2wHGGmi4O/Q==} + + '@types/d3-array@3.0.3': + resolution: {integrity: sha512-Reoy+pKnvsksN0lQUlcH6dOGjRZ/3WRwXR//m+/8lt1BXeI4xyaUZoqULNjyXXRuh0Mj4LNpkCvhUpQlY3X5xQ==} + + '@types/d3-color@3.1.0': + resolution: {integrity: sha512-HKuicPHJuvPgCD+np6Se9MQvS6OCbJmOjGvylzMJRlDwUXjKTTXs6Pwgk79O09Vj/ho3u1ofXnhFOaEWWPrlwA==} + + '@types/d3-delaunay@6.0.1': + resolution: {integrity: sha512-tLxQ2sfT0p6sxdG75c6f/ekqxjyYR0+LwPrsO1mbC9YDBzPJhs2HbJJRrn8Ez1DBoHRo2yx7YEATI+8V1nGMnQ==} + + '@types/d3-format@3.0.1': + resolution: {integrity: sha512-5KY70ifCCzorkLuIkDe0Z9YTf9RR2CjBX1iaJG+rgM/cPP+sO+q9YdQ9WdhQcgPj1EQiJ2/0+yUkkziTG6Lubg==} + + '@types/d3-geo@3.1.0': + resolution: {integrity: sha512-856sckF0oP/diXtS4jNsiQw/UuK5fQG8l/a9VVLeSouf1/PPbBE1i1W852zVwKwYCBkFJJB7nCFTbk6UMEXBOQ==} + + '@types/d3-interpolate@3.0.1': + resolution: {integrity: sha512-jx5leotSeac3jr0RePOH1KdR9rISG91QIE4Q2PYTu4OymLTZfA3SrnURSLzKH48HmXVUru50b8nje4E79oQSQw==} + + '@types/d3-path@3.1.1': + resolution: {integrity: sha512-VMZBYyQvbGmWyWVea0EHs/BwLgxc+MKi1zLDCONksozI4YJMcTt8ZEuIR4Sb1MMTE8MMW49v0IwI5+b7RmfWlg==} + + '@types/d3-scale@4.0.2': + resolution: {integrity: sha512-Yk4htunhPAwN0XGlIwArRomOjdoBFXC3+kCxK2Ubg7I9shQlVSJy/pG/Ht5ASN+gdMIalpk8TJ5xV74jFsetLA==} + + '@types/d3-shape@3.1.7': + resolution: {integrity: sha512-VLvUQ33C+3J+8p+Daf+nYSOsjB4GXp19/S/aGo60m9h1v6XaxjiT82lKVWJCfzhtuZ3yD7i/TPeC/fuKLLOSmg==} + + '@types/d3-time-format@2.1.0': + resolution: {integrity: sha512-/myT3I7EwlukNOX2xVdMzb8FRgNzRMpsZddwst9Ld/VFe6LyJyRp0s32l/V9XoUzk+Gqu56F/oGk6507+8BxrA==} + + '@types/d3-time@3.0.0': + resolution: {integrity: sha512-sZLCdHvBUcNby1cB6Fd3ZBrABbjz3v1Vm90nysCQ6Vt7vd6e/h9Lt7SiJUoEX0l4Dzc7P5llKyhqSi1ycSf1Hg==} + + '@types/estree@1.0.9': + resolution: {integrity: sha512-GhdPgy1el4/ImP05X05Uw4cw2/M93BCUmnEvWZNStlCzEKME4Fkk+YpoA5OiHNQmoS7Cafb8Xa3Pya8m1Qrzeg==} + + '@types/geojson@7946.0.16': + resolution: {integrity: sha512-6C8nqWur3j98U6+lXDfTUWIfgvZU+EumvpHKcYjujKH7woYyLj2sUmff0tRhrqM7BohUw7Pz3ZB1jj2gW9Fvmg==} + + '@types/istanbul-lib-coverage@2.0.6': + resolution: {integrity: sha512-2QF/t/auWm0lsy8XtKVPG19v3sSOQlJe/YHZgfjb/KBBHOGSV+J2q/S671rcq9uTBrLAXmZpqJiaQbMT+zNU1w==} + + '@types/istanbul-lib-report@3.0.3': + resolution: {integrity: sha512-NQn7AHQnk/RSLOxrBbGyJM/aVQ+pjj5HCgasFxc0K/KhoATfQ/47AyUl15I2yBUpihjmas+a+VJBOqecrFH+uA==} + + '@types/istanbul-reports@3.0.4': + resolution: {integrity: sha512-pk2B1NWalF9toCRu6gjBzR69syFjP4Od8WRAX+0mmf9lAjCRicLOWc+ZrxZHx/0XRjotgkF9t6iaMJ+aXcOdZQ==} + + '@types/jest@30.0.0': + resolution: {integrity: sha512-XTYugzhuwqWjws0CVz8QpM36+T+Dz5mTEBKhNs/esGLnCIlGdRy+Dq78NRjd7ls7r8BC8ZRMOrKlkO1hU0JOwA==} + + '@types/json-schema@7.0.15': + resolution: {integrity: sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==} + + '@types/lodash@4.17.26': + resolution: {integrity: sha512-48NWfiY6oNcKOh47Z4h+sIvwcQR91h6KPhaYKgeMIrkT2jV82Gy90SErj60vW8jQbeMSOSbhIv3bZ7JoqPPVhA==} + + '@types/methods@1.1.4': + resolution: {integrity: sha512-ymXWVrDiCxTBE3+RIrrP533E70eA+9qu7zdWoHuOmGujkYtzf4HQF96b8nwHLqhuf4ykX61IGRIB38CC6/sImQ==} + + '@types/node@24.13.6': + resolution: {integrity: sha512-SGrw/h3KPFshy3OE6ZL53LMBG5vGQQ8/gIpiqz/kRZhPJ7HgwCEs8LBuNtWLa8dvGZVpSF7+Bf+c11HUrCb/yg==} + + '@types/pg@8.23.1': + resolution: {integrity: sha512-fKVHpikPdg4GKks3JuLEhvwSyvwzF23hnabPy6DD8ljVbC7+6J5dQzdv4arV6jqq57djnMgs1HKBxX4P8aBI3A==} + + '@types/react@19.3.0': + resolution: {integrity: sha512-N0rFCuH9YoxG9/m61l9MfpJKfmLOVU0em7ipIz6TRgSSkvReLB9vL85GB+yr8Bs5leqpvg96JSwF4ZS1s4viQg==} + + '@types/stack-utils@2.0.3': + resolution: {integrity: sha512-9aEbYZ3TbYMznPdcdr3SmIrLXwC/AKZXQeCf9Pgao5CKb8CyHuEX5jzWPTkvregvhRJHcpRO6BFoGW9ycaOkYw==} + + '@types/superagent@8.1.11': + resolution: {integrity: sha512-KA7srSW/HENDtOw9DOqaFLgWuMqN9WgjEw62lh9dpvRaZDkhdOkazASd7X7i2eMUYLHa1U37ZttnePsH5zTDHw==} + + '@types/supertest@7.2.1': + resolution: {integrity: sha512-4CbBvoYVLHL7+yhbYrZET0vsvuyXTC05aRe7dNQkwMzm56auceoy6Yu3K50uZmwfHna1os3CMSgM/3QVkUtPTw==} + + '@types/yargs-parser@21.0.3': + resolution: {integrity: sha512-I4q9QU9MQv4oEOz4tAHJtNz1cwuLxn2F3xcc2iV5WdqLPpUnj30aUuxt1mAxYTG+oe8CZMV/+6rU4S4gRDzqtQ==} + + '@types/yargs@17.0.35': + resolution: {integrity: sha512-qUHkeCyQFxMXg79wQfTtfndEC+N9ZZg76HJftDJp+qH2tV7Gj4OJi7l+PiWwJ+pWtW8GwSmqsDj/oymhrTWXjg==} + + '@ungap/structured-clone@1.4.0': + resolution: {integrity: sha512-1mEZtMKPM09vDmQt5y7YvmN2+DFTP7Tg0EWXdic8/C6VRnpb33e4ghisCIE3WZjsE2N8mf+QV1Zqh7ZFYLWInQ==} + + '@unrs/resolver-binding-android-arm-eabi@1.12.2': + resolution: {integrity: sha512-g5T90pqg1bo/7mytQx6F4iBNC0Wsh9cu+z9veDbFjc7HjpesJFWD7QMS0NGStXM075+7dJPPVvBbpZlnrdpi/w==} + cpu: [arm] + os: [android] + + '@unrs/resolver-binding-android-arm64@1.12.2': + resolution: {integrity: sha512-YGCRZv/9GLhwmz6mYDeTsm/92BAyR28l6c2ReweVW5pWgfsitWLY8upvfRlGdoyD8HjeTHSYJWyZGD4KJA/nFQ==} + cpu: [arm64] + os: [android] + + '@unrs/resolver-binding-darwin-arm64@1.12.2': + resolution: {integrity: sha512-u9DiNT1auQMO20A9SyTuG3wUgQWB9Z7KjAg0uFuCDR1FsAY8A0CG2S6JpHS1xwm/w1G08bjXZDcyOCjv1WAm2w==} + cpu: [arm64] + os: [darwin] + + '@unrs/resolver-binding-darwin-x64@1.12.2': + resolution: {integrity: sha512-f7rPLi/T1HVKZu/u6t87lroib16n8vrSzcyxI7lg4BGO9UF26KhQL44sd9eOUgrTYhvRXtWOIZT5PejdPyJfUA==} + cpu: [x64] + os: [darwin] + + '@unrs/resolver-binding-freebsd-x64@1.12.2': + resolution: {integrity: sha512-BpcOjWCJub6nRZUS2zA20pmLvjtqAtGejETaIyRLiZiQf++cbrjltLA5NN/xaXfqeOBOSlMFbemIl5/S5tljmg==} + cpu: [x64] + os: [freebsd] + + '@unrs/resolver-binding-linux-arm-gnueabihf@1.12.2': + resolution: {integrity: sha512-vZTDvdSISZjJx66OzJqtsOhzifbqRjbmI1Mnu49fQDwog5GtDI4QidRiEAYbZCRj9C8YZEW+3ZjqsyS9GR4k2A==} + cpu: [arm] + os: [linux] + + '@unrs/resolver-binding-linux-arm-musleabihf@1.12.2': + resolution: {integrity: sha512-BiPI+IrIlwcW4nLLMM21+B1dFPzd55yAVgVGrdgDjNef+ch03GdxrcyaIz8X9SsQirh/kCQ7mviyWlMxdh2D7g==} + cpu: [arm] + os: [linux] + + '@unrs/resolver-binding-linux-arm64-gnu@1.12.2': + resolution: {integrity: sha512-zJc0H99FEPoFfSrNpa91HYfxzfAJCr502oxNK1cfdC9hlaFI43RT+JFCann9JUgZmLzzntChHyn13Sgn9ljHNg==} + cpu: [arm64] + os: [linux] + + '@unrs/resolver-binding-linux-arm64-musl@1.12.2': + resolution: {integrity: sha512-KQ3Lki6l+Pz1k/eBipN41ES+YUK30beLGb9YqcB1O542cyLCNE6GaxrfcY3T6EezmGGk84wb5XyO9loTM9tkcA==} + cpu: [arm64] + os: [linux] + + '@unrs/resolver-binding-linux-loong64-gnu@1.12.2': + resolution: {integrity: sha512-3SJGEh1DborhG6pyxvhPzCT4bbSIVihsvgJc13P1bHG7KLdNDaF9T3gsTwFc7Jw/5Y5/iWOjkEx7Zy0NvCGX3Q==} + cpu: [loong64] + os: [linux] + + '@unrs/resolver-binding-linux-loong64-musl@1.12.2': + resolution: {integrity: sha512-jiuG/Obbel7uw1PwHNFfrkiKhLAF6mnyZ6aWlOAVN9WqKm8v0OFGnciJIHu8+CMvXLQ8AD51LPzAoUfT21D5Ew==} + cpu: [loong64] + os: [linux] + + '@unrs/resolver-binding-linux-ppc64-gnu@1.12.2': + resolution: {integrity: sha512-q7xRvVpmcfeL+LlZg8Pbbo6QaTZwDU5BaGZbwfhkEsXJn3Was8xYfE0RBH266xZt0rM6B7i8xAYIvjthuUIWHg==} + cpu: [ppc64] + os: [linux] + + '@unrs/resolver-binding-linux-riscv64-gnu@1.12.2': + resolution: {integrity: sha512-0CVdx6lcnT3Q9inOH8tsMIOJ6ImndllMjqJHg8RLVdB7Vq4SfkEXl9mCSsVNuNA4MCYycRicCUxPCabVHJRr6A==} + cpu: [riscv64] + os: [linux] + + '@unrs/resolver-binding-linux-riscv64-musl@1.12.2': + resolution: {integrity: sha512-iOwlRo9vnp6R6ohHQS11n0NnfdXx/omhkocmIfaPRpQhKZ+3BDMkkdRVh53qjkFkpPddf+FETA28NwGN7l5l+w==} + cpu: [riscv64] + os: [linux] + + '@unrs/resolver-binding-linux-s390x-gnu@1.12.2': + resolution: {integrity: sha512-HYJtLfXq94q8iZNFT1lknx258wlkkWhZeUXJRqzKBBUJ00CvZ+N33zgbCqimLjsyw5Va6uUxhVa12mI+kaveEw==} + cpu: [s390x] + os: [linux] + + '@unrs/resolver-binding-linux-x64-gnu@1.12.2': + resolution: {integrity: sha512-mPsUhunKKDih5O96Y6enDQyHc1SqBPlY1E/SfMWDM3EdJ95Z9CArPeCVwCCqbP45ljvivdEk8Fxn+SIb1rDAJQ==} + cpu: [x64] + os: [linux] + + '@unrs/resolver-binding-linux-x64-musl@1.12.2': + resolution: {integrity: sha512-azrt6+5ydLd8Vt210AAFis/lZevSfPw93EJRIJG+xPu4WCJ8K0kppCTpMyLPcKT7H15M4Jnt2tMp5bOvCkRC6A==} + cpu: [x64] + os: [linux] + + '@unrs/resolver-binding-openharmony-arm64@1.12.2': + resolution: {integrity: sha512-YZ9hP4O0X9PQb8eO980qmLNGH4zT3I9+SZTdt0Pr0YyuGQhYKoOZkV02VzrzyOZJ5xIJ3UFIenKkUkGg8GjgWQ==} + cpu: [arm64] + os: [openharmony] + + '@unrs/resolver-binding-wasm32-wasi@1.12.2': + resolution: {integrity: sha512-tYFDIkMxSflfEc/h92ZWNsZlHSwgimbNHSO3PL2JWQHfCuC2q316jMyYU9TIWZsFK2bQwyK5VAdYgn8ygPj69A==} + engines: {node: '>=14.0.0'} + cpu: [wasm32] + + '@unrs/resolver-binding-win32-arm64-msvc@1.12.2': + resolution: {integrity: sha512-qzNyg3xL0VPQmCaUh+N5jSitce6k+uCBfMDesWRnlULOZaqUkaJ0ybdT+UqlAWJoQjuqfIU/0Ptx9bteN4D82g==} + cpu: [arm64] + os: [win32] + + '@unrs/resolver-binding-win32-ia32-msvc@1.12.2': + resolution: {integrity: sha512-WD9sY00OfpHVGfsnHZoA8jVT+esS/Bg8z8jzxp5BnDCjjwsuKsPQrzswwpFy4J1AUJbXPRfkpcX0mXrzeXW79g==} + cpu: [ia32] + os: [win32] + + '@unrs/resolver-binding-win32-x64-msvc@1.12.2': + resolution: {integrity: sha512-nAB74NfSNKknqQ1RrYj6uz8FcXEomu/MATJZxh/x+BArzN2U3JbOYC0APYzUIGhVY3m5hRxA8VPNdPBoG8txlA==} + cpu: [x64] + os: [win32] + + '@visx/curve@4.0.1-alpha.0': + resolution: {integrity: sha512-jRu61Uz274pV1zyioXmboyrLutYbnKsgjj4njSGCnhdXj5GkZvZbg+ThDb6oOzoAnJOBRLz4rzPlWvNJOzuVMg==} + + '@visx/event@4.0.1-alpha.0': + resolution: {integrity: sha512-EQqCMSv/s8NbFjo+hz3FKsvvYfP+2QslsFJ/24/O5l/W+7UC6J6aAvO0ujVwrTwdYbuQ+vhxKi1xdPdKR/qj1g==} + + '@visx/grid@4.0.1-alpha.0': + resolution: {integrity: sha512-rycutGmTHO+znNdPumheWMglm7YfpffvRwUkVy5zy4WoORIuKTMkDxwnOzHG2xMxU3EE/YCd37xFV5AxA30yeg==} + peerDependencies: + react: ^16.14.0 || ^17.0.0-0 || ^18.0.0-0 || ^19.0.0-0 + + '@visx/group@4.0.1-alpha.0': + resolution: {integrity: sha512-V19l7iQ7jccBv8kao/EByuI6o4xtxzzLV9nqVI1hRvmdzTVsuLpqlwzYCZUXJaTVvUWf8s4D2SQFjGkj/Nw+0w==} + peerDependencies: + react: ^16.14.0 || ^17.0.0-0 || ^18.0.0-0 || ^19.0.0-0 + + '@visx/point@4.0.1-alpha.0': + resolution: {integrity: sha512-ijTfr/Nx09f03vIj9nyTr3z4Xth4Y75427UaogJh6dnIRLMEFHQOwNu791sbfiNj0a+ZXuaE32h0vKrFe4/8Qg==} + + '@visx/responsive@4.0.1-alpha.0': + resolution: {integrity: sha512-o+1zGywQZY0+yOx3Iw87wc4bbPJRr/HnIukTwfOz4UVyj9pB1OQNVHB7OORO1+LBHJceWpB31co/ZV9KHncKrA==} + peerDependencies: + react: ^16.14.0 || ^17.0.0-0 || ^18.0.0-0 || ^19.0.0-0 + + '@visx/scale@4.0.1-alpha.0': + resolution: {integrity: sha512-nzjeE87vFSAXGWFiiNfBpNLAf0Q8Qmf6syvKLjqNi4kGZkdhbUll3E/59YsgWXmjM8+llPLWzGsP+JPvo5eq1A==} + + '@visx/shape@4.0.1-alpha.0': + resolution: {integrity: sha512-62QeiVNmPlterQGwhkEDcbq7M0MqY0lBsK5QKXtM9ZoPZWkuGV3aykA3+Xu20B2FAvyJq4LqJzBc7Sxr+EAdbA==} + peerDependencies: + react: ^16.14.0 || ^17.0.0-0 || ^18.0.0-0 || ^19.0.0-0 + + '@visx/vendor@4.0.0-alpha.0': + resolution: {integrity: sha512-6I+MuqXBcv9jnlcVowHoHKSdk9gXTWkHLKyqBwRWg7LY6A3Ei8SHfubpqGV5rBUSppxMq2RszPJUS6w+H0YgmQ==} + + '@webassemblyjs/ast@1.14.1': + resolution: {integrity: sha512-nuBEDgQfm1ccRp/8bCQrx1frohyufl4JlbMMZ4P1wpeOfDhF6FQkxZJ1b/e+PLwr6X1Nhw6OLme5usuBWYBvuQ==} + + '@webassemblyjs/floating-point-hex-parser@1.13.2': + resolution: {integrity: sha512-6oXyTOzbKxGH4steLbLNOu71Oj+C8Lg34n6CqRvqfS2O71BxY6ByfMDRhBytzknj9yGUPVJ1qIKhRlAwO1AovA==} + + '@webassemblyjs/helper-api-error@1.13.2': + resolution: {integrity: sha512-U56GMYxy4ZQCbDZd6JuvvNV/WFildOjsaWD3Tzzvmw/mas3cXzRJPMjP83JqEsgSbyrmaGjBfDtV7KDXV9UzFQ==} + + '@webassemblyjs/helper-buffer@1.14.1': + resolution: {integrity: sha512-jyH7wtcHiKssDtFPRB+iQdxlDf96m0E39yb0k5uJVhFGleZFoNw1c4aeIcVUPPbXUVJ94wwnMOAqUHyzoEPVMA==} + + '@webassemblyjs/helper-numbers@1.13.2': + resolution: {integrity: sha512-FE8aCmS5Q6eQYcV3gI35O4J789wlQA+7JrqTTpJqn5emA4U2hvwJmvFRC0HODS+3Ye6WioDklgd6scJ3+PLnEA==} + + '@webassemblyjs/helper-wasm-bytecode@1.13.2': + resolution: {integrity: sha512-3QbLKy93F0EAIXLh0ogEVR6rOubA9AoZ+WRYhNbFyuB70j3dRdwH9g+qXhLAO0kiYGlg3TxDV+I4rQTr/YNXkA==} + + '@webassemblyjs/helper-wasm-section@1.14.1': + resolution: {integrity: sha512-ds5mXEqTJ6oxRoqjhWDU83OgzAYjwsCV8Lo/N+oRsNDmx/ZDpqalmrtgOMkHwxsG0iI//3BwWAErYRHtgn0dZw==} + + '@webassemblyjs/ieee754@1.13.2': + resolution: {integrity: sha512-4LtOzh58S/5lX4ITKxnAK2USuNEvpdVV9AlgGQb8rJDHaLeHciwG4zlGr0j/SNWlr7x3vO1lDEsuePvtcDNCkw==} + + '@webassemblyjs/leb128@1.13.2': + resolution: {integrity: sha512-Lde1oNoIdzVzdkNEAWZ1dZ5orIbff80YPdHx20mrHwHrVNNTjNr8E3xz9BdpcGqRQbAEa+fkrCb+fRFTl/6sQw==} + + '@webassemblyjs/utf8@1.13.2': + resolution: {integrity: sha512-3NQWGjKTASY1xV5m7Hr0iPeXD9+RDobLll3T9d2AO+g3my8xy5peVyjSag4I50mR1bBSN/Ct12lo+R9tJk0NZQ==} + + '@webassemblyjs/wasm-edit@1.14.1': + resolution: {integrity: sha512-RNJUIQH/J8iA/1NzlE4N7KtyZNHi3w7at7hDjvRNm5rcUXa00z1vRz3glZoULfJ5mpvYhLybmVcwcjGrC1pRrQ==} + + '@webassemblyjs/wasm-gen@1.14.1': + resolution: {integrity: sha512-AmomSIjP8ZbfGQhumkNvgC33AY7qtMCXnN6bL2u2Js4gVCg8fp735aEiMSBbDR7UQIj90n4wKAFUSEd0QN2Ukg==} + + '@webassemblyjs/wasm-opt@1.14.1': + resolution: {integrity: sha512-PTcKLUNvBqnY2U6E5bdOQcSM+oVP/PmrDY9NzowJjislEjwP/C4an2303MCVS2Mg9d3AJpIGdUFIQQWbPds0Sw==} + + '@webassemblyjs/wasm-parser@1.14.1': + resolution: {integrity: sha512-JLBl+KZ0R5qB7mCnud/yyX08jWFw5MsoalJ1pQ4EdFlgj9VdXKGuENGsiCIjegI1W7p91rUlcB/LB5yRJKNTcQ==} + + '@webassemblyjs/wast-printer@1.14.1': + resolution: {integrity: sha512-kPSSXE6De1XOR820C90RIo2ogvZG+c3KiHzqUoO/F34Y2shGzesfqv7o57xrxovZJH/MetF5UjroJ/R/3isoiw==} + + '@xtuc/ieee754@1.2.0': + resolution: {integrity: sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA==} + + '@xtuc/long@4.2.2': + resolution: {integrity: sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ==} + + abstract-logging@2.0.1: + resolution: {integrity: sha512-2BjRTZxTPvheOvGbBslFSYOUkr+SjPtOnrLP33f+VIWLzezQpZcqVg7ja3L4dBXmzzgwT+a029jRx5PCi3JuiA==} + + accepts@2.0.0: + resolution: {integrity: sha512-5cvg6CtKwfgdmVqY1WIiXKc3Q1bkRqGLi+2W/6ao+6Y7gu/RCwRuAhGEzh5B4KlszSuTLgZYuqFqo5bImjNKng==} + engines: {node: '>= 0.6'} + + acorn-walk@8.3.5: + resolution: {integrity: sha512-HEHNfbars9v4pgpW6SO1KSPkfoS0xVOM/9UzkJltjlsHZmJasxg8aXkuZa7SMf8vKGIBhpUsPluQSqhJFCqebw==} + engines: {node: '>=0.4.0'} + + acorn@8.18.0: + resolution: {integrity: sha512-lGq+9yr1/GuAWaVYIHRjvvySG5/4VfKIvC8EWxStPdcDh/Ka7FG3twP6v4d5BkravUilhIAsG4Qj83t02LWUPQ==} + engines: {node: '>=0.4.0'} + hasBin: true + + ajv-formats@3.0.1: + resolution: {integrity: sha512-8iUql50EUR+uUcdRQ3HDqa6EVyo3docL8g5WJ3FNcWmu62IbkGUue/pEyLBW8VGKKucTPgqeks4fIU1DA4yowQ==} + peerDependencies: + ajv: ^8.0.0 + peerDependenciesMeta: + ajv: + optional: true + + ajv-keywords@5.1.0: + resolution: {integrity: sha512-YCS/JNFAUyr5vAuhk1DWm1CBxRHW9LbJ2ozWeemrIqpbsqKjHVxYPyi5GC0rjZIT5JxJ3virVTS8wk4i/Z+krw==} + peerDependencies: + ajv: ^8.8.2 + + ajv@8.20.0: + resolution: {integrity: sha512-Thbli+OlOj+iMPYFBVBfJ3OmCAnaSyNn4M1vz9T6Gka5Jt9ba/HIR56joy65tY6kx/FCF5VXNB819Y7/GUrBGA==} + + ansi-escapes@4.3.2: + resolution: {integrity: sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==} + engines: {node: '>=8'} + + ansi-regex@5.0.1: + resolution: {integrity: sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==} + engines: {node: '>=8'} + + ansi-regex@6.3.0: + resolution: {integrity: sha512-WpDfL7NO6j7tH88IDBNVdUJxDh9nmCteAVW9dsep846XdwF4naCBK+/tGLX3KJgcpgMRXCFlTM2hKGoK9FsdrQ==} + engines: {node: '>=12'} + + ansi-styles@4.3.0: + resolution: {integrity: sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==} + engines: {node: '>=8'} + + ansi-styles@5.2.0: + resolution: {integrity: sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==} + engines: {node: '>=10'} + + ansi-styles@6.2.3: + resolution: {integrity: sha512-4Dj6M28JB+oAH8kFkTLUo+a2jwOFkuqb3yucU0CANcRRUbxS0cP0nZYCGjcc3BNXwRIsUVmDGgzawme7zvJHvg==} + engines: {node: '>=12'} + + ansis@4.4.0: + resolution: {integrity: sha512-9k3v7xcHwgdO/DruxGIg4HtjvlAZlcnsX/mzqUb1t3NkYnl9kK2UJ+Gq0io+vQf7iT//BD/HB/NBkUR1LWxoeA==} + engines: {node: '>=14'} + + anymatch@3.1.3: + resolution: {integrity: sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==} + engines: {node: '>= 8'} + + append-field@1.0.0: + resolution: {integrity: sha512-klpgFSWLW1ZEs8svjfb7g4qWY0YS5imI82dTg+QahUvJ8YqAY0P10Uk8tTyh9ZGuYEZEMaeJYCF5BFuX552hsw==} + + arg@4.1.3: + resolution: {integrity: sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==} + + argparse@1.0.10: + resolution: {integrity: sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==} + + argparse@2.0.1: + resolution: {integrity: sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==} + + array-timsort@1.0.3: + resolution: {integrity: sha512-/+3GRL7dDAGEfM6TseQk/U+mi18TU2Ms9I3UlLdUMhz2hbvGNTKdj9xniwXfUqgYhHxRx0+8UnKkvlNwVU+cWQ==} + + asap@2.0.6: + resolution: {integrity: sha512-BSHWgDSAiKs50o2Re8ppvp3seVHXSRM44cdSsT9FfNEUUZLOGWVCsiWaRPWM1Znn+mqZ1OfVZ3z3DWEzSp7hRA==} + + asynckit@0.4.0: + resolution: {integrity: sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==} + + atomic-sleep@1.0.0: + resolution: {integrity: sha512-kNOjDqAh7px0XWNI+4QbzoiR/nTkHAWNud2uvnJquD1/x5a7EQZMJT0AczqK0Qn67oY/TTQ1LbUKajZpp3I9tQ==} + engines: {node: '>=8.0.0'} + + avvio@9.3.0: + resolution: {integrity: sha512-g2tQ7LE7oOSqDfwEm3M+ZCMTJc7KiZCdJ4UwyZJb5ckTKyYu50OYmvv0mCFXPuYXoM4zkSt8zM9XQ9KCvxA74A==} + + aws-ssl-profiles@1.1.2: + resolution: {integrity: sha512-NZKeq9AfyQvEeNlN0zSYAaWrmBffJh3IELMZfRpJVWgrpEbtEpnjvzqBPf+mxoI287JohRDoa+/nsfqqiZmF6g==} + engines: {node: '>= 6.0.0'} + + babel-jest@30.5.2: + resolution: {integrity: sha512-ES8WeJ2fNWPEDunyAtUfJ12nHyaWUloCHdkfK2oW5uSoQSUmjNKdWiGaXJITJwvFEWoD/evHEg/QoCXAvLaQqQ==} + engines: {node: ^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0} + peerDependencies: + '@babel/core': ^7.11.0 || ^8.0.0-0 + + babel-plugin-istanbul@8.0.0: + resolution: {integrity: sha512-18wCskrN3DgbuBmp1gr7LBGT8xdz5xhQQqFvFhVxbkl8VBCrMKQ2YtqBWtUal1Zrc1HTuX0011+Brjw78TCFkg==} + engines: {node: '>=18'} + + babel-plugin-jest-hoist@30.5.0: + resolution: {integrity: sha512-gtGo1B+u14jrZQv6TdSWIWkTqclboo7Qn+dFAGUOIuXLFuJKAdg3U5MIWzZnW4vfUb4dX9skmAMiby86e/SF4A==} + engines: {node: ^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0} + + babel-preset-current-node-syntax@1.2.0: + resolution: {integrity: sha512-E/VlAEzRrsLEb2+dv8yp3bo4scof3l9nR4lrld+Iy5NyVqgVYUJnDAmunkhPMisRI32Qc4iRiz425d8vM++2fg==} + peerDependencies: + '@babel/core': ^7.0.0 || ^8.0.0-0 + + babel-preset-jest@30.5.0: + resolution: {integrity: sha512-ZGPn5ClP4lBDpuOK8W1yQIOy359HmbnZv3suucAlIe+SEE9yDsxV4S2PjSbH2Vc97U+WmzYD7vw3kr8NsQ/i6w==} + engines: {node: ^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0} + peerDependencies: + '@babel/core': ^7.11.0 || ^8.0.0-beta.1 || ^8.0.0 + + balanced-match@1.0.2: + resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==} + + balanced-match@4.0.4: + resolution: {integrity: sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA==} + engines: {node: 18 || 20 || >=22} + + base64-js@1.5.1: + resolution: {integrity: sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==} + + baseline-browser-mapping@2.11.25: + resolution: {integrity: sha512-gMmEShwwq7FJqMwvfRwvCl00v4kN+KOfJqXn+f4nrufak5gNHJOksd/60Dvjuz7sI8Y5WiSFBa8FEYr+zoyqCw==} + engines: {node: '>=6.0.0'} + hasBin: true + + better-result@2.10.0: + resolution: {integrity: sha512-oQhh0y1qo2/ZKdAAEvHZAqKKiHOFU5k/bW96fE2ScgQOVkJRiHwB+nOS1SgFsYqRlxMDWvefXi9Q3px7QvgNDw==} + + bl@4.1.0: + resolution: {integrity: sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==} + + body-parser@2.3.0: + resolution: {integrity: sha512-2cGmJupaNgg+QUwVLAucDuWuoMZ6EX9iHDRswZ5lsNYEmwPaRknMPCLZz07yTzVq/83p4o/wzbDZbBrTvGGTIw==} + engines: {node: '>=18'} + + brace-expansion@2.1.7: + resolution: {integrity: sha512-uZbew1NqdmPDTMJ8ah1y+b+9QEJrfkXFk3RcTQw3X0jW/xRUvFKsg1CfQdSYGdTbXZWExtU3J3ccxtnfw1Fi0g==} + + brace-expansion@5.0.12: + resolution: {integrity: sha512-YovQ3rzhaLMIrDjNDMkNS01tea93qhEhG5xy8f6+R0l+dw3Ki+5sCoIoI942iuLZTHWogWktgwVDhU09iNEimQ==} + engines: {node: 20 || >=22} + + browserslist@4.29.0: + resolution: {integrity: sha512-3GSvyjvDI4Dur1Meg2BekJquu5uF+9R9a1+5M1Mde192eZoXbeXjzgOsgqPS2V8D5wrrip0gR5Hf/GhWQ9ZzaA==} + engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} + hasBin: true + + bs-logger@0.2.6: + resolution: {integrity: sha512-pd8DCoxmbgc7hyPKOvxtqNcjYoOsABPQdcCUjGp3d42VR2CX1ORhk2A87oqqu5R1kk+76nsxZupkmyd+MVtCog==} + engines: {node: '>= 6'} + + bser@2.1.1: + resolution: {integrity: sha512-gQxTNE/GAfIIrmHLUE3oJyp5FO6HRBfhjnw4/wMmA63ZGDJnWBmgY/lyQBpnDUkGmAhbSe39tx2d/iTOAfglwQ==} + + buffer-from@1.1.2: + resolution: {integrity: sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==} + + buffer@5.7.1: + resolution: {integrity: sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==} + + busboy@1.6.0: + resolution: {integrity: sha512-8SFQbg/0hQ9xy3UNTB0YEnsNBbWfhf7RtnzpL7TkBiTBRfrQ9Fxcnz7VJsleJpyp6rVLvXiuORqjlHi5q+PYuA==} + engines: {node: '>=10.16.0'} + + bytes@3.1.2: + resolution: {integrity: sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==} + engines: {node: '>= 0.8'} + + c12@3.3.4: + resolution: {integrity: sha512-cM0ApFQSBXuourJejzwv/AuPRvAxordTyParRVcHjjtXirtkzM0uK2L9TTn9s0cXZbG7E55jCivRQzoxYmRAlA==} + peerDependencies: + magicast: '*' + peerDependenciesMeta: + magicast: + optional: true + + call-bind-apply-helpers@1.0.2: + resolution: {integrity: sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==} + engines: {node: '>= 0.4'} + + call-bound@1.0.4: + resolution: {integrity: sha512-+ys997U96po4Kx/ABpBCqhA9EuxJaQWDQg7295H4hBphv3IZg0boBKuwYpt4YXp6MZ5AmZQnU/tyMTlRpaSejg==} + engines: {node: '>= 0.4'} + + callsites@3.1.0: + resolution: {integrity: sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==} + engines: {node: '>=6'} + + camelcase@5.3.1: + resolution: {integrity: sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==} + engines: {node: '>=6'} + + camelcase@6.3.0: + resolution: {integrity: sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==} + engines: {node: '>=10'} + + caniuse-lite@1.0.30001810: + resolution: {integrity: sha512-TITQPUkaz+aVk5GL6NhOdwk1aEaNTSDPsGFWrTuhKGtjTF70jL/Oht2W4c6rXUe5fu7Ie19VIahAXHIIiWWNeg==} + + chalk@4.1.2: + resolution: {integrity: sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==} + engines: {node: '>=10'} + + chalk@5.6.2: + resolution: {integrity: sha512-7NzBL0rN6fMUW+f7A6Io4h40qQlG+xGmtMxfbnH/K7TAtt8JQWVQK+6g0UXKMeVJoyV5EkkNsErQ8pVD3bLHbA==} + engines: {node: ^12.17.0 || ^14.13 || >=16.0.0} + + char-regex@1.0.2: + resolution: {integrity: sha512-kWWXztvZ5SBQV+eRgKFeh8q5sLuZY2+8WUIzlxWVTg+oGwY14qylx1KbKzHd8P6ZYkAg0xyIDU9JMHhyJMZ1jw==} + engines: {node: '>=10'} + + chardet@0.7.0: + resolution: {integrity: sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==} + + chardet@2.2.0: + resolution: {integrity: sha512-rddelWYNPRrXq6PtNEN2S3f6t9ILzvqaN5pVgi4kqt9jHQaXIial9PznB5iSPVlQSLNaaH22ItWz3EJtQ10+OA==} + + chokidar@5.0.0: + resolution: {integrity: sha512-TQMmc3w+5AxjpL8iIiwebF73dRDF4fBIieAqGn9RGCWaEVwQ6Fb2cGe31Yns0RRIzii5goJ1Y7xbMwo1TxMplw==} + engines: {node: '>= 20.19.0'} + + chrome-trace-event@1.0.4: + resolution: {integrity: sha512-rNjApaLzuwaOTjCiT8lSDdGN1APCiqkChLMJxJPWLunPAt5fy8xgU9/jNOchV84wfIxrA0lRQB7oCT8jrn/wrQ==} + engines: {node: '>=6.0'} + + ci-info@4.4.0: + resolution: {integrity: sha512-77PSwercCZU2Fc4sX94eF8k8Pxte6JAwL4/ICZLFjJLqegs7kCuAsqqj/70NQF6TvDpgFjkubQB2FW2ZZddvQg==} + engines: {node: '>=8'} + + cjs-module-lexer@2.2.1: + resolution: {integrity: sha512-Ca8swihM+/4yKecYHY52kgJd300hi2lADU/a1RxNTRe+RJ9jvqQlESpbz9DnG9mowez8qwXHB8qYdIUw9e+F5Q==} + + classnames@2.5.1: + resolution: {integrity: sha512-saHYOzhIQs6wy2sVxTM6bUDsQO4F50V9RQ22qBpEdCW+I+/Wmke2HOl6lS6dTpdxVhb88/I6+Hs+438c3lfUow==} + + cli-cursor@3.1.0: + resolution: {integrity: sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==} + engines: {node: '>=8'} + + cli-cursor@5.0.0: + resolution: {integrity: sha512-aCj4O5wKyszjMmDT4tZj93kxyydN/K5zPWSCe6/0AV/AA1pqe5ZBIw0a2ZfPQV7lL5/yb5HsUreJ6UFAF1tEQw==} + engines: {node: '>=18'} + + cli-progress@3.12.0: + resolution: {integrity: sha512-tRkV3HJ1ASwm19THiiLIXLO7Im7wlTuKnvkYaTkyoAPefqjNg7W7DHKUlGRxy9vxDvbyCYQkQozvptuMkGCg8A==} + engines: {node: '>=4'} + + cli-spinners@2.9.2: + resolution: {integrity: sha512-ywqV+5MmyL4E7ybXgKys4DugZbX0FC6LnwrhjuykIjnK9k8OQacQ7axGKnjDXWNhns0xot3bZI5h55H8yo9cJg==} + engines: {node: '>=6'} + + cli-spinners@3.4.0: + resolution: {integrity: sha512-bXfOC4QcT1tKXGorxL3wbJm6XJPDqEnij2gQ2m7ESQuE+/z9YFIWnl/5RpTiKWbMq3EVKR4fRLJGn6DVfu0mpw==} + engines: {node: '>=18.20'} + + cli-table3@0.6.5: + resolution: {integrity: sha512-+W/5efTR7y5HRD7gACw9yQjqMVvEMLBHmboM/kPWam+H+Hmyrgjh6YncVKK122YZkXrLudzTuAukUw9FnMf7IQ==} + engines: {node: 10.* || >= 12.*} + + cli-width@3.0.0: + resolution: {integrity: sha512-FxqpkPPwu1HjuN93Omfm4h8uIanXofW0RxVEW3k5RKx+mJJYSthzNhp32Kzxxy3YAEZ/Dc/EWN1vZRY0+kOhbw==} + engines: {node: '>= 10'} + + cli-width@4.1.0: + resolution: {integrity: sha512-ouuZd4/dm2Sw5Gmqy6bGyNNNe1qt9RpmxveLSO7KcgsTnU7RXfsw+/bukWGo1abgBiMAic068rclZsO4IWmmxQ==} + engines: {node: '>= 12'} + + cliui@8.0.1: + resolution: {integrity: sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==} + engines: {node: '>=12'} + + clone@1.0.4: + resolution: {integrity: sha512-JQHZ2QMW6l3aH/j6xCqQThY/9OH4D/9ls34cgkUBiEeocRTU04tHfKPBsUK1PqZCUQM7GiA0IIXJSuXHI64Kbg==} + engines: {node: '>=0.8'} + + cluster-key-slot@1.1.1: + resolution: {integrity: sha512-rwHwUfXL40Chm1r08yrhU3qpUvdVlgkKNeyeGPOxnW8/SyVDvgRaed/Uz54AqWNaTCAThlj6QAs3TZcKI0xDEw==} + engines: {node: '>=0.10.0'} + + co@4.6.0: + resolution: {integrity: sha512-QVb0dM5HvG+uaxitm8wONl7jltx8dqhfU33DcqtOZcLSVIKSDDLDi7+0LbAKiyI8hD9u42m2YxXSkMGWThaecQ==} + engines: {iojs: '>= 1.0.0', node: '>= 0.12.0'} + + collect-v8-coverage@1.0.3: + resolution: {integrity: sha512-1L5aqIkwPfiodaMgQunkF1zRhNqifHBmtbbbxcr6yVxxBnliw4TDOW6NxpO8DJLgJ16OT+Y4ztZqP6p/FtXnAw==} + + color-convert@2.0.1: + resolution: {integrity: sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==} + engines: {node: '>=7.0.0'} + + color-name@1.1.4: + resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==} + + colorette@2.0.20: + resolution: {integrity: sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w==} + + combined-stream@1.0.8: + resolution: {integrity: sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==} + engines: {node: '>= 0.8'} + + commander@15.0.0: + resolution: {integrity: sha512-z67u4ZhzCL/Tydu1lJARtEZYWbWaN7oYLHbsuzocr6y4N6WZAagG3RQ4FW61V1/0+jImpj293XfrcYnd1qxtPg==} + engines: {node: '>=22.12.0'} + + commander@2.20.3: + resolution: {integrity: sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==} + + commander@4.1.1: + resolution: {integrity: sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==} + engines: {node: '>= 6'} + + comment-json@5.0.0: + resolution: {integrity: sha512-uiqLcOiVDJtBP8WGkZHEP+FZIhTzP1dxvn59EfoYUi9gqupjrBWVQkO2atDrbnKPwLeotFYDsuNb26uBMqB+hw==} + engines: {node: '>= 6'} + + component-emitter@1.3.1: + resolution: {integrity: sha512-T0+barUSQRTUQASh8bx02dl+DhF54GtIDY13Y3m9oWTklKbb3Wv974meRpeZ3lp1JpLVECWWNHC4vaG2XHXouQ==} + + confbox@0.2.4: + resolution: {integrity: sha512-ysOGlgTFbN2/Y6Cg3Iye8YKulHw+R2fNXHrgSmXISQdMnomY6eNDprVdW9R5xBguEqI954+S6709UyiO7B+6OQ==} + + confbox@0.3.1: + resolution: {integrity: sha512-cKUSoKa8YxFZZSmraVi7onONx3amu77ngK3kGpsYHDH7drPwCRkQE1RYMPlLRrMtnciRj274XNRxcHxnKmDSnA==} + + content-disposition@1.1.0: + resolution: {integrity: sha512-5jRCH9Z/+DRP7rkvY83B+yGIGX96OYdJmzngqnw2SBSxqCFPd0w2km3s5iawpGX8krnwSGmF0FW5Nhr0Hfai3g==} + engines: {node: '>=18'} + + content-disposition@3.0.0: + resolution: {integrity: sha512-ZH/0Xs9rMIFWCOmGdmS9eHBTF62qqQYNz4nVjQhkdIO/a0fCP4UIM3mRz/wiqL0L14YgAz/1xio4OaSY4+ON/A==} + engines: {node: '>=22'} + + content-type@1.0.5: + resolution: {integrity: sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==} + engines: {node: '>= 0.6'} + + content-type@2.1.0: + resolution: {integrity: sha512-mj7UPXE0jaqaOsukNZRUEfEi2AcL7C/vwmwcHV0O97eO1E1pxBZuyjlZrx5seTaNBg1U6+o35wpa35Qfcc+7ag==} + engines: {node: '>=18'} + + convert-source-map@2.0.0: + resolution: {integrity: sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==} + + cookie-signature@1.2.2: + resolution: {integrity: sha512-D76uU73ulSXrD1UXF4KE2TMxVVwhsnCgfAyTg9k8P6KGZjlXKrOLe4dJQKI3Bxi5wjesZoFXJWElNWBjPZMbhg==} + engines: {node: '>=6.6.0'} + + cookie@0.7.2: + resolution: {integrity: sha512-yki5XnKuf750l50uGTllt6kKILY4nQ1eNIQatoXEByZ5dWgnKqbnqmTrBE5B4N7lrMJKQ2ytWMiTO2o0v6Ew/w==} + engines: {node: '>= 0.6'} + + cookie@1.1.1: + resolution: {integrity: sha512-ei8Aos7ja0weRpFzJnEA9UHJ/7XQmqglbRwnf2ATjcB9Wq874VKH9kfjjirM6UhU2/E5fFYadylyhFldcqSidQ==} + engines: {node: '>=18'} + + cookiejar@2.1.4: + resolution: {integrity: sha512-LDx6oHrK+PhzLKJU9j5S7/Y3jM/mUHvD/DeI1WQmJn652iPC5Y4TBzC9l+5OMOXlyTTA+SmVUPm0HQUwpD5Jqw==} + + cors@2.8.6: + resolution: {integrity: sha512-tJtZBBHA6vjIAaF6EnIaq6laBBP9aq/Y3ouVJjEfoHbRBcHBAHYcMh/w8LDrk2PvIMMq8gmopa5D4V8RmbrxGw==} + engines: {node: '>= 0.10'} + + create-require@1.1.1: + resolution: {integrity: sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==} + + cross-spawn@7.0.6: + resolution: {integrity: sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==} + engines: {node: '>= 8'} + + csstype@3.2.3: + resolution: {integrity: sha512-z1HGKcYy2xA8AGQfwrn0PAy+PB7X/GSj3UVJW9qKyn43xWa+gl5nXmU4qqLMRzWVLFC8KusUX8T/0kCiOYpAIQ==} + + d3-array@3.2.1: + resolution: {integrity: sha512-gUY/qeHq/yNqqoCKNq4vtpFLdoCdvyNpWoC/KNjhGbhDuQpAM9sIQQKkXSNpXa9h5KySs/gzm7R88WkUutgwWQ==} + engines: {node: '>=12'} + + d3-array@3.2.4: + resolution: {integrity: sha512-tdQAmyA18i4J7wprpYq8ClcxZy3SC31QMeByyCFyRt7BVHdREQZ5lpzoe5mFEYZUWe+oq8HBvk9JjpibyEV4Jg==} + engines: {node: '>=12'} + + d3-color@3.1.0: + resolution: {integrity: sha512-zg/chbXyeBtMQ1LbD/WSoW2DpC3I0mpmPdW+ynRTj/x2DAWYrIY7qeZIHidozwV24m4iavr15lNwIwLxRmOxhA==} + engines: {node: '>=12'} + + d3-delaunay@6.0.2: + resolution: {integrity: sha512-IMLNldruDQScrcfT+MWnazhHbDJhcRJyOEBAJfwQnHle1RPh6WDuLvxNArUju2VSMSUuKlY5BGHRJ2cYyoFLQQ==} + engines: {node: '>=12'} + + d3-format@3.1.0: + resolution: {integrity: sha512-YyUI6AEuY/Wpt8KWLgZHsIU86atmikuoOmCfommt0LYHiQSPjvX2AcFc38PX0CBpr2RCyZhjex+NS/LPOv6YqA==} + engines: {node: '>=12'} + + d3-geo@3.1.0: + resolution: {integrity: sha512-JEo5HxXDdDYXCaWdwLRt79y7giK8SbhZJbFWXqbRTolCHFI5jRqteLzCsq51NKbUoX0PjBVSohxrx+NoOUujYA==} + engines: {node: '>=12'} + + d3-interpolate@3.0.1: + resolution: {integrity: sha512-3bYs1rOD33uo8aqJfKP3JWPAibgw8Zm2+L9vBKEHJ2Rg+viTR7o5Mmv5mZcieN+FRYaAOWX5SJATX6k1PWz72g==} + engines: {node: '>=12'} + + d3-path@3.1.0: + resolution: {integrity: sha512-p3KP5HCf/bvjBSSKuXid6Zqijx7wIfNW+J/maPs+iwR35at5JCbLUT0LzF1cnjbCHWhqzQTIN2Jpe8pRebIEFQ==} + engines: {node: '>=12'} + + d3-scale@4.0.2: + resolution: {integrity: sha512-GZW464g1SH7ag3Y7hXjf8RoUuAFIqklOAq3MRl4OaWabTFJY9PN/E1YklhXLh+OQ3fM9yS2nOkCoS+WLZ6kvxQ==} + engines: {node: '>=12'} + + d3-shape@3.2.0: + resolution: {integrity: sha512-SaLBuwGm3MOViRq2ABk3eLoxwZELpH6zhl3FbAoJ7Vm1gofKx6El1Ib5z23NUEhF9AsGl7y+dzLe5Cw2AArGTA==} + engines: {node: '>=12'} + + d3-time-format@4.1.0: + resolution: {integrity: sha512-dJxPBlzC7NugB2PDLwo9Q8JiTR3M3e4/XANkreKSUxF8vvXKqm1Yfq4Q5dl8budlunRVlUUaDUgFt7eA8D6NLg==} + engines: {node: '>=12'} + + d3-time@3.1.0: + resolution: {integrity: sha512-VqKjzBLejbSMT4IgbmVgDjpkYrNWUYJnbCGo874u7MMKIWsILRX+OpX/gTk8MqjpT1A/c6HY2dCA77ZN0lkQ2Q==} + engines: {node: '>=12'} + + dateformat@4.6.3: + resolution: {integrity: sha512-2P0p0pFGzHS5EMnhdxQi7aJN+iMheud0UhG4dlE1DLAlvL8JHjJJTX/CSm4JXwV0Ka5nGk3zC5mcb5bUQUxxMA==} + + debug@4.4.3: + resolution: {integrity: sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==} + engines: {node: '>=6.0'} + peerDependencies: + supports-color: '*' + peerDependenciesMeta: + supports-color: + optional: true + + dedent@1.7.2: + resolution: {integrity: sha512-WzMx3mW98SN+zn3hgemf4OzdmyNhhhKz5Ay0pUfQiMQ3e1g+xmTJWp/pKdwKVXhdSkAEGIIzqeuWrL3mV/AXbA==} + peerDependencies: + babel-plugin-macros: ^3.1.0 + peerDependenciesMeta: + babel-plugin-macros: + optional: true + + deepmerge-ts@7.1.5: + resolution: {integrity: sha512-HOJkrhaYsweh+W+e74Yn7YStZOilkoPb6fycpwNLKzSPtruFs48nYis0zy5yJz1+ktUhHxoRDJ27RQAWLIJVJw==} + engines: {node: '>=16.0.0'} + + deepmerge@4.3.1: + resolution: {integrity: sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==} + engines: {node: '>=0.10.0'} + + defaults@1.0.4: + resolution: {integrity: sha512-eFuaLoy/Rxalv2kr+lqMlUnrDWV+3j4pljOIJgLIhI058IQfWJ7vXhyEIHu+HtC738klGALYxOKDO0bQP3tg8A==} + + defu@6.1.7: + resolution: {integrity: sha512-7z22QmUWiQ/2d0KkdYmANbRUVABpZ9SNYyH5vx6PZ+nE5bcC0l7uFvEfHlyld/HcGBFTL536ClDt3DEcSlEJAQ==} + + delaunator@5.1.0: + resolution: {integrity: sha512-AGrQ4QSgssa1NGmWmLPqN5NY2KajF5MqxetNEO+o0n3ZwZZeTmt7bBnvzHWrmkZFxGgr4HdyFgelzgi06otLuQ==} + + delayed-stream@1.0.0: + resolution: {integrity: sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==} + engines: {node: '>=0.4.0'} + + denque@2.1.0: + resolution: {integrity: sha512-HVQE3AAb/pxF8fQAoiqpvg9i3evqug3hoiwakOyZAwJm+6vZehbkYXZ0l4JxS+I3QxM97v5aaRNhj8v5oBhekw==} + engines: {node: '>=0.10'} + + depd@2.0.0: + resolution: {integrity: sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==} + engines: {node: '>= 0.8'} + + dequal@2.0.3: + resolution: {integrity: sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA==} + engines: {node: '>=6'} + + destr@2.0.5: + resolution: {integrity: sha512-ugFTXCtDZunbzasqBxrK93Ik/DRYsO6S/fedkWEMKqt04xZ4csmnmwGDBAb07QWNaGMAmnTIemsYZCksjATwsA==} + + detect-libc@2.1.2: + resolution: {integrity: sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ==} + engines: {node: '>=8'} + + detect-newline@3.1.0: + resolution: {integrity: sha512-TLz+x/vEXm/Y7P7wn1EJFNLxYpUD4TgMosxY6fAVJUnJMbupHBOncxyWUG9OpTaH9EBD7uFI5LfEgmMOc54DsA==} + engines: {node: '>=8'} + + dezalgo@1.0.4: + resolution: {integrity: sha512-rXSP0bf+5n0Qonsb+SVVfNfIsimO4HEtmnIpPHY8Q1UCzKlQrDMfdobr8nJOOsRgWCyMRqeSBQzmWUMq7zvVig==} + + diff@4.0.4: + resolution: {integrity: sha512-X07nttJQkwkfKfvTPG/KSnE2OMdcUCao6+eXF3wmnIQRn2aPAHH3VxDbDOdegkd6JbPsXqShpvEOHfAT+nCNwQ==} + engines: {node: '>=0.3.1'} + + dotenv@17.4.2: + resolution: {integrity: sha512-nI4U3TottKAcAD9LLud4Cb7b2QztQMUEfHbvhTH09bqXTxnSie8WnjPALV/WMCrJZ6UV/qHJ6L03OqO3LcdYZw==} + engines: {node: '>=12'} + + dotenv@18.0.7: + resolution: {integrity: sha512-QEvMEF8ca3GNZJJnAbOgxpj5ULhBvnMcURp+XKrtvqFNPgjBvYoswQ0Jl2cO7JzCjxZjJhr9ZuIEhlrRxMft/Q==} + engines: {node: '>=12'} + hasBin: true + + dunder-proto@1.0.1: + resolution: {integrity: sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==} + engines: {node: '>= 0.4'} + + eastasianwidth@0.2.0: + resolution: {integrity: sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==} + + ee-first@1.1.1: + resolution: {integrity: sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==} + + effect@3.20.0: + resolution: {integrity: sha512-qMLfDJscrNG8p/aw+IkT9W7fgj50Z4wG5bLBy0Txsxz8iUHjDIkOgO3SV0WZfnQbNG2VJYb0b+rDLMrhM4+Krw==} + + electron-to-chromium@1.5.433: + resolution: {integrity: sha512-5lCAbyZBjtmUt/RAGHRqrL2q0oEFRThDAsZHHDn9XHa89Qw7gMYOeSicBTy+AHfvo0r6vwsZvqNJTQIQy1BLzA==} + + elkjs@0.11.1: + resolution: {integrity: sha512-zxxR9k+rx5ktMwT/FwyLdPCrq7xN6e4VGGHH8hA01vVYKjTFik7nHOxBnAYtrgYUB1RpAiLvA1/U2YraWxyKKg==} + + emittery@0.13.1: + resolution: {integrity: sha512-DeWwawk6r5yR9jFgnDKYt4sLS0LmHJJi3ZOnb5/JdbYwj3nW+FxQnHIjhBKz8YLC7oRNPVM9NQ47I3CVx34eqQ==} + engines: {node: '>=12'} + + emoji-regex@8.0.0: + resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==} + + emoji-regex@9.2.2: + resolution: {integrity: sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==} + + emojilib@2.4.0: + resolution: {integrity: sha512-5U0rVMU5Y2n2+ykNLQqMoqklN9ICBT/KsvC1Gz6vqHbz2AXXGkG+Pm5rMWk/8Vjrr/mY9985Hi8DYzn1F09Nyw==} + + empathic@2.0.0: + resolution: {integrity: sha512-i6UzDscO/XfAcNYD75CfICkmfLedpyPDdozrLMmQc5ORaQcdMoc21OnlEylMIqI7U8eniKrPMxxtj8k0vhmJhA==} + engines: {node: '>=14'} + + encodeurl@2.0.0: + resolution: {integrity: sha512-Q0n9HRi4m6JuGIV1eFlmvJB7ZEVxu93IrMyiMsGC0lrMJMWzRgx6WGquyfQgZVb31vhGgXnfmPNNXmxnOkRBrg==} + engines: {node: '>= 0.8'} + + end-of-stream@1.4.5: + resolution: {integrity: sha512-ooEGc6HP26xXq/N+GCGOT0JKCLDGrq2bQUZrQ7gyrJiZANJ/8YDTxTpQBXGMn+WbIQXNVpyWymm7KYVICQnyOg==} + + enhanced-resolve@5.25.1: + resolution: {integrity: sha512-nGXts5znJzmWPu+mIE9izCOzdg63oJca2mDzGWWTth7sr4aCToKcoyFVBQwN75Ij5Pf6p510EwkTqViTRzDV+w==} + engines: {node: '>=10.13.0'} + + env-paths@3.0.0: + resolution: {integrity: sha512-dtJUTepzMW3Lm/NPxRf3wP4642UWhjL2sQxc+ym2YMj1m/H2zDNQOlezafzkHwn6sMstjHTwG6iQQsctDW/b1A==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + + error-ex@1.3.4: + resolution: {integrity: sha512-sqQamAnR14VgCr1A618A3sGrygcpK+HEbenA/HiEAkkUwcZIIB/tgWqHFxWgOyDh4nB4JCRimh79dR5Ywc9MDQ==} + + es-define-property@1.0.1: + resolution: {integrity: sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==} + engines: {node: '>= 0.4'} + + es-errors@1.3.0: + resolution: {integrity: sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==} + engines: {node: '>= 0.4'} + + es-module-lexer@2.3.2: + resolution: {integrity: sha512-poHGpORABojJJucnV9KbOavETW8lBVnphkW77ER5/BQ5Fz7oXSoCNek7IH3vR5nRjdsEz926ibFYX8KtLQmdyw==} + + es-object-atoms@1.1.2: + resolution: {integrity: sha512-HWcBoN6NileqtSydK2FqHbS/LoDd2pqrnQHLyJzBj4kOp/ky2MWMN694xOfkK8/SnUsW2DH7EfyVlydKCsm1Zw==} + engines: {node: '>= 0.4'} + + es-set-tostringtag@2.1.0: + resolution: {integrity: sha512-j6vWzfrGVfyXxge+O0x5sh6cvxAog0a/4Rdd2K36zCMV5eJ+/+tOAngRO8cODMNWbVRdVlmGZQL2YS3yR8bIUA==} + engines: {node: '>= 0.4'} + + es-toolkit@1.51.0: + resolution: {integrity: sha512-zC2lQGkM7QX+Gm6iM3+WIdZJzthsEd14LvRNJneSO2hzyz/zNBENR8+YXWo1cKxgPBtV6ksPYHELbcwBRzmdCw==} + + escalade@3.2.0: + resolution: {integrity: sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==} + engines: {node: '>=6'} + + escape-html@1.0.3: + resolution: {integrity: sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==} + + escape-string-regexp@1.0.5: + resolution: {integrity: sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==} + engines: {node: '>=0.8.0'} + + escape-string-regexp@2.0.0: + resolution: {integrity: sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==} + engines: {node: '>=8'} + + esprima@4.0.1: + resolution: {integrity: sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==} + engines: {node: '>=4'} + hasBin: true + + etag@1.8.1: + resolution: {integrity: sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==} + engines: {node: '>= 0.6'} + + events@3.3.0: + resolution: {integrity: sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==} + engines: {node: '>=0.8.x'} + + execa@5.1.1: + resolution: {integrity: sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==} + engines: {node: '>=10'} + + exit-x@0.2.2: + resolution: {integrity: sha512-+I6B/IkJc1o/2tiURyz/ivu/O0nKNEArIUB5O7zBrlDVJr22SCLH3xTeEry428LvFhRzIA1g8izguxJ/gbNcVQ==} + engines: {node: '>= 0.8.0'} + + expect@30.5.2: + resolution: {integrity: sha512-0LNuMvs8/5mRYhnCR4k+lGV7fqPMs6Bnksda4S3zsCUmdxBpAn4zU4NNzXdq1pMKe/H4W5t/zVIDSJ/H3e0vDA==} + engines: {node: ^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0} + + express@5.2.1: + resolution: {integrity: sha512-hIS4idWWai69NezIdRt2xFVofaF4j+6INOpJlVOLDO8zXGpUVEVzIYk12UUi2JzjEzWL3IOAxcTubgz9Po0yXw==} + engines: {node: '>= 18'} + + exsolve@1.1.3: + resolution: {integrity: sha512-kuzL9zherLQoqDeQaS55AiiIg1kb4KYXaSusTtgZTPlvKP2gGCI82LNmBNh5RjDVUXIcmgx+/Mx7vPwRzBbhJA==} + + external-editor@3.1.0: + resolution: {integrity: sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew==} + engines: {node: '>=4'} + + fast-check@3.23.2: + resolution: {integrity: sha512-h5+1OzzfCC3Ef7VbtKdcv7zsstUQwUDlYpUTvjeUsJAssPgLn7QzbboPtL5ro04Mq0rPOsMzl7q5hIbRs2wD1A==} + engines: {node: '>=8.0.0'} + + fast-copy@4.1.1: + resolution: {integrity: sha512-A4QTJmuiztpGtr6AMeJts9R4hbj2ZBUwtOaKrG6rw2y7t6+IaJKjz5M3XDs8BUznxDH43FVc6A0y/gWlMl4UtA==} + + fast-decode-uri-component@1.0.1: + resolution: {integrity: sha512-WKgKWg5eUxvRZGwW8FvfbaH7AXSh2cL+3j5fMGzUMCxWBJ3dV3a7Wz8y2f/uQ0e3B6WmodD3oS54jTQ9HVTIIg==} + + fast-deep-equal@3.1.3: + resolution: {integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==} + + fast-json-stable-stringify@2.1.0: + resolution: {integrity: sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==} + + fast-json-stringify@7.0.1: + resolution: {integrity: sha512-eRSayARSbbwlBjpP4vnTTIRD5QPcIrmihPxDeN1DtKnHPg66UuJLx+8hlK1kaFdjvzyQ/dzALoi4vwAQ+T+iZA==} + + fast-querystring@1.1.2: + resolution: {integrity: sha512-g6KuKWmFXc0fID8WWH0jit4g0AGBoJhCkJMb1RmbsSEUNvQ+ZC8D6CUZ+GtF8nMzSPXnhiePyyqqipzNNEnHjg==} + + fast-safe-stringify@2.1.1: + resolution: {integrity: sha512-W+KJc2dmILlPplD/H4K9l9LcAHAfPtP6BY84uVLXQ6Evcz9Lcg33Y2z1IVblT6xdY54PXYVHEv+0Wpq8Io6zkA==} + + fast-string-truncated-width@3.0.3: + resolution: {integrity: sha512-0jjjIEL6+0jag3l2XWWizO64/aZVtpiGE3t0Zgqxv0DPuxiMjvB3M24fCyhZUO4KomJQPj3LTSUnDP3GpdwC0g==} + + fast-string-width@3.0.2: + resolution: {integrity: sha512-gX8LrtNEI5hq8DVUfRQMbr5lpaS4nMIWV+7XEbXk2b8kiQIizgnlr12B4dA3ZEx3308ze0O4Q1R+cHts8kyUJg==} + + fast-uri@3.1.8: + resolution: {integrity: sha512-GZMtZUTNRpOVIECoXwLNZS5xUGE+mVNbTB8h/7Rwh2TFWcBQiPzTgyZi05BF9UMZKkLJv8XBRJTlU7zg8+ZfMg==} + + fast-uri@4.2.1: + resolution: {integrity: sha512-TmHQgewjHtMq1E5QKA0tOE0yeYGQs25KZC/ziJpubRtWI15W92e6vPFydWOeZBVROSHBYw/QhD9d5OefdD6LDg==} + + fast-wrap-ansi@0.2.2: + resolution: {integrity: sha512-7F2Fl+TjRSenLqlU3UjSH0iyqopqoZIu7eZVpEirP2g1GtWa2G/ecEmBdgz31+Mxr+ELclgg6sokpSFIQiZ02Q==} + + fastify-plugin@6.0.0: + resolution: {integrity: sha512-fZOty7z3O7vOliF6d8bHE3wiEh1KcNnKEQensSgTk9C1DvN6nRLS++XVd86v33Hw/8u9Un8A1zDrQ8ujcQDHEg==} + + fastify@5.12.1: + resolution: {integrity: sha512-FWi+tQvwxR/PeRX7Z2mhfEF5ozJ3jn9asiiclzKXNSzJRHAYcU924aIOKAdHFJ+YIKieh3cqr1IwCOvTr41B3Q==} + + fastq@1.20.3: + resolution: {integrity: sha512-XKv5nnLs6nLF71NgiKJLIZFLkPyIEuOselLG7ujZnGrRfQK8HpvY+WqKhAJUAdLomwVHErVS4LfxFlPq0/FTAw==} + + fb-watchman@2.0.2: + resolution: {integrity: sha512-p5161BqbuCaSnB8jIbzQHOlpgsPmK5rJVDfDKO91Axs5NC1uu3HRQm6wt9cd9/+GtQQIO53JdGXXoyDpTAsgYA==} + + fdir@6.5.0: + resolution: {integrity: sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==} + engines: {node: '>=12.0.0'} + peerDependencies: + picomatch: ^3 || ^4 + peerDependenciesMeta: + picomatch: + optional: true + + figures@3.2.0: + resolution: {integrity: sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg==} + engines: {node: '>=8'} + + file-type@22.1.1: + resolution: {integrity: sha512-sEB0oStmeLGtpmSAD88RDNuLsvhv4iC3u0lE25CUvfCULvj49xoQ3l3K525Vn+ZzsZ6DOLajQCV6RmhwwhqiJg==} + engines: {node: '>=22'} + + finalhandler@2.1.1: + resolution: {integrity: sha512-S8KoZgRZN+a5rNwqTxlZZePjT/4cnm0ROV70LedRHZ0p8u9fRID0hJUZQpkKLzro8LfmC8sx23bY6tVNxv8pQA==} + engines: {node: '>= 18.0.0'} + + find-my-way@9.7.0: + resolution: {integrity: sha512-f2JHn75x2JlwUwLenZypgczR7YWMb/uO9BvUXtus+JMgkbIkLADd38cI4EiV+OQqrGo1Zlq6V8wnqMJ8e62wUQ==} + engines: {node: '>=20'} + + find-my-way@9.9.0: + resolution: {integrity: sha512-sJsgZ1sQH2UDuowPuMKg8az7Qc8F0jnj+SKkFWU/+T0xcFlgV5skgXOGUqmQzOdmW6ALA7AhJINWx3qFBkbLHA==} + engines: {node: '>=20'} + + find-up@4.1.0: + resolution: {integrity: sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==} + engines: {node: '>=8'} + + foreground-child@3.3.1: + resolution: {integrity: sha512-gIXjKqtFuWEgzFRJA9WCQeSJLZDjgJUOMCMzxtvFq/37KojM1BFGufqsCy0r4qSQmYLsZYMeyRqzIWOMup03sw==} + engines: {node: '>=14'} + + form-data@4.0.6: + resolution: {integrity: sha512-vKatAh4SlVfgbv+YtmhiRjhEMJsYpsG1Y2rMQtR+SVSbytsSD1YGzDIcrAJmdFec88u/+VoGmxnl+80gL1tRCQ==} + engines: {node: '>= 6'} + + formidable@3.5.4: + resolution: {integrity: sha512-YikH+7CUTOtP44ZTnUhR7Ic2UASBPOqmaRkRKxRbywPTe5VxF7RRCck4af9wutiZ/QKM5nME9Bie2fFaPz5Gug==} + engines: {node: '>=14.0.0'} + + forwarded@0.2.0: + resolution: {integrity: sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==} + engines: {node: '>= 0.6'} + + fresh@2.0.0: + resolution: {integrity: sha512-Rx/WycZ60HOaqLKAi6cHRKKI7zxWbJ31MhntmtwMoaTeF7XFH9hhBp8vITaMidfljRQ6eYWCKkaTK+ykVJHP2A==} + engines: {node: '>= 0.8'} + + function-bind@1.1.2: + resolution: {integrity: sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==} + + generate-function@2.3.1: + resolution: {integrity: sha512-eeB5GfMNeevm/GRYq20ShmsaGcmI81kIX2K9XQx5miC8KdHaC6Jm0qQ8ZNeGOi7wYB8OsdxKs+Y2oVuTFuVwKQ==} + + gensync@1.0.0-beta.2: + resolution: {integrity: sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==} + engines: {node: '>=6.9.0'} + + get-caller-file@2.0.5: + resolution: {integrity: sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==} + engines: {node: 6.* || 8.* || >= 10.*} + + get-east-asian-width@1.7.0: + resolution: {integrity: sha512-XjH1AECxf0giL2V1aU8vKyRR2ppRUb5c0EvT7zuJTokQ74bNo52zOtghqdWIqrhUD79fo3x0WfKZdOqxF6LG1Q==} + engines: {node: '>=18'} + + get-intrinsic@1.3.0: + resolution: {integrity: sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==} + engines: {node: '>= 0.4'} + + get-package-type@0.1.0: + resolution: {integrity: sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q==} + engines: {node: '>=8.0.0'} + + get-port-please@3.2.0: + resolution: {integrity: sha512-I9QVvBw5U/hw3RmWpYKRumUeaDgxTPd401x364rLmWBJcOQ753eov1eTgzDqRG9bqFIfDc7gfzcQEWrUri3o1A==} + + get-proto@1.0.1: + resolution: {integrity: sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==} + engines: {node: '>= 0.4'} + + get-stream@6.0.1: + resolution: {integrity: sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==} + engines: {node: '>=10'} + + giget@3.3.1: + resolution: {integrity: sha512-r+mvuDjrjMpsdw46Kmeydb8bdHm7wOKw8wNBtTndkjbPjgAp5oUJUxRE76wZFknxIPokfWvep2qSXK37aXE6zg==} + hasBin: true + + glob@10.5.0: + resolution: {integrity: sha512-DfXN8DfhJ7NH3Oe7cFmu3NCu1wKbkReJ8TorzSAFbSKrlNaQSKfIzqYqVY8zlbs2NLBbWpRiU52GX2PbaBVNkg==} + deprecated: Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me + hasBin: true + + glob@13.0.6: + resolution: {integrity: sha512-Wjlyrolmm8uDpm/ogGyXZXb1Z+Ca2B8NbJwqBVg0axK9GbBeoS7yGV6vjXnYdGm6X53iehEuxxbyiKp8QmN4Vw==} + engines: {node: 18 || 20 || >=22} + + gopd@1.2.0: + resolution: {integrity: sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==} + engines: {node: '>= 0.4'} + + graceful-fs@4.2.11: + resolution: {integrity: sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==} + + grammex@3.1.13: + resolution: {integrity: sha512-LnPnhOBLEJEVKS8WFDVaA397L9Kq55Q9oSITJiVLHVdhAclfUkWzQv74KhvZHKL2Q09Pb1XdsrOsZ4LfTFFTEg==} + + graphmatch@1.1.1: + resolution: {integrity: sha512-5ykVn/EXM1hF0XCaWh05VbYvEiOL2lY1kBxZtaYsyvjp7cmWOU1XsAdfQBwClraEofXDT197lFbXOEVMHpvQOg==} + + handlebars@4.7.9: + resolution: {integrity: sha512-4E71E0rpOaQuJR2A3xDZ+GM1HyWYv1clR58tC8emQNeQe3RH7MAzSbat+V0wG78LQBo6m6bzSG/L4pBuCsgnUQ==} + engines: {node: '>=0.4.7'} + hasBin: true + + has-flag@4.0.0: + resolution: {integrity: sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==} + engines: {node: '>=8'} + + has-symbols@1.1.0: + resolution: {integrity: sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==} + engines: {node: '>= 0.4'} + + has-tostringtag@1.0.2: + resolution: {integrity: sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==} + engines: {node: '>= 0.4'} + + hasown@2.0.4: + resolution: {integrity: sha512-T2UbfbBEF32wiepXIsMlTW9+dDYC6wMh/t/vYA4tuOMKqWz/n3vr1NFSxQiyP+zk2mXsoMA/i/7qV6LKut1t1A==} + engines: {node: '>= 0.4'} + + help-me@5.0.0: + resolution: {integrity: sha512-7xgomUX6ADmcYzFik0HzAxh/73YlKR9bmFzf51CZwR+b6YtzU2m0u49hQCqV6SvlqIqsaxovfwdvbnsw3b/zpg==} + + html-escaper@2.0.2: + resolution: {integrity: sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==} + + http-errors@2.0.1: + resolution: {integrity: sha512-4FbRdAX+bSdmo4AUFuS0WNiPz8NgFt+r8ThgNWmlrjQjt1Q7ZR9+zTlce2859x4KSXrwIsaeTqDoKQmtP8pLmQ==} + engines: {node: '>= 0.8'} + + human-signals@2.1.0: + resolution: {integrity: sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==} + engines: {node: '>=10.17.0'} + + iconv-lite@0.4.24: + resolution: {integrity: sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==} + engines: {node: '>=0.10.0'} + + iconv-lite@0.7.3: + resolution: {integrity: sha512-IKXpvIzjnC9XTAUbVBcMfGS0EPaIXtW6v+zr+RRp+hqULEpo0owZax6wyRwPOJbWbzjYspQwusTsfVr0ifh4uQ==} + engines: {node: '>=0.10.0'} + + ieee754@1.2.1: + resolution: {integrity: sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==} + + import-local@3.2.0: + resolution: {integrity: sha512-2SPlun1JUPWoM6t3F0dw0FkCF/jWY8kttcY4f599GLTSjh2OCuuhdTkJQsEcZzBqbXZGKMK2OqW1oZsjtf/gQA==} + engines: {node: '>=8'} + hasBin: true + + imurmurhash@0.1.4: + resolution: {integrity: sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==} + engines: {node: '>=0.8.19'} + + inherits@2.0.4: + resolution: {integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==} + + inquirer@8.2.6: + resolution: {integrity: sha512-M1WuAmb7pn9zdFRtQYk26ZBoY043Sse0wVDdk4Bppr+JOXyQYybdtvK+l9wUibhtjdjvtoiNy8tk+EgsYIUqKg==} + engines: {node: '>=12.0.0'} + + internmap@2.0.3: + resolution: {integrity: sha512-5Hh7Y1wQbvY5ooGgPbDaL5iYLAPzMTUrjMulskHLH6wnv/A+1q5rgEaiuqEjB+oxGXIVZs1FF+R/KPN3ZSQYYg==} + engines: {node: '>=12'} + + ioredis@6.0.0: + resolution: {integrity: sha512-f+Dtubxfpf6KYFq7WVXJoOLn0bk4TJrMrN9SzeE+jrWrCWj7XX3fA6vkryafhADX+GMymRxgDJDOI33COkJc0w==} + engines: {node: '>=20.0.0'} + + ipaddr.js@1.9.1: + resolution: {integrity: sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==} + engines: {node: '>= 0.10'} + + ipaddr.js@2.5.0: + resolution: {integrity: sha512-aq+t5NAc+cS6rZQQVWC2x98CPqGtKKTMDd4Gaodv0wShnItdKg/51djkGJ1hqH+Oy0ivDftCbSLCQob8zso01w==} + engines: {node: '>= 10'} + + is-arrayish@0.2.1: + resolution: {integrity: sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==} + + is-extglob@2.1.1: + resolution: {integrity: sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==} + engines: {node: '>=0.10.0'} + + is-fullwidth-code-point@3.0.0: + resolution: {integrity: sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==} + engines: {node: '>=8'} + + is-generator-fn@2.1.0: + resolution: {integrity: sha512-cTIB4yPYL/Grw0EaSzASzg6bBy9gqCofvWN8okThAYIxKJZC+udlRAmGbM0XLeniEJSs8uEgHPGuHSe1XsOLSQ==} + engines: {node: '>=6'} + + is-glob@4.0.3: + resolution: {integrity: sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==} + engines: {node: '>=0.10.0'} + + is-interactive@1.0.0: + resolution: {integrity: sha512-2HvIEKRoqS62guEC+qBjpvRubdX910WCMuJTZ+I9yvqKU2/12eSL549HMwtabb4oupdj2sMP50k+XJfB/8JE6w==} + engines: {node: '>=8'} + + is-interactive@2.0.0: + resolution: {integrity: sha512-qP1vozQRI+BMOPcjFzrjXuQvdak2pHNUMZoeG2eRbiSqyvbEf/wQtEOTOX1guk6E3t36RkaqiSt8A/6YElNxLQ==} + engines: {node: '>=12'} + + is-promise@4.0.0: + resolution: {integrity: sha512-hvpoI6korhJMnej285dSg6nu1+e6uxs7zG3BYAm5byqDsgJNWwxzM6z6iZiAgQR4TJ30JmBTOwqZUw3WlyH3AQ==} + + is-property@1.0.2: + resolution: {integrity: sha512-Ks/IoX00TtClbGQr4TWXemAnktAQvYB7HzcCxDGqEZU6oCmb2INHuOoKxbtR+HFkmYWBKv/dOZtGRiAjDhj92g==} + + is-stream@2.0.1: + resolution: {integrity: sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==} + engines: {node: '>=8'} + + is-unicode-supported@0.1.0: + resolution: {integrity: sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==} + engines: {node: '>=10'} + + is-unicode-supported@2.1.0: + resolution: {integrity: sha512-mE00Gnza5EEB3Ds0HfMyllZzbBrmLOX3vfWoj9A9PEnTfratQ/BcaJOuMhnkhjXvb2+FkY3VuHqtAGpTPmglFQ==} + engines: {node: '>=18'} + + isexe@2.0.0: + resolution: {integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==} + + istanbul-lib-coverage@3.2.2: + resolution: {integrity: sha512-O8dpsF+r0WV/8MNRKfnmrtCWhuKjxrq2w+jpzBL5UZKTi2LeVWnWOmWRxFlesJONmc+wLAGvKQZEOanko0LFTg==} + engines: {node: '>=8'} + + istanbul-lib-instrument@6.0.3: + resolution: {integrity: sha512-Vtgk7L/R2JHyyGW07spoFlB8/lpjiOLTjMdms6AFMraYt3BaJauod/NGrfnVG/y4Ix1JEuMRPDPEj2ua+zz1/Q==} + engines: {node: '>=10'} + + istanbul-lib-report@3.0.1: + resolution: {integrity: sha512-GCfE1mtsHGOELCU8e/Z7YWzpmybrx/+dSTfLrvY8qRmaY6zXTKWn6WQIjaAFw069icm6GVMNkgu0NzI4iPZUNw==} + engines: {node: '>=10'} + + istanbul-lib-source-maps@5.0.6: + resolution: {integrity: sha512-yg2d+Em4KizZC5niWhQaIomgf5WlL4vOOjZ5xGCmF8SnPE/mDWWXgvRExdcpCgh9lLRRa1/fSYp2ymmbJ1pI+A==} + engines: {node: '>=10'} + + istanbul-reports@3.2.0: + resolution: {integrity: sha512-HGYWWS/ehqTV3xN10i23tkPkpH46MLCIMFNCaaKNavAXTF1RkqxawEPtnjnGZ6XKSInBKkiOA5BKS+aZiY3AvA==} + engines: {node: '>=8'} + + iterare@1.2.1: + resolution: {integrity: sha512-RKYVTCjAnRthyJes037NX/IiqeidgN1xc3j1RjFfECFp28A1GVwK9nA+i0rJPaHqSZwygLzRnFlzUuHFoWWy+Q==} + engines: {node: '>=6'} + + jackspeak@3.4.3: + resolution: {integrity: sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw==} + + jest-changed-files@30.5.1: + resolution: {integrity: sha512-0+bvMM/ENhDI29Z8q1r4HxiDIi4G5tnBmSw4esfPQoj9q8Nik7KIyuxHkTVnnniJQf05SxpGaKDQ+4h28ynGPg==} + engines: {node: ^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0} + + jest-circus@30.5.2: + resolution: {integrity: sha512-vffFgjs5JSJ9q4ds1vNW3klKYPJfYfIY61LT/zaZgvTeASJOWZUt8LBfHgIcV4rwxlPBLl/ePBGccHEclS4PlQ==} + engines: {node: ^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0} + + jest-cli@30.5.2: + resolution: {integrity: sha512-YYYxUUVjFgPvgEleKNKMaYGIFgR3l3832Cl0kRL/oCiDZ03v7wImUtquHl2OOBCCNgprjZgBN5bczS/JklPBDg==} + engines: {node: ^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0} + hasBin: true + peerDependencies: + node-notifier: ^8.0.1 || ^9.0.0 || ^10.0.0 + peerDependenciesMeta: + node-notifier: + optional: true + + jest-config@30.5.2: + resolution: {integrity: sha512-U6221OZekabePvGcGPf4raIBKMvYQWFHvhobDJRojOYaFMj2HaGytAdknjDhYc6JTz2fdHW9+6k0wWUDaNeOFQ==} + engines: {node: ^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0} + peerDependencies: + '@types/node': '*' + esbuild-register: '>=3.4.0' + ts-node: '>=9.0.0' + peerDependenciesMeta: + '@types/node': + optional: true + esbuild-register: + optional: true + ts-node: + optional: true + + jest-diff@30.5.2: + resolution: {integrity: sha512-rBtHnI6BWTiWj3lM7fOLVfChx7R9B0u9VV3PRHawKs79x6ZjW1QoSrKenaigNGWlvhtoi2BqvDbABDie+Os3xQ==} + engines: {node: ^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0} + + jest-docblock@30.5.0: + resolution: {integrity: sha512-NwDqcxtoZi33RhuW+zJS/RVA3rmheQ8BnwpYZuc/Eruaz6seQb7+aoCeDZu/3X7W2XmD8DbSo9Pn72DbKsBFYw==} + engines: {node: ^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0} + + jest-each@30.5.2: + resolution: {integrity: sha512-GRrW+7fmmgmkvyfEBqc1QFdWnF1Ex5yG6Y6AWL4TTxnkWlKIT98dsKh3P3UuWm6v4XsQwVE6DEzXIPMzWJ3ZbA==} + engines: {node: ^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0} + + jest-environment-node@30.5.2: + resolution: {integrity: sha512-Ciz4KgTGIbojxSKpuFImgWJj5EyqfE8xMq9NxWmOXnQywHHS03H9Mv+vaCB29J5pr3JBrY27WbRV18rBdjh8Dg==} + engines: {node: ^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0} + + jest-haste-map@30.5.1: + resolution: {integrity: sha512-VIFgt67jW480YDxKfEv9IYQKrFpYt7bOCMn3VsnjK7AK9qo7p6acpnA1DHwsVOULE3dTaYew/6JaTD/d0VDHoQ==} + engines: {node: ^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0} + + jest-leak-detector@30.5.1: + resolution: {integrity: sha512-gt4GT2aWgEoCNTcBe4rqS74xTIUJxi+UD9SNSu9aOk5LmTEd6fS5KSTmAKAfitCCktQHNN+upUuL6EkBfFbMDQ==} + engines: {node: ^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0} + + jest-matcher-utils@30.5.2: + resolution: {integrity: sha512-lFkB365PTIHOhPzwrb9T6gvlDnPpOZ7/c3ewOKKB7bzztqjVrtlyRL2MkyfJXpyY2u2SKw001JKrTx14fBUFcQ==} + engines: {node: ^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0} + + jest-message-util@30.5.1: + resolution: {integrity: sha512-UdQlLdd9wL/Ys7xRErckqwD6wPlSZYueosSWuHc1r2ztGLwlgPvtSJq2+BPEgaEY13WLvfFbmhTj8pba0Sd1jg==} + engines: {node: ^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0} + + jest-mock@30.5.2: + resolution: {integrity: sha512-KTHb37Fhj8xY8qPFvTFaFJHcdsumQp+ExsUlgoX232Agmc706gagBs53+CYvulV7MVQo9AgXOUxsqzzVBoJlrA==} + engines: {node: ^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0} + + jest-regex-util@30.5.0: + resolution: {integrity: sha512-Mg0WK7A6xRHLSA1udJ8y9f3lM0uUhFTBnLKzwPmqB9AylvpleJ6BLemR8K9dK27DY+cesDryoA7yLZCAHsPG1A==} + engines: {node: ^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0} + + jest-resolve-dependencies@30.5.2: + resolution: {integrity: sha512-GMI0DP5enX9Z2qW2zFy1bOkrCfWAOPRJQ7qHt0pdfrxBPsgWxglMPrRSK2TX/wRWYxcPRSLFg3Z88qPOzHx7FQ==} + engines: {node: ^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0} + + jest-resolve@30.5.1: + resolution: {integrity: sha512-wprhLejRtwN6h8ZgaqC0eYjGJ1uMdGPT/+b3eFncbG4NWuuP9QL+vWwRinu9waw7hkOLcpMJGVJAMgBwsPssMQ==} + engines: {node: ^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0} + + jest-runner@30.5.2: + resolution: {integrity: sha512-/B6px7hiiNhVSRwuv9AGn0nawYvwsHeQZ3ItTd5Gp2diFd0EOKaWVeWqcbw3L88vx1GfpCKjQkxWItZCTl11Rw==} + engines: {node: ^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0} + + jest-runtime@30.5.2: + resolution: {integrity: sha512-0paUAHBlheai10A3XSy9Xh+YBG0IROy+/qzcDPzQ/nbbXrznQzeWy5qniICWK6d3W3scaRQCVAbXdcK0ibBq4w==} + engines: {node: ^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0} + + jest-snapshot@30.5.2: + resolution: {integrity: sha512-jKIdes25AnAH73dOCi2qE6J6vHJ6L2vyBS11M89kT50DVJcLTf2AOjvcc+2vVaN8lUbY5v2R83aqXo3Ro9fqYA==} + engines: {node: ^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0} + + jest-util@30.5.1: + resolution: {integrity: sha512-yKuxmNy2rSbTXw+3SIPanJo+nV4/BS1p26v44IYBFMsswSQySfMMcPHErnOncda7i9HEz0q605rIhSTBVgrZTg==} + engines: {node: ^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0} + + jest-validate@30.5.1: + resolution: {integrity: sha512-i/buJ56wTpxihE93hQYNMfdOThS87+HGvLZzZJmU4xggPcdTYQq051iwALLCHp3q+SkCGH+EFejQZz5EbBSkkg==} + engines: {node: ^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0} + + jest-watcher@30.5.2: + resolution: {integrity: sha512-rqRgg4R11GA9m1UsEZwQeixHsgZReCn6TOHAHtIH33yXrIvoX0OGPA20Yzzjkz7X40fZvcRSxEpQppYPcWzmcQ==} + engines: {node: ^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0} + + jest-worker@27.5.1: + resolution: {integrity: sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg==} + engines: {node: '>= 10.13.0'} + + jest-worker@30.5.1: + resolution: {integrity: sha512-Cbxh5v7AoLuFRmFJSM4/aHdQ68rjXvUWr716EE0Dh3I7T+T/3FgFKhOERGXHcU2Meftq9+9zxPM3TSNyI9D+HA==} + engines: {node: ^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0} + + jest@30.5.2: + resolution: {integrity: sha512-3gnpdBIza8ijCl3iMV9ChE3hSt1+46865qqod863gQtJr1DixOkAU5DoGbi3u+XlRcw++BhZQMu/y4xBdHBvSQ==} + engines: {node: ^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0} + hasBin: true + peerDependencies: + node-notifier: ^8.0.1 || ^9.0.0 || ^10.0.0 + peerDependenciesMeta: + node-notifier: + optional: true + + jiti@2.7.0: + resolution: {integrity: sha512-AC/7JofJvZGrrneWNaEnJeOLUx+JlGt7tNa0wZiRPT4MY1wmfKjt2+6O2p2uz2+skll8OZZmJMNqeke7kKbNgQ==} + hasBin: true + + joycon@3.1.1: + resolution: {integrity: sha512-34wB/Y7MW7bzjKRjUKTa46I2Z7eV62Rkhva+KkopW7Qvv/OSWBqvkSY7vusOPrNuZcUG3tApvdVgNB8POj3SPw==} + engines: {node: '>=10'} + + js-tokens@4.0.0: + resolution: {integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==} + + js-yaml@3.15.2: + resolution: {integrity: sha512-6EuL879VkRA+1Cz578mKMiKvjPNEuk6+r1JaFzoSWejZmtf7xWbIyw1e3KkxlkzTIt9Taw6JBhEppG7utc1P+w==} + hasBin: true + + js-yaml@5.4.1: + resolution: {integrity: sha512-28R/k+NAjeuf7+CKlTxWZVExJGwVVLwY06DgEnOMz2gEpfNkDcD7QvyiVPT0xy0XXhU8vHsd4Ot42OOPdJG7dQ==} + hasBin: true + + jsesc@3.1.0: + resolution: {integrity: sha512-/sM3dO2FOzXjKQhJuo0Q173wf2KOo8t4I8vHy6lF9poUp7bKT0/NHE8fPX23PwfhnykfqnC2xRxOnVw5XuGIaA==} + engines: {node: '>=6'} + hasBin: true + + json-parse-even-better-errors@2.3.1: + resolution: {integrity: sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==} + + json-schema-ref-resolver@3.0.0: + resolution: {integrity: sha512-hOrZIVL5jyYFjzk7+y7n5JDzGlU8rfWDuYyHwGa2WA8/pcmMHezp2xsVwxrebD/Q9t8Nc5DboieySDpCp4WG4A==} + + json-schema-traverse@1.0.0: + resolution: {integrity: sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==} + + json5@2.2.3: + resolution: {integrity: sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==} + engines: {node: '>=6'} + hasBin: true + + jsonc-parser@3.3.1: + resolution: {integrity: sha512-HUgH65KyejrUFPvHFPbqOY0rsFip3Bo5wb4ngvdi1EpCYWUQDC5V+Y7mZws+DLkr4M//zQJoanu1SP+87Dv1oQ==} + + leven@3.1.0: + resolution: {integrity: sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A==} + engines: {node: '>=6'} + + light-my-request@6.6.0: + resolution: {integrity: sha512-CHYbu8RtboSIoVsHZ6Ye4cj4Aw/yg2oAFimlF7mNvfDV192LR7nDiKtSIfCuLT7KokPSTn/9kfVLm5OGN0A28A==} + + lines-and-columns@1.2.4: + resolution: {integrity: sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==} + + load-esm@1.0.3: + resolution: {integrity: sha512-v5xlu8eHD1+6r8EHTg6hfmO97LN8ugKtiXcy5e6oN72iD2r6u0RPfLl6fxM+7Wnh2ZRq15o0russMst44WauPA==} + engines: {node: '>=13.2.0'} + + locate-path@5.0.0: + resolution: {integrity: sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==} + engines: {node: '>=8'} + + lodash.memoize@4.1.2: + resolution: {integrity: sha512-t7j+NzmgnQzTAYXcsHYLgimltOV1MXHtlOWf6GjL9Kj8GK5FInw5JotxvbOs+IvV1/Dzo04/fCGfLVs7aXb4Ag==} + + lodash@4.18.1: + resolution: {integrity: sha512-dMInicTPVE8d1e5otfwmmjlxkZoUpiVLwyeTdUsi/Caj/gfzzblBcCE5sRHV/AsjuCmxWrte2TNGSYuCeCq+0Q==} + + log-symbols@4.1.0: + resolution: {integrity: sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==} + engines: {node: '>=10'} + + log-symbols@7.0.1: + resolution: {integrity: sha512-ja1E3yCr9i/0hmBVaM0bfwDjnGy8I/s6PP4DFp+yP+a+mrHO4Rm7DtmnqROTUkHIkqffC84YY7AeqX6oFk0WFg==} + engines: {node: '>=18'} + + long@5.3.2: + resolution: {integrity: sha512-mNAgZ1GmyNhD7AuqnTG3/VQ26o760+ZYBPKjPvugO8+nLbYfX6TVpJPseBvopbdY+qpZ/lKUnmEc1LeZYS3QAA==} + + lru-cache@10.4.3: + resolution: {integrity: sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==} + + lru-cache@11.5.3: + resolution: {integrity: sha512-U4N8FgzmWxc8k1VH8Kr6lQg18U7Fjvby6wXHVRX/ZZ7IwWbRMgrRbP0Wrb5q5NVinryp4SQampHKdvtecItxUg==} + engines: {node: 20 || >=22} + + lru-cache@5.1.1: + resolution: {integrity: sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==} + + lru.min@1.1.5: + resolution: {integrity: sha512-5J9ysMYUpYIg9RF2vJpy9SinEmSviFSe0GyPpCQ4L5QSkLAgeLXlTAOu2ZwWUU5m+0SBl6gUU1R1ZQB3aKypfA==} + engines: {bun: '>=1.0.0', deno: '>=1.30.0', node: '>=8.0.0'} + + magic-string@1.0.0: + resolution: {integrity: sha512-CGvjzMN08iv6w1mm4/x3Gh1hLb4VnyRUA15FFpl6CsCIGGoe36k7kY5KNz9QDbSBN5I/fWHM6ZlIkUTa5xdUEA==} + + make-dir@4.0.0: + resolution: {integrity: sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw==} + engines: {node: '>=10'} + + make-error@1.3.6: + resolution: {integrity: sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==} + + math-intrinsics@1.1.0: + resolution: {integrity: sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==} + engines: {node: '>= 0.4'} + + media-typer@0.3.0: + resolution: {integrity: sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==} + engines: {node: '>= 0.6'} + + media-typer@1.1.1: + resolution: {integrity: sha512-yz3xRaG20c6/BOzvYoDaGtPmGscs7YivItZEEqe6GbwNfHuxu9YNmvnEkMzKldAGY4/80pRcQRZSEnhquk9XuQ==} + engines: {node: '>= 0.8'} + + merge-descriptors@2.0.0: + resolution: {integrity: sha512-Snk314V5ayFLhp3fkUREub6WtjBfPdCPY1Ln8/8munuLuiYhsABgBVWsozAG+MWMbVEvcdcpbi9R7ww22l9Q3g==} + engines: {node: '>=18'} + + merge-stream@2.0.0: + resolution: {integrity: sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==} + + methods@1.1.2: + resolution: {integrity: sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==} + engines: {node: '>= 0.6'} + + mime-db@1.52.0: + resolution: {integrity: sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==} + engines: {node: '>= 0.6'} + + mime-db@1.54.0: + resolution: {integrity: sha512-aU5EJuIN2WDemCcAp2vFBfp/m4EAhWJnUNSSw0ixs7/kXbd6Pg64EmwJkNdFhB8aWt1sH2CTXrLxo/iAGV3oPQ==} + engines: {node: '>= 0.6'} + + mime-types@2.1.35: + resolution: {integrity: sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==} + engines: {node: '>= 0.6'} + + mime-types@3.0.2: + resolution: {integrity: sha512-Lbgzdk0h4juoQ9fCKXW4by0UJqj+nOOrI9MJ1sSj4nI8aI2eo1qmvQEie4VD1glsS250n15LsWsYtCugiStS5A==} + engines: {node: '>=18'} + + mime@2.6.0: + resolution: {integrity: sha512-USPkMeET31rOMiarsBNIHZKLGgvKc/LrjofAnBlOttf5ajRvqiRA8QsenbcooctK6d6Ts6aqZXBA+XbkKthiQg==} + engines: {node: '>=4.0.0'} + hasBin: true + + mime@3.0.0: + resolution: {integrity: sha512-jSCU7/VB1loIWBZe14aEYHU/+1UMEHoaO7qxCOVJOw9GgH72VAWppxNcjU+x9a2k3GSIBXNKxXQFqRvvZ7vr3A==} + engines: {node: '>=10.0.0'} + hasBin: true + + mimic-fn@2.1.0: + resolution: {integrity: sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==} + engines: {node: '>=6'} + + mimic-function@5.0.1: + resolution: {integrity: sha512-VP79XUPxV2CigYP3jWwAUFSku2aKqBH7uTAapFWCBqutsbmDo96KY5o8uh6U+/YSIn5OxJnXp73beVkpqMIGhA==} + engines: {node: '>=18'} + + minimatch@10.2.6: + resolution: {integrity: sha512-vpLQEs+VLCr1nU0BXS07maYoFwlDAH0gngQuuttxIwutDFEMHq2blX+8vpgxDdK3J1PwjCJiep77OitTZ4Ll1A==} + engines: {node: 18 || 20 || >=22} + + minimatch@9.0.9: + resolution: {integrity: sha512-OBwBN9AL4dqmETlpS2zasx+vTeWclWzkblfZk7KTA5j3jeOONz/tRCnZomUyvNg83wL5Zv9Ss6HMJXAgL8R2Yg==} + engines: {node: '>=16 || 14 >=14.17'} + + minimist@1.2.8: + resolution: {integrity: sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==} + + minimizer-webpack-plugin@5.11.0: + resolution: {integrity: sha512-2JVy2DY+iBtfRyrQB5cRM7lfurnJIi6jFTgLip/7FxDu0WxswrIRzr4fBySQ0X7HqM7BcwE28zm+HfQ5V6y4Cg==} + engines: {node: '>= 10.13.0'} + peerDependencies: + '@minify-html/node': '*' + '@napi-rs/image': '*' + '@swc/core': '*' + '@swc/css': '*' + '@swc/html': '*' + clean-css: '*' + cssnano: '*' + csso: '*' + esbuild: '*' + html-minifier-terser: '*' + imagemin: '*' + lightningcss: '*' + postcss: '*' + sharp: '*' + svgo: '*' + uglify-js: '*' + webpack: ^5.1.0 + peerDependenciesMeta: + '@minify-html/node': + optional: true + '@napi-rs/image': + optional: true + '@swc/core': + optional: true + '@swc/css': + optional: true + '@swc/html': + optional: true + clean-css: + optional: true + cssnano: + optional: true + csso: + optional: true + esbuild: + optional: true + html-minifier-terser: + optional: true + imagemin: + optional: true + lightningcss: + optional: true + postcss: + optional: true + sharp: + optional: true + svgo: + optional: true + uglify-js: + optional: true + + minipass@7.1.3: + resolution: {integrity: sha512-tEBHqDnIoM/1rXME1zgka9g6Q2lcoCkxHLuc7ODJ5BxbP5d4c2Z5cGgtXAku59200Cx7diuHTOYfSBD8n6mm8A==} + engines: {node: '>=16 || 14 >=14.17'} + + ms@2.1.3: + resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==} + + multer@2.4.0: + resolution: {integrity: sha512-7dqa0ZcFfzbefdTuIkzOSMvZWC0J7FLqBOjJUZvDCXShIURWKxAyTT1wHhnE5q19c7jOJf43IYYKjBmZVZmvhg==} + engines: {node: '>= 10.16.0'} + + mute-stream@0.0.8: + resolution: {integrity: sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==} + + mute-stream@3.0.0: + resolution: {integrity: sha512-dkEJPVvun4FryqBmZ5KhDo0K9iDXAwn08tMLDinNdRBNPcYEDiWYysLcc6k3mjTMlbP9KyylvRpd4wFtwrT9rw==} + engines: {node: ^20.17.0 || >=22.9.0} + + mysql2@3.15.3: + resolution: {integrity: sha512-FBrGau0IXmuqg4haEZRBfHNWB5mUARw6hNwPDXXGg0XzVJ50mr/9hb267lvpVMnhZ1FON3qNd4Xfcez1rbFwSg==} + engines: {node: '>= 8.0'} + + named-placeholders@1.1.6: + resolution: {integrity: sha512-Tz09sEL2EEuv5fFowm419c1+a/jSMiBjI9gHxVLrVdbUkkNUUfjsVYs9pVZu5oCon/kmRh9TfLEObFtkVxmY0w==} + engines: {node: '>=8.0.0'} + + nanoid@5.1.16: + resolution: {integrity: sha512-kVrnsrJqMR8+oLJnGEmSWw9BivK5mt7H3FZatVRjrc5wGqFYuBxX1yG7+A7Gi5AefkX6t/oCkizcQgpu0cY1dQ==} + engines: {node: ^18 || >=20} + hasBin: true + + napi-postinstall@0.3.4: + resolution: {integrity: sha512-PHI5f1O0EP5xJ9gQmFGMS6IZcrVvTjpXjz7Na41gTE7eE2hK11lg04CECCYEEjdc17EV4DO+fkGEtt7TpTaTiQ==} + engines: {node: ^12.20.0 || ^14.18.0 || >=16.0.0} + hasBin: true + + natural-compare@1.4.0: + resolution: {integrity: sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==} + + negotiator@1.1.0: + resolution: {integrity: sha512-NMPBRMJgiQHjbd8phG3Vebdx4kZ1H121rbl5IkMqeOsahptB9BKo/d7oJ3zTXqTgagn2bWlNSXkh0QUGM31RYg==} + engines: {node: '>=18'} + + neo-async@2.6.2: + resolution: {integrity: sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==} + + nestjs-pino@5.2.0: + resolution: {integrity: sha512-w7zIidjqzhvB7TSDBttC//NxKBAz2rr2d6pNctsglWqb/VqNbDj/Hko2VsgHMYmLpIoZ5pka5gASbGc60V8Qvw==} + engines: {node: '>=22.12.0'} + peerDependencies: + '@nestjs/common': ^11.0.8 || ^12.0.2 + '@nestjs/core': ^11.0.8 || ^12.0.2 + pino: ^10.0.0 + pino-http: ^11.0.0 + rxjs: ^7.1.0 + + node-addon-api@7.1.1: + resolution: {integrity: sha512-5m3bsyrjFWE1xf7nz7YXdN4udnVtXK6/Yfgn5qnahL6bCkf2yKt4k3nuTKAtT4r3IG8JNR2ncsIMdZuAzJjHQQ==} + + node-emoji@2.1.3: + resolution: {integrity: sha512-E2WEOVsgs7O16zsURJ/eH8BqhF029wGpEOnv7Urwdo2wmQanOACwJQh0devF9D9RhoZru0+9JXIS0dBXIAz+lA==} + engines: {node: '>=18'} + + node-emoji@2.2.0: + resolution: {integrity: sha512-Z3lTE9pLaJF47NyMhd4ww1yFTAP8YhYI8SleJiHzM46Fgpm5cnNzSl9XfzFNqbaz+VlJrIj3fXQ4DeN1Rjm6cw==} + engines: {node: '>=18'} + + node-int64@0.4.0: + resolution: {integrity: sha512-O5lz91xSOeoXP6DulyHfllpq+Eg00MWitZIbtPfoSEvqIHdl5gfcY6hYzDWnj0qD5tz52PI08u9qUvSVeUBeHw==} + + node-releases@2.0.56: + resolution: {integrity: sha512-x0InOIyzgdk+eyaWaRJFH5snEtiImgBgblZ2CyPrLmqqcuMQkEvcDPHbzqbD8eDsSeJbVOjn+crzyzHaM4D+/A==} + engines: {node: '>=18'} + + normalize-path@3.0.0: + resolution: {integrity: sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==} + engines: {node: '>=0.10.0'} + + npm-run-path@4.0.1: + resolution: {integrity: sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==} + engines: {node: '>=8'} + + object-assign@4.1.1: + resolution: {integrity: sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==} + engines: {node: '>=0.10.0'} + + object-inspect@1.13.4: + resolution: {integrity: sha512-W67iLl4J2EXEGTbfeHCffrjDfitvLANg0UlX3wFUUSTx92KXRFegMHUVgSqE+wvhAbi4WqjGg9czysTV2Epbew==} + engines: {node: '>= 0.4'} + + ohash@2.0.12: + resolution: {integrity: sha512-65S/5gk9YSsaRjcyf7Nfa6h/d3E8/1gslpXfI4W7Dxn/oap8IKRuNT5VXkLQ1YFKIEg4apRY4Pj6aiwFzrDdmw==} + + on-exit-leak-free@2.1.2: + resolution: {integrity: sha512-0eJJY6hXLGf1udHwfNftBqH+g73EU4B504nZeKpz1sYRKafAghwxEJunB2O7rDZkL4PGfsMVnTXZ2EjibbqcsA==} + engines: {node: '>=14.0.0'} + + on-finished@2.4.1: + resolution: {integrity: sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==} + engines: {node: '>= 0.8'} + + once@1.4.0: + resolution: {integrity: sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==} + + onetime@5.1.2: + resolution: {integrity: sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==} + engines: {node: '>=6'} + + onetime@7.0.0: + resolution: {integrity: sha512-VXJjc87FScF88uafS3JllDgvAm+c/Slfz06lorj2uAY34rlUu0Nt+v8wreiImcrgAjjIHp1rXpTDlLOGw29WwQ==} + engines: {node: '>=18'} + + ora@5.4.1: + resolution: {integrity: sha512-5b6Y85tPxZZ7QytO+BQzysW31HJku27cRIlkbAXaNx+BdcVi+LlRFmVXzeF6a7JCwJpyw5c4b+YSVImQIrBpuQ==} + engines: {node: '>=10'} + + ora@9.4.1: + resolution: {integrity: sha512-6VlU9MLXbjVQD04AZCMX28hVtA5bUoadvUqO76MUCVA0ilwJbMiHsITRPfyVm6p/BC0Av/BXMujx39WCe1LEqw==} + engines: {node: '>=20'} + + os-tmpdir@1.0.2: + resolution: {integrity: sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g==} + engines: {node: '>=0.10.0'} + + oxlint-tsgolint@7.0.2002: + resolution: {integrity: sha512-rQAj2RAQM57nCwTd3PhtnAkREGW2StqI47tzudNlJF8WwGommM7rVpeP4O1O8/ZiuDZ9f2GnTESzLHGTluwkvQ==} + hasBin: true + + oxlint@1.83.0: + resolution: {integrity: sha512-cyDzSzaw3uzP0TeCeq3lLRPPoaUxkbB4ZOXj+kn+5r+BX9V+4bNVGk9lxer+WrgcpebH4JxLlJ3KQjveVztOLQ==} + engines: {node: ^20.19.0 || >=22.12.0} + hasBin: true + peerDependencies: + oxlint-tsgolint: '>=7.0.2001' + vite-plus: '*' + peerDependenciesMeta: + oxlint-tsgolint: + optional: true + vite-plus: + optional: true + + p-limit@2.3.0: + resolution: {integrity: sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==} + engines: {node: '>=6'} + + p-limit@3.1.0: + resolution: {integrity: sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==} + engines: {node: '>=10'} + + p-locate@4.1.0: + resolution: {integrity: sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==} + engines: {node: '>=8'} + + p-try@2.2.0: + resolution: {integrity: sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==} + engines: {node: '>=6'} + + package-json-from-dist@1.0.1: + resolution: {integrity: sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw==} + + parse-json@5.2.0: + resolution: {integrity: sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==} + engines: {node: '>=8'} + + parseurl@1.3.3: + resolution: {integrity: sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==} + engines: {node: '>= 0.8'} + + path-exists@4.0.0: + resolution: {integrity: sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==} + engines: {node: '>=8'} + + path-key@3.1.1: + resolution: {integrity: sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==} + engines: {node: '>=8'} + + path-scurry@1.11.1: + resolution: {integrity: sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==} + engines: {node: '>=16 || 14 >=14.18'} + + path-scurry@2.0.2: + resolution: {integrity: sha512-3O/iVVsJAPsOnpwWIeD+d6z/7PmqApyQePUtCndjatj/9I5LylHvt5qluFaBT3I5h3r1ejfR056c+FCv+NnNXg==} + engines: {node: 18 || 20 || >=22} + + path-to-regexp@8.4.2: + resolution: {integrity: sha512-qRcuIdP69NPm4qbACK+aDogI5CBDMi1jKe0ry5rSQJz8JVLsC7jV8XpiJjGRLLol3N+R5ihGYcrPLTno6pAdBA==} + + pathe@2.0.3: + resolution: {integrity: sha512-WUjGcAqP1gQacoQe+OBJsFA7Ld4DyXuUIjZ5cc75cLHvJ7dtNsTugphxIADwspS+AraAUePCKrSVtPLFj/F88w==} + + perfect-debounce@2.1.0: + resolution: {integrity: sha512-LjgdTytVFXeUgtHZr9WYViYSM/g8MkcTPYDlPa3cDqMirHjKiSZPYd6DoL7pK8AJQr+uWkQvCjHNdiMqsrJs+g==} + + pg-cloudflare@1.4.1: + resolution: {integrity: sha512-6PQbsFWZcp9EmJEwy5cGQ2La+AMWpP46lgbb8X+U/XsHIUweYDNCpeuKck5RxL2MdVFi7krbbEi5nX4Zh7JhrQ==} + + pg-connection-string@2.14.1: + resolution: {integrity: sha512-qR3kGNPBLpCNtz0evbKA0Y/MRFXwSSdT+pTJvYp/bXTcReZbvX1kzF0IyTc1QnxqF7AZbOeBhNL8R5mYQZV/MA==} + + pg-int8@1.0.1: + resolution: {integrity: sha512-WCtabS6t3c8SkpDBUlb1kjOs7l66xsGdKpIPZsg4wR+B3+u9UAum2odSsF9tnvxg80h4ZxLWMy4pRjOsFIqQpw==} + engines: {node: '>=4.0.0'} + + pg-pool@3.14.0: + resolution: {integrity: sha512-gKtPkFdQPU3DksooVLi9LsjZxrsBUZIpa+7aVx+LV5pNh0KzP4Zleud2po+ConrxbuXGBJ6Hfer6hdgpIBpBaw==} + peerDependencies: + pg: '>=8.0' + + pg-protocol@1.16.1: + resolution: {integrity: sha512-p9VOFMiHB/ZbJATetbg+99PxssTVSQRnyuPSQ67mN1+1KBOjZaZ83ZQzltnxPhJwSsC3nwVjJ10DVJlerbFzLg==} + + pg-types@2.2.0: + resolution: {integrity: sha512-qTAAlrEsl8s4OiEQY69wDvcMIdQN6wdz5ojQiOy6YRMuynxenON0O5oCpJI6lshc6scgAY8qvJ2On/p+CXY0GA==} + engines: {node: '>=4'} + + pg@8.23.1: + resolution: {integrity: sha512-aL96AHANtWjPLDOLqnhx+ngp9+UK7ETEU8VJrDCGvsSSi/mGLcWYsS6Herg7lmaBJe4uwrfqsa7gTEFaSizDoQ==} + engines: {node: '>= 16.0.0'} + peerDependencies: + pg-native: '>=3.0.1' + peerDependenciesMeta: + pg-native: + optional: true + + pgpass@1.0.5: + resolution: {integrity: sha512-FdW9r/jQZhSeohs1Z3sI1yxFQNFvMcnmfuj4WBMUTxOrAyLMaTcE1aAMBiTlbMNaXvBCQuVi0R7hd8udDSP7ug==} + + picocolors@1.1.1: + resolution: {integrity: sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==} + + picomatch@2.3.2: + resolution: {integrity: sha512-V7+vQEJ06Z+c5tSye8S+nHUfI51xoXIXjHQ99cQtKUkQqqO1kO/KCJUfZXuB47h/YBlDhah2H3hdUGXn8ie0oA==} + engines: {node: '>=8.6'} + + picomatch@4.0.5: + resolution: {integrity: sha512-RvwwcruNjI1ncT5xRakeyS9Lf8lcItv34KD+aif+VH9kduAyfYBipGh12274xtenIPZ119/R9BdTBa8gAwSh0A==} + engines: {node: '>=12'} + + picomatch@4.0.7: + resolution: {integrity: sha512-qcJu88Q2IWqJsDD529JKMdwGm/dvInW4HvQnRwiH9JtihJvzGOscDtHE3x1pBKeUOTysQ8kVmLnJ2kJu7yhcGA==} + engines: {node: '>=12'} + + pino-abstract-transport@3.0.0: + resolution: {integrity: sha512-wlfUczU+n7Hy/Ha5j9a/gZNy7We5+cXp8YL+X+PG8S0KXxw7n/JXA3c46Y0zQznIJ83URJiwy7Lh56WLokNuxg==} + + pino-http@11.0.0: + resolution: {integrity: sha512-wqg5XIAGRRIWtTk8qPGxkbrfiwEWz1lgedVLvhLALudKXvg1/L2lTFgTGPJ4Z2e3qcRmxoFxDuSdMdMGNM6I1g==} + + pino-pretty@13.1.3: + resolution: {integrity: sha512-ttXRkkOz6WWC95KeY9+xxWL6AtImwbyMHrL1mSwqwW9u+vLp/WIElvHvCSDg0xO/Dzrggz1zv3rN5ovTRVowKg==} + hasBin: true + + pino-std-serializers@7.1.0: + resolution: {integrity: sha512-BndPH67/JxGExRgiX1dX0w1FvZck5Wa4aal9198SrRhZjH3GxKQUKIBnYJTdj2HDN3UQAS06HlfcSbQj2OHmaw==} + + pino@10.3.1: + resolution: {integrity: sha512-r34yH/GlQpKZbU1BvFFqOjhISRo1MNx1tWYsYvmj6KIRHSPMT2+yHOEb1SG6NMvRoHRF0a07kCOox/9yakl1vg==} + hasBin: true + + pirates@4.0.7: + resolution: {integrity: sha512-TfySrs/5nm8fQJDcBDuUng3VOUKsd7S+zqvbOTiGXHfxX4wK31ard+hoNuvkicM/2YFzlpDgABOevKSsB4G/FA==} + engines: {node: '>= 6'} + + pkg-dir@4.2.0: + resolution: {integrity: sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==} + engines: {node: '>=8'} + + pkg-types@2.3.3: + resolution: {integrity: sha512-j/lCFdcppV0JxWpCEITdbDltBxPP6cHT+yNJ6Go2OgoSA9518X847X9z0p6LtA4Nc16+eQzCZjRrWanTGvHJ5w==} + + pluralize@8.0.0: + resolution: {integrity: sha512-Nc3IT5yHzflTfbjgqWcCPpo7DaKy4FnpB0l/zCAW0Tc7jxAiuqSxHasntB3D7887LSrA93kDJ9IXovxJYxyLCA==} + engines: {node: '>=4'} + + postgres-array@2.0.0: + resolution: {integrity: sha512-VpZrUqU5A69eQyW2c5CA1jtLecCsN2U/bD6VilrFDWq5+5UIEVO7nazS3TEcHf1zuPYO/sqGvUvW62g86RXZuA==} + engines: {node: '>=4'} + + postgres-array@3.0.4: + resolution: {integrity: sha512-nAUSGfSDGOaOAEGwqsRY27GPOea7CNipJPOA7lPbdEpx5Kg3qzdP0AaWC5MlhTWV9s4hFX39nomVZ+C4tnGOJQ==} + engines: {node: '>=12'} + + postgres-bytea@1.0.1: + resolution: {integrity: sha512-5+5HqXnsZPE65IJZSMkZtURARZelel2oXUEO8rH83VS/hxH5vv1uHquPg5wZs8yMAfdv971IU+kcPUczi7NVBQ==} + engines: {node: '>=0.10.0'} + + postgres-date@1.0.7: + resolution: {integrity: sha512-suDmjLVQg78nMK2UZ454hAG+OAW+HQPZ6n++TNDUX+L0+uUlLywnoxJKDou51Zm+zTCjrCl0Nq6J9C5hP9vK/Q==} + engines: {node: '>=0.10.0'} + + postgres-interval@1.2.0: + resolution: {integrity: sha512-9ZhXKM/rw350N1ovuWHbGxnGh/SNJ4cnxHiM0rxE4VN41wsg8P8zWn9hv/buK00RP4WvlOyr/RBDiptyxVbkZQ==} + engines: {node: '>=0.10.0'} + + postgres@3.4.7: + resolution: {integrity: sha512-Jtc2612XINuBjIl/QTWsV5UvE8UHuNblcO3vVADSrKsrc6RqGX6lOW1cEo3CM2v0XG4Nat8nI+YM7/f26VxXLw==} + engines: {node: '>=12'} + + prettier@3.9.8: + resolution: {integrity: sha512-WRFq3Wn3WId7LLROfMLdH7xaFr2jR62wU8nLO6rQUOLOxNZUviyJQs1M0iIhLexSFy+L+w0ch66wtoO2jRjG0A==} + engines: {node: '>=14'} + hasBin: true + + pretty-format@30.5.1: + resolution: {integrity: sha512-byhRAPguVKMQIj4kjJwJ5lAskVhfuiSdiYl/aLTWpgkGEmic2jYhJh1yE9ih8Ox44Xg9ccCT11/S6QrzSJuNrg==} + engines: {node: ^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0} + + prisma@7.10.0: + resolution: {integrity: sha512-o0ornyJOWgygVAzGCpr8PdXV8EJLHyVGDDUr/voBQt8Azzw8cYTByzzPGcA/m4tCkPcnJA8raEOv2CslsKhPEw==} + engines: {node: ^20.19 || ^22.12 || >=24.0} + hasBin: true + peerDependencies: + better-sqlite3: '>=9.0.0' + typescript: '>=5.4.0' + peerDependenciesMeta: + better-sqlite3: + optional: true + typescript: + optional: true + + process-warning@4.0.1: + resolution: {integrity: sha512-3c2LzQ3rY9d0hc1emcsHhfT9Jwz0cChib/QN89oME2R451w5fy3f0afAhERFZAwrbDU43wk12d0ORBpDVME50Q==} + + process-warning@5.1.0: + resolution: {integrity: sha512-jQSaVHsPgtyw60e1rQ/A+/ArPEj/S8pS/vFnyGa/gYFXrKk/6RuDkoqVDQ5NI5MmS01698ltlAk0NoDBNLujRw==} + + proper-lockfile@4.1.2: + resolution: {integrity: sha512-TjNPblN4BwAWMXU8s9AEz4JmQxnD1NNL7bNOY/AKUzyamc379FWASUhc/K1pL2noVb+XmZKLL68cjzLsiOAMaA==} + + proxy-addr@2.0.8: + resolution: {integrity: sha512-5nnx0yGyVUcY6t9RnWcARWtwT9F1D8O9rt08htPvnd49W1IgZtmLkhu9WfMzQj1cFxjHIO6connUNVW5k7AVyQ==} + engines: {node: '>= 0.10'} + + pump@3.0.4: + resolution: {integrity: sha512-VS7sjc6KR7e1ukRFhQSY5LM2uBWAUPiOPa/A3mkKmiMwSmRFUITt0xuj+/lesgnCv+dPIEYlkzrcyXgquIHMcA==} + + pure-rand@6.1.0: + resolution: {integrity: sha512-bVWawvoZoBYpp6yIoQtQXHZjmz35RSVHnUOTefl8Vcjr8snTPY1wnpSPMWekcFwbxI6gtmT7rSYPFvz71ldiOA==} + + pure-rand@7.0.1: + resolution: {integrity: sha512-oTUZM/NAZS8p7ANR3SHh30kXB+zK2r2BPcEn/awJIbOvq82WoMN4p62AWWp3Hhw50G0xMsw1mhIBLqHw64EcNQ==} + + qs@6.16.0: + resolution: {integrity: sha512-h6fhOIaRrID2CbEY2fqs+7t+UXZo+MLAnU5gRIq85uFtdiUPCdsApMlHhXogKVM4HM2DVbIjGNTTYH2OcmP1vA==} + engines: {node: '>=0.6'} + + quick-format-unescaped@4.0.4: + resolution: {integrity: sha512-tYC1Q1hgyRuHgloV/YXs2w15unPVh8qfu/qCTfhTYamaw7fyhumKa2yGpdSo87vY32rIclj+4fWYQXUMs9EHvg==} + + range-parser@1.3.0: + resolution: {integrity: sha512-hek2mFQpPuI4E1BBKrSto+BU3e3x4xuarsbiwr3+lf7p44juvFMV0XFWQAP3xUyqXA4RrXLIoaSUGbSt056ZMw==} + engines: {node: '>= 0.6'} + + raw-body@3.0.2: + resolution: {integrity: sha512-K5zQjDllxWkf7Z5xJdV0/B0WTNqx6vxG70zJE4N0kBs4LovmEYWJzQGxC9bS9RAKu3bgM40lrd5zoLJ12MQ5BA==} + engines: {node: '>= 0.10'} + + rc9@3.1.0: + resolution: {integrity: sha512-ufjkNVzbRHKcCOmTahZkmVsyc3W+MSk3jY03m+a7tGHkIsdVMG9l10/3HvFbWkkKzY5VFp3pkRsIo/UYgmFL7Q==} + + react-dom@19.3.0: + resolution: {integrity: sha512-JDk8dgif51OjFoDE70+OT9ICyYr+69HlmihNwp1+Nsfbna3t5sIiCa9ZJktDmQ4/1b/rn26hIAR2uYXDMr5r0Q==} + peerDependencies: + react: ^19.3.0 + + react-is@18.3.1: + resolution: {integrity: sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg==} + + react-is@19.3.0: + resolution: {integrity: sha512-UpMYezM4v5/18F28aC66AEsjXIgE02kyEMH6yLdgLXu/UTfa1Ntwck/nNLrbqJsEXW7gPb0coNO9FQse9WTovA==} + + react@19.3.0: + resolution: {integrity: sha512-E8LUcbtBWt20bbl2YoHfx4ZDBdxVTfOKtCZn9cDSJ4l6/nuoApcpIBcj47t2wZoVX8g2ZHuMHbiShgCR1T5Sog==} + engines: {node: '>=0.10.0'} + + readable-stream@3.6.2: + resolution: {integrity: sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==} + engines: {node: '>= 6'} + + readdirp@5.1.1: + resolution: {integrity: sha512-Kko+Y5XQ6fM+Ce3dq3m9YGxnacYZYl9cA1wZjaF3Vbry2L3i1qVg8+CAgNPsXRArPMUMCaOR7oa9Nqntc43JKA==} + engines: {node: '>= 20.19.0'} + + real-require@0.2.0: + resolution: {integrity: sha512-57frrGM/OCTLqLOAh0mhVA9VBMHd+9U7Zb2THMGdBUoZVOtGbJzjxsYGDJ3A9AYYCP4hn6y1TVbaOfzWtm5GFg==} + engines: {node: '>= 12.13.0'} + + real-require@1.0.0: + resolution: {integrity: sha512-P4nbQYQfePJxRSmY+v/KINxVucm4NF3p3s7pJveMTtom52FR4YGltUQLB8idDXwDDWW+eYrWDFbuzUnjoWHF7g==} + + redis-errors@1.2.0: + resolution: {integrity: sha512-1qny3OExCf0UvUV/5wpYKf2YwPcOqXzkwKKSmKHiE6ZMQs5heeE/c8eXK+PNllPvmjgAbfnsbpkGZWy8cBpn9w==} + engines: {node: '>=4'} + + reflect-metadata@0.2.2: + resolution: {integrity: sha512-urBwgfrvVP/eAyXx4hluJivBKzuEbSQs9rKWCrCkbSxNv8mxPcUZKeuoF3Uy4mJl3Lwprp6yy5/39VWigZ4K6Q==} + + remeda@2.33.4: + resolution: {integrity: sha512-ygHswjlc/opg2VrtiYvUOPLjxjtdKvjGz1/plDhkG66hjNjFr1xmfrs2ClNFo/E6TyUFiwYNh53bKV26oBoMGQ==} + + require-directory@2.1.1: + resolution: {integrity: sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==} + engines: {node: '>=0.10.0'} + + require-from-string@2.0.2: + resolution: {integrity: sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==} + engines: {node: '>=0.10.0'} + + resolve-cwd@3.0.0: + resolution: {integrity: sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg==} + engines: {node: '>=8'} + + resolve-from@5.0.0: + resolution: {integrity: sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==} + engines: {node: '>=8'} + + restore-cursor@3.1.0: + resolution: {integrity: sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==} + engines: {node: '>=8'} + + restore-cursor@5.1.0: + resolution: {integrity: sha512-oMA2dcrw6u0YfxJQXm342bFKX/E4sG9rbTzO9ptUcR/e8A33cHuvStiYOwH7fszkZlZ1z/ta9AAoPk2F4qIOHA==} + engines: {node: '>=18'} + + ret@0.5.0: + resolution: {integrity: sha512-I1XxrZSQ+oErkRR4jYbAyEEu2I0avBvvMM5JN+6EBprOGRCs63ENqZ3vjavq8fBw2+62G5LF5XelKwuJpcvcxw==} + engines: {node: '>=10'} + + retry@0.12.0: + resolution: {integrity: sha512-9LkiTwjUh6rT555DtE9rTX+BKByPfrMzEAtnlEtdEwr3Nkffwiihqe2bWADg+OQRjt9gl6ICdmB/ZFDCGAtSow==} + engines: {node: '>= 4'} + + reusify@1.1.0: + resolution: {integrity: sha512-g6QUff04oZpHs0eG5p83rFLhHeV00ug/Yf9nZM6fLeUrPguBTkTQOdpAWWspMh55TZfVQDPaN3NQJfbVRAxdIw==} + engines: {iojs: '>=1.0.0', node: '>=0.10.0'} + + rfdc@1.4.1: + resolution: {integrity: sha512-q1b3N5QkRUWUl7iyylaaj3kOpIT0N2i9MqIEQXP73GVsN9cw3fdx8X63cEmWhJGi2PPCF23Ijp7ktmd39rawIA==} + + robust-predicates@3.0.3: + resolution: {integrity: sha512-NS3levdsRIUOmiJ8FZWCP7LG3QpJyrs/TE0Zpf1yvZu8cAJJ6QMW92H1c7kWpdIHo8RvmLxN/o2JXTKHp74lUA==} + + router@2.2.0: + resolution: {integrity: sha512-nLTrUKm2UyiL7rlhapu/Zl45FwNgkZGaCpZbIHajDYgwlJCOzLSk+cIPAnsEqV955GjILJnKbdQC1nVPz+gAYQ==} + engines: {node: '>= 18'} + + run-async@2.4.1: + resolution: {integrity: sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ==} + engines: {node: '>=0.12.0'} + + rxjs@7.8.2: + resolution: {integrity: sha512-dhKf903U/PQZY6boNNtAGdWbG85WAbjT/1xYoZIC7FAY0yWapOBQVsVrDl58W86//e1VpMNBtRV4MaXfdMySFA==} + + safe-buffer@5.2.1: + resolution: {integrity: sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==} + + safe-regex2@5.1.1: + resolution: {integrity: sha512-mOSBvHGDZMuIEZMdOz/aCEYDCv0E7nfcNsIhUF+/P+xC7Hyf3FkvymqgPbg9D1EdSGu+uKbJgy09K/RKKc7kJA==} + hasBin: true + + safe-stable-stringify@2.5.0: + resolution: {integrity: sha512-b3rppTKm9T+PsVCBEOUR46GWI7fdOs00VKZ1+9c1EWDaDMvjQc6tUwuFyIprgGgTcWoVHSKrU8H31ZHA2e0RHA==} + engines: {node: '>=10'} + + safer-buffer@2.1.2: + resolution: {integrity: sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==} + + scheduler@0.28.0: + resolution: {integrity: sha512-juorfCmIkIw8tT+p5BXSm6PJjQF/ycEYmKyzURCIt/RaZIhL+PulbQ9Yu2z1HdOJDdqDTlxA1+xKBmHXJsczAw==} + + schema-utils@4.5.0: + resolution: {integrity: sha512-zJlMCZ0cAR5p/Y4oVpRoqioDMJcGxaXRrQ/4rP4WyR84vc5z/DolXdbvXeDpTwbtocDFr2rhPqHPErDCUtz2kA==} + engines: {node: '>= 10.13.0'} + + secure-json-parse@4.1.0: + resolution: {integrity: sha512-l4KnYfEyqYJxDwlNVyRfO2E4NTHfMKAWdUuA8J0yve2Dz/E/PdBepY03RvyJpssIpRFwJoCD55wA+mEDs6ByWA==} + + semver@6.3.1: + resolution: {integrity: sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==} + hasBin: true + + semver@7.8.5: + resolution: {integrity: sha512-Y7/KDsb8LjooZpwaqGyulO6DQlksgCncchHGk+sZIY4SBvUocMBEFH5Ur1fI4dV+Jvl0w6cjvucaIi40puRioA==} + engines: {node: '>=10'} + hasBin: true + + send@1.2.1: + resolution: {integrity: sha512-1gnZf7DFcoIcajTjTwjwuDjzuz4PPcY2StKPlsGAQ1+YH20IRVrBaXSWmdjowTJ6u8Rc01PoYOGHXfP1mYcZNQ==} + engines: {node: '>= 18'} + + seq-queue@0.0.5: + resolution: {integrity: sha512-hr3Wtp/GZIc/6DAGPDcV4/9WoZhjrkXsi5B/07QgX8tsdc6ilr7BFM6PM6rbdAX1kFSDYeZGLipIZZKyQP0O5Q==} + + serve-static@2.2.1: + resolution: {integrity: sha512-xRXBn0pPqQTVQiC8wyQrKs2MOlX24zQ0POGaj0kultvoOCstBQM5yvOhAVSUwOMjQtTvsPWoNCHfPGwaaQJhTw==} + engines: {node: '>= 18'} + + set-cookie-parser@2.7.2: + resolution: {integrity: sha512-oeM1lpU/UvhTxw+g3cIfxXHyJRc/uidd3yK1P242gzHds0udQBYzs3y8j4gCCW+ZJ7ad0yctld8RYO+bdurlvw==} + + setprototypeof@1.2.0: + resolution: {integrity: sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==} + + shebang-command@2.0.0: + resolution: {integrity: sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==} + engines: {node: '>=8'} + + shebang-regex@3.0.0: + resolution: {integrity: sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==} + engines: {node: '>=8'} + + side-channel-list@1.0.1: + resolution: {integrity: sha512-mjn/0bi/oUURjc5Xl7IaWi/OJJJumuoJFQJfDDyO46+hBWsfaVM65TBHq2eoZBhzl9EchxOijpkbRC8SVBQU0w==} + engines: {node: '>= 0.4'} + + side-channel-map@1.0.1: + resolution: {integrity: sha512-VCjCNfgMsby3tTdo02nbjtM/ewra6jPHmpThenkTYh8pG9ucZ/1P8So4u4FGBek/BjpOVsDCMoLA/iuBKIFXRA==} + engines: {node: '>= 0.4'} + + side-channel-weakmap@1.0.2: + resolution: {integrity: sha512-WPS/HvHQTYnHisLo9McqBHOJk2FkHO/tlpvldyrnem4aeQp4hai3gythswg6p01oSoTl58rcpiFAjF2br2Ak2A==} + engines: {node: '>= 0.4'} + + side-channel@1.1.1: + resolution: {integrity: sha512-6x6dK6zJdpTzF4sQeNYxwtvBzf6Eg4GtlesS94HOvTudUeyK2WXAaIfmDgsyslYrRBeFIlsi54AYsFGUuhmvrQ==} + engines: {node: '>= 0.4'} + + signal-exit@3.0.7: + resolution: {integrity: sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==} + + signal-exit@4.1.0: + resolution: {integrity: sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==} + engines: {node: '>=14'} + + skin-tone@2.0.0: + resolution: {integrity: sha512-kUMbT1oBJCpgrnKoSr0o6wPtvRWT9W9UKvGLwfJYO2WuahZRHOpEyL1ckyMGgMWh0UdpmaoFqKKD29WTomNEGA==} + engines: {node: '>=8'} + + slash@3.0.0: + resolution: {integrity: sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==} + engines: {node: '>=8'} + + sonic-boom@4.2.1: + resolution: {integrity: sha512-w6AxtubXa2wTXAUsZMMWERrsIRAdrK0Sc+FUytWvYAhBJLyuI4llrMIC1DtlNSdI99EI86KZum2MMq3EAZlF9Q==} + + source-map-support@0.5.21: + resolution: {integrity: sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==} + + source-map@0.6.1: + resolution: {integrity: sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==} + engines: {node: '>=0.10.0'} + + source-map@0.7.6: + resolution: {integrity: sha512-i5uvt8C3ikiWeNZSVZNWcfZPItFQOsYTUAOkcUPGd8DqDy1uOUikjt5dG+uRlwyvR108Fb9DOd4GvXfT0N2/uQ==} + engines: {node: '>= 12'} + + split2@4.2.0: + resolution: {integrity: sha512-UcjcJOWknrNkF6PLX83qcHM6KHgVKNkV62Y8a5uYDVv9ydGQVwAHMKqHdJje1VTWpljG0WYpCDhrCdAOYH4TWg==} + engines: {node: '>= 10.x'} + + sprintf-js@1.0.3: + resolution: {integrity: sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==} + + sqlstring@2.3.3: + resolution: {integrity: sha512-qC9iz2FlN7DQl3+wjwn3802RTyjCx7sDvfQEXchwa6CWOx07/WVfh91gBmQ9fahw8snwGEWU3xGzOt4tFyHLxg==} + engines: {node: '>= 0.6'} + + stack-utils@2.0.6: + resolution: {integrity: sha512-XlkWvfIm6RmsWtNJx+uqtKLS8eqFbxUg0ZzLXqY0caEy9l7hruX8IpiDnjsLavoBgqCCR71TqWO8MaXYheJ3RQ==} + engines: {node: '>=10'} + + standard-as-callback@2.1.0: + resolution: {integrity: sha512-qoRRSyROncaz1z0mvYqIE4lCd9p2R90i6GxW3uZv5ucSu8tU7B5HXUP1gG8pVZsYNVaXjk8ClXHPttLyxAL48A==} + + statuses@2.0.2: + resolution: {integrity: sha512-DvEy55V3DB7uknRo+4iOGT5fP1slR8wQohVdknigZPMpMstaKJQWhwiYBACJE3Ul2pTnATihhBYnRhZQHGBiRw==} + engines: {node: '>= 0.8'} + + std-env@3.10.0: + resolution: {integrity: sha512-5GS12FdOZNliM5mAOxFRg7Ir0pWz8MdpYm6AY6VPkGpbA7ZzmbzNcBJQ0GPvvyWgcY7QAhCgf9Uy89I03faLkg==} + + stdin-discarder@0.3.2: + resolution: {integrity: sha512-eCPu1qRxPVkl5605OTWF8Wz40b4Mf45NY5LQmVPQ599knfs5QhASUm9GbJ5BDMDOXgrnh0wyEdvzmL//YMlw0A==} + engines: {node: '>=18'} + + streamsearch@1.1.0: + resolution: {integrity: sha512-Mcc5wHehp9aXz1ax6bZUyY5afg9u2rv5cqQI3mRrYkGC8rW2hM02jWuwjtL++LS5qinSyhj2QfLyNsuc+VsExg==} + engines: {node: '>=10.0.0'} + + string-length@4.0.2: + resolution: {integrity: sha512-+l6rNN5fYHNhZZy41RXsYptCjA2Igmq4EG7kZAYFQI1E1VTXarr6ZPXBg6eq7Y6eK4FEhY6AJlyuFIb/v/S0VQ==} + engines: {node: '>=10'} + + string-width@4.2.3: + resolution: {integrity: sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==} + engines: {node: '>=8'} + + string-width@5.1.2: + resolution: {integrity: sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==} + engines: {node: '>=12'} + + string-width@8.2.2: + resolution: {integrity: sha512-GaPUh5gfdrYzqeVNZvUfT23vYYxXzKYidUcnMtJg/3rxRV63EFZy3k6xfKlmfeJD0176lnUV/Usr3XcwSvFzpg==} + engines: {node: '>=20'} + + string_decoder@1.3.0: + resolution: {integrity: sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==} + + strip-ansi@6.0.1: + resolution: {integrity: sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==} + engines: {node: '>=8'} + + strip-ansi@7.2.0: + resolution: {integrity: sha512-yDPMNjp4WyfYBkHnjIRLfca1i6KMyGCtsVgoKe/z1+6vukgaENdgGBZt+ZmKPc4gavvEZ5OgHfHdrazhgNyG7w==} + engines: {node: '>=12'} + + strip-bom@3.0.0: + resolution: {integrity: sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==} + engines: {node: '>=4'} + + strip-bom@4.0.0: + resolution: {integrity: sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w==} + engines: {node: '>=8'} + + strip-final-newline@2.0.0: + resolution: {integrity: sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==} + engines: {node: '>=6'} + + strip-json-comments@3.1.1: + resolution: {integrity: sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==} + engines: {node: '>=8'} + + strip-json-comments@5.0.3: + resolution: {integrity: sha512-1tB5mhVo7U+ETBKNf92xT4hrQa3pm0MZ0PQvuDnWgAAGHDsfp4lPSpiS6psrSiet87wyGPh9ft6wmhOMQ0hDiw==} + engines: {node: '>=14.16'} + + strtok3@10.3.5: + resolution: {integrity: sha512-ki4hZQfh5rX0QDLLkOCj+h+CVNkqmp/CMf8v8kZpkNVK6jGQooMytqzLZYUVYIZcFZ6yDB70EfD8POcFXiF5oA==} + engines: {node: '>=18'} + + superagent@10.3.0: + resolution: {integrity: sha512-B+4Ik7ROgVKrQsXTV0Jwp2u+PXYLSlqtDAhYnkkD+zn3yg8s/zjA2MeGayPoY/KICrbitwneDHrjSotxKL+0XQ==} + engines: {node: '>=14.18.0'} + + supertest@7.2.2: + resolution: {integrity: sha512-oK8WG9diS3DlhdUkcFn4tkNIiIbBx9lI2ClF8K+b2/m8Eyv47LSawxUzZQSNKUrVb2KsqeTDCcjAAVPYaSLVTA==} + engines: {node: '>=14.18.0'} + + supports-color@7.2.0: + resolution: {integrity: sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==} + engines: {node: '>=8'} + + supports-color@8.1.1: + resolution: {integrity: sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==} + engines: {node: '>=10'} + + swagger-ui-dist@5.32.14: + resolution: {integrity: sha512-nOA2pSQhcmODMUQZpJHYKNuwniDUqcOWGNaSCOoZv12FdOSJ9JxV95HtyRGNMqEBj6h6lCNTy20TgZDYTSuUIg==} + + synckit@0.11.13: + resolution: {integrity: sha512-eNRKgb3z66Yp3D2CixVujOUvXLFUTij/zVnV8KRyvFdQwpz7I5DS8UfRkTeLzb64u+dkzDSdelE24izu+zSSUg==} + engines: {node: ^14.18.0 || >=16.0.0} + + tagged-tag@1.0.0: + resolution: {integrity: sha512-yEFYrVhod+hdNyx7g5Bnkkb0G6si8HJurOoOEgC8B/O0uXLHlaey/65KRv6cuWBNhBgHKAROVpc7QyYqE5gFng==} + engines: {node: '>=20'} + + tapable@2.3.3: + resolution: {integrity: sha512-uxc/zpqFg6x7C8vOE7lh6Lbda8eEL9zmVm/PLeTPBRhh1xCgdWaQ+J1CUieGpIfm2HdtsUpRv+HshiasBMcc6A==} + engines: {node: '>=6'} + + terser@5.51.2: + resolution: {integrity: sha512-bWnjSNscmuI+GJze6ZupnHP8G/cTcsJF+bXCeQknk2SHQsgbNJnLrqiH9jZ2W4STPVXH2mDKKRX3iwPhc9Cn/Q==} + engines: {node: '>=10'} + hasBin: true + + test-exclude@7.0.2: + resolution: {integrity: sha512-u9E6A+ZDYdp7a4WnarkXPZOx8Ilz46+kby6p1yZ8zsGTz9gYa6FIS7lj2oezzNKmtdyyJNNmmXDppga5GB7kSw==} + engines: {node: '>=18'} + + thread-stream@4.2.0: + resolution: {integrity: sha512-e2zZ96wSChazBsbENf/Pcm/4swHt2cEKQ92rhUjkL9GCKiTDJIaTBenjE/m9DXi0QBmTMDkFDdOomUy20A1tDQ==} + engines: {node: '>=20'} + + through@2.3.8: + resolution: {integrity: sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==} + + tmp@0.0.33: + resolution: {integrity: sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==} + engines: {node: '>=0.6.0'} + + toad-cache@3.7.4: + resolution: {integrity: sha512-m1TdR/rvT7kgGJZhspNtXdsdYk0fddFpJJFlG5s+UkPFo6lkLoZ3YLOaovPYjq1R75NP5JfeTlSHaOsE09peCg==} + engines: {node: '>=20'} + + toidentifier@1.0.1: + resolution: {integrity: sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==} + engines: {node: '>=0.6'} + + token-types@6.1.2: + resolution: {integrity: sha512-dRXchy+C0IgK8WPC6xvCHFRIWYUbqqdEIKPaKo/AcTUNzwLTK6AH7RjdLWsEZcAN/TBdtfUw3PYEgPr5VPr6ww==} + engines: {node: '>=14.16'} + + ts-jest@29.4.12: + resolution: {integrity: sha512-Ov6ClY53Fflh6BGAnY2DlTq1hYDrTycz2PVTXBWFW2CU+9zrEqAp9fWdGXl42EXO5RLSFAcAZ2JFKbP+zBTFfw==} + engines: {node: ^14.15.0 || ^16.10.0 || ^18.0.0 || >=20.0.0} + hasBin: true + peerDependencies: + '@babel/core': '>=7.0.0-beta.0 <8' + '@jest/transform': ^29.0.0 || ^30.0.0 + '@jest/types': ^29.0.0 || ^30.0.0 + babel-jest: ^29.0.0 || ^30.0.0 + esbuild: '*' + jest: ^29.0.0 || ^30.0.0 + jest-util: ^29.0.0 || ^30.0.0 + typescript: '>=4.3 <7' + peerDependenciesMeta: + '@babel/core': + optional: true + '@jest/transform': + optional: true + '@jest/types': + optional: true + babel-jest: + optional: true + esbuild: + optional: true + jest-util: + optional: true + + ts-loader@9.6.2: + resolution: {integrity: sha512-R4iuczmtgxvtuI556s+hTZ6/7Ee03VCAk/l/M8LY1OAsUgB7YydsCxkgq9D9pKRaD7GJqUi2u8fp9zZP/ufjKA==} + engines: {node: '>=12.0.0'} + peerDependencies: + loader-utils: '*' + typescript: '*' + webpack: ^4.0.0 || ^5.0.0 + peerDependenciesMeta: + loader-utils: + optional: true + + ts-node@10.9.2: + resolution: {integrity: sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ==} + hasBin: true + peerDependencies: + '@swc/core': '>=1.2.50' + '@swc/wasm': '>=1.2.50' + '@types/node': '*' + typescript: '>=2.7' + peerDependenciesMeta: + '@swc/core': + optional: true + '@swc/wasm': + optional: true + + tsconfig-paths@4.2.0: + resolution: {integrity: sha512-NoZ4roiN7LnbKn9QqE1amc9DJfzvZXxF4xDavcOWt1BPkdx+m+0gJuPM+S0vCe7zTJMYUP0R8pO2XMr+Y8oLIg==} + engines: {node: '>=6'} + + tslib@2.8.1: + resolution: {integrity: sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==} + + type-detect@4.0.8: + resolution: {integrity: sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==} + engines: {node: '>=4'} + + type-fest@0.21.3: + resolution: {integrity: sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==} + engines: {node: '>=10'} + + type-fest@4.41.0: + resolution: {integrity: sha512-TeTSQ6H5YHvpqVwBRcnLDCBnDOHWYu7IvGbHT6N8AOymcr9PJGjc1GTtiWZTYg0NCgYwvnYWEkVChQAr9bjfwA==} + engines: {node: '>=16'} + + type-fest@5.10.0: + resolution: {integrity: sha512-NoSdpq/WEiAg5sjmBkmV/hfxv6HJH4NqPNrqjtSO5CwRmpsDfaf4begxW34KdJykH/l1yHtwBWQkCRdoXO8mPA==} + engines: {node: '>=20'} + + type-is@1.6.18: + resolution: {integrity: sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==} + engines: {node: '>= 0.6'} + + type-is@2.1.0: + resolution: {integrity: sha512-faYHw0anBbc/kWF3zFTEnxSFOAGUX9GFbOBthvDdLsIlEoWOFOtS0zgCiQYwIskL9iGXZL3kAXD8OoZ4GmMATA==} + engines: {node: '>= 18'} + + typescript@6.0.3: + resolution: {integrity: sha512-y2TvuxSZPDyQakkFRPZHKFm+KKVqIisdg9/CZwm9ftvKXLP8NRWj38/ODjNbr43SsoXqNuAisEf1GdCxqWcdBw==} + engines: {node: '>=14.17'} + hasBin: true + + uglify-js@3.19.3: + resolution: {integrity: sha512-v3Xu+yuwBXisp6QYTcH4UbH+xYJXqnq2m/LtQVWKWzYc1iehYnLixoQDN9FH6/j9/oybfd6W9Ghwkl8+UMKTKQ==} + engines: {node: '>=0.8.0'} + hasBin: true + + uid@2.0.2: + resolution: {integrity: sha512-u3xV3X7uzvi5b1MncmZo3i2Aw222Zk1keqLA1YkHldREkAhAqi65wuPfe7lHx8H/Wzy+8CE7S7uS3jekIM5s8g==} + engines: {node: '>=8'} + + uint8array-extras@1.5.0: + resolution: {integrity: sha512-rvKSBiC5zqCCiDZ9kAOszZcDvdAHwwIKJG33Ykj43OKcWsnmcBRL09YTU4nOeHZ8Y2a7l1MgTd08SBe9A8Qj6A==} + engines: {node: '>=18'} + + undici-types@7.18.2: + resolution: {integrity: sha512-AsuCzffGHJybSaRrmr5eHr81mwJU3kjw6M+uprWvCXiNeN9SOGwQ3Jn8jb8m3Z6izVgknn1R0FTCEAP2QrLY/w==} + + undici@6.20.1: + resolution: {integrity: sha512-AjQF1QsmqfJys+LXfGTNum+qw4S88CojRInG/6t31W/1fk6G59s92bnAvGz5Cmur+kQv2SURXEvvudLmbrE8QA==} + engines: {node: '>=18.17'} + + unicode-emoji-modifier-base@1.0.0: + resolution: {integrity: sha512-yLSH4py7oFH3oG/9K+XWrz1pSi3dfUrWEnInbxMfArOfc1+33BlGPQtLsOYwvdMy11AwUBetYuaRxSPqgkq+8g==} + engines: {node: '>=4'} + + unpipe@1.0.0: + resolution: {integrity: sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==} + engines: {node: '>= 0.8'} + + unrs-resolver@1.12.2: + resolution: {integrity: sha512-dmlRxBJJayXjqTwC+JtF1HhJmgf3ftQ3YejFcZrf4+KKtJv0qDsK1pjqaaVjG7wJ5NJ6UVP1OqRMQ71Z4C3rxQ==} + + update-browserslist-db@1.3.3: + resolution: {integrity: sha512-pJ2sYawQS0R/WI928Gj5GlPhTGzbMelq0+4INtSYNDV9ErKJcX6xjGWkoG/VnB3dpUm00zALaqkrUD77pO5TDQ==} + hasBin: true + peerDependencies: + browserslist: '>= 4.21.0' + + util-deprecate@1.0.2: + resolution: {integrity: sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==} + + v8-compile-cache-lib@3.0.1: + resolution: {integrity: sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==} + + v8-to-istanbul@9.3.0: + resolution: {integrity: sha512-kiGUalWN+rgBJ/1OHZsBtU4rXZOfj/7rKQxULKlIzwzQSvMJUUNgPwJEEh7gU6xEVxC0ahoOBvN2YI8GH6FNgA==} + engines: {node: '>=10.12.0'} + + valibot@1.4.2: + resolution: {integrity: sha512-gjdCvJ6d3RyHAneqxMYMW9QMCwYMb3jpOO0IyHZV1bnRHFBHrX3VkIILt5XYR0WhwHiH7Mty8ovuPZ/O3gamrg==} + peerDependencies: + typescript: '>=5' + peerDependenciesMeta: + typescript: + optional: true + + vary@1.1.2: + resolution: {integrity: sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==} + engines: {node: '>= 0.8'} + + watchpack@2.5.2: + resolution: {integrity: sha512-6i/00NBjP4yGPs+caKSyRfpTF/8Torsu0MOW3mMzIbhgISFder8i7xbqgHlLMwJrdiN8ndBV3UA1/AfzPSr+jg==} + engines: {node: '>=10.13.0'} + + wcwidth@1.0.1: + resolution: {integrity: sha512-XHPEwS0q6TaxcvG85+8EYkbiCux2XtWG2mkc47Ng2A77BQu9+DqIOJldST4HgPkuea7dvKSj5VgX3P1d4rW8Tg==} + + webpack-sources@3.5.1: + resolution: {integrity: sha512-jyuiGJdtvY434z5bUZrjz67v76/ePNvFZTp9Mdz29IlH4+GPsgyGjiv0fKI+M7BdkU6ADjulUcKAd3tUK3WlEw==} + engines: {node: '>=10.13.0'} + + webpack@5.111.1: + resolution: {integrity: sha512-cNypaz0RP+S4cvQVi1M/3bRUkvNP0xZpL0TjFx+c6jg64VbxD+2weWDgY9UnjRI6dhZgtaj8DU76GGFcJ79xPQ==} + engines: {node: '>=10.13.0'} + hasBin: true + peerDependencies: + webpack-cli: '*' + peerDependenciesMeta: + webpack-cli: + optional: true + + which@2.0.2: + resolution: {integrity: sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==} + engines: {node: '>= 8'} + hasBin: true + + wordwrap@1.0.0: + resolution: {integrity: sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q==} + + wrap-ansi@6.2.0: + resolution: {integrity: sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==} + engines: {node: '>=8'} + + wrap-ansi@7.0.0: + resolution: {integrity: sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==} + engines: {node: '>=10'} + + wrap-ansi@8.1.0: + resolution: {integrity: sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==} + engines: {node: '>=12'} + + wrappy@1.0.2: + resolution: {integrity: sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==} + + write-file-atomic@5.0.1: + resolution: {integrity: sha512-+QU2zd6OTD8XWIJCbffaiQeH9U73qIqafo1x6V1snCWYGJf6cVE0cDR4D8xRzcEnfI21IFrUPzPGtcPf8AC+Rw==} + engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} + + xtend@4.0.2: + resolution: {integrity: sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==} + engines: {node: '>=0.4'} + + y18n@5.0.8: + resolution: {integrity: sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==} + engines: {node: '>=10'} + + yallist@3.1.1: + resolution: {integrity: sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==} + + yargs-parser@21.1.1: + resolution: {integrity: sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==} + engines: {node: '>=12'} + + yargs@17.7.3: + resolution: {integrity: sha512-GZtjxm/J/4TSxuL3FNYjCmLktBTnIw/rVmKSIyKeYAZpmJB2ig9VauCC5xsa82GNKVKDAqpOn3KVzNt0zmrU0g==} + engines: {node: '>=12'} + + yn@3.1.1: + resolution: {integrity: sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==} + engines: {node: '>=6'} + + yocto-queue@0.1.0: + resolution: {integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==} + engines: {node: '>=10'} + + yoctocolors@2.2.0: + resolution: {integrity: sha512-xYqdZFUK/VYazNl/oCDYN+3WloWQwMfZxBoiNt6qNyk+xfOdi598muWE42rNZFp1kNOiqW936q5RhUdnpqElSg==} + engines: {node: '>=18'} + + zeptomatch@2.1.0: + resolution: {integrity: sha512-KiGErG2J0G82LSpniV0CtIzjlJ10E04j02VOudJsPyPwNZgGnRKQy7I1R7GMyg/QswnE4l7ohSGrQbQbjXPPDA==} + + zod@4.6.5: + resolution: {integrity: sha512-v5l/aFXZQeai4awLbOpSoHecE9UiMrnfx75tEXLjNonXVARxQ5mOeipTjROUchszUNCqnE+hqAMujRsRHsut2Q==} + +snapshots: + + '@angular-devkit/core@22.1.8(chokidar@5.0.0)': + dependencies: + ajv: 8.20.0 + ajv-formats: 3.0.1(ajv@8.20.0) + jsonc-parser: 3.3.1 + picomatch: 4.0.5 + rxjs: 7.8.2 + source-map: 0.7.6 + optionalDependencies: + chokidar: 5.0.0 + + '@angular-devkit/schematics-cli@22.1.8(@types/node@24.13.6)(chokidar@5.0.0)': + dependencies: + '@angular-devkit/core': 22.1.8(chokidar@5.0.0) + '@angular-devkit/schematics': 22.1.8(chokidar@5.0.0) + '@inquirer/prompts': 8.5.2(@types/node@24.13.6) + transitivePeerDependencies: + - '@types/node' + - chokidar + + '@angular-devkit/schematics@22.1.8(chokidar@5.0.0)': + dependencies: + '@angular-devkit/core': 22.1.8(chokidar@5.0.0) + jsonc-parser: 3.3.1 + magic-string: 1.0.0 + ora: 9.4.1 + rxjs: 7.8.2 + transitivePeerDependencies: + - chokidar + + '@babel/code-frame@7.29.7': + dependencies: + '@babel/helper-validator-identifier': 7.29.7 + js-tokens: 4.0.0 + picocolors: 1.1.1 + + '@babel/compat-data@7.29.7': {} + + '@babel/core@7.29.7': + dependencies: + '@babel/code-frame': 7.29.7 + '@babel/generator': 7.29.8 + '@babel/helper-compilation-targets': 7.29.7 + '@babel/helper-module-transforms': 7.29.7(@babel/core@7.29.7) + '@babel/helpers': 7.29.7 + '@babel/parser': 7.29.9 + '@babel/template': 7.29.7 + '@babel/traverse': 7.29.8 + '@babel/types': 7.29.8 + '@jridgewell/remapping': 2.3.5 + convert-source-map: 2.0.0 + debug: 4.4.3 + gensync: 1.0.0-beta.2 + json5: 2.2.3 + semver: 6.3.1 + transitivePeerDependencies: + - supports-color + + '@babel/generator@7.29.8': + dependencies: + '@babel/parser': 7.29.9 + '@babel/types': 7.29.8 + '@jridgewell/gen-mapping': 0.3.13 + '@jridgewell/trace-mapping': 0.3.31 + jsesc: 3.1.0 + + '@babel/helper-compilation-targets@7.29.7': + dependencies: + '@babel/compat-data': 7.29.7 + '@babel/helper-validator-option': 7.29.7 + browserslist: 4.29.0 + lru-cache: 5.1.1 + semver: 6.3.1 + + '@babel/helper-globals@7.29.7': {} + + '@babel/helper-module-imports@7.29.7': + dependencies: + '@babel/traverse': 7.29.8 + '@babel/types': 7.29.8 + transitivePeerDependencies: + - supports-color + + '@babel/helper-module-transforms@7.29.7(@babel/core@7.29.7)': + dependencies: + '@babel/core': 7.29.7 + '@babel/helper-module-imports': 7.29.7 + '@babel/helper-validator-identifier': 7.29.7 + '@babel/traverse': 7.29.8 + transitivePeerDependencies: + - supports-color + + '@babel/helper-plugin-utils@7.29.7': {} + + '@babel/helper-string-parser@7.29.7': {} + + '@babel/helper-validator-identifier@7.29.7': {} + + '@babel/helper-validator-option@7.29.7': {} + + '@babel/helpers@7.29.7': + dependencies: + '@babel/template': 7.29.7 + '@babel/types': 7.29.8 + + '@babel/parser@7.29.9': + dependencies: + '@babel/types': 7.29.8 + + '@babel/plugin-syntax-async-generators@7.8.4(@babel/core@7.29.7)': + dependencies: + '@babel/core': 7.29.7 + '@babel/helper-plugin-utils': 7.29.7 + + '@babel/plugin-syntax-bigint@7.8.3(@babel/core@7.29.7)': + dependencies: + '@babel/core': 7.29.7 + '@babel/helper-plugin-utils': 7.29.7 + + '@babel/plugin-syntax-class-properties@7.12.13(@babel/core@7.29.7)': + dependencies: + '@babel/core': 7.29.7 + '@babel/helper-plugin-utils': 7.29.7 + + '@babel/plugin-syntax-class-static-block@7.14.5(@babel/core@7.29.7)': + dependencies: + '@babel/core': 7.29.7 + '@babel/helper-plugin-utils': 7.29.7 + + '@babel/plugin-syntax-import-attributes@7.29.7(@babel/core@7.29.7)': + dependencies: + '@babel/core': 7.29.7 + '@babel/helper-plugin-utils': 7.29.7 + + '@babel/plugin-syntax-import-meta@7.10.4(@babel/core@7.29.7)': + dependencies: + '@babel/core': 7.29.7 + '@babel/helper-plugin-utils': 7.29.7 + + '@babel/plugin-syntax-json-strings@7.8.3(@babel/core@7.29.7)': + dependencies: + '@babel/core': 7.29.7 + '@babel/helper-plugin-utils': 7.29.7 + + '@babel/plugin-syntax-jsx@7.29.7(@babel/core@7.29.7)': + dependencies: + '@babel/core': 7.29.7 + '@babel/helper-plugin-utils': 7.29.7 + + '@babel/plugin-syntax-logical-assignment-operators@7.10.4(@babel/core@7.29.7)': + dependencies: + '@babel/core': 7.29.7 + '@babel/helper-plugin-utils': 7.29.7 + + '@babel/plugin-syntax-nullish-coalescing-operator@7.8.3(@babel/core@7.29.7)': + dependencies: + '@babel/core': 7.29.7 + '@babel/helper-plugin-utils': 7.29.7 + + '@babel/plugin-syntax-numeric-separator@7.10.4(@babel/core@7.29.7)': + dependencies: + '@babel/core': 7.29.7 + '@babel/helper-plugin-utils': 7.29.7 + + '@babel/plugin-syntax-object-rest-spread@7.8.3(@babel/core@7.29.7)': + dependencies: + '@babel/core': 7.29.7 + '@babel/helper-plugin-utils': 7.29.7 + + '@babel/plugin-syntax-optional-catch-binding@7.8.3(@babel/core@7.29.7)': + dependencies: + '@babel/core': 7.29.7 + '@babel/helper-plugin-utils': 7.29.7 + + '@babel/plugin-syntax-optional-chaining@7.8.3(@babel/core@7.29.7)': + dependencies: + '@babel/core': 7.29.7 + '@babel/helper-plugin-utils': 7.29.7 + + '@babel/plugin-syntax-private-property-in-object@7.14.5(@babel/core@7.29.7)': + dependencies: + '@babel/core': 7.29.7 + '@babel/helper-plugin-utils': 7.29.7 + + '@babel/plugin-syntax-top-level-await@7.14.5(@babel/core@7.29.7)': + dependencies: + '@babel/core': 7.29.7 + '@babel/helper-plugin-utils': 7.29.7 + + '@babel/plugin-syntax-typescript@7.29.7(@babel/core@7.29.7)': + dependencies: + '@babel/core': 7.29.7 + '@babel/helper-plugin-utils': 7.29.7 + + '@babel/template@7.29.7': + dependencies: + '@babel/code-frame': 7.29.7 + '@babel/parser': 7.29.9 + '@babel/types': 7.29.8 + + '@babel/traverse@7.29.8': + dependencies: + '@babel/code-frame': 7.29.7 + '@babel/generator': 7.29.8 + '@babel/helper-globals': 7.29.7 + '@babel/parser': 7.29.9 + '@babel/template': 7.29.7 + '@babel/types': 7.29.8 + debug: 4.4.3 + transitivePeerDependencies: + - supports-color + + '@babel/types@7.29.8': + dependencies: + '@babel/helper-string-parser': 7.29.7 + '@babel/helper-validator-identifier': 7.29.7 + + '@bcoe/v8-coverage@0.2.3': {} + + '@borewit/text-codec@0.2.2': {} + + '@colors/colors@1.5.0': + optional: true + + '@cspotcode/source-map-support@0.8.1': + dependencies: + '@jridgewell/trace-mapping': 0.3.9 + + '@electric-sql/pglite-socket@0.1.3(@electric-sql/pglite@0.4.3)': + dependencies: + '@electric-sql/pglite': 0.4.3 + + '@electric-sql/pglite-tools@0.3.3(@electric-sql/pglite@0.4.3)': + dependencies: + '@electric-sql/pglite': 0.4.3 + + '@electric-sql/pglite@0.4.3': {} + + '@emnapi/core@1.10.0': + dependencies: + '@emnapi/wasi-threads': 1.2.1 + tslib: 2.8.1 + optional: true + + '@emnapi/runtime@1.10.0': + dependencies: + tslib: 2.8.1 + optional: true + + '@emnapi/wasi-threads@1.2.1': + dependencies: + tslib: 2.8.1 + optional: true + + '@fastify/accept-negotiator@2.1.0': {} + + '@fastify/ajv-compiler@4.0.6': + dependencies: + ajv: 8.20.0 + ajv-formats: 3.0.1(ajv@8.20.0) + fast-uri: 4.2.1 + + '@fastify/cors@11.3.0': + dependencies: + fastify-plugin: 6.0.0 + toad-cache: 3.7.4 + + '@fastify/error@4.2.0': {} + + '@fastify/fast-json-stringify-compiler@5.1.0': + dependencies: + fast-json-stringify: 7.0.1 + + '@fastify/formbody@9.0.0': + dependencies: + fast-querystring: 1.1.2 + fastify-plugin: 6.0.0 + + '@fastify/forwarded@3.0.2': {} + + '@fastify/merge-json-schemas@0.2.1': + dependencies: + dequal: 2.0.3 + + '@fastify/proxy-addr@5.1.1': + dependencies: + '@fastify/forwarded': 3.0.2 + ipaddr.js: 2.5.0 + + '@fastify/send@4.1.1': + dependencies: + '@lukeed/ms': 2.0.2 + escape-html: 1.0.3 + fast-decode-uri-component: 1.0.1 + http-errors: 2.0.1 + mime: 3.0.0 + + '@fastify/static@10.1.4': + dependencies: + '@fastify/accept-negotiator': 2.1.0 + '@fastify/error': 4.2.0 + '@fastify/send': 4.1.1 + content-disposition: 3.0.0 + fastify-plugin: 6.0.0 + fastq: 1.20.3 + glob: 13.0.6 + + '@inquirer/ansi@2.0.8': {} + + '@inquirer/checkbox@5.2.5(@types/node@24.13.6)': + dependencies: + '@inquirer/ansi': 2.0.8 + '@inquirer/core': 12.0.3(@types/node@24.13.6) + '@inquirer/figures': 2.0.9 + '@inquirer/type': 4.1.1(@types/node@24.13.6) + optionalDependencies: + '@types/node': 24.13.6 + + '@inquirer/confirm@6.3.2(@types/node@24.13.6)': + dependencies: + '@inquirer/core': 12.0.3(@types/node@24.13.6) + '@inquirer/type': 4.1.1(@types/node@24.13.6) + optionalDependencies: + '@types/node': 24.13.6 + + '@inquirer/core@12.0.3(@types/node@24.13.6)': + dependencies: + '@inquirer/ansi': 2.0.8 + '@inquirer/figures': 2.0.9 + '@inquirer/type': 4.1.1(@types/node@24.13.6) + cli-width: 4.1.0 + fast-wrap-ansi: 0.2.2 + mute-stream: 3.0.0 + signal-exit: 4.1.0 + optionalDependencies: + '@types/node': 24.13.6 + + '@inquirer/editor@5.3.3(@types/node@24.13.6)': + dependencies: + '@inquirer/core': 12.0.3(@types/node@24.13.6) + '@inquirer/external-editor': 3.0.5(@types/node@24.13.6) + '@inquirer/type': 4.1.1(@types/node@24.13.6) + optionalDependencies: + '@types/node': 24.13.6 + + '@inquirer/expand@5.1.5(@types/node@24.13.6)': + dependencies: + '@inquirer/core': 12.0.3(@types/node@24.13.6) + '@inquirer/type': 4.1.1(@types/node@24.13.6) + optionalDependencies: + '@types/node': 24.13.6 + + '@inquirer/external-editor@3.0.5(@types/node@24.13.6)': + dependencies: + chardet: 2.2.0 + iconv-lite: 0.7.3 + optionalDependencies: + '@types/node': 24.13.6 + + '@inquirer/figures@2.0.9': {} + + '@inquirer/input@5.1.6(@types/node@24.13.6)': + dependencies: + '@inquirer/core': 12.0.3(@types/node@24.13.6) + '@inquirer/type': 4.1.1(@types/node@24.13.6) + optionalDependencies: + '@types/node': 24.13.6 + + '@inquirer/number@4.2.3(@types/node@24.13.6)': + dependencies: + '@inquirer/core': 12.0.3(@types/node@24.13.6) + '@inquirer/type': 4.1.1(@types/node@24.13.6) + optionalDependencies: + '@types/node': 24.13.6 + + '@inquirer/password@5.2.2(@types/node@24.13.6)': + dependencies: + '@inquirer/ansi': 2.0.8 + '@inquirer/core': 12.0.3(@types/node@24.13.6) + '@inquirer/type': 4.1.1(@types/node@24.13.6) + optionalDependencies: + '@types/node': 24.13.6 + + '@inquirer/prompts@8.5.2(@types/node@24.13.6)': + dependencies: + '@inquirer/checkbox': 5.2.5(@types/node@24.13.6) + '@inquirer/confirm': 6.3.2(@types/node@24.13.6) + '@inquirer/editor': 5.3.3(@types/node@24.13.6) + '@inquirer/expand': 5.1.5(@types/node@24.13.6) + '@inquirer/input': 5.1.6(@types/node@24.13.6) + '@inquirer/number': 4.2.3(@types/node@24.13.6) + '@inquirer/password': 5.2.2(@types/node@24.13.6) + '@inquirer/rawlist': 5.3.5(@types/node@24.13.6) + '@inquirer/search': 4.3.3(@types/node@24.13.6) + '@inquirer/select': 5.2.5(@types/node@24.13.6) + optionalDependencies: + '@types/node': 24.13.6 + + '@inquirer/prompts@8.7.2(@types/node@24.13.6)': + dependencies: + '@inquirer/checkbox': 5.2.5(@types/node@24.13.6) + '@inquirer/confirm': 6.3.2(@types/node@24.13.6) + '@inquirer/editor': 5.3.3(@types/node@24.13.6) + '@inquirer/expand': 5.1.5(@types/node@24.13.6) + '@inquirer/input': 5.1.6(@types/node@24.13.6) + '@inquirer/number': 4.2.3(@types/node@24.13.6) + '@inquirer/password': 5.2.2(@types/node@24.13.6) + '@inquirer/rawlist': 5.3.5(@types/node@24.13.6) + '@inquirer/search': 4.3.3(@types/node@24.13.6) + '@inquirer/select': 5.2.5(@types/node@24.13.6) + optionalDependencies: + '@types/node': 24.13.6 + + '@inquirer/rawlist@5.3.5(@types/node@24.13.6)': + dependencies: + '@inquirer/core': 12.0.3(@types/node@24.13.6) + '@inquirer/type': 4.1.1(@types/node@24.13.6) + optionalDependencies: + '@types/node': 24.13.6 + + '@inquirer/search@4.3.3(@types/node@24.13.6)': + dependencies: + '@inquirer/core': 12.0.3(@types/node@24.13.6) + '@inquirer/figures': 2.0.9 + '@inquirer/type': 4.1.1(@types/node@24.13.6) + optionalDependencies: + '@types/node': 24.13.6 + + '@inquirer/select@5.2.5(@types/node@24.13.6)': + dependencies: + '@inquirer/ansi': 2.0.8 + '@inquirer/core': 12.0.3(@types/node@24.13.6) + '@inquirer/figures': 2.0.9 + '@inquirer/type': 4.1.1(@types/node@24.13.6) + optionalDependencies: + '@types/node': 24.13.6 + + '@inquirer/type@4.1.1(@types/node@24.13.6)': + optionalDependencies: + '@types/node': 24.13.6 + + '@ioredis/commands@2.0.0': {} + + '@isaacs/cliui@8.0.2': + dependencies: + string-width: 5.1.2 + string-width-cjs: string-width@4.2.3 + strip-ansi: 7.2.0 + strip-ansi-cjs: strip-ansi@6.0.1 + wrap-ansi: 8.1.0 + wrap-ansi-cjs: wrap-ansi@7.0.0 + + '@istanbuljs/load-nyc-config@1.1.0': + dependencies: + camelcase: 5.3.1 + find-up: 4.1.0 + get-package-type: 0.1.0 + js-yaml: 3.15.2 + resolve-from: 5.0.0 + + '@istanbuljs/schema@0.1.6': {} + + '@jest/console@30.5.2': + dependencies: + '@jest/types': 30.5.1 + '@types/node': 24.13.6 + chalk: 4.1.2 + jest-message-util: 30.5.1 + jest-util: 30.5.1 + slash: 3.0.0 + + '@jest/core@30.5.2(ts-node@10.9.2(@types/node@24.13.6)(typescript@6.0.3))': + dependencies: + '@jest/console': 30.5.2 + '@jest/pattern': 30.5.0 + '@jest/reporters': 30.5.2 + '@jest/test-result': 30.5.2 + '@jest/transform': 30.5.2 + '@jest/types': 30.5.1 + '@types/node': 24.13.6 + ansi-escapes: 4.3.2 + chalk: 4.1.2 + ci-info: 4.4.0 + exit-x: 0.2.2 + fast-json-stable-stringify: 2.1.0 + graceful-fs: 4.2.11 + jest-changed-files: 30.5.1 + jest-config: 30.5.2(@types/node@24.13.6)(ts-node@10.9.2(@types/node@24.13.6)(typescript@6.0.3)) + jest-haste-map: 30.5.1 + jest-message-util: 30.5.1 + jest-regex-util: 30.5.0 + jest-resolve: 30.5.1 + jest-resolve-dependencies: 30.5.2 + jest-runner: 30.5.2 + jest-runtime: 30.5.2 + jest-snapshot: 30.5.2 + jest-util: 30.5.1 + jest-validate: 30.5.1 + jest-watcher: 30.5.2 + pretty-format: 30.5.1 + slash: 3.0.0 + transitivePeerDependencies: + - babel-plugin-macros + - esbuild-register + - supports-color + - ts-node + + '@jest/diff-sequences@30.5.0': {} + + '@jest/environment@30.5.2': + dependencies: + '@jest/fake-timers': 30.5.2 + '@jest/types': 30.5.1 + '@types/node': 24.13.6 + jest-mock: 30.5.2 + + '@jest/expect-utils@30.5.2': + dependencies: + '@jest/get-type': 30.5.0 + + '@jest/expect@30.5.2': + dependencies: + expect: 30.5.2 + jest-snapshot: 30.5.2 + transitivePeerDependencies: + - supports-color + + '@jest/fake-timers@30.5.2': + dependencies: + '@jest/types': 30.5.1 + '@sinonjs/fake-timers': 15.4.0 + '@types/node': 24.13.6 + jest-message-util: 30.5.1 + jest-mock: 30.5.2 + jest-util: 30.5.1 + + '@jest/get-type@30.5.0': {} + + '@jest/globals@30.5.2': + dependencies: + '@jest/environment': 30.5.2 + '@jest/expect': 30.5.2 + '@jest/types': 30.5.1 + jest-mock: 30.5.2 + transitivePeerDependencies: + - supports-color + + '@jest/pattern@30.5.0': + dependencies: + '@types/node': 24.13.6 + jest-regex-util: 30.5.0 + + '@jest/reporters@30.5.2': + dependencies: + '@bcoe/v8-coverage': 0.2.3 + '@jest/console': 30.5.2 + '@jest/test-result': 30.5.2 + '@jest/transform': 30.5.2 + '@jest/types': 30.5.1 + '@jridgewell/trace-mapping': 0.3.31 + '@types/node': 24.13.6 + chalk: 4.1.2 + collect-v8-coverage: 1.0.3 + exit-x: 0.2.2 + glob: 13.0.6 + graceful-fs: 4.2.11 + istanbul-lib-coverage: 3.2.2 + istanbul-lib-instrument: 6.0.3 + istanbul-lib-report: 3.0.1 + istanbul-lib-source-maps: 5.0.6 + istanbul-reports: 3.2.0 + jest-message-util: 30.5.1 + jest-util: 30.5.1 + jest-worker: 30.5.1 + slash: 3.0.0 + string-length: 4.0.2 + v8-to-istanbul: 9.3.0 + transitivePeerDependencies: + - supports-color + + '@jest/schemas@30.5.0': + dependencies: + '@sinclair/typebox': 0.34.52 + + '@jest/snapshot-utils@30.5.1': + dependencies: + '@jest/types': 30.5.1 + chalk: 4.1.2 + graceful-fs: 4.2.11 + natural-compare: 1.4.0 + + '@jest/source-map@30.5.2': + dependencies: + '@jridgewell/trace-mapping': 0.3.31 + callsites: 3.1.0 + convert-source-map: 2.0.0 + graceful-fs: 4.2.11 + + '@jest/test-result@30.5.2': + dependencies: + '@jest/console': 30.5.2 + '@jest/types': 30.5.1 + '@types/istanbul-lib-coverage': 2.0.6 + collect-v8-coverage: 1.0.3 + + '@jest/test-sequencer@30.5.2': + dependencies: + '@jest/test-result': 30.5.2 + graceful-fs: 4.2.11 + jest-haste-map: 30.5.1 + slash: 3.0.0 + + '@jest/transform@30.5.2': + dependencies: + '@babel/core': 7.29.7 + '@jest/types': 30.5.1 + '@jridgewell/trace-mapping': 0.3.31 + babel-plugin-istanbul: 8.0.0 + chalk: 4.1.2 + convert-source-map: 2.0.0 + fast-json-stable-stringify: 2.1.0 + graceful-fs: 4.2.11 + jest-haste-map: 30.5.1 + jest-regex-util: 30.5.0 + jest-util: 30.5.1 + pirates: 4.0.7 + slash: 3.0.0 + write-file-atomic: 5.0.1 + transitivePeerDependencies: + - supports-color + + '@jest/types@30.5.1': + dependencies: + '@jest/pattern': 30.5.0 + '@jest/schemas': 30.5.0 + '@types/istanbul-lib-coverage': 2.0.6 + '@types/istanbul-reports': 3.0.4 + '@types/node': 24.13.6 + '@types/yargs': 17.0.35 + chalk: 4.1.2 + + '@jridgewell/gen-mapping@0.3.13': + dependencies: + '@jridgewell/sourcemap-codec': 1.6.0 + '@jridgewell/trace-mapping': 0.3.31 + + '@jridgewell/remapping@2.3.5': + dependencies: + '@jridgewell/gen-mapping': 0.3.13 + '@jridgewell/trace-mapping': 0.3.31 + + '@jridgewell/resolve-uri@3.1.2': {} + + '@jridgewell/source-map@0.3.11': + dependencies: + '@jridgewell/gen-mapping': 0.3.13 + '@jridgewell/trace-mapping': 0.3.31 + + '@jridgewell/sourcemap-codec@1.6.0': {} + + '@jridgewell/trace-mapping@0.3.31': + dependencies: + '@jridgewell/resolve-uri': 3.1.2 + '@jridgewell/sourcemap-codec': 1.6.0 + + '@jridgewell/trace-mapping@0.3.9': + dependencies: + '@jridgewell/resolve-uri': 3.1.2 + '@jridgewell/sourcemap-codec': 1.6.0 + + '@lukeed/csprng@1.1.0': {} + + '@lukeed/ms@2.0.2': {} + + '@microsoft/tsdoc@0.16.0': {} + + '@napi-rs/wasm-runtime@1.2.4(@emnapi/core@1.10.0)(@emnapi/runtime@1.10.0)': + dependencies: + '@emnapi/core': 1.10.0 + '@emnapi/runtime': 1.10.0 + '@tybys/wasm-util': 0.10.4 + optional: true + + '@nestjs/cli@12.0.3(@types/node@24.13.6)(prettier@3.9.8)(ts-loader@9.6.2(typescript@6.0.3)(webpack@5.111.1))(webpack@5.111.1)': + dependencies: + '@angular-devkit/core': 22.1.8(chokidar@5.0.0) + '@angular-devkit/schematics': 22.1.8(chokidar@5.0.0) + '@angular-devkit/schematics-cli': 22.1.8(@types/node@24.13.6)(chokidar@5.0.0) + '@inquirer/prompts': 8.7.2(@types/node@24.13.6) + '@nestjs/schematics': 12.0.4(chokidar@5.0.0)(prettier@3.9.8)(typescript@6.0.3) + ansis: 4.4.0 + chokidar: 5.0.0 + cli-table3: 0.6.5 + commander: 15.0.0 + minimatch: 10.2.6 + node-emoji: 2.2.0 + ora: 9.4.1 + tsconfig-paths: 4.2.0 + typescript: 6.0.3 + optionalDependencies: + ts-loader: 9.6.2(typescript@6.0.3)(webpack@5.111.1) + webpack: 5.111.1 + transitivePeerDependencies: + - '@types/node' + - prettier + + '@nestjs/common@12.0.4(reflect-metadata@0.2.2)(rxjs@7.8.2)': + dependencies: + '@standard-schema/spec': 1.1.0 + file-type: 22.1.1 + iterare: 1.2.1 + load-esm: 1.0.3 + reflect-metadata: 0.2.2 + rxjs: 7.8.2 + tslib: 2.8.1 + uid: 2.0.2 + transitivePeerDependencies: + - supports-color + + '@nestjs/core@12.0.4(@nestjs/common@12.0.4(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/platform-express@12.0.4)(reflect-metadata@0.2.2)(rxjs@7.8.2)': + dependencies: + '@nestjs/common': 12.0.4(reflect-metadata@0.2.2)(rxjs@7.8.2) + fast-safe-stringify: 2.1.1 + iterare: 1.2.1 + path-to-regexp: 8.4.2 + reflect-metadata: 0.2.2 + rxjs: 7.8.2 + tslib: 2.8.1 + uid: 2.0.2 + optionalDependencies: + '@nestjs/platform-express': 12.0.4(@nestjs/common@12.0.4(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/core@12.0.4) + + '@nestjs/mapped-types@12.0.0(@nestjs/common@12.0.4(reflect-metadata@0.2.2)(rxjs@7.8.2))(reflect-metadata@0.2.2)': + dependencies: + '@nestjs/common': 12.0.4(reflect-metadata@0.2.2)(rxjs@7.8.2) + reflect-metadata: 0.2.2 + + '@nestjs/mau@0.2.8': + dependencies: + chalk: 4.1.2 + cli-progress: 3.12.0 + commander: 4.1.1 + inquirer: 8.2.6 + node-emoji: 2.1.3 + ora: 5.4.1 + undici: 6.20.1 + + '@nestjs/platform-express@12.0.4(@nestjs/common@12.0.4(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/core@12.0.4)': + dependencies: + '@nestjs/common': 12.0.4(reflect-metadata@0.2.2)(rxjs@7.8.2) + '@nestjs/core': 12.0.4(@nestjs/common@12.0.4(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/platform-express@12.0.4)(reflect-metadata@0.2.2)(rxjs@7.8.2) + cors: 2.8.6 + express: 5.2.1 + multer: 2.4.0 + path-to-regexp: 8.4.2 + tslib: 2.8.1 + transitivePeerDependencies: + - supports-color + optional: true + + '@nestjs/platform-fastify@12.0.1(@fastify/static@10.1.4)(@nestjs/common@12.0.4(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/core@12.0.4)': + dependencies: + '@fastify/cors': 11.3.0 + '@fastify/formbody': 9.0.0 + '@nestjs/common': 12.0.4(reflect-metadata@0.2.2)(rxjs@7.8.2) + '@nestjs/core': 12.0.4(@nestjs/common@12.0.4(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/platform-express@12.0.4)(reflect-metadata@0.2.2)(rxjs@7.8.2) + fast-querystring: 1.1.2 + fastify: 5.12.1 + fastify-plugin: 6.0.0 + find-my-way: 9.9.0 + light-my-request: 6.6.0 + path-to-regexp: 8.4.2 + reusify: 1.1.0 + tslib: 2.8.1 + optionalDependencies: + '@fastify/static': 10.1.4 + + '@nestjs/schematics@12.0.4(chokidar@5.0.0)(prettier@3.9.8)(typescript@6.0.3)': + dependencies: + '@angular-devkit/core': 22.1.8(chokidar@5.0.0) + '@angular-devkit/schematics': 22.1.8(chokidar@5.0.0) + comment-json: 5.0.0 + jsonc-parser: 3.3.1 + pluralize: 8.0.0 + typescript: 6.0.3 + optionalDependencies: + prettier: 3.9.8 + transitivePeerDependencies: + - chokidar + + '@nestjs/swagger@12.0.1(@fastify/static@10.1.4)(@nestjs/common@12.0.4(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/core@12.0.4)(reflect-metadata@0.2.2)': + dependencies: + '@microsoft/tsdoc': 0.16.0 + '@nestjs/common': 12.0.4(reflect-metadata@0.2.2)(rxjs@7.8.2) + '@nestjs/core': 12.0.4(@nestjs/common@12.0.4(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/platform-express@12.0.4)(reflect-metadata@0.2.2)(rxjs@7.8.2) + '@nestjs/mapped-types': 12.0.0(@nestjs/common@12.0.4(reflect-metadata@0.2.2)(rxjs@7.8.2))(reflect-metadata@0.2.2) + '@standard-schema/spec': 1.1.0 + es-toolkit: 1.51.0 + js-yaml: 5.4.1 + path-to-regexp: 8.4.2 + reflect-metadata: 0.2.2 + swagger-ui-dist: 5.32.14 + optionalDependencies: + '@fastify/static': 10.1.4 + + '@nestjs/testing@12.0.4(@nestjs/common@12.0.4(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/core@12.0.4)(@nestjs/platform-express@12.0.4)': + dependencies: + '@nestjs/common': 12.0.4(reflect-metadata@0.2.2)(rxjs@7.8.2) + '@nestjs/core': 12.0.4(@nestjs/common@12.0.4(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/platform-express@12.0.4)(reflect-metadata@0.2.2)(rxjs@7.8.2) + tslib: 2.8.1 + optionalDependencies: + '@nestjs/platform-express': 12.0.4(@nestjs/common@12.0.4(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/core@12.0.4) + + '@noble/hashes@1.8.0': {} + + '@oxlint-tsgolint/darwin-arm64@7.0.2002': + optional: true + + '@oxlint-tsgolint/darwin-x64@7.0.2002': + optional: true + + '@oxlint-tsgolint/linux-arm64@7.0.2002': + optional: true + + '@oxlint-tsgolint/linux-x64@7.0.2002': + optional: true + + '@oxlint-tsgolint/win32-arm64@7.0.2002': + optional: true + + '@oxlint-tsgolint/win32-x64@7.0.2002': + optional: true + + '@oxlint/binding-android-arm-eabi@1.83.0': + optional: true + + '@oxlint/binding-android-arm64@1.83.0': + optional: true + + '@oxlint/binding-darwin-arm64@1.83.0': + optional: true + + '@oxlint/binding-darwin-x64@1.83.0': + optional: true + + '@oxlint/binding-freebsd-x64@1.83.0': + optional: true + + '@oxlint/binding-linux-arm-gnueabihf@1.83.0': + optional: true + + '@oxlint/binding-linux-arm-musleabihf@1.83.0': + optional: true + + '@oxlint/binding-linux-arm64-gnu@1.83.0': + optional: true + + '@oxlint/binding-linux-arm64-musl@1.83.0': + optional: true + + '@oxlint/binding-linux-ppc64-gnu@1.83.0': + optional: true + + '@oxlint/binding-linux-riscv64-gnu@1.83.0': + optional: true + + '@oxlint/binding-linux-riscv64-musl@1.83.0': + optional: true + + '@oxlint/binding-linux-s390x-gnu@1.83.0': + optional: true + + '@oxlint/binding-linux-x64-gnu@1.83.0': + optional: true + + '@oxlint/binding-linux-x64-musl@1.83.0': + optional: true + + '@oxlint/binding-openharmony-arm64@1.83.0': + optional: true + + '@oxlint/binding-win32-arm64-msvc@1.83.0': + optional: true + + '@oxlint/binding-win32-ia32-msvc@1.83.0': + optional: true + + '@oxlint/binding-win32-x64-msvc@1.83.0': + optional: true + + '@paralleldrive/cuid2@2.3.1': + dependencies: + '@noble/hashes': 1.8.0 + + '@parcel/watcher-android-arm64@2.6.0': + optional: true + + '@parcel/watcher-darwin-arm64@2.6.0': + optional: true + + '@parcel/watcher-darwin-x64@2.6.0': + optional: true + + '@parcel/watcher-freebsd-x64@2.6.0': + optional: true + + '@parcel/watcher-linux-arm-glibc@2.6.0': + optional: true + + '@parcel/watcher-linux-arm-musl@2.6.0': + optional: true + + '@parcel/watcher-linux-arm64-glibc@2.6.0': + optional: true + + '@parcel/watcher-linux-arm64-musl@2.6.0': + optional: true + + '@parcel/watcher-linux-x64-glibc@2.6.0': + optional: true + + '@parcel/watcher-linux-x64-musl@2.6.0': + optional: true + + '@parcel/watcher-win32-arm64@2.6.0': + optional: true + + '@parcel/watcher-win32-x64@2.6.0': + optional: true + + '@parcel/watcher@2.6.0': + dependencies: + detect-libc: 2.1.2 + is-glob: 4.0.3 + node-addon-api: 7.1.1 + picomatch: 4.0.7 + optionalDependencies: + '@parcel/watcher-android-arm64': 2.6.0 + '@parcel/watcher-darwin-arm64': 2.6.0 + '@parcel/watcher-darwin-x64': 2.6.0 + '@parcel/watcher-freebsd-x64': 2.6.0 + '@parcel/watcher-linux-arm-glibc': 2.6.0 + '@parcel/watcher-linux-arm-musl': 2.6.0 + '@parcel/watcher-linux-arm64-glibc': 2.6.0 + '@parcel/watcher-linux-arm64-musl': 2.6.0 + '@parcel/watcher-linux-x64-glibc': 2.6.0 + '@parcel/watcher-linux-x64-musl': 2.6.0 + '@parcel/watcher-win32-arm64': 2.6.0 + '@parcel/watcher-win32-x64': 2.6.0 + + '@pinojs/redact@0.4.0': {} + + '@pkgjs/parseargs@0.11.0': + optional: true + + '@pkgr/core@0.3.6': {} + + '@prisma/adapter-pg@7.10.0': + dependencies: + '@prisma/driver-adapter-utils': 7.10.0 + '@types/pg': 8.23.1 + pg: 8.23.1 + postgres-array: 3.0.4 + transitivePeerDependencies: + - pg-native + + '@prisma/client-runtime-utils@7.10.0': {} + + '@prisma/client@7.10.0(prisma@7.10.0(@types/react@19.3.0)(react-dom@19.3.0(react@19.3.0))(react@19.3.0)(typescript@6.0.3))(typescript@6.0.3)': + dependencies: + '@prisma/client-runtime-utils': 7.10.0 + optionalDependencies: + prisma: 7.10.0(@types/react@19.3.0)(react-dom@19.3.0(react@19.3.0))(react@19.3.0)(typescript@6.0.3) + typescript: 6.0.3 + + '@prisma/config@7.10.0': + dependencies: + c12: 3.3.4 + deepmerge-ts: 7.1.5 + effect: 3.20.0 + empathic: 2.0.0 + transitivePeerDependencies: + - magicast + + '@prisma/debug@7.10.0': {} + + '@prisma/debug@7.2.0': {} + + '@prisma/dev@0.24.17(typescript@6.0.3)': + dependencies: + '@electric-sql/pglite': 0.4.3 + '@electric-sql/pglite-socket': 0.1.3(@electric-sql/pglite@0.4.3) + '@electric-sql/pglite-tools': 0.3.3(@electric-sql/pglite@0.4.3) + '@prisma/get-platform': 7.2.0 + '@prisma/query-plan-executor': 7.2.0 + '@prisma/streams-local': 0.1.11 + find-my-way: 9.7.0 + foreground-child: 3.3.1 + get-port-please: 3.2.0 + pathe: 2.0.3 + proper-lockfile: 4.1.2 + remeda: 2.33.4 + std-env: 3.10.0 + valibot: 1.4.2(typescript@6.0.3) + zeptomatch: 2.1.0 + transitivePeerDependencies: + - typescript + + '@prisma/driver-adapter-utils@7.10.0': + dependencies: + '@prisma/debug': 7.10.0 + + '@prisma/engines-version@7.10.0-4.0edf323efd1d98336f3f0a68684b56f689b900d3': {} + + '@prisma/engines@7.10.0': + dependencies: + '@prisma/debug': 7.10.0 + '@prisma/engines-version': 7.10.0-4.0edf323efd1d98336f3f0a68684b56f689b900d3 + '@prisma/fetch-engine': 7.10.0 + '@prisma/get-platform': 7.10.0 + + '@prisma/fetch-engine@7.10.0': + dependencies: + '@prisma/debug': 7.10.0 + '@prisma/engines-version': 7.10.0-4.0edf323efd1d98336f3f0a68684b56f689b900d3 + '@prisma/get-platform': 7.10.0 + + '@prisma/get-platform@7.10.0': + dependencies: + '@prisma/debug': 7.10.0 + + '@prisma/get-platform@7.2.0': + dependencies: + '@prisma/debug': 7.2.0 + + '@prisma/query-plan-executor@7.2.0': {} + + '@prisma/streams-local@0.1.11': + dependencies: + ajv: 8.20.0 + better-result: 2.10.0 + env-paths: 3.0.0 + proper-lockfile: 4.1.2 + + '@prisma/studio-core@0.33.0(@types/react@19.3.0)(react-dom@19.3.0(react@19.3.0))(react@19.3.0)': + dependencies: + '@radix-ui/react-toggle': 1.1.10(@types/react@19.3.0)(react-dom@19.3.0(react@19.3.0))(react@19.3.0) + '@types/react': 19.3.0 + '@visx/curve': 4.0.1-alpha.0 + '@visx/event': 4.0.1-alpha.0 + '@visx/grid': 4.0.1-alpha.0(react@19.3.0) + '@visx/group': 4.0.1-alpha.0(react@19.3.0) + '@visx/responsive': 4.0.1-alpha.0(react@19.3.0) + '@visx/scale': 4.0.1-alpha.0 + '@visx/shape': 4.0.1-alpha.0(react@19.3.0) + d3-array: 3.2.4 + d3-shape: 3.2.0 + elkjs: 0.11.1 + react: 19.3.0 + react-dom: 19.3.0(react@19.3.0) + transitivePeerDependencies: + - '@types/react-dom' + + '@radix-ui/primitive@1.1.3': {} + + '@radix-ui/react-compose-refs@1.1.2(@types/react@19.3.0)(react@19.3.0)': + dependencies: + react: 19.3.0 + optionalDependencies: + '@types/react': 19.3.0 + + '@radix-ui/react-primitive@2.1.3(@types/react@19.3.0)(react-dom@19.3.0(react@19.3.0))(react@19.3.0)': + dependencies: + '@radix-ui/react-slot': 1.2.3(@types/react@19.3.0)(react@19.3.0) + react: 19.3.0 + react-dom: 19.3.0(react@19.3.0) + optionalDependencies: + '@types/react': 19.3.0 + + '@radix-ui/react-slot@1.2.3(@types/react@19.3.0)(react@19.3.0)': + dependencies: + '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.3.0)(react@19.3.0) + react: 19.3.0 + optionalDependencies: + '@types/react': 19.3.0 + + '@radix-ui/react-toggle@1.1.10(@types/react@19.3.0)(react-dom@19.3.0(react@19.3.0))(react@19.3.0)': + dependencies: + '@radix-ui/primitive': 1.1.3 + '@radix-ui/react-primitive': 2.1.3(@types/react@19.3.0)(react-dom@19.3.0(react@19.3.0))(react@19.3.0) + '@radix-ui/react-use-controllable-state': 1.2.2(@types/react@19.3.0)(react@19.3.0) + react: 19.3.0 + react-dom: 19.3.0(react@19.3.0) + optionalDependencies: + '@types/react': 19.3.0 + + '@radix-ui/react-use-controllable-state@1.2.2(@types/react@19.3.0)(react@19.3.0)': + dependencies: + '@radix-ui/react-use-effect-event': 0.0.2(@types/react@19.3.0)(react@19.3.0) + '@radix-ui/react-use-layout-effect': 1.1.1(@types/react@19.3.0)(react@19.3.0) + react: 19.3.0 + optionalDependencies: + '@types/react': 19.3.0 + + '@radix-ui/react-use-effect-event@0.0.2(@types/react@19.3.0)(react@19.3.0)': + dependencies: + '@radix-ui/react-use-layout-effect': 1.1.1(@types/react@19.3.0)(react@19.3.0) + react: 19.3.0 + optionalDependencies: + '@types/react': 19.3.0 + + '@radix-ui/react-use-layout-effect@1.1.1(@types/react@19.3.0)(react@19.3.0)': + dependencies: + react: 19.3.0 + optionalDependencies: + '@types/react': 19.3.0 + + '@scalar/client-side-rendering@0.4.1': + dependencies: + '@scalar/schemas': 0.10.0 + '@scalar/types': 0.20.0 + '@scalar/validation': 0.6.3 + + '@scalar/helpers@0.12.0': {} + + '@scalar/nestjs-api-reference@1.2.19': + dependencies: + '@scalar/client-side-rendering': 0.4.1 + + '@scalar/schemas@0.10.0': + dependencies: + '@scalar/helpers': 0.12.0 + '@scalar/validation': 0.6.3 + + '@scalar/types@0.20.0': + dependencies: + '@scalar/helpers': 0.12.0 + nanoid: 5.1.16 + type-fest: 5.10.0 + zod: 4.6.5 + + '@scalar/validation@0.6.3': {} + + '@scarf/scarf@1.4.0': {} + + '@sinclair/typebox@0.34.52': {} + + '@sindresorhus/is@4.6.0': {} + + '@sinonjs/commons@3.0.1': + dependencies: + type-detect: 4.0.8 + + '@sinonjs/fake-timers@15.4.0': + dependencies: + '@sinonjs/commons': 3.0.1 + + '@standard-schema/spec@1.1.0': {} + + '@tokenizer/inflate@0.4.1': + dependencies: + debug: 4.4.3 + token-types: 6.1.2 + transitivePeerDependencies: + - supports-color + + '@tokenizer/token@0.3.0': {} + + '@tsconfig/node10@1.0.13': {} + + '@tsconfig/node12@1.0.11': {} + + '@tsconfig/node14@1.0.3': {} + + '@tsconfig/node16@1.0.4': {} + + '@tybys/wasm-util@0.10.4': + dependencies: + tslib: 2.8.1 + optional: true + + '@types/babel__core@7.20.5': + dependencies: + '@babel/parser': 7.29.9 + '@babel/types': 7.29.8 + '@types/babel__generator': 7.27.0 + '@types/babel__template': 7.4.4 + '@types/babel__traverse': 7.28.0 + + '@types/babel__generator@7.27.0': + dependencies: + '@babel/types': 7.29.8 + + '@types/babel__template@7.4.4': + dependencies: + '@babel/parser': 7.29.9 + '@babel/types': 7.29.8 + + '@types/babel__traverse@7.28.0': + dependencies: + '@babel/types': 7.29.8 + + '@types/cookiejar@2.1.5': {} + + '@types/d3-array@3.0.3': {} + + '@types/d3-color@3.1.0': {} + + '@types/d3-delaunay@6.0.1': {} + + '@types/d3-format@3.0.1': {} + + '@types/d3-geo@3.1.0': + dependencies: + '@types/geojson': 7946.0.16 + + '@types/d3-interpolate@3.0.1': + dependencies: + '@types/d3-color': 3.1.0 + + '@types/d3-path@3.1.1': {} + + '@types/d3-scale@4.0.2': + dependencies: + '@types/d3-time': 3.0.0 + + '@types/d3-shape@3.1.7': + dependencies: + '@types/d3-path': 3.1.1 + + '@types/d3-time-format@2.1.0': {} + + '@types/d3-time@3.0.0': {} + + '@types/estree@1.0.9': {} + + '@types/geojson@7946.0.16': {} + + '@types/istanbul-lib-coverage@2.0.6': {} + + '@types/istanbul-lib-report@3.0.3': + dependencies: + '@types/istanbul-lib-coverage': 2.0.6 + + '@types/istanbul-reports@3.0.4': + dependencies: + '@types/istanbul-lib-report': 3.0.3 + + '@types/jest@30.0.0': + dependencies: + expect: 30.5.2 + pretty-format: 30.5.1 + + '@types/json-schema@7.0.15': {} + + '@types/lodash@4.17.26': {} + + '@types/methods@1.1.4': {} + + '@types/node@24.13.6': + dependencies: + undici-types: 7.18.2 + + '@types/pg@8.23.1': + dependencies: + '@types/node': 24.13.6 + pg-protocol: 1.16.1 + pg-types: 2.2.0 + + '@types/react@19.3.0': + dependencies: + csstype: 3.2.3 + + '@types/stack-utils@2.0.3': {} + + '@types/superagent@8.1.11': + dependencies: + '@types/cookiejar': 2.1.5 + '@types/methods': 1.1.4 + '@types/node': 24.13.6 + form-data: 4.0.6 + + '@types/supertest@7.2.1': + dependencies: + '@types/methods': 1.1.4 + '@types/superagent': 8.1.11 + + '@types/yargs-parser@21.0.3': {} + + '@types/yargs@17.0.35': + dependencies: + '@types/yargs-parser': 21.0.3 + + '@ungap/structured-clone@1.4.0': {} + + '@unrs/resolver-binding-android-arm-eabi@1.12.2': + optional: true + + '@unrs/resolver-binding-android-arm64@1.12.2': + optional: true + + '@unrs/resolver-binding-darwin-arm64@1.12.2': + optional: true + + '@unrs/resolver-binding-darwin-x64@1.12.2': + optional: true + + '@unrs/resolver-binding-freebsd-x64@1.12.2': + optional: true + + '@unrs/resolver-binding-linux-arm-gnueabihf@1.12.2': + optional: true + + '@unrs/resolver-binding-linux-arm-musleabihf@1.12.2': + optional: true + + '@unrs/resolver-binding-linux-arm64-gnu@1.12.2': + optional: true + + '@unrs/resolver-binding-linux-arm64-musl@1.12.2': + optional: true + + '@unrs/resolver-binding-linux-loong64-gnu@1.12.2': + optional: true + + '@unrs/resolver-binding-linux-loong64-musl@1.12.2': + optional: true + + '@unrs/resolver-binding-linux-ppc64-gnu@1.12.2': + optional: true + + '@unrs/resolver-binding-linux-riscv64-gnu@1.12.2': + optional: true + + '@unrs/resolver-binding-linux-riscv64-musl@1.12.2': + optional: true + + '@unrs/resolver-binding-linux-s390x-gnu@1.12.2': + optional: true + + '@unrs/resolver-binding-linux-x64-gnu@1.12.2': + optional: true + + '@unrs/resolver-binding-linux-x64-musl@1.12.2': + optional: true + + '@unrs/resolver-binding-openharmony-arm64@1.12.2': + optional: true + + '@unrs/resolver-binding-wasm32-wasi@1.12.2': + dependencies: + '@emnapi/core': 1.10.0 + '@emnapi/runtime': 1.10.0 + '@napi-rs/wasm-runtime': 1.2.4(@emnapi/core@1.10.0)(@emnapi/runtime@1.10.0) + optional: true + + '@unrs/resolver-binding-win32-arm64-msvc@1.12.2': + optional: true + + '@unrs/resolver-binding-win32-ia32-msvc@1.12.2': + optional: true + + '@unrs/resolver-binding-win32-x64-msvc@1.12.2': + optional: true + + '@visx/curve@4.0.1-alpha.0': + dependencies: + '@visx/vendor': 4.0.0-alpha.0 + + '@visx/event@4.0.1-alpha.0': + dependencies: + '@types/react': 19.3.0 + '@visx/point': 4.0.1-alpha.0 + + '@visx/grid@4.0.1-alpha.0(react@19.3.0)': + dependencies: + '@types/react': 19.3.0 + '@visx/curve': 4.0.1-alpha.0 + '@visx/group': 4.0.1-alpha.0(react@19.3.0) + '@visx/point': 4.0.1-alpha.0 + '@visx/scale': 4.0.1-alpha.0 + '@visx/shape': 4.0.1-alpha.0(react@19.3.0) + classnames: 2.5.1 + react: 19.3.0 + + '@visx/group@4.0.1-alpha.0(react@19.3.0)': + dependencies: + '@types/react': 19.3.0 + classnames: 2.5.1 + react: 19.3.0 + + '@visx/point@4.0.1-alpha.0': {} + + '@visx/responsive@4.0.1-alpha.0(react@19.3.0)': + dependencies: + '@types/lodash': 4.17.26 + '@types/react': 19.3.0 + lodash: 4.18.1 + react: 19.3.0 + + '@visx/scale@4.0.1-alpha.0': + dependencies: + '@visx/vendor': 4.0.0-alpha.0 + + '@visx/shape@4.0.1-alpha.0(react@19.3.0)': + dependencies: + '@types/lodash': 4.17.26 + '@types/react': 19.3.0 + '@visx/curve': 4.0.1-alpha.0 + '@visx/group': 4.0.1-alpha.0(react@19.3.0) + '@visx/scale': 4.0.1-alpha.0 + '@visx/vendor': 4.0.0-alpha.0 + classnames: 2.5.1 + lodash: 4.18.1 + react: 19.3.0 + + '@visx/vendor@4.0.0-alpha.0': + dependencies: + '@types/d3-array': 3.0.3 + '@types/d3-color': 3.1.0 + '@types/d3-delaunay': 6.0.1 + '@types/d3-format': 3.0.1 + '@types/d3-geo': 3.1.0 + '@types/d3-interpolate': 3.0.1 + '@types/d3-path': 3.1.1 + '@types/d3-scale': 4.0.2 + '@types/d3-shape': 3.1.7 + '@types/d3-time': 3.0.0 + '@types/d3-time-format': 2.1.0 + d3-array: 3.2.1 + d3-color: 3.1.0 + d3-delaunay: 6.0.2 + d3-format: 3.1.0 + d3-geo: 3.1.0 + d3-interpolate: 3.0.1 + d3-path: 3.1.0 + d3-scale: 4.0.2 + d3-shape: 3.2.0 + d3-time: 3.1.0 + d3-time-format: 4.1.0 + internmap: 2.0.3 + + '@webassemblyjs/ast@1.14.1': + dependencies: + '@webassemblyjs/helper-numbers': 1.13.2 + '@webassemblyjs/helper-wasm-bytecode': 1.13.2 + + '@webassemblyjs/floating-point-hex-parser@1.13.2': {} + + '@webassemblyjs/helper-api-error@1.13.2': {} + + '@webassemblyjs/helper-buffer@1.14.1': {} + + '@webassemblyjs/helper-numbers@1.13.2': + dependencies: + '@webassemblyjs/floating-point-hex-parser': 1.13.2 + '@webassemblyjs/helper-api-error': 1.13.2 + '@xtuc/long': 4.2.2 + + '@webassemblyjs/helper-wasm-bytecode@1.13.2': {} + + '@webassemblyjs/helper-wasm-section@1.14.1': + dependencies: + '@webassemblyjs/ast': 1.14.1 + '@webassemblyjs/helper-buffer': 1.14.1 + '@webassemblyjs/helper-wasm-bytecode': 1.13.2 + '@webassemblyjs/wasm-gen': 1.14.1 + + '@webassemblyjs/ieee754@1.13.2': + dependencies: + '@xtuc/ieee754': 1.2.0 + + '@webassemblyjs/leb128@1.13.2': + dependencies: + '@xtuc/long': 4.2.2 + + '@webassemblyjs/utf8@1.13.2': {} + + '@webassemblyjs/wasm-edit@1.14.1': + dependencies: + '@webassemblyjs/ast': 1.14.1 + '@webassemblyjs/helper-buffer': 1.14.1 + '@webassemblyjs/helper-wasm-bytecode': 1.13.2 + '@webassemblyjs/helper-wasm-section': 1.14.1 + '@webassemblyjs/wasm-gen': 1.14.1 + '@webassemblyjs/wasm-opt': 1.14.1 + '@webassemblyjs/wasm-parser': 1.14.1 + '@webassemblyjs/wast-printer': 1.14.1 + + '@webassemblyjs/wasm-gen@1.14.1': + dependencies: + '@webassemblyjs/ast': 1.14.1 + '@webassemblyjs/helper-wasm-bytecode': 1.13.2 + '@webassemblyjs/ieee754': 1.13.2 + '@webassemblyjs/leb128': 1.13.2 + '@webassemblyjs/utf8': 1.13.2 + + '@webassemblyjs/wasm-opt@1.14.1': + dependencies: + '@webassemblyjs/ast': 1.14.1 + '@webassemblyjs/helper-buffer': 1.14.1 + '@webassemblyjs/wasm-gen': 1.14.1 + '@webassemblyjs/wasm-parser': 1.14.1 + + '@webassemblyjs/wasm-parser@1.14.1': + dependencies: + '@webassemblyjs/ast': 1.14.1 + '@webassemblyjs/helper-api-error': 1.13.2 + '@webassemblyjs/helper-wasm-bytecode': 1.13.2 + '@webassemblyjs/ieee754': 1.13.2 + '@webassemblyjs/leb128': 1.13.2 + '@webassemblyjs/utf8': 1.13.2 + + '@webassemblyjs/wast-printer@1.14.1': + dependencies: + '@webassemblyjs/ast': 1.14.1 + '@xtuc/long': 4.2.2 + + '@xtuc/ieee754@1.2.0': {} + + '@xtuc/long@4.2.2': {} + + abstract-logging@2.0.1: {} + + accepts@2.0.0: + dependencies: + mime-types: 3.0.2 + negotiator: 1.1.0 + optional: true + + acorn-walk@8.3.5: + dependencies: + acorn: 8.18.0 + + acorn@8.18.0: {} + + ajv-formats@3.0.1(ajv@8.20.0): + optionalDependencies: + ajv: 8.20.0 + + ajv-keywords@5.1.0(ajv@8.20.0): + dependencies: + ajv: 8.20.0 + fast-deep-equal: 3.1.3 + + ajv@8.20.0: + dependencies: + fast-deep-equal: 3.1.3 + fast-uri: 3.1.8 + json-schema-traverse: 1.0.0 + require-from-string: 2.0.2 + + ansi-escapes@4.3.2: + dependencies: + type-fest: 0.21.3 + + ansi-regex@5.0.1: {} + + ansi-regex@6.3.0: {} + + ansi-styles@4.3.0: + dependencies: + color-convert: 2.0.1 + + ansi-styles@5.2.0: {} + + ansi-styles@6.2.3: {} + + ansis@4.4.0: {} + + anymatch@3.1.3: + dependencies: + normalize-path: 3.0.0 + picomatch: 2.3.2 + + append-field@1.0.0: + optional: true + + arg@4.1.3: {} + + argparse@1.0.10: + dependencies: + sprintf-js: 1.0.3 + + argparse@2.0.1: {} + + array-timsort@1.0.3: {} + + asap@2.0.6: {} + + asynckit@0.4.0: {} + + atomic-sleep@1.0.0: {} + + avvio@9.3.0: + dependencies: + '@fastify/error': 4.2.0 + fastq: 1.20.3 + + aws-ssl-profiles@1.1.2: {} + + babel-jest@30.5.2(@babel/core@7.29.7): + dependencies: + '@babel/core': 7.29.7 + '@jest/transform': 30.5.2 + '@types/babel__core': 7.20.5 + babel-plugin-istanbul: 8.0.0 + babel-preset-jest: 30.5.0(@babel/core@7.29.7) + chalk: 4.1.2 + graceful-fs: 4.2.11 + slash: 3.0.0 + transitivePeerDependencies: + - supports-color + + babel-plugin-istanbul@8.0.0: + dependencies: + '@babel/helper-plugin-utils': 7.29.7 + '@istanbuljs/load-nyc-config': 1.1.0 + '@istanbuljs/schema': 0.1.6 + istanbul-lib-instrument: 6.0.3 + test-exclude: 7.0.2 + transitivePeerDependencies: + - supports-color + + babel-plugin-jest-hoist@30.5.0: + dependencies: + '@types/babel__core': 7.20.5 + + babel-preset-current-node-syntax@1.2.0(@babel/core@7.29.7): + dependencies: + '@babel/core': 7.29.7 + '@babel/plugin-syntax-async-generators': 7.8.4(@babel/core@7.29.7) + '@babel/plugin-syntax-bigint': 7.8.3(@babel/core@7.29.7) + '@babel/plugin-syntax-class-properties': 7.12.13(@babel/core@7.29.7) + '@babel/plugin-syntax-class-static-block': 7.14.5(@babel/core@7.29.7) + '@babel/plugin-syntax-import-attributes': 7.29.7(@babel/core@7.29.7) + '@babel/plugin-syntax-import-meta': 7.10.4(@babel/core@7.29.7) + '@babel/plugin-syntax-json-strings': 7.8.3(@babel/core@7.29.7) + '@babel/plugin-syntax-logical-assignment-operators': 7.10.4(@babel/core@7.29.7) + '@babel/plugin-syntax-nullish-coalescing-operator': 7.8.3(@babel/core@7.29.7) + '@babel/plugin-syntax-numeric-separator': 7.10.4(@babel/core@7.29.7) + '@babel/plugin-syntax-object-rest-spread': 7.8.3(@babel/core@7.29.7) + '@babel/plugin-syntax-optional-catch-binding': 7.8.3(@babel/core@7.29.7) + '@babel/plugin-syntax-optional-chaining': 7.8.3(@babel/core@7.29.7) + '@babel/plugin-syntax-private-property-in-object': 7.14.5(@babel/core@7.29.7) + '@babel/plugin-syntax-top-level-await': 7.14.5(@babel/core@7.29.7) + + babel-preset-jest@30.5.0(@babel/core@7.29.7): + dependencies: + '@babel/core': 7.29.7 + babel-plugin-jest-hoist: 30.5.0 + babel-preset-current-node-syntax: 1.2.0(@babel/core@7.29.7) + + balanced-match@1.0.2: {} + + balanced-match@4.0.4: {} + + base64-js@1.5.1: {} + + baseline-browser-mapping@2.11.25: {} + + better-result@2.10.0: {} + + bl@4.1.0: + dependencies: + buffer: 5.7.1 + inherits: 2.0.4 + readable-stream: 3.6.2 + + body-parser@2.3.0: + dependencies: + bytes: 3.1.2 + content-type: 2.1.0 + debug: 4.4.3 + http-errors: 2.0.1 + iconv-lite: 0.7.3 + on-finished: 2.4.1 + qs: 6.16.0 + raw-body: 3.0.2 + type-is: 2.1.0 + transitivePeerDependencies: + - supports-color + optional: true + + brace-expansion@2.1.7: + dependencies: + balanced-match: 1.0.2 + + brace-expansion@5.0.12: + dependencies: + balanced-match: 4.0.4 + + browserslist@4.29.0: + dependencies: + baseline-browser-mapping: 2.11.25 + caniuse-lite: 1.0.30001810 + electron-to-chromium: 1.5.433 + node-releases: 2.0.56 + update-browserslist-db: 1.3.3(browserslist@4.29.0) + + bs-logger@0.2.6: + dependencies: + fast-json-stable-stringify: 2.1.0 + + bser@2.1.1: + dependencies: + node-int64: 0.4.0 + + buffer-from@1.1.2: {} + + buffer@5.7.1: + dependencies: + base64-js: 1.5.1 + ieee754: 1.2.1 + + busboy@1.6.0: + dependencies: + streamsearch: 1.1.0 + optional: true + + bytes@3.1.2: + optional: true + + c12@3.3.4: + dependencies: + chokidar: 5.0.0 + confbox: 0.2.4 + defu: 6.1.7 + dotenv: 17.4.2 + exsolve: 1.1.3 + giget: 3.3.1 + jiti: 2.7.0 + ohash: 2.0.12 + pathe: 2.0.3 + perfect-debounce: 2.1.0 + pkg-types: 2.3.3 + rc9: 3.1.0 + + call-bind-apply-helpers@1.0.2: + dependencies: + es-errors: 1.3.0 + function-bind: 1.1.2 + + call-bound@1.0.4: + dependencies: + call-bind-apply-helpers: 1.0.2 + get-intrinsic: 1.3.0 + + callsites@3.1.0: {} + + camelcase@5.3.1: {} + + camelcase@6.3.0: {} + + caniuse-lite@1.0.30001810: {} + + chalk@4.1.2: + dependencies: + ansi-styles: 4.3.0 + supports-color: 7.2.0 + + chalk@5.6.2: {} + + char-regex@1.0.2: {} + + chardet@0.7.0: {} + + chardet@2.2.0: {} + + chokidar@5.0.0: + dependencies: + readdirp: 5.1.1 + + chrome-trace-event@1.0.4: {} + + ci-info@4.4.0: {} + + cjs-module-lexer@2.2.1: {} + + classnames@2.5.1: {} + + cli-cursor@3.1.0: + dependencies: + restore-cursor: 3.1.0 + + cli-cursor@5.0.0: + dependencies: + restore-cursor: 5.1.0 + + cli-progress@3.12.0: + dependencies: + string-width: 4.2.3 + + cli-spinners@2.9.2: {} + + cli-spinners@3.4.0: {} + + cli-table3@0.6.5: + dependencies: + string-width: 4.2.3 + optionalDependencies: + '@colors/colors': 1.5.0 + + cli-width@3.0.0: {} + + cli-width@4.1.0: {} + + cliui@8.0.1: + dependencies: + string-width: 4.2.3 + strip-ansi: 6.0.1 + wrap-ansi: 7.0.0 + + clone@1.0.4: {} + + cluster-key-slot@1.1.1: {} + + co@4.6.0: {} + + collect-v8-coverage@1.0.3: {} + + color-convert@2.0.1: + dependencies: + color-name: 1.1.4 + + color-name@1.1.4: {} + + colorette@2.0.20: {} + + combined-stream@1.0.8: + dependencies: + delayed-stream: 1.0.0 + + commander@15.0.0: {} + + commander@2.20.3: {} + + commander@4.1.1: {} + + comment-json@5.0.0: + dependencies: + array-timsort: 1.0.3 + esprima: 4.0.1 + + component-emitter@1.3.1: {} + + confbox@0.2.4: {} + + confbox@0.3.1: {} + + content-disposition@1.1.0: + optional: true + + content-disposition@3.0.0: {} + + content-type@1.0.5: + optional: true + + content-type@2.1.0: + optional: true + + convert-source-map@2.0.0: {} + + cookie-signature@1.2.2: {} + + cookie@0.7.2: + optional: true + + cookie@1.1.1: {} + + cookiejar@2.1.4: {} + + cors@2.8.6: + dependencies: + object-assign: 4.1.1 + vary: 1.1.2 + optional: true + + create-require@1.1.1: {} + + cross-spawn@7.0.6: + dependencies: + path-key: 3.1.1 + shebang-command: 2.0.0 + which: 2.0.2 + + csstype@3.2.3: {} + + d3-array@3.2.1: + dependencies: + internmap: 2.0.3 + + d3-array@3.2.4: + dependencies: + internmap: 2.0.3 + + d3-color@3.1.0: {} + + d3-delaunay@6.0.2: + dependencies: + delaunator: 5.1.0 + + d3-format@3.1.0: {} + + d3-geo@3.1.0: + dependencies: + d3-array: 3.2.4 + + d3-interpolate@3.0.1: + dependencies: + d3-color: 3.1.0 + + d3-path@3.1.0: {} + + d3-scale@4.0.2: + dependencies: + d3-array: 3.2.4 + d3-format: 3.1.0 + d3-interpolate: 3.0.1 + d3-time: 3.1.0 + d3-time-format: 4.1.0 + + d3-shape@3.2.0: + dependencies: + d3-path: 3.1.0 + + d3-time-format@4.1.0: + dependencies: + d3-time: 3.1.0 + + d3-time@3.1.0: + dependencies: + d3-array: 3.2.4 + + dateformat@4.6.3: {} + + debug@4.4.3: + dependencies: + ms: 2.1.3 + + dedent@1.7.2: {} + + deepmerge-ts@7.1.5: {} + + deepmerge@4.3.1: {} + + defaults@1.0.4: + dependencies: + clone: 1.0.4 + + defu@6.1.7: {} + + delaunator@5.1.0: + dependencies: + robust-predicates: 3.0.3 + + delayed-stream@1.0.0: {} + + denque@2.1.0: {} + + depd@2.0.0: {} + + dequal@2.0.3: {} + + destr@2.0.5: {} + + detect-libc@2.1.2: {} + + detect-newline@3.1.0: {} + + dezalgo@1.0.4: + dependencies: + asap: 2.0.6 + wrappy: 1.0.2 + + diff@4.0.4: {} + + dotenv@17.4.2: {} + + dotenv@18.0.7: {} + + dunder-proto@1.0.1: + dependencies: + call-bind-apply-helpers: 1.0.2 + es-errors: 1.3.0 + gopd: 1.2.0 + + eastasianwidth@0.2.0: {} + + ee-first@1.1.1: + optional: true + + effect@3.20.0: + dependencies: + '@standard-schema/spec': 1.1.0 + fast-check: 3.23.2 + + electron-to-chromium@1.5.433: {} + + elkjs@0.11.1: {} + + emittery@0.13.1: {} + + emoji-regex@8.0.0: {} + + emoji-regex@9.2.2: {} + + emojilib@2.4.0: {} + + empathic@2.0.0: {} + + encodeurl@2.0.0: + optional: true + + end-of-stream@1.4.5: + dependencies: + once: 1.4.0 + + enhanced-resolve@5.25.1: + dependencies: + graceful-fs: 4.2.11 + tapable: 2.3.3 + + env-paths@3.0.0: {} + + error-ex@1.3.4: + dependencies: + is-arrayish: 0.2.1 + + es-define-property@1.0.1: {} + + es-errors@1.3.0: {} + + es-module-lexer@2.3.2: {} + + es-object-atoms@1.1.2: + dependencies: + es-errors: 1.3.0 + + es-set-tostringtag@2.1.0: + dependencies: + es-errors: 1.3.0 + get-intrinsic: 1.3.0 + has-tostringtag: 1.0.2 + hasown: 2.0.4 + + es-toolkit@1.51.0: {} + + escalade@3.2.0: {} + + escape-html@1.0.3: {} + + escape-string-regexp@1.0.5: {} + + escape-string-regexp@2.0.0: {} + + esprima@4.0.1: {} + + etag@1.8.1: + optional: true + + events@3.3.0: {} + + execa@5.1.1: + dependencies: + cross-spawn: 7.0.6 + get-stream: 6.0.1 + human-signals: 2.1.0 + is-stream: 2.0.1 + merge-stream: 2.0.0 + npm-run-path: 4.0.1 + onetime: 5.1.2 + signal-exit: 3.0.7 + strip-final-newline: 2.0.0 + + exit-x@0.2.2: {} + + expect@30.5.2: + dependencies: + '@jest/expect-utils': 30.5.2 + '@jest/get-type': 30.5.0 + jest-matcher-utils: 30.5.2 + jest-message-util: 30.5.1 + jest-mock: 30.5.2 + jest-util: 30.5.1 + + express@5.2.1: + dependencies: + accepts: 2.0.0 + body-parser: 2.3.0 + content-disposition: 1.1.0 + content-type: 1.0.5 + cookie: 0.7.2 + cookie-signature: 1.2.2 + debug: 4.4.3 + depd: 2.0.0 + encodeurl: 2.0.0 + escape-html: 1.0.3 + etag: 1.8.1 + finalhandler: 2.1.1 + fresh: 2.0.0 + http-errors: 2.0.1 + merge-descriptors: 2.0.0 + mime-types: 3.0.2 + on-finished: 2.4.1 + once: 1.4.0 + parseurl: 1.3.3 + proxy-addr: 2.0.8 + qs: 6.16.0 + range-parser: 1.3.0 + router: 2.2.0 + send: 1.2.1 + serve-static: 2.2.1 + statuses: 2.0.2 + type-is: 2.1.0 + vary: 1.1.2 + transitivePeerDependencies: + - supports-color + optional: true + + exsolve@1.1.3: {} + + external-editor@3.1.0: + dependencies: + chardet: 0.7.0 + iconv-lite: 0.4.24 + tmp: 0.0.33 + + fast-check@3.23.2: + dependencies: + pure-rand: 6.1.0 + + fast-copy@4.1.1: {} + + fast-decode-uri-component@1.0.1: {} + + fast-deep-equal@3.1.3: {} + + fast-json-stable-stringify@2.1.0: {} + + fast-json-stringify@7.0.1: + dependencies: + '@fastify/merge-json-schemas': 0.2.1 + ajv: 8.20.0 + ajv-formats: 3.0.1(ajv@8.20.0) + fast-uri: 4.2.1 + json-schema-ref-resolver: 3.0.0 + rfdc: 1.4.1 + + fast-querystring@1.1.2: + dependencies: + fast-decode-uri-component: 1.0.1 + + fast-safe-stringify@2.1.1: {} + + fast-string-truncated-width@3.0.3: {} + + fast-string-width@3.0.2: + dependencies: + fast-string-truncated-width: 3.0.3 + + fast-uri@3.1.8: {} + + fast-uri@4.2.1: {} + + fast-wrap-ansi@0.2.2: + dependencies: + fast-string-width: 3.0.2 + + fastify-plugin@6.0.0: {} + + fastify@5.12.1: + dependencies: + '@fastify/ajv-compiler': 4.0.6 + '@fastify/error': 4.2.0 + '@fastify/fast-json-stringify-compiler': 5.1.0 + '@fastify/proxy-addr': 5.1.1 + abstract-logging: 2.0.1 + avvio: 9.3.0 + fast-json-stringify: 7.0.1 + find-my-way: 9.9.0 + light-my-request: 6.6.0 + pino: 10.3.1 + process-warning: 5.1.0 + rfdc: 1.4.1 + secure-json-parse: 4.1.0 + semver: 7.8.5 + toad-cache: 3.7.4 + + fastq@1.20.3: + dependencies: + reusify: 1.1.0 + + fb-watchman@2.0.2: + dependencies: + bser: 2.1.1 + + fdir@6.5.0(picomatch@4.0.7): + optionalDependencies: + picomatch: 4.0.7 + + figures@3.2.0: + dependencies: + escape-string-regexp: 1.0.5 + + file-type@22.1.1: + dependencies: + '@tokenizer/inflate': 0.4.1 + strtok3: 10.3.5 + token-types: 6.1.2 + uint8array-extras: 1.5.0 + transitivePeerDependencies: + - supports-color + + finalhandler@2.1.1: + dependencies: + debug: 4.4.3 + encodeurl: 2.0.0 + escape-html: 1.0.3 + on-finished: 2.4.1 + parseurl: 1.3.3 + statuses: 2.0.2 + transitivePeerDependencies: + - supports-color + optional: true + + find-my-way@9.7.0: + dependencies: + fast-deep-equal: 3.1.3 + fast-querystring: 1.1.2 + safe-regex2: 5.1.1 + + find-my-way@9.9.0: + dependencies: + fast-deep-equal: 3.1.3 + fast-querystring: 1.1.2 + safe-regex2: 5.1.1 + + find-up@4.1.0: + dependencies: + locate-path: 5.0.0 + path-exists: 4.0.0 + + foreground-child@3.3.1: + dependencies: + cross-spawn: 7.0.6 + signal-exit: 4.1.0 + + form-data@4.0.6: + dependencies: + asynckit: 0.4.0 + combined-stream: 1.0.8 + es-set-tostringtag: 2.1.0 + hasown: 2.0.4 + mime-types: 2.1.35 + + formidable@3.5.4: + dependencies: + '@paralleldrive/cuid2': 2.3.1 + dezalgo: 1.0.4 + once: 1.4.0 + + forwarded@0.2.0: + optional: true + + fresh@2.0.0: + optional: true + + function-bind@1.1.2: {} + + generate-function@2.3.1: + dependencies: + is-property: 1.0.2 + + gensync@1.0.0-beta.2: {} + + get-caller-file@2.0.5: {} + + get-east-asian-width@1.7.0: {} + + get-intrinsic@1.3.0: + dependencies: + call-bind-apply-helpers: 1.0.2 + es-define-property: 1.0.1 + es-errors: 1.3.0 + es-object-atoms: 1.1.2 + function-bind: 1.1.2 + get-proto: 1.0.1 + gopd: 1.2.0 + has-symbols: 1.1.0 + hasown: 2.0.4 + math-intrinsics: 1.1.0 + + get-package-type@0.1.0: {} + + get-port-please@3.2.0: {} + + get-proto@1.0.1: + dependencies: + dunder-proto: 1.0.1 + es-object-atoms: 1.1.2 + + get-stream@6.0.1: {} + + giget@3.3.1: {} + + glob@10.5.0: + dependencies: + foreground-child: 3.3.1 + jackspeak: 3.4.3 + minimatch: 9.0.9 + minipass: 7.1.3 + package-json-from-dist: 1.0.1 + path-scurry: 1.11.1 + + glob@13.0.6: + dependencies: + minimatch: 10.2.6 + minipass: 7.1.3 + path-scurry: 2.0.2 + + gopd@1.2.0: {} + + graceful-fs@4.2.11: {} + + grammex@3.1.13: {} + + graphmatch@1.1.1: {} + + handlebars@4.7.9: + dependencies: + minimist: 1.2.8 + neo-async: 2.6.2 + source-map: 0.6.1 + wordwrap: 1.0.0 + optionalDependencies: + uglify-js: 3.19.3 + + has-flag@4.0.0: {} + + has-symbols@1.1.0: {} + + has-tostringtag@1.0.2: + dependencies: + has-symbols: 1.1.0 + + hasown@2.0.4: + dependencies: + function-bind: 1.1.2 + + help-me@5.0.0: {} + + html-escaper@2.0.2: {} + + http-errors@2.0.1: + dependencies: + depd: 2.0.0 + inherits: 2.0.4 + setprototypeof: 1.2.0 + statuses: 2.0.2 + toidentifier: 1.0.1 + + human-signals@2.1.0: {} + + iconv-lite@0.4.24: + dependencies: + safer-buffer: 2.1.2 + + iconv-lite@0.7.3: + dependencies: + safer-buffer: 2.1.2 + + ieee754@1.2.1: {} + + import-local@3.2.0: + dependencies: + pkg-dir: 4.2.0 + resolve-cwd: 3.0.0 + + imurmurhash@0.1.4: {} + + inherits@2.0.4: {} + + inquirer@8.2.6: + dependencies: + ansi-escapes: 4.3.2 + chalk: 4.1.2 + cli-cursor: 3.1.0 + cli-width: 3.0.0 + external-editor: 3.1.0 + figures: 3.2.0 + lodash: 4.18.1 + mute-stream: 0.0.8 + ora: 5.4.1 + run-async: 2.4.1 + rxjs: 7.8.2 + string-width: 4.2.3 + strip-ansi: 6.0.1 + through: 2.3.8 + wrap-ansi: 6.2.0 + + internmap@2.0.3: {} + + ioredis@6.0.0: + dependencies: + '@ioredis/commands': 2.0.0 + cluster-key-slot: 1.1.1 + debug: 4.4.3 + denque: 2.1.0 + redis-errors: 1.2.0 + standard-as-callback: 2.1.0 + transitivePeerDependencies: + - supports-color + + ipaddr.js@1.9.1: + optional: true + + ipaddr.js@2.5.0: {} + + is-arrayish@0.2.1: {} + + is-extglob@2.1.1: {} + + is-fullwidth-code-point@3.0.0: {} + + is-generator-fn@2.1.0: {} + + is-glob@4.0.3: + dependencies: + is-extglob: 2.1.1 + + is-interactive@1.0.0: {} + + is-interactive@2.0.0: {} + + is-promise@4.0.0: + optional: true + + is-property@1.0.2: {} + + is-stream@2.0.1: {} + + is-unicode-supported@0.1.0: {} + + is-unicode-supported@2.1.0: {} + + isexe@2.0.0: {} + + istanbul-lib-coverage@3.2.2: {} + + istanbul-lib-instrument@6.0.3: + dependencies: + '@babel/core': 7.29.7 + '@babel/parser': 7.29.9 + '@istanbuljs/schema': 0.1.6 + istanbul-lib-coverage: 3.2.2 + semver: 7.8.5 + transitivePeerDependencies: + - supports-color + + istanbul-lib-report@3.0.1: + dependencies: + istanbul-lib-coverage: 3.2.2 + make-dir: 4.0.0 + supports-color: 7.2.0 + + istanbul-lib-source-maps@5.0.6: + dependencies: + '@jridgewell/trace-mapping': 0.3.31 + debug: 4.4.3 + istanbul-lib-coverage: 3.2.2 + transitivePeerDependencies: + - supports-color + + istanbul-reports@3.2.0: + dependencies: + html-escaper: 2.0.2 + istanbul-lib-report: 3.0.1 + + iterare@1.2.1: {} + + jackspeak@3.4.3: + dependencies: + '@isaacs/cliui': 8.0.2 + optionalDependencies: + '@pkgjs/parseargs': 0.11.0 + + jest-changed-files@30.5.1: + dependencies: + execa: 5.1.1 + jest-util: 30.5.1 + p-limit: 3.1.0 + + jest-circus@30.5.2: + dependencies: + '@jest/environment': 30.5.2 + '@jest/expect': 30.5.2 + '@jest/test-result': 30.5.2 + '@jest/types': 30.5.1 + '@types/node': 24.13.6 + chalk: 4.1.2 + co: 4.6.0 + dedent: 1.7.2 + is-generator-fn: 2.1.0 + jest-each: 30.5.2 + jest-matcher-utils: 30.5.2 + jest-message-util: 30.5.1 + jest-runtime: 30.5.2 + jest-snapshot: 30.5.2 + jest-util: 30.5.1 + p-limit: 3.1.0 + pretty-format: 30.5.1 + pure-rand: 7.0.1 + slash: 3.0.0 + stack-utils: 2.0.6 + transitivePeerDependencies: + - babel-plugin-macros + - supports-color + + jest-cli@30.5.2(@types/node@24.13.6)(ts-node@10.9.2(@types/node@24.13.6)(typescript@6.0.3)): + dependencies: + '@jest/core': 30.5.2(ts-node@10.9.2(@types/node@24.13.6)(typescript@6.0.3)) + '@jest/test-result': 30.5.2 + '@jest/types': 30.5.1 + chalk: 4.1.2 + exit-x: 0.2.2 + import-local: 3.2.0 + jest-config: 30.5.2(@types/node@24.13.6)(ts-node@10.9.2(@types/node@24.13.6)(typescript@6.0.3)) + jest-util: 30.5.1 + jest-validate: 30.5.1 + yargs: 17.7.3 + transitivePeerDependencies: + - '@types/node' + - babel-plugin-macros + - esbuild-register + - supports-color + - ts-node + + jest-config@30.5.2(@types/node@24.13.6)(ts-node@10.9.2(@types/node@24.13.6)(typescript@6.0.3)): + dependencies: + '@babel/core': 7.29.7 + '@jest/get-type': 30.5.0 + '@jest/pattern': 30.5.0 + '@jest/test-sequencer': 30.5.2 + '@jest/types': 30.5.1 + babel-jest: 30.5.2(@babel/core@7.29.7) + chalk: 4.1.2 + ci-info: 4.4.0 + deepmerge: 4.3.1 + glob: 13.0.6 + graceful-fs: 4.2.11 + jest-circus: 30.5.2 + jest-docblock: 30.5.0 + jest-environment-node: 30.5.2 + jest-regex-util: 30.5.0 + jest-resolve: 30.5.1 + jest-runner: 30.5.2 + jest-util: 30.5.1 + jest-validate: 30.5.1 + parse-json: 5.2.0 + pretty-format: 30.5.1 + slash: 3.0.0 + strip-json-comments: 3.1.1 + optionalDependencies: + '@types/node': 24.13.6 + ts-node: 10.9.2(@types/node@24.13.6)(typescript@6.0.3) + transitivePeerDependencies: + - babel-plugin-macros + - supports-color + + jest-diff@30.5.2: + dependencies: + '@jest/diff-sequences': 30.5.0 + '@jest/get-type': 30.5.0 + chalk: 4.1.2 + pretty-format: 30.5.1 + + jest-docblock@30.5.0: + dependencies: + detect-newline: 3.1.0 + + jest-each@30.5.2: + dependencies: + '@jest/get-type': 30.5.0 + '@jest/types': 30.5.1 + chalk: 4.1.2 + jest-regex-util: 30.5.0 + jest-util: 30.5.1 + pretty-format: 30.5.1 + + jest-environment-node@30.5.2: + dependencies: + '@jest/environment': 30.5.2 + '@jest/fake-timers': 30.5.2 + '@jest/types': 30.5.1 + '@types/node': 24.13.6 + jest-mock: 30.5.2 + jest-util: 30.5.1 + jest-validate: 30.5.1 + + jest-haste-map@30.5.1: + dependencies: + '@jest/types': 30.5.1 + '@parcel/watcher': 2.6.0 + '@types/node': 24.13.6 + anymatch: 3.1.3 + fb-watchman: 2.0.2 + fdir: 6.5.0(picomatch@4.0.7) + graceful-fs: 4.2.11 + jest-regex-util: 30.5.0 + jest-util: 30.5.1 + jest-worker: 30.5.1 + picomatch: 4.0.7 + + jest-leak-detector@30.5.1: + dependencies: + '@jest/get-type': 30.5.0 + pretty-format: 30.5.1 + + jest-matcher-utils@30.5.2: + dependencies: + '@jest/get-type': 30.5.0 + chalk: 4.1.2 + jest-diff: 30.5.2 + pretty-format: 30.5.1 + + jest-message-util@30.5.1: + dependencies: + '@babel/code-frame': 7.29.7 + '@jest/types': 30.5.1 + '@types/stack-utils': 2.0.3 + chalk: 4.1.2 + graceful-fs: 4.2.11 + jest-util: 30.5.1 + picomatch: 4.0.7 + pretty-format: 30.5.1 + slash: 3.0.0 + stack-utils: 2.0.6 + + jest-mock@30.5.2: + dependencies: + '@jest/expect-utils': 30.5.2 + '@jest/types': 30.5.1 + '@types/node': 24.13.6 + jest-util: 30.5.1 + + jest-regex-util@30.5.0: {} + + jest-resolve-dependencies@30.5.2: + dependencies: + jest-regex-util: 30.5.0 + jest-snapshot: 30.5.2 + transitivePeerDependencies: + - supports-color + + jest-resolve@30.5.1: + dependencies: + chalk: 4.1.2 + graceful-fs: 4.2.11 + jest-haste-map: 30.5.1 + jest-util: 30.5.1 + jest-validate: 30.5.1 + slash: 3.0.0 + unrs-resolver: 1.12.2 + + jest-runner@30.5.2: + dependencies: + '@jest/console': 30.5.2 + '@jest/environment': 30.5.2 + '@jest/source-map': 30.5.2 + '@jest/test-result': 30.5.2 + '@jest/transform': 30.5.2 + '@jest/types': 30.5.1 + '@types/node': 24.13.6 + chalk: 4.1.2 + emittery: 0.13.1 + exit-x: 0.2.2 + graceful-fs: 4.2.11 + jest-docblock: 30.5.0 + jest-environment-node: 30.5.2 + jest-haste-map: 30.5.1 + jest-leak-detector: 30.5.1 + jest-message-util: 30.5.1 + jest-resolve: 30.5.1 + jest-runtime: 30.5.2 + jest-util: 30.5.1 + jest-watcher: 30.5.2 + jest-worker: 30.5.1 + p-limit: 3.1.0 + transitivePeerDependencies: + - supports-color + + jest-runtime@30.5.2: + dependencies: + '@jest/environment': 30.5.2 + '@jest/fake-timers': 30.5.2 + '@jest/globals': 30.5.2 + '@jest/source-map': 30.5.2 + '@jest/test-result': 30.5.2 + '@jest/transform': 30.5.2 + '@jest/types': 30.5.1 + '@types/node': 24.13.6 + chalk: 4.1.2 + cjs-module-lexer: 2.2.1 + collect-v8-coverage: 1.0.3 + es-module-lexer: 2.3.2 + glob: 13.0.6 + graceful-fs: 4.2.11 + jest-haste-map: 30.5.1 + jest-message-util: 30.5.1 + jest-mock: 30.5.2 + jest-regex-util: 30.5.0 + jest-resolve: 30.5.1 + jest-snapshot: 30.5.2 + jest-util: 30.5.1 + slash: 3.0.0 + strip-bom: 4.0.0 + transitivePeerDependencies: + - supports-color + + jest-snapshot@30.5.2: + dependencies: + '@babel/core': 7.29.7 + '@babel/generator': 7.29.8 + '@babel/plugin-syntax-jsx': 7.29.7(@babel/core@7.29.7) + '@babel/plugin-syntax-typescript': 7.29.7(@babel/core@7.29.7) + '@babel/types': 7.29.8 + '@jest/expect-utils': 30.5.2 + '@jest/get-type': 30.5.0 + '@jest/snapshot-utils': 30.5.1 + '@jest/transform': 30.5.2 + '@jest/types': 30.5.1 + babel-preset-current-node-syntax: 1.2.0(@babel/core@7.29.7) + chalk: 4.1.2 + expect: 30.5.2 + graceful-fs: 4.2.11 + jest-diff: 30.5.2 + jest-matcher-utils: 30.5.2 + jest-message-util: 30.5.1 + jest-util: 30.5.1 + pretty-format: 30.5.1 + semver: 7.8.5 + synckit: 0.11.13 + transitivePeerDependencies: + - supports-color + + jest-util@30.5.1: + dependencies: + '@jest/types': 30.5.1 + '@types/node': 24.13.6 + chalk: 4.1.2 + ci-info: 4.4.0 + graceful-fs: 4.2.11 + picomatch: 4.0.7 + + jest-validate@30.5.1: + dependencies: + '@jest/get-type': 30.5.0 + '@jest/types': 30.5.1 + camelcase: 6.3.0 + chalk: 4.1.2 + leven: 3.1.0 + pretty-format: 30.5.1 + + jest-watcher@30.5.2: + dependencies: + '@jest/test-result': 30.5.2 + '@jest/types': 30.5.1 + '@types/node': 24.13.6 + ansi-escapes: 4.3.2 + chalk: 4.1.2 + emittery: 0.13.1 + jest-util: 30.5.1 + string-length: 4.0.2 + + jest-worker@27.5.1: + dependencies: + '@types/node': 24.13.6 + merge-stream: 2.0.0 + supports-color: 8.1.1 + + jest-worker@30.5.1: + dependencies: + '@types/node': 24.13.6 + '@ungap/structured-clone': 1.4.0 + jest-util: 30.5.1 + merge-stream: 2.0.0 + supports-color: 8.1.1 + + jest@30.5.2(@types/node@24.13.6)(ts-node@10.9.2(@types/node@24.13.6)(typescript@6.0.3)): + dependencies: + '@jest/core': 30.5.2(ts-node@10.9.2(@types/node@24.13.6)(typescript@6.0.3)) + '@jest/types': 30.5.1 + import-local: 3.2.0 + jest-cli: 30.5.2(@types/node@24.13.6)(ts-node@10.9.2(@types/node@24.13.6)(typescript@6.0.3)) + transitivePeerDependencies: + - '@types/node' + - babel-plugin-macros + - esbuild-register + - supports-color + - ts-node + + jiti@2.7.0: {} + + joycon@3.1.1: {} + + js-tokens@4.0.0: {} + + js-yaml@3.15.2: + dependencies: + argparse: 1.0.10 + esprima: 4.0.1 + + js-yaml@5.4.1: + dependencies: + argparse: 2.0.1 + + jsesc@3.1.0: {} + + json-parse-even-better-errors@2.3.1: {} + + json-schema-ref-resolver@3.0.0: + dependencies: + dequal: 2.0.3 + + json-schema-traverse@1.0.0: {} + + json5@2.2.3: {} + + jsonc-parser@3.3.1: {} + + leven@3.1.0: {} + + light-my-request@6.6.0: + dependencies: + cookie: 1.1.1 + process-warning: 4.0.1 + set-cookie-parser: 2.7.2 + + lines-and-columns@1.2.4: {} + + load-esm@1.0.3: {} + + locate-path@5.0.0: + dependencies: + p-locate: 4.1.0 + + lodash.memoize@4.1.2: {} + + lodash@4.18.1: {} + + log-symbols@4.1.0: + dependencies: + chalk: 4.1.2 + is-unicode-supported: 0.1.0 + + log-symbols@7.0.1: + dependencies: + is-unicode-supported: 2.1.0 + yoctocolors: 2.2.0 + + long@5.3.2: {} + + lru-cache@10.4.3: {} + + lru-cache@11.5.3: {} + + lru-cache@5.1.1: + dependencies: + yallist: 3.1.1 + + lru.min@1.1.5: {} + + magic-string@1.0.0: + dependencies: + '@jridgewell/sourcemap-codec': 1.6.0 + + make-dir@4.0.0: + dependencies: + semver: 7.8.5 + + make-error@1.3.6: {} + + math-intrinsics@1.1.0: {} + + media-typer@0.3.0: + optional: true + + media-typer@1.1.1: + optional: true + + merge-descriptors@2.0.0: + optional: true + + merge-stream@2.0.0: {} + + methods@1.1.2: {} + + mime-db@1.52.0: {} + + mime-db@1.54.0: {} + + mime-types@2.1.35: + dependencies: + mime-db: 1.52.0 + + mime-types@3.0.2: + dependencies: + mime-db: 1.54.0 + optional: true + + mime@2.6.0: {} + + mime@3.0.0: {} + + mimic-fn@2.1.0: {} + + mimic-function@5.0.1: {} + + minimatch@10.2.6: + dependencies: + brace-expansion: 5.0.12 + + minimatch@9.0.9: + dependencies: + brace-expansion: 2.1.7 + + minimist@1.2.8: {} + + minimizer-webpack-plugin@5.11.0(webpack@5.111.1): + dependencies: + '@jridgewell/trace-mapping': 0.3.31 + jest-worker: 27.5.1 + schema-utils: 4.5.0 + terser: 5.51.2 + webpack: 5.111.1 + + minipass@7.1.3: {} + + ms@2.1.3: {} + + multer@2.4.0: + dependencies: + append-field: 1.0.0 + busboy: 1.6.0 + type-is: 1.6.18 + optional: true + + mute-stream@0.0.8: {} + + mute-stream@3.0.0: {} + + mysql2@3.15.3: + dependencies: + aws-ssl-profiles: 1.1.2 + denque: 2.1.0 + generate-function: 2.3.1 + iconv-lite: 0.7.3 + long: 5.3.2 + lru.min: 1.1.5 + named-placeholders: 1.1.6 + seq-queue: 0.0.5 + sqlstring: 2.3.3 + + named-placeholders@1.1.6: + dependencies: + lru.min: 1.1.5 + + nanoid@5.1.16: {} + + napi-postinstall@0.3.4: {} + + natural-compare@1.4.0: {} + + negotiator@1.1.0: + dependencies: + content-type: 2.1.0 + optional: true + + neo-async@2.6.2: {} + + nestjs-pino@5.2.0(@nestjs/common@12.0.4(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/core@12.0.4)(pino-http@11.0.0)(pino@10.3.1)(rxjs@7.8.2): + dependencies: + '@nestjs/common': 12.0.4(reflect-metadata@0.2.2)(rxjs@7.8.2) + '@nestjs/core': 12.0.4(@nestjs/common@12.0.4(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/platform-express@12.0.4)(reflect-metadata@0.2.2)(rxjs@7.8.2) + pino: 10.3.1 + pino-http: 11.0.0 + rxjs: 7.8.2 + + node-addon-api@7.1.1: {} + + node-emoji@2.1.3: + dependencies: + '@sindresorhus/is': 4.6.0 + char-regex: 1.0.2 + emojilib: 2.4.0 + skin-tone: 2.0.0 + + node-emoji@2.2.0: + dependencies: + '@sindresorhus/is': 4.6.0 + char-regex: 1.0.2 + emojilib: 2.4.0 + skin-tone: 2.0.0 + + node-int64@0.4.0: {} + + node-releases@2.0.56: {} + + normalize-path@3.0.0: {} + + npm-run-path@4.0.1: + dependencies: + path-key: 3.1.1 + + object-assign@4.1.1: + optional: true + + object-inspect@1.13.4: {} + + ohash@2.0.12: {} + + on-exit-leak-free@2.1.2: {} + + on-finished@2.4.1: + dependencies: + ee-first: 1.1.1 + optional: true + + once@1.4.0: + dependencies: + wrappy: 1.0.2 + + onetime@5.1.2: + dependencies: + mimic-fn: 2.1.0 + + onetime@7.0.0: + dependencies: + mimic-function: 5.0.1 + + ora@5.4.1: + dependencies: + bl: 4.1.0 + chalk: 4.1.2 + cli-cursor: 3.1.0 + cli-spinners: 2.9.2 + is-interactive: 1.0.0 + is-unicode-supported: 0.1.0 + log-symbols: 4.1.0 + strip-ansi: 6.0.1 + wcwidth: 1.0.1 + + ora@9.4.1: + dependencies: + chalk: 5.6.2 + cli-cursor: 5.0.0 + cli-spinners: 3.4.0 + is-interactive: 2.0.0 + is-unicode-supported: 2.1.0 + log-symbols: 7.0.1 + stdin-discarder: 0.3.2 + string-width: 8.2.2 + + os-tmpdir@1.0.2: {} + + oxlint-tsgolint@7.0.2002: + optionalDependencies: + '@oxlint-tsgolint/darwin-arm64': 7.0.2002 + '@oxlint-tsgolint/darwin-x64': 7.0.2002 + '@oxlint-tsgolint/linux-arm64': 7.0.2002 + '@oxlint-tsgolint/linux-x64': 7.0.2002 + '@oxlint-tsgolint/win32-arm64': 7.0.2002 + '@oxlint-tsgolint/win32-x64': 7.0.2002 + + oxlint@1.83.0(oxlint-tsgolint@7.0.2002): + optionalDependencies: + '@oxlint/binding-android-arm-eabi': 1.83.0 + '@oxlint/binding-android-arm64': 1.83.0 + '@oxlint/binding-darwin-arm64': 1.83.0 + '@oxlint/binding-darwin-x64': 1.83.0 + '@oxlint/binding-freebsd-x64': 1.83.0 + '@oxlint/binding-linux-arm-gnueabihf': 1.83.0 + '@oxlint/binding-linux-arm-musleabihf': 1.83.0 + '@oxlint/binding-linux-arm64-gnu': 1.83.0 + '@oxlint/binding-linux-arm64-musl': 1.83.0 + '@oxlint/binding-linux-ppc64-gnu': 1.83.0 + '@oxlint/binding-linux-riscv64-gnu': 1.83.0 + '@oxlint/binding-linux-riscv64-musl': 1.83.0 + '@oxlint/binding-linux-s390x-gnu': 1.83.0 + '@oxlint/binding-linux-x64-gnu': 1.83.0 + '@oxlint/binding-linux-x64-musl': 1.83.0 + '@oxlint/binding-openharmony-arm64': 1.83.0 + '@oxlint/binding-win32-arm64-msvc': 1.83.0 + '@oxlint/binding-win32-ia32-msvc': 1.83.0 + '@oxlint/binding-win32-x64-msvc': 1.83.0 + oxlint-tsgolint: 7.0.2002 + + p-limit@2.3.0: + dependencies: + p-try: 2.2.0 + + p-limit@3.1.0: + dependencies: + yocto-queue: 0.1.0 + + p-locate@4.1.0: + dependencies: + p-limit: 2.3.0 + + p-try@2.2.0: {} + + package-json-from-dist@1.0.1: {} + + parse-json@5.2.0: + dependencies: + '@babel/code-frame': 7.29.7 + error-ex: 1.3.4 + json-parse-even-better-errors: 2.3.1 + lines-and-columns: 1.2.4 + + parseurl@1.3.3: + optional: true + + path-exists@4.0.0: {} + + path-key@3.1.1: {} + + path-scurry@1.11.1: + dependencies: + lru-cache: 10.4.3 + minipass: 7.1.3 + + path-scurry@2.0.2: + dependencies: + lru-cache: 11.5.3 + minipass: 7.1.3 + + path-to-regexp@8.4.2: {} + + pathe@2.0.3: {} + + perfect-debounce@2.1.0: {} + + pg-cloudflare@1.4.1: + optional: true + + pg-connection-string@2.14.1: {} + + pg-int8@1.0.1: {} + + pg-pool@3.14.0(pg@8.23.1): + dependencies: + pg: 8.23.1 + + pg-protocol@1.16.1: {} + + pg-types@2.2.0: + dependencies: + pg-int8: 1.0.1 + postgres-array: 2.0.0 + postgres-bytea: 1.0.1 + postgres-date: 1.0.7 + postgres-interval: 1.2.0 + + pg@8.23.1: + dependencies: + pg-connection-string: 2.14.1 + pg-pool: 3.14.0(pg@8.23.1) + pg-protocol: 1.16.1 + pg-types: 2.2.0 + pgpass: 1.0.5 + optionalDependencies: + pg-cloudflare: 1.4.1 + + pgpass@1.0.5: + dependencies: + split2: 4.2.0 + + picocolors@1.1.1: {} + + picomatch@2.3.2: {} + + picomatch@4.0.5: {} + + picomatch@4.0.7: {} + + pino-abstract-transport@3.0.0: + dependencies: + split2: 4.2.0 + + pino-http@11.0.0: + dependencies: + get-caller-file: 2.0.5 + pino: 10.3.1 + pino-std-serializers: 7.1.0 + process-warning: 5.1.0 + + pino-pretty@13.1.3: + dependencies: + colorette: 2.0.20 + dateformat: 4.6.3 + fast-copy: 4.1.1 + fast-safe-stringify: 2.1.1 + help-me: 5.0.0 + joycon: 3.1.1 + minimist: 1.2.8 + on-exit-leak-free: 2.1.2 + pino-abstract-transport: 3.0.0 + pump: 3.0.4 + secure-json-parse: 4.1.0 + sonic-boom: 4.2.1 + strip-json-comments: 5.0.3 + + pino-std-serializers@7.1.0: {} + + pino@10.3.1: + dependencies: + '@pinojs/redact': 0.4.0 + atomic-sleep: 1.0.0 + on-exit-leak-free: 2.1.2 + pino-abstract-transport: 3.0.0 + pino-std-serializers: 7.1.0 + process-warning: 5.1.0 + quick-format-unescaped: 4.0.4 + real-require: 0.2.0 + safe-stable-stringify: 2.5.0 + sonic-boom: 4.2.1 + thread-stream: 4.2.0 + + pirates@4.0.7: {} + + pkg-dir@4.2.0: + dependencies: + find-up: 4.1.0 + + pkg-types@2.3.3: + dependencies: + confbox: 0.3.1 + exsolve: 1.1.3 + pathe: 2.0.3 + + pluralize@8.0.0: {} + + postgres-array@2.0.0: {} + + postgres-array@3.0.4: {} + + postgres-bytea@1.0.1: {} + + postgres-date@1.0.7: {} + + postgres-interval@1.2.0: + dependencies: + xtend: 4.0.2 + + postgres@3.4.7: {} + + prettier@3.9.8: {} + + pretty-format@30.5.1: + dependencies: + '@jest/react-is-18': react-is@18.3.1 + '@jest/react-is-19': react-is@19.3.0 + '@jest/schemas': 30.5.0 + ansi-styles: 5.2.0 + + prisma@7.10.0(@types/react@19.3.0)(react-dom@19.3.0(react@19.3.0))(react@19.3.0)(typescript@6.0.3): + dependencies: + '@prisma/config': 7.10.0 + '@prisma/dev': 0.24.17(typescript@6.0.3) + '@prisma/engines': 7.10.0 + '@prisma/studio-core': 0.33.0(@types/react@19.3.0)(react-dom@19.3.0(react@19.3.0))(react@19.3.0) + mysql2: 3.15.3 + postgres: 3.4.7 + optionalDependencies: + typescript: 6.0.3 + transitivePeerDependencies: + - '@types/react' + - '@types/react-dom' + - magicast + - react + - react-dom + + process-warning@4.0.1: {} + + process-warning@5.1.0: {} + + proper-lockfile@4.1.2: + dependencies: + graceful-fs: 4.2.11 + retry: 0.12.0 + signal-exit: 3.0.7 + + proxy-addr@2.0.8: + dependencies: + forwarded: 0.2.0 + ipaddr.js: 1.9.1 + optional: true + + pump@3.0.4: + dependencies: + end-of-stream: 1.4.5 + once: 1.4.0 + + pure-rand@6.1.0: {} + + pure-rand@7.0.1: {} + + qs@6.16.0: + dependencies: + es-define-property: 1.0.1 + side-channel: 1.1.1 + + quick-format-unescaped@4.0.4: {} + + range-parser@1.3.0: + optional: true + + raw-body@3.0.2: + dependencies: + bytes: 3.1.2 + http-errors: 2.0.1 + iconv-lite: 0.7.3 + unpipe: 1.0.0 + optional: true + + rc9@3.1.0: + dependencies: + defu: 6.1.7 + destr: 2.0.5 + + react-dom@19.3.0(react@19.3.0): + dependencies: + react: 19.3.0 + scheduler: 0.28.0 + + react-is@18.3.1: {} + + react-is@19.3.0: {} + + react@19.3.0: {} + + readable-stream@3.6.2: + dependencies: + inherits: 2.0.4 + string_decoder: 1.3.0 + util-deprecate: 1.0.2 + + readdirp@5.1.1: {} + + real-require@0.2.0: {} + + real-require@1.0.0: {} + + redis-errors@1.2.0: {} + + reflect-metadata@0.2.2: {} + + remeda@2.33.4: {} + + require-directory@2.1.1: {} + + require-from-string@2.0.2: {} + + resolve-cwd@3.0.0: + dependencies: + resolve-from: 5.0.0 + + resolve-from@5.0.0: {} + + restore-cursor@3.1.0: + dependencies: + onetime: 5.1.2 + signal-exit: 3.0.7 + + restore-cursor@5.1.0: + dependencies: + onetime: 7.0.0 + signal-exit: 4.1.0 + + ret@0.5.0: {} + + retry@0.12.0: {} + + reusify@1.1.0: {} + + rfdc@1.4.1: {} + + robust-predicates@3.0.3: {} + + router@2.2.0: + dependencies: + debug: 4.4.3 + depd: 2.0.0 + is-promise: 4.0.0 + parseurl: 1.3.3 + path-to-regexp: 8.4.2 + transitivePeerDependencies: + - supports-color + optional: true + + run-async@2.4.1: {} + + rxjs@7.8.2: + dependencies: + tslib: 2.8.1 + + safe-buffer@5.2.1: {} + + safe-regex2@5.1.1: + dependencies: + ret: 0.5.0 + + safe-stable-stringify@2.5.0: {} + + safer-buffer@2.1.2: {} + + scheduler@0.28.0: {} + + schema-utils@4.5.0: + dependencies: + '@types/json-schema': 7.0.15 + ajv: 8.20.0 + ajv-formats: 3.0.1(ajv@8.20.0) + ajv-keywords: 5.1.0(ajv@8.20.0) + + secure-json-parse@4.1.0: {} + + semver@6.3.1: {} + + semver@7.8.5: {} + + send@1.2.1: + dependencies: + debug: 4.4.3 + encodeurl: 2.0.0 + escape-html: 1.0.3 + etag: 1.8.1 + fresh: 2.0.0 + http-errors: 2.0.1 + mime-types: 3.0.2 + ms: 2.1.3 + on-finished: 2.4.1 + range-parser: 1.3.0 + statuses: 2.0.2 + transitivePeerDependencies: + - supports-color + optional: true + + seq-queue@0.0.5: {} + + serve-static@2.2.1: + dependencies: + encodeurl: 2.0.0 + escape-html: 1.0.3 + parseurl: 1.3.3 + send: 1.2.1 + transitivePeerDependencies: + - supports-color + optional: true + + set-cookie-parser@2.7.2: {} + + setprototypeof@1.2.0: {} + + shebang-command@2.0.0: + dependencies: + shebang-regex: 3.0.0 + + shebang-regex@3.0.0: {} + + side-channel-list@1.0.1: + dependencies: + es-errors: 1.3.0 + object-inspect: 1.13.4 + + side-channel-map@1.0.1: + dependencies: + call-bound: 1.0.4 + es-errors: 1.3.0 + get-intrinsic: 1.3.0 + object-inspect: 1.13.4 + + side-channel-weakmap@1.0.2: + dependencies: + call-bound: 1.0.4 + es-errors: 1.3.0 + get-intrinsic: 1.3.0 + object-inspect: 1.13.4 + side-channel-map: 1.0.1 + + side-channel@1.1.1: + dependencies: + es-errors: 1.3.0 + object-inspect: 1.13.4 + side-channel-list: 1.0.1 + side-channel-map: 1.0.1 + side-channel-weakmap: 1.0.2 + + signal-exit@3.0.7: {} + + signal-exit@4.1.0: {} + + skin-tone@2.0.0: + dependencies: + unicode-emoji-modifier-base: 1.0.0 + + slash@3.0.0: {} + + sonic-boom@4.2.1: + dependencies: + atomic-sleep: 1.0.0 + + source-map-support@0.5.21: + dependencies: + buffer-from: 1.1.2 + source-map: 0.6.1 + + source-map@0.6.1: {} + + source-map@0.7.6: {} + + split2@4.2.0: {} + + sprintf-js@1.0.3: {} + + sqlstring@2.3.3: {} + + stack-utils@2.0.6: + dependencies: + escape-string-regexp: 2.0.0 + + standard-as-callback@2.1.0: {} + + statuses@2.0.2: {} + + std-env@3.10.0: {} + + stdin-discarder@0.3.2: {} + + streamsearch@1.1.0: + optional: true + + string-length@4.0.2: + dependencies: + char-regex: 1.0.2 + strip-ansi: 6.0.1 + + string-width@4.2.3: + dependencies: + emoji-regex: 8.0.0 + is-fullwidth-code-point: 3.0.0 + strip-ansi: 6.0.1 + + string-width@5.1.2: + dependencies: + eastasianwidth: 0.2.0 + emoji-regex: 9.2.2 + strip-ansi: 7.2.0 + + string-width@8.2.2: + dependencies: + get-east-asian-width: 1.7.0 + strip-ansi: 7.2.0 + + string_decoder@1.3.0: + dependencies: + safe-buffer: 5.2.1 + + strip-ansi@6.0.1: + dependencies: + ansi-regex: 5.0.1 + + strip-ansi@7.2.0: + dependencies: + ansi-regex: 6.3.0 + + strip-bom@3.0.0: {} + + strip-bom@4.0.0: {} + + strip-final-newline@2.0.0: {} + + strip-json-comments@3.1.1: {} + + strip-json-comments@5.0.3: {} + + strtok3@10.3.5: + dependencies: + '@tokenizer/token': 0.3.0 + + superagent@10.3.0: + dependencies: + component-emitter: 1.3.1 + cookiejar: 2.1.4 + debug: 4.4.3 + fast-safe-stringify: 2.1.1 + form-data: 4.0.6 + formidable: 3.5.4 + methods: 1.1.2 + mime: 2.6.0 + qs: 6.16.0 + transitivePeerDependencies: + - supports-color + + supertest@7.2.2: + dependencies: + cookie-signature: 1.2.2 + methods: 1.1.2 + superagent: 10.3.0 + transitivePeerDependencies: + - supports-color + + supports-color@7.2.0: + dependencies: + has-flag: 4.0.0 + + supports-color@8.1.1: + dependencies: + has-flag: 4.0.0 + + swagger-ui-dist@5.32.14: + dependencies: + '@scarf/scarf': 1.4.0 + + synckit@0.11.13: + dependencies: + '@pkgr/core': 0.3.6 + + tagged-tag@1.0.0: {} + + tapable@2.3.3: {} + + terser@5.51.2: + dependencies: + '@jridgewell/source-map': 0.3.11 + acorn: 8.18.0 + commander: 2.20.3 + source-map-support: 0.5.21 + + test-exclude@7.0.2: + dependencies: + '@istanbuljs/schema': 0.1.6 + glob: 10.5.0 + minimatch: 10.2.6 + + thread-stream@4.2.0: + dependencies: + real-require: 1.0.0 + + through@2.3.8: {} + + tmp@0.0.33: + dependencies: + os-tmpdir: 1.0.2 + + toad-cache@3.7.4: {} + + toidentifier@1.0.1: {} + + token-types@6.1.2: + dependencies: + '@borewit/text-codec': 0.2.2 + '@tokenizer/token': 0.3.0 + ieee754: 1.2.1 + + ts-jest@29.4.12(@babel/core@7.29.7)(@jest/transform@30.5.2)(@jest/types@30.5.1)(babel-jest@30.5.2(@babel/core@7.29.7))(jest-util@30.5.1)(jest@30.5.2(@types/node@24.13.6)(ts-node@10.9.2(@types/node@24.13.6)(typescript@6.0.3)))(typescript@6.0.3): + dependencies: + bs-logger: 0.2.6 + fast-json-stable-stringify: 2.1.0 + handlebars: 4.7.9 + jest: 30.5.2(@types/node@24.13.6)(ts-node@10.9.2(@types/node@24.13.6)(typescript@6.0.3)) + json5: 2.2.3 + lodash.memoize: 4.1.2 + make-error: 1.3.6 + semver: 7.8.5 + type-fest: 4.41.0 + typescript: 6.0.3 + yargs-parser: 21.1.1 + optionalDependencies: + '@babel/core': 7.29.7 + '@jest/transform': 30.5.2 + '@jest/types': 30.5.1 + babel-jest: 30.5.2(@babel/core@7.29.7) + jest-util: 30.5.1 + + ts-loader@9.6.2(typescript@6.0.3)(webpack@5.111.1): + dependencies: + chalk: 4.1.2 + picomatch: 4.0.7 + source-map: 0.7.6 + typescript: 6.0.3 + webpack: 5.111.1 + + ts-node@10.9.2(@types/node@24.13.6)(typescript@6.0.3): + dependencies: + '@cspotcode/source-map-support': 0.8.1 + '@tsconfig/node10': 1.0.13 + '@tsconfig/node12': 1.0.11 + '@tsconfig/node14': 1.0.3 + '@tsconfig/node16': 1.0.4 + '@types/node': 24.13.6 + acorn: 8.18.0 + acorn-walk: 8.3.5 + arg: 4.1.3 + create-require: 1.1.1 + diff: 4.0.4 + make-error: 1.3.6 + typescript: 6.0.3 + v8-compile-cache-lib: 3.0.1 + yn: 3.1.1 + + tsconfig-paths@4.2.0: + dependencies: + json5: 2.2.3 + minimist: 1.2.8 + strip-bom: 3.0.0 + + tslib@2.8.1: {} + + type-detect@4.0.8: {} + + type-fest@0.21.3: {} + + type-fest@4.41.0: {} + + type-fest@5.10.0: + dependencies: + tagged-tag: 1.0.0 + + type-is@1.6.18: + dependencies: + media-typer: 0.3.0 + mime-types: 2.1.35 + optional: true + + type-is@2.1.0: + dependencies: + content-type: 2.1.0 + media-typer: 1.1.1 + mime-types: 3.0.2 + optional: true + + typescript@6.0.3: {} + + uglify-js@3.19.3: + optional: true + + uid@2.0.2: + dependencies: + '@lukeed/csprng': 1.1.0 + + uint8array-extras@1.5.0: {} + + undici-types@7.18.2: {} + + undici@6.20.1: {} + + unicode-emoji-modifier-base@1.0.0: {} + + unpipe@1.0.0: + optional: true + + unrs-resolver@1.12.2: + dependencies: + napi-postinstall: 0.3.4 + optionalDependencies: + '@unrs/resolver-binding-android-arm-eabi': 1.12.2 + '@unrs/resolver-binding-android-arm64': 1.12.2 + '@unrs/resolver-binding-darwin-arm64': 1.12.2 + '@unrs/resolver-binding-darwin-x64': 1.12.2 + '@unrs/resolver-binding-freebsd-x64': 1.12.2 + '@unrs/resolver-binding-linux-arm-gnueabihf': 1.12.2 + '@unrs/resolver-binding-linux-arm-musleabihf': 1.12.2 + '@unrs/resolver-binding-linux-arm64-gnu': 1.12.2 + '@unrs/resolver-binding-linux-arm64-musl': 1.12.2 + '@unrs/resolver-binding-linux-loong64-gnu': 1.12.2 + '@unrs/resolver-binding-linux-loong64-musl': 1.12.2 + '@unrs/resolver-binding-linux-ppc64-gnu': 1.12.2 + '@unrs/resolver-binding-linux-riscv64-gnu': 1.12.2 + '@unrs/resolver-binding-linux-riscv64-musl': 1.12.2 + '@unrs/resolver-binding-linux-s390x-gnu': 1.12.2 + '@unrs/resolver-binding-linux-x64-gnu': 1.12.2 + '@unrs/resolver-binding-linux-x64-musl': 1.12.2 + '@unrs/resolver-binding-openharmony-arm64': 1.12.2 + '@unrs/resolver-binding-wasm32-wasi': 1.12.2 + '@unrs/resolver-binding-win32-arm64-msvc': 1.12.2 + '@unrs/resolver-binding-win32-ia32-msvc': 1.12.2 + '@unrs/resolver-binding-win32-x64-msvc': 1.12.2 + + update-browserslist-db@1.3.3(browserslist@4.29.0): + dependencies: + browserslist: 4.29.0 + escalade: 3.2.0 + picocolors: 1.1.1 + + util-deprecate@1.0.2: {} + + v8-compile-cache-lib@3.0.1: {} + + v8-to-istanbul@9.3.0: + dependencies: + '@jridgewell/trace-mapping': 0.3.31 + '@types/istanbul-lib-coverage': 2.0.6 + convert-source-map: 2.0.0 + + valibot@1.4.2(typescript@6.0.3): + optionalDependencies: + typescript: 6.0.3 + + vary@1.1.2: + optional: true + + watchpack@2.5.2: + dependencies: + graceful-fs: 4.2.11 + + wcwidth@1.0.1: + dependencies: + defaults: 1.0.4 + + webpack-sources@3.5.1: {} + + webpack@5.111.1: + dependencies: + '@types/estree': 1.0.9 + '@types/json-schema': 7.0.15 + '@webassemblyjs/ast': 1.14.1 + '@webassemblyjs/wasm-edit': 1.14.1 + '@webassemblyjs/wasm-parser': 1.14.1 + browserslist: 4.29.0 + chrome-trace-event: 1.0.4 + enhanced-resolve: 5.25.1 + es-module-lexer: 2.3.2 + events: 3.3.0 + graceful-fs: 4.2.11 + mime-db: 1.54.0 + minimizer-webpack-plugin: 5.11.0(webpack@5.111.1) + schema-utils: 4.5.0 + tapable: 2.3.3 + watchpack: 2.5.2 + webpack-sources: 3.5.1 + transitivePeerDependencies: + - '@minify-html/node' + - '@napi-rs/image' + - '@swc/core' + - '@swc/css' + - '@swc/html' + - clean-css + - cssnano + - csso + - esbuild + - html-minifier-terser + - imagemin + - lightningcss + - postcss + - sharp + - svgo + - uglify-js + + which@2.0.2: + dependencies: + isexe: 2.0.0 + + wordwrap@1.0.0: {} + + wrap-ansi@6.2.0: + dependencies: + ansi-styles: 4.3.0 + string-width: 4.2.3 + strip-ansi: 6.0.1 + + wrap-ansi@7.0.0: + dependencies: + ansi-styles: 4.3.0 + string-width: 4.2.3 + strip-ansi: 6.0.1 + + wrap-ansi@8.1.0: + dependencies: + ansi-styles: 6.2.3 + string-width: 5.1.2 + strip-ansi: 7.2.0 + + wrappy@1.0.2: {} + + write-file-atomic@5.0.1: + dependencies: + imurmurhash: 0.1.4 + signal-exit: 4.1.0 + + xtend@4.0.2: {} + + y18n@5.0.8: {} + + yallist@3.1.1: {} + + yargs-parser@21.1.1: {} + + yargs@17.7.3: + dependencies: + cliui: 8.0.1 + escalade: 3.2.0 + get-caller-file: 2.0.5 + require-directory: 2.1.1 + string-width: 4.2.3 + y18n: 5.0.8 + yargs-parser: 21.1.1 + + yn@3.1.1: {} + + yocto-queue@0.1.0: {} + + yoctocolors@2.2.0: {} + + zeptomatch@2.1.0: + dependencies: + grammex: 3.1.13 + graphmatch: 1.1.1 + + zod@4.6.5: {} diff --git a/prisma.config.ts b/prisma.config.ts new file mode 100644 index 00000000..74ba9ee2 --- /dev/null +++ b/prisma.config.ts @@ -0,0 +1,8 @@ +import 'dotenv/config'; +import { defineConfig } from 'prisma/config'; + +export default defineConfig({ + schema: 'prisma/schema.prisma', + migrations: { path: 'prisma/migrations' }, + datasource: { url: process.env.DATABASE_URL }, +}); diff --git a/prisma/migrations/20261011140000_initial/migration.sql b/prisma/migrations/20261011140000_initial/migration.sql new file mode 100644 index 00000000..8e449725 --- /dev/null +++ b/prisma/migrations/20261011140000_initial/migration.sql @@ -0,0 +1,56 @@ +CREATE SCHEMA IF NOT EXISTS "public"; + +CREATE TABLE "users" ( + "id" UUID NOT NULL, + "username" VARCHAR(32) NOT NULL, + "display_name" VARCHAR(100) NOT NULL, + "created_at" TIMESTAMPTZ(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, + + CONSTRAINT "users_pkey" PRIMARY KEY ("id") +); + +CREATE TABLE "chats" ( + "id" UUID NOT NULL, + "title" VARCHAR(100) NOT NULL, + "created_at" TIMESTAMPTZ(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, + + CONSTRAINT "chats_pkey" PRIMARY KEY ("id") +); + +CREATE TABLE "chat_members" ( + "chat_id" UUID NOT NULL, + "user_id" UUID NOT NULL, + "position" INTEGER NOT NULL, + + CONSTRAINT "chat_members_pkey" PRIMARY KEY ("chat_id","user_id") +); + +CREATE TABLE "messages" ( + "id" UUID NOT NULL, + "chat_id" UUID NOT NULL, + "sender_id" UUID NOT NULL, + "text" VARCHAR(4000) NOT NULL, + "created_at" TIMESTAMPTZ(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, + + CONSTRAINT "messages_pkey" PRIMARY KEY ("id") +); + +CREATE UNIQUE INDEX "users_username_key" ON "users"("username"); + +CREATE INDEX "chats_created_at_id_idx" ON "chats"("created_at", "id"); + +CREATE INDEX "chat_members_user_id_chat_id_idx" ON "chat_members"("user_id", "chat_id"); + +CREATE UNIQUE INDEX "chat_members_chat_id_position_key" ON "chat_members"("chat_id", "position"); + +CREATE INDEX "messages_chat_id_created_at_id_idx" ON "messages"("chat_id", "created_at", "id"); + +CREATE INDEX "messages_sender_id_idx" ON "messages"("sender_id"); + +ALTER TABLE "chat_members" ADD CONSTRAINT "chat_members_chat_id_fkey" FOREIGN KEY ("chat_id") REFERENCES "chats"("id") ON DELETE CASCADE ON UPDATE CASCADE; + +ALTER TABLE "chat_members" ADD CONSTRAINT "chat_members_user_id_fkey" FOREIGN KEY ("user_id") REFERENCES "users"("id") ON DELETE RESTRICT ON UPDATE CASCADE; + +ALTER TABLE "messages" ADD CONSTRAINT "messages_chat_id_fkey" FOREIGN KEY ("chat_id") REFERENCES "chats"("id") ON DELETE CASCADE ON UPDATE CASCADE; + +ALTER TABLE "messages" ADD CONSTRAINT "messages_sender_id_fkey" FOREIGN KEY ("sender_id") REFERENCES "users"("id") ON DELETE RESTRICT ON UPDATE CASCADE; diff --git a/prisma/migrations/20261011160000_auth/migration.sql b/prisma/migrations/20261011160000_auth/migration.sql new file mode 100644 index 00000000..9e0c4a5e --- /dev/null +++ b/prisma/migrations/20261011160000_auth/migration.sql @@ -0,0 +1,20 @@ +ALTER TABLE "users" ADD COLUMN "password_hash" TEXT; + +CREATE TABLE "sessions" ( + "id" UUID NOT NULL, + "user_id" UUID NOT NULL, + "token_hash" CHAR(64) NOT NULL, + "created_at" TIMESTAMPTZ(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, + "expires_at" TIMESTAMPTZ(3) NOT NULL, + "revoked_at" TIMESTAMPTZ(3), + + CONSTRAINT "sessions_pkey" PRIMARY KEY ("id") +); + +CREATE UNIQUE INDEX "sessions_token_hash_key" ON "sessions"("token_hash"); + +CREATE INDEX "sessions_user_id_idx" ON "sessions"("user_id"); + +CREATE INDEX "sessions_expires_at_idx" ON "sessions"("expires_at"); + +ALTER TABLE "sessions" ADD CONSTRAINT "sessions_user_id_fkey" FOREIGN KEY ("user_id") REFERENCES "users"("id") ON DELETE CASCADE ON UPDATE CASCADE; diff --git a/prisma/migrations/20261013093000_cache_epochs/migration.sql b/prisma/migrations/20261013093000_cache_epochs/migration.sql new file mode 100644 index 00000000..0e42114c --- /dev/null +++ b/prisma/migrations/20261013093000_cache_epochs/migration.sql @@ -0,0 +1,2 @@ +ALTER TABLE "users" ADD COLUMN "chats_epoch" BIGINT NOT NULL DEFAULT 0; +ALTER TABLE "chats" ADD COLUMN "messages_epoch" BIGINT NOT NULL DEFAULT 0; diff --git a/prisma/migrations/20261013150000_message_epoch_buckets/migration.sql b/prisma/migrations/20261013150000_message_epoch_buckets/migration.sql new file mode 100644 index 00000000..b1c17169 --- /dev/null +++ b/prisma/migrations/20261013150000_message_epoch_buckets/migration.sql @@ -0,0 +1,13 @@ +CREATE TABLE "chat_message_epochs" ( + "chat_id" UUID NOT NULL, + "bucket" SMALLINT NOT NULL, + "epoch" BIGINT NOT NULL DEFAULT 0, + CONSTRAINT "chat_message_epochs_pkey" PRIMARY KEY ("chat_id", "bucket"), + CONSTRAINT "chat_message_epochs_bucket_check" CHECK ("bucket" BETWEEN 0 AND 15), + CONSTRAINT "chat_message_epochs_chat_id_fkey" FOREIGN KEY ("chat_id") REFERENCES "chats"("id") ON DELETE CASCADE ON UPDATE CASCADE +); + +INSERT INTO "chat_message_epochs" ("chat_id", "bucket", "epoch") +SELECT "id", 0, "messages_epoch" FROM "chats"; + +ALTER TABLE "chats" DROP COLUMN "messages_epoch"; diff --git a/prisma/migrations/20261026120000_message_idempotency/migration.sql b/prisma/migrations/20261026120000_message_idempotency/migration.sql new file mode 100644 index 00000000..744af151 --- /dev/null +++ b/prisma/migrations/20261026120000_message_idempotency/migration.sql @@ -0,0 +1,15 @@ +CREATE TABLE "message_idempotency" ( + "user_id" UUID NOT NULL, + "chat_id" UUID NOT NULL, + "key" VARCHAR(128) NOT NULL, + "message_id" UUID, + "expires_at" TIMESTAMPTZ(3) NOT NULL, + CONSTRAINT "message_idempotency_pkey" PRIMARY KEY ("user_id", "chat_id", "key"), + CONSTRAINT "message_idempotency_user_id_fkey" FOREIGN KEY ("user_id") REFERENCES "users"("id") ON DELETE CASCADE ON UPDATE CASCADE, + CONSTRAINT "message_idempotency_chat_id_fkey" FOREIGN KEY ("chat_id") REFERENCES "chats"("id") ON DELETE CASCADE ON UPDATE CASCADE, + CONSTRAINT "message_idempotency_message_id_fkey" FOREIGN KEY ("message_id") REFERENCES "messages"("id") ON DELETE CASCADE ON UPDATE CASCADE +); + +CREATE INDEX "message_idempotency_expires_at_idx" ON "message_idempotency"("expires_at"); +CREATE INDEX "message_idempotency_chat_id_idx" ON "message_idempotency"("chat_id"); +CREATE INDEX "message_idempotency_message_id_idx" ON "message_idempotency"("message_id"); diff --git a/prisma/migrations/migration_lock.toml b/prisma/migrations/migration_lock.toml new file mode 100644 index 00000000..2fe25d87 --- /dev/null +++ b/prisma/migrations/migration_lock.toml @@ -0,0 +1 @@ +provider = "postgresql" diff --git a/prisma/schema.prisma b/prisma/schema.prisma new file mode 100644 index 00000000..9ad8d841 --- /dev/null +++ b/prisma/schema.prisma @@ -0,0 +1,106 @@ +generator client { + provider = "prisma-client" + output = "../src/generated/prisma" + moduleFormat = "cjs" +} + +datasource db { + provider = "postgresql" +} + +model User { + id String @id @default(uuid()) @db.Uuid + username String @unique @db.VarChar(32) + displayName String @map("display_name") @db.VarChar(100) + passwordHash String? @map("password_hash") + createdAt DateTime @default(now()) @map("created_at") @db.Timestamptz(3) + chatsEpoch BigInt @default(0) @map("chats_epoch") + memberships ChatMember[] + messages Message[] + sessions Session[] + idempotencyRecords MessageIdempotency[] + + @@map("users") +} + +model Session { + id String @id @default(uuid()) @db.Uuid + userId String @map("user_id") @db.Uuid + tokenHash String @unique @map("token_hash") @db.Char(64) + createdAt DateTime @default(now()) @map("created_at") @db.Timestamptz(3) + expiresAt DateTime @map("expires_at") @db.Timestamptz(3) + revokedAt DateTime? @map("revoked_at") @db.Timestamptz(3) + user User @relation(fields: [userId], references: [id], onDelete: Cascade) + + @@index([userId]) + @@index([expiresAt]) + @@map("sessions") +} + +model Chat { + id String @id @default(uuid()) @db.Uuid + title String @db.VarChar(100) + createdAt DateTime @default(now()) @map("created_at") @db.Timestamptz(3) + messageEpochs ChatMessageEpoch[] + members ChatMember[] + messages Message[] + idempotencyRecords MessageIdempotency[] + + @@index([createdAt, id]) + @@map("chats") +} + +model ChatMember { + chatId String @map("chat_id") @db.Uuid + userId String @map("user_id") @db.Uuid + position Int + chat Chat @relation(fields: [chatId], references: [id], onDelete: Cascade) + user User @relation(fields: [userId], references: [id], onDelete: Restrict) + + @@id([chatId, userId]) + @@unique([chatId, position]) + @@index([userId, chatId]) + @@map("chat_members") +} + +model ChatMessageEpoch { + chatId String @map("chat_id") @db.Uuid + bucket Int @db.SmallInt + epoch BigInt @default(0) + chat Chat @relation(fields: [chatId], references: [id], onDelete: Cascade) + + @@id([chatId, bucket]) + @@map("chat_message_epochs") +} + +model Message { + id String @id @default(uuid()) @db.Uuid + chatId String @map("chat_id") @db.Uuid + senderId String @map("sender_id") @db.Uuid + text String @db.VarChar(4000) + createdAt DateTime @default(now()) @map("created_at") @db.Timestamptz(3) + chat Chat @relation(fields: [chatId], references: [id], onDelete: Cascade) + sender User @relation(fields: [senderId], references: [id], onDelete: Restrict) + idempotencyRecords MessageIdempotency[] + + @@index([chatId, createdAt, id]) + @@index([senderId]) + @@map("messages") +} + +model MessageIdempotency { + userId String @map("user_id") @db.Uuid + chatId String @map("chat_id") @db.Uuid + key String @db.VarChar(128) + messageId String? @map("message_id") @db.Uuid + expiresAt DateTime @map("expires_at") @db.Timestamptz(3) + user User @relation(fields: [userId], references: [id], onDelete: Cascade) + chat Chat @relation(fields: [chatId], references: [id], onDelete: Cascade) + message Message? @relation(fields: [messageId], references: [id], onDelete: Cascade) + + @@id([userId, chatId, key]) + @@index([chatId]) + @@index([messageId]) + @@index([expiresAt]) + @@map("message_idempotency") +} diff --git a/scripts/analyze-scaling-evidence.py b/scripts/analyze-scaling-evidence.py new file mode 100644 index 00000000..2c89f7ef --- /dev/null +++ b/scripts/analyze-scaling-evidence.py @@ -0,0 +1,10 @@ +#!/usr/bin/env python3 +"""Compatibility entry point for the consolidated report figures.""" +import runpy +from pathlib import Path +import sys + +if __name__ == '__main__': + helper = Path(__file__).with_name('report-evidence.py') + sys.argv = [str(helper), '--plot', *sys.argv[1:]] + runpy.run_path(str(helper), run_name='__main__') diff --git a/scripts/audit-saturation.py b/scripts/audit-saturation.py new file mode 100644 index 00000000..282e879f --- /dev/null +++ b/scripts/audit-saturation.py @@ -0,0 +1,62 @@ +#!/usr/bin/env python3 +"""Check saved source snapshots, run completion and actual container budgets.""" +import argparse +from collections import Counter +import hashlib +import json +from pathlib import Path + + +def main(): + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument('directory', type=Path) + args = parser.parse_args() + root = args.directory + manifest = json.loads((root / 'manifest.json').read_text(encoding='utf-8')) + sources = {name: hashlib.sha256((root / 'sources' / name).read_bytes()).hexdigest() == digest + for name, digest in manifest['source_sha256'].items()} + budgets = {} + images = set() + for profile, containers in manifest['containers'].items(): + apis = [c for c in containers if '-api-' in c['name']] + images.update(c['image'] for c in apis) + budgets[profile] = {'replicas': len(apis), 'cpu': sum(c['nano_cpus'] for c in apis) / 1e9, + 'ram_mib': sum(c['memory_bytes'] for c in apis) / 1024**2, + 'total_pool': sum(int(c['pool_max']) for c in apis)} + runs = {} + groups = Counter() + for label in manifest['runs']: + path = root / label + summary = json.loads((path / 'summary.json').read_text(encoding='utf-8')) + execution = json.loads((path / 'execution.json').read_text(encoding='utf-8')) + profile = next(p for p in manifest['profiles'] if label.startswith(p + '-r')) + expected = budgets[profile]['replicas'] + rate = summary['profile']['offered_rps'] + if summary['profile'].get('phase') == 'confirmation': + groups[f'{profile}/r{rate}'] += 1 + runs[label] = {'returncode': execution['returncode'], + 'diagnostics_complete': summary.get('diagnostics_complete', False), + 'replicas_match': summary['profile']['expected_instances'] == expected, + 'criterion': summary.get('criterion')} + requested = manifest.get('requested_confirmation_rates') + complete_groups = all(count == manifest['repetitions'] for count in groups.values()) + if requested: + complete_groups = complete_groups and all( + groups[f'{profile}/r{rate}'] == manifest['repetitions'] + for profile in manifest['profiles'] for rate in requested) + checks = {'finished': bool(manifest.get('finished')), 'source_snapshots_match': all(sources.values()), + 'one_api_image': len(images) == 1, 'all_runs_complete': bool(runs) and all( + r['returncode'] == 0 and r['diagnostics_complete'] and r['replicas_match'] for r in runs.values()), + 'confirmation_groups_complete': bool(groups) and complete_groups, + 'pool_budget_matches': all(b['total_pool'] == manifest['pool_budget'] for b in budgets.values())} + audit = {'checks_pass': all(checks.values()), 'checks': checks, 'budgets': budgets, + 'source_snapshots': sources, 'confirmation_groups': dict(groups), 'runs': runs} + (root / 'audit.json').write_text(json.dumps(audit, indent=2) + '\n', encoding='utf-8') + print(json.dumps({'checks_pass': audit['checks_pass'], 'checks': checks, 'budgets': budgets, + 'runs': len(runs)}, indent=2)) + if not audit['checks_pass']: + raise SystemExit(1) + + +if __name__ == '__main__': + main() diff --git a/scripts/benchmark-scaling.mjs b/scripts/benchmark-scaling.mjs new file mode 100644 index 00000000..58b8effa --- /dev/null +++ b/scripts/benchmark-scaling.mjs @@ -0,0 +1,402 @@ +#!/usr/bin/env node +/** + * Synthetic lab3 scaling benchmark. Runs against an already configured stack. + * The client is outside the Docker resource budget; no automatic POST retries. + */ + +import { execFile as execFileCallback } from 'node:child_process'; +import { mkdir, writeFile } from 'node:fs/promises'; +import { dirname } from 'node:path'; +import { monitorEventLoopDelay, performance } from 'node:perf_hooks'; +import { promisify } from 'node:util'; +import { randomUUID } from 'node:crypto'; + +const execFile = promisify(execFileCallback); +const sleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms)); + +function options(argv) { + const defaults = { + 'base-url': 'http://127.0.0.1:8080', + label: 'unlabelled', + rate: '100', + 'duration-seconds': '30', + 'warmup-seconds': '5', + 'max-in-flight': '64', + 'read-percent': '80', + 'seed-messages': '100', + 'history-limit': '50', + 'timeout-ms': '5000', + 'docker-stats-interval-seconds': '2', + }; + const allowed = new Set([...Object.keys(defaults), 'output', 'docker-stats', 'expected-instances']); + const values = { ...defaults }; + for (let i = 0; i < argv.length; i += 1) { + const name = argv[i]; + if (name === '--help') { + console.log(`Usage: node scripts/benchmark-scaling.mjs [options] + --base-url URL Nginx URL (default: http://127.0.0.1:8080) + --label NAME Configuration label for later comparisons + --rate N Scheduled HTTP requests per second (default: 100) + --duration-seconds N Measured phase (default: 30) + --warmup-seconds N Read-only warmup (default: 5) + --max-in-flight N Client-side outstanding request cap (default: 64) + --read-percent N Percentage of history GETs (default: 80) + --seed-messages N Initial messages in a fresh chat (default: 100) + --history-limit N Messages per GET page (default: 50) + --timeout-ms N Per-request deadline (default: 5000) + --docker-stats Sample CPU/RAM of current Compose containers + --docker-stats-interval-seconds N Sampling interval (default: 2) + --expected-instances N Require N distinct X-Instance-Id values + --output PATH Save JSON result; stdout always prints summary +`); + process.exit(0); + } + if (!name.startsWith('--') || !allowed.has(name.slice(2))) { + throw new Error(`unknown option: ${name}`); + } + const key = name.slice(2); + if (key === 'docker-stats') { + values[key] = true; + continue; + } + const value = argv[++i]; + if (value === undefined || value.startsWith('--')) { + throw new Error(`missing value for ${name}`); + } + values[key] = value; + } + const number = (key, min, max) => { + const value = Number(values[key]); + if (!Number.isFinite(value) || value < min || value > max) { + throw new Error(`${key} must be ${min}..${max}`); + } + return value; + }; + const parsed = { + baseUrl: values['base-url'].replace(/\/$/, ''), + label: values.label, + rate: number('rate', 1, 1000), + durationSeconds: number('duration-seconds', 1, 3600), + warmupSeconds: number('warmup-seconds', 0, 600), + maxInFlight: number('max-in-flight', 1, 4096), + readPercent: number('read-percent', 0, 100), + seedMessages: number('seed-messages', 0, 10000), + historyLimit: number('history-limit', 1, 100), + timeoutMs: number('timeout-ms', 100, 120000), + dockerStats: Boolean(values['docker-stats']), + dockerStatsIntervalSeconds: number('docker-stats-interval-seconds', 0.5, 60), + expectedInstances: values['expected-instances'] === undefined + ? null : Number(values['expected-instances']), + output: values.output, + }; + if (!/^https?:\/\//.test(parsed.baseUrl)) { + throw new Error('base-url must begin with http:// or https://'); + } + if (!/^[a-zA-Z0-9_.-]{1,80}$/.test(parsed.label)) { + throw new Error('label must use letters, digits, dot, underscore or dash'); + } + if (parsed.rate * parsed.durationSeconds > 200000) { + throw new Error('at most 200000 measured request slots are allowed per run'); + } + for (const key of ['rate', 'maxInFlight', 'readPercent', 'seedMessages', + 'historyLimit', 'timeoutMs']) { + if (!Number.isInteger(parsed[key])) throw new Error(`${key} must be an integer`); + } + if (parsed.expectedInstances !== null && + (!Number.isInteger(parsed.expectedInstances) || parsed.expectedInstances < 1 || + parsed.expectedInstances > 16)) { + throw new Error('expected-instances must be an integer from 1 to 16'); + } + return parsed; +} + +async function api(baseUrl, method, path, { body, authorization, key, timeoutMs } = {}) { + const headers = { Accept: 'application/json' }; + if (authorization) headers.Authorization = authorization; + if (key) headers['Idempotency-Key'] = key; + if (body !== undefined) headers['Content-Type'] = 'application/json'; + const response = await fetch(baseUrl + path, { + method, + headers, + body: body === undefined ? undefined : JSON.stringify(body), + signal: AbortSignal.timeout(timeoutMs ?? 10000), + }); + const payload = await response.json().catch(() => null); + return { status: response.status, payload, instance: response.headers.get('x-instance-id') }; +} + +async function bootstrap(config) { + const suffix = randomUUID().replaceAll('-', '').slice(0, 12); + const password = `T3st-${randomUUID()}`; + const users = []; + for (const label of ['alice', 'bob']) { + const username = `bench_${label}_${suffix}`; + const created = await api(config.baseUrl, 'POST', '/api/v1/users', { + body: { username, display_name: `Benchmark ${label}`, password }, + }); + if (created.status !== 201 || !created.payload?.id) { + throw new Error(`setup: user registration returned ${created.status}`); + } + const basic = Buffer.from(`${username}:${password}`).toString('base64'); + const session = await api(config.baseUrl, 'POST', '/api/v1/auth/sessions', { + authorization: `Basic ${basic}`, + }); + if (session.status !== 201 || !session.payload?.token) { + throw new Error(`setup: session creation returned ${session.status}`); + } + users.push({ id: created.payload.id, token: session.payload.token }); + } + const authorization = `Bearer ${users[0].token}`; + const chat = await api(config.baseUrl, 'POST', '/api/v1/chats', { + body: { title: 'Scaling benchmark', member_ids: users.map((user) => user.id) }, + authorization, + }); + if (chat.status !== 201 || !chat.payload?.id) { + throw new Error(`setup: chat creation returned ${chat.status}`); + } + const path = `/api/v1/chats/${chat.payload.id}/messages`; + for (let index = 0; index < config.seedMessages; index += 1) { + const seeded = await api(config.baseUrl, 'POST', path, { + body: { text: `seed-${suffix}-${index}` }, authorization, key: randomUUID(), + }); + if (seeded.status !== 201 || !seeded.payload?.id) { + throw new Error(`setup: seed message ${index + 1} returned ${seeded.status}`); + } + } + return { authorization, path }; +} + +function percentile(sorted, fraction) { + if (!sorted.length) return null; + return Number(sorted[Math.ceil(fraction * sorted.length) - 1].toFixed(3)); +} + +function summarize(events, durationSeconds, slots, dropped, late) { + const groups = {}; + for (const kind of ['read', 'write', 'all']) { + const chosen = kind === 'all' ? events : events.filter((event) => event.kind === kind); + const successes = chosen.filter((event) => event.ok); + const latencies = successes.map((event) => event.latency_ms).sort((a, b) => a - b); + const statuses = {}; + const errors = {}; + const instances = {}; + for (const event of chosen) { + const status = event.status === null ? 'network' : String(event.status); + statuses[status] = (statuses[status] ?? 0) + 1; + if (!event.ok) errors[event.error] = (errors[event.error] ?? 0) + 1; + if (event.instance) instances[event.instance] = (instances[event.instance] ?? 0) + 1; + } + groups[kind] = { + attempted: chosen.length, + successful: successes.length, + errors: chosen.length - successes.length, + successful_rps: Number((successes.length / durationSeconds).toFixed(3)), + status_counts: statuses, + error_counts: errors, + instance_counts: instances, + successful_latency_ms: { + p50: percentile(latencies, 0.5), + p95: percentile(latencies, 0.95), + p99: percentile(latencies, 0.99), + }, + }; + } + return { scheduled_slots: slots, client_dropped_slots: dropped, + scheduler_late_slots: late, ...groups }; +} + +async function runPhase(config, context, durationSeconds, readPercent) { + const slots = Math.floor(config.rate * durationSeconds); + const intervalMs = 1000 / config.rate; + const started = performance.now(); + const startedEpochMs = Date.now(); + const events = []; + const pending = new Set(); + let dropped = 0; + let late = 0; + for (let sequence = 0; sequence < slots; sequence += 1) { + const scheduledAt = started + sequence * intervalMs; + const waitMs = scheduledAt - performance.now(); + if (waitMs > 0) await sleep(waitMs); + const actualAt = performance.now(); + if (actualAt - scheduledAt > intervalMs) { + late += 1; + dropped += 1; + continue; + } + if (pending.size >= config.maxInFlight) { + dropped += 1; + continue; + } + const kind = ((sequence * 37 + 17) % 100) < readPercent ? 'read' : 'write'; + const task = (async () => { + let status = null; + let instance = null; + let error = null; + try { + const result = kind === 'read' + ? await api(config.baseUrl, 'GET', `${context.path}?limit=${config.historyLimit}`, { + authorization: context.authorization, timeoutMs: config.timeoutMs, + }) + : await api(config.baseUrl, 'POST', context.path, { + authorization: context.authorization, timeoutMs: config.timeoutMs, + key: randomUUID(), body: { text: `bench-${sequence}-${randomUUID()}` }, + }); + status = result.status; + instance = result.instance; + if (status !== (kind === 'read' ? 200 : 201)) error = `http_${status}`; + else if (!instance) error = 'missing_instance_id'; + else if (kind === 'read' && !Array.isArray(result.payload?.items)) error = 'invalid_page'; + else if (kind === 'write' && !result.payload?.id) error = 'invalid_message'; + } catch (caught) { + error = caught?.name === 'TimeoutError' ? 'timeout' : 'network_or_parse'; + } + events.push({ sequence, kind, ok: error === null, status, error, instance, + scheduled_ms: Number((scheduledAt - started).toFixed(3)), + start_lag_ms: Number((actualAt - scheduledAt).toFixed(3)), + latency_ms: Number((performance.now() - actualAt).toFixed(3)) }); + })(); + pending.add(task); + void task.finally(() => pending.delete(task)); + } + const scheduledEnd = started + durationSeconds * 1000; + if (performance.now() < scheduledEnd) await sleep(scheduledEnd - performance.now()); + await Promise.all(pending); + return { events, started_epoch_ms: startedEpochMs, + scheduled_end_epoch_ms: startedEpochMs + durationSeconds * 1000, + completed_epoch_ms: Date.now(), + summary: summarize(events, durationSeconds, slots, dropped, late), + drain_seconds: Number(((performance.now() - scheduledEnd) / 1000).toFixed(3)) }; +} + +function bytesToMiB(value) { + const match = /^([\d.]+)\s*([KMGT]?i?B)$/i.exec(value.trim()); + if (!match) return null; + const scale = { B: 1, KB: 1e3, MB: 1e6, GB: 1e9, TB: 1e12, + KIB: 1024, MIB: 1024 ** 2, GIB: 1024 ** 3, TIB: 1024 ** 4 }; + return Number((Number(match[1]) * scale[match[2].toUpperCase()] / 1024 ** 2).toFixed(3)); +} + +async function dockerSampler(intervalSeconds) { + const { stdout } = await execFile('docker', ['compose', 'ps', '-q'], { + timeout: 15000, maxBuffer: 1024 * 1024, + }); + const ids = stdout.trim().split(/\s+/).filter(Boolean); + if (!ids.length) throw new Error('docker-stats: no running Compose containers'); + let stopped = false; + const samples = []; + const errors = []; + const task = (async () => { + while (!stopped) { + const started = performance.now(); + try { + const result = await execFile('docker', + ['stats', '--no-stream', '--format', '{{json .}}', ...ids], + { timeout: 15000, maxBuffer: 1024 * 1024 }); + for (const line of result.stdout.trim().split(/\r?\n/).filter(Boolean)) { + const row = JSON.parse(line); + samples.push({ time_ms: Number(started.toFixed(3)), container: row.Name, + cpu_percent: Number(row.CPUPerc.replace('%', '')), + memory_mib: bytesToMiB(row.MemUsage.split('/')[0]), + memory_limit_mib: bytesToMiB(row.MemUsage.split('/')[1]), + pids: Number(row.PIDs) }); + } + } catch (error) { + errors.push(error?.code || error?.name || 'docker_stats_error'); + } + const waitMs = Math.max(0, intervalSeconds * 1000 - (performance.now() - started)); + if (!stopped && waitMs) await sleep(waitMs); + } + })(); + return { stop: async () => { stopped = true; await task; return { samples, errors }; } }; +} + +async function main() { + const config = options(process.argv.slice(2)); + const context = await bootstrap(config); + const warmup = config.warmupSeconds + ? await runPhase(config, context, config.warmupSeconds, 100) + : null; + const sampler = config.dockerStats + ? await dockerSampler(config.dockerStatsIntervalSeconds) + : null; + const delay = monitorEventLoopDelay({ resolution: 20 }); + delay.enable(); + const cpuBefore = process.cpuUsage(); + const memoryBefore = process.memoryUsage().rss; + let measured; + let dockerStats = null; + try { + measured = await runPhase(config, context, config.durationSeconds, config.readPercent); + } finally { + if (sampler) dockerStats = await sampler.stop(); + delay.disable(); + } + const cpu = process.cpuUsage(cpuBefore); + const result = { + label: config.label, + base_url: config.baseUrl, + profile: { + arrival_model: 'scheduled open loop; late or over-capacity slots dropped', + offered_rps: config.rate, + duration_seconds: config.durationSeconds, + warmup_seconds: config.warmupSeconds, + warmup_profile: 'read only', + read_percent: config.readPercent, + write_percent: 100 - config.readPercent, + initial_messages: config.seedMessages, + history_limit: config.historyLimit, + max_in_flight: config.maxInFlight, + timeout_ms: config.timeoutMs, + automatic_retries: false, + expected_instances: config.expectedInstances, + }, + warmup: warmup?.summary ?? null, + measurement: measured.summary, + drain_seconds: measured.drain_seconds, + timing: { + measurement_started_epoch_ms: measured.started_epoch_ms, + measurement_scheduled_end_epoch_ms: measured.scheduled_end_epoch_ms, + measurement_completed_epoch_ms: measured.completed_epoch_ms, + }, + client: { + cpu_seconds: Number(((cpu.user + cpu.system) / 1e6).toFixed(3)), + rss_before_mib: Number((memoryBefore / 1024 ** 2).toFixed(3)), + rss_after_mib: Number((process.memoryUsage().rss / 1024 ** 2).toFixed(3)), + event_loop_delay_ms: { + mean: Number((delay.mean / 1e6).toFixed(3)), + p99: Number((delay.percentile(99) / 1e6).toFixed(3)), + }, + }, + docker_stats: dockerStats, + request_samples: measured.events, + notes: [ + 'Setup and read-only warmup are excluded from measured RPS.', + 'RPS uses the scheduled measurement window; requests may complete during drain.', + 'HTTP failures, timeouts and client-dropped slots are reported separately.', + 'One chat is used per run; writes increase its history during measurement.', + 'The Node client runs outside Docker CPU/RAM limits and can itself saturate.', + 'A timed-out POST might have committed; this benchmark never retries it.', + ], + }; + const json = JSON.stringify(result, null, 2) + '\n'; + if (config.output) { + await mkdir(dirname(config.output), { recursive: true }); + await writeFile(config.output, json, 'utf8'); + } + console.log(JSON.stringify({ label: result.label, profile: result.profile, + measurement: result.measurement, drain_seconds: result.drain_seconds, + client: result.client, docker_stats_samples: dockerStats?.samples.length ?? 0, + output: config.output ?? null }, null, 2)); + const observed = Object.keys(result.measurement.all.instance_counts).length; + if (config.expectedInstances !== null && observed !== config.expectedInstances) { + console.error(`expected ${config.expectedInstances} API instances, observed ${observed}`); + process.exitCode = 1; + } + if (!result.measurement.all.successful) process.exitCode = 1; +} + +main().catch((error) => { + console.error(`benchmark failed: ${error?.message ?? String(error)}`); + process.exitCode = 1; +}); diff --git a/scripts/calibrate-scaling-observer.py b/scripts/calibrate-scaling-observer.py new file mode 100644 index 00000000..bf3afbc7 --- /dev/null +++ b/scripts/calibrate-scaling-observer.py @@ -0,0 +1,67 @@ +#!/usr/bin/env python3 +"""Measure idle PostgreSQL CPU with/without the observer after a scaling sweep.""" +import argparse +import json +from pathlib import Path +import subprocess +import time +import uuid + +ROOT = Path(__file__).resolve().parents[1] + + +def docker(*args): + return subprocess.check_output(["docker", *args], cwd=ROOT, text=True, encoding="utf-8", timeout=30) + + +def snapshot(container): + values = {k: int(v) for k, v in (line.split() for line in docker("exec", container, "cat", "/sys/fs/cgroup/cpu.stat").splitlines())} + return {"time": time.time(), "cpu": values} + + +def main(): + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument("--seconds", type=int, default=30) + parser.add_argument("--output", type=Path, required=True) + args = parser.parse_args() + args.output.mkdir(parents=True, exist_ok=False) + container = docker("compose", "ps", "-q", "postgres").strip() + results = [] + for phase in ("without-before", "with-observer", "without-after"): + child = None + files = [] + stop = f"/tmp/scaling-calibration-{uuid.uuid4().hex}.stop" + try: + if phase == "with-observer": + files = [(args.output / "postgres.jsonl").open("wb"), (args.output / "postgres.stderr").open("wb")] + child = subprocess.Popen(["docker", "exec", "-i", container, "sh", "-s", "postgres", stop], + cwd=ROOT, stdin=subprocess.PIPE, stdout=files[0], stderr=files[1]) + child.stdin.write((ROOT / "scripts/diagnostics/observer.sh").read_bytes()) + child.stdin.close() + time.sleep(3) + before = snapshot(container) + time.sleep(args.seconds) + after = snapshot(container) + elapsed = after["time"] - before["time"] + row = {"phase": phase, "before": before, "after": after, + "mean_cpu_cores": (after["cpu"]["usage_usec"]-before["cpu"]["usage_usec"])/elapsed/1e6} + results.append(row) + print(f"{phase}: CPU={row['mean_cpu_cores']:.4f} cores", flush=True) + finally: + if child is not None: + docker("exec", container, "touch", stop) + child.wait(timeout=15) + docker("cp", f"{container}:{stop}.pg.jsonl", str(args.output / "postgres-sql.jsonl")) + docker("exec", container, "rm", "-f", stop + ".pg.jsonl") + for file in files: + file.close() + overhead = results[1]["mean_cpu_cores"] - (results[0]["mean_cpu_cores"] + results[2]["mean_cpu_cores"])/2 + report = {"phases": results, "estimated_observer_cpu_cores": overhead, + "notes": ["Idle calibration with the running stack's normal readiness probes; no HTTP load generator.", + "Difference includes host variation, monitor clients and monitoring SQL; not a correction factor for loaded runs."]} + (args.output / "summary.json").write_text(json.dumps(report, indent=2), encoding="utf-8") + print(f"Estimated observer CPU={overhead:.4f} cores", flush=True) + + +if __name__ == "__main__": + main() diff --git a/scripts/collect-report-checks.py b/scripts/collect-report-checks.py new file mode 100644 index 00000000..6e20fb44 --- /dev/null +++ b/scripts/collect-report-checks.py @@ -0,0 +1,194 @@ +#!/usr/bin/env python3 +"""Run lab3 checks and retain one compact result without request logs or secrets.""" +import argparse +from datetime import datetime, timezone +import hashlib +import json +import os +from pathlib import Path +import subprocess +import sys +import tempfile +import time + +ROOT = Path(__file__).resolve().parents[1] + + +def capture(command, timeout=180): + return subprocess.run(command, cwd=ROOT, capture_output=True, text=True, + encoding='utf-8', errors='replace', timeout=timeout) + + +def snapshot(): + result = capture(['docker', 'compose', 'ps', '--all', '-q'], 30) + result.check_returncode() + ids = result.stdout.split() + inspected = capture(['docker', 'inspect', *ids], 30) + inspected.check_returncode() + rows = [] + for c in json.loads(inspected.stdout): + service = c['Config']['Labels'].get('com.docker.compose.service') + if service not in {'api', 'nginx', 'postgres', 'redis', 'migrate'}: + continue + pool = next((v.split('=', 1)[1] for v in c['Config'].get('Env', []) if v.startswith('DB_POOL_MAX=')), None) + rows.append({'service': service, 'id': c['Id'], 'image': c['Image'], + 'started_at': c['State']['StartedAt'], 'status': c['State']['Status'], + 'health': c['State'].get('Health', {}).get('Status'), + 'exit_code': c['State']['ExitCode'], 'cpu': c['HostConfig']['NanoCpus'] / 1e9, + 'memory_mib': c['HostConfig']['Memory'] / 1024**2, + 'pool_max': pool, 'command': c['Config']['Cmd'], + 'ports': c['HostConfig'].get('PortBindings'), + 'volumes': [{'name': m['Name'], 'destination': m['Destination']} + for m in c['Mounts'] if m['Type'] == 'volume']}) + return rows + + +def main(): + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument('--base-url', default='http://127.0.0.1:8080') + parser.add_argument('--output', type=Path, default=ROOT / 'evidence/checks.json') + parser.add_argument('--retry-failed', action='store_true', help='Rerun failed checks and retain previous attempts') + args = parser.parse_args() + args.output.parent.mkdir(parents=True, exist_ok=True) + if args.retry_failed: + report = json.loads(args.output.read_text(encoding='utf-8')) + if report.get('source_sha256'): + report['source_before_recheck_sha256'] = report['source_sha256'] + selected = {c['name'] for c in report['checks'] if c['status'] == 'FAIL'} + report['recheck_started'] = datetime.now(timezone.utc).isoformat() + else: + previous = (json.loads(args.output.read_text(encoding='utf-8')) + if args.output.exists() else None) + report = {'recorded_at': datetime.now(timezone.utc).isoformat(), + 'base_url': args.base_url, 'checks': [], 'initial': snapshot()} + if previous: + report['previous_validation'] = { + 'recorded_at': previous['recorded_at'], 'finished': previous.get('finished'), + 'api_images': sorted({c['image'] for c in previous.get('final', []) if c['service'] == 'api'}), + 'checks': [{k: c[k] for k in ('name', 'status', 'seconds', 'previous_attempts') if k in c} + for c in previous['checks']], + } + selected = None + report['source_sha256'] = {name: hashlib.sha256((ROOT / name).read_bytes()).hexdigest() + for name in ('src/main.ts', 'src/app.controller.ts', + 'src/common/http/fastify-adapter.ts', + 'infra/start-nginx.sh', 'scripts/stop-one.sh', + 'scripts/restart.sh', 'test/check_shutdown.py')} + + def save(): + args.output.write_text(json.dumps(report, ensure_ascii=False, indent=2) + '\n', encoding='utf-8') + + def run(name, command, timeout=180, details=None, parse_json=False): + if selected is not None and name not in selected and name != 'final-smoke': + return None + print(f'START {name}', flush=True) + started = time.monotonic() + item = {'name': name, 'command': command, 'started': datetime.now(timezone.utc).isoformat()} + try: + result = capture(command, timeout) + item['exit_code'] = result.returncode + item['status'] = 'PASS' if result.returncode == 0 else 'FAIL' + lines = (result.stdout + '\n' + result.stderr).splitlines() + item['summary'] = [line for line in lines if line.startswith( + ('PASS:', 'FAIL:', 'ok ', 'not ok ', '# tests', '# pass', '# fail', '# cancelled'))][-40:] + if details is not None and details.exists(): + item['details'] = json.loads(details.read_text(encoding='utf-8')) + elif parse_json: + for pos in (i for i, char in enumerate(result.stdout) if char == '{'): + try: + item['details'], _ = json.JSONDecoder().raw_decode(result.stdout[pos:]) + break + except json.JSONDecodeError: + continue + except (OSError, subprocess.TimeoutExpired) as exc: + item.update(status='FAIL', error=type(exc).__name__) + item['seconds'] = round(time.monotonic() - started, 3) + previous = next((c for c in report['checks'] if c['name'] == name), None) + if previous is not None: + item['previous_attempts'] = previous.get('previous_attempts', []) + [ + {key: value for key, value in previous.items() if key != 'previous_attempts'}] + report['checks'][report['checks'].index(previous)] = item + else: + report['checks'].append(item) + save() + print(f"{item['status']} {name} ({item['seconds']}s)", flush=True) + for line in item.get('summary', [])[-3:]: + print(line, flush=True) + return item + + def restore(): + result = capture(['docker', 'compose', '-f', 'compose.yaml', '-f', 'configs/two.yaml', + 'up', '-d', '--no-build', '--no-deps', '--wait', '--wait-timeout', '120', 'api'], 180) + result.check_returncode() + time.sleep(6) + + py = [sys.executable, '-X', 'utf8'] + pnpm = 'pnpm.cmd' if os.name == 'nt' else 'pnpm' + hook_suffix = 'cmd' if os.name == 'nt' else 'sh' + save() + with tempfile.TemporaryDirectory(prefix='lab3-report-') as tmp: + temp = Path(tmp) + run('contract', py + ['scripts/check_contract.py']) + run('lint', [pnpm, 'lint']) + run('build', [pnpm, 'build'], 240) + run('draining', ['node', '--test', '--test-reporter=tap', 'test/draining.mjs'], 120) + for name, script in (('nginx-readiness', 'nginx-readiness.sh'), + ('nginx-readiness-parallel', 'nginx-readiness-parallel.sh')): + run(name, ['docker', 'run', '--rm', '--network', 'none', '--entrypoint', '/bin/sh', + '-v', f'{ROOT / "infra"}:/source:ro', + '-v', f'{ROOT / "test" / script}:/test.sh:ro', + 'nginx:1.30.6-alpine', '/test.sh'], 60) + run('smoke', py + ['tests/smoke.py', '--base-url', args.base_url]) + run('idempotency', ['docker', 'compose', 'run', '--rm', '--no-deps', '-T', + '-v', f'{ROOT / "test/idempotency.mjs"}:/app/test/idempotency.mjs:ro', + 'api', 'node', '--test', 'test/idempotency.mjs'], 180) + if selected is None or selected & {'persistence', 'public-failover'}: + try: + if selected is None or 'persistence' in selected: + before = snapshot() + item = run('persistence', py + ['tests/resilience.py', '--mode', 'persistence', + '--action-script', f'scripts/restart.{hook_suffix}', '--base-url', args.base_url], 240) + after = snapshot() + item['before'] = before + item['after'] = after + restarted = {c['id']: c for c in before if c['service'] != 'migrate'} + same = {c['id']: c for c in after if c['service'] != 'migrate'} + item['containers_restarted'] = restarted.keys() == same.keys() and all( + c['started_at'] != same[key]['started_at'] for key, c in restarted.items()) + item['volumes_preserved'] = restarted.keys() == same.keys() and all( + c['volumes'] == same[key]['volumes'] for key, c in restarted.items()) + if not item['containers_restarted'] or not item['volumes_preserved']: + item['status'] = 'FAIL' + save() + run('public-failover', py + ['tests/resilience.py', '--mode', 'failover', + '--action-script', f'scripts/stop-one.{hook_suffix}', '--base-url', args.base_url], 120, + parse_json=True) + finally: + restore() + for scenario in ('resources', 'failover', 'rolling'): + result_file = temp / f'grade4-{scenario}.json' + run(f'grade4-{scenario}', py + ['test/grade4.py', '--scenario', scenario, + '--base-url', args.base_url, '--concurrency', '4', '--observe-seconds', '10', + '--output', str(result_file)], 300, details=result_file) + run('shutdown', py + ['test/check_shutdown.py', '--base-url', args.base_url], 180, parse_json=True) + images = ['mtusi2026lab2-fork-backend:latest', 'mtusi2026lab2-fork-migrate:latest', + 'mtusi2026lab3-fork-api:latest', 'mtusi2026lab3-fork-migrate:latest'] + if selected is None or 'migration-compatibility' in selected: + available = capture(['docker', 'image', 'inspect', '--format', '{{.Id}}', *images], 30) + if available.returncode == 0: + run('migration-compatibility', py + ['test/check_migration_compat.py'], 360, parse_json=True) + else: + report['checks'].append({'name': 'migration-compatibility', 'status': 'NOT_RUN', + 'reason': 'Required local lab2/lab3 images are not all available; no images pulled.'}) + run('final-smoke', py + ['tests/smoke.py', '--base-url', args.base_url]) + report['final'] = snapshot() + report['all_executed_checks_pass'] = all(c['status'] != 'FAIL' for c in report['checks']) + report['finished'] = datetime.now(timezone.utc).isoformat() + save() + print(f"Saved {len(report['checks'])} checks to {args.output}", flush=True) + if not report['all_executed_checks_pass']: + raise SystemExit(1) + + +if __name__ == '__main__': + main() diff --git a/scripts/diagnostics/README.md b/scripts/diagnostics/README.md new file mode 100644 index 00000000..092b655f --- /dev/null +++ b/scripts/diagnostics/README.md @@ -0,0 +1,108 @@ +# Диагностическая серия масштабирования + +Из корня репозитория, при работающем Docker и собранном образе API: + +```powershell +python -X utf8 scripts/run-scaling-diagnostics.py --client container --output .artifacts/scaling/diagnostics-r100 +``` + +Значения по умолчанию: профили one/two/four, только 100 запланированных +запросов/с, три повтора на профиль, 15 с прогрева и 60 с измерения, 80% чтений истории и 20% +записей. Пул берётся из Compose: по умолчанию 15 на реплику для one/two, +8 для four; фактические значения сохраняются в `manifest.json`. +В каждом прогоне — новый чат и 30 исходных +сообщений. Всего 9 прогонов: 11 минут 15 секунд прогрева и измерений плюс время запуска +контейнеров и сбора данных (ориентировочно около 15 минут, не жёсткий тайм-аут). Меньшие нагрузки +по умолчанию исключены; при необходимости их можно явно задать через `--rates`. + +Нагрузка для профиля перестаёт повышаться, если минимум в двух из трёх повторов +встречается один из признаков: больше 5% слотов пропущено из-за опоздания генератора, +больше 5% пропущено из-за лимита одновременно выполняемых запросов, больше 1% ошибок +среди отправленных запросов или p95 успешных ответов превышает 1000 мс. Это границы +эксперимента, а не установленный SLA и не доказательство насыщения сервера. + +Для полной матрицы всех запрошенных ступеней добавьте `--full-matrix`. Тогда +превышения порогов записываются в `threshold_crossings` и не прерывают профиль. +Точки с большими пропусками генератора не доказывают максимальную ёмкость API. +Ошибки запуска, отсутствие результата или неполные диагностические данные всё +ещё останавливают серию с восстановлением обычного профиля two. + +Сбор инструментированного пула включается только через `test/compose.diagnostics.yaml`. +Preload сохраняет callback/Promise-интерфейсы pg.Pool и раз в секунду пишет +`/tmp/scaling-pool.jsonl` внутри API. Очередь и занятые соединения наблюдаются каждые +100 мс; краткие очереди могут не попасть в выборку, поэтому дополнительно измеряется +время каждого получения соединения. Оно включает создание новых соединений и +задержки event loop, а не только ожидание очереди. Cчётчики приобретений накопительные, +max-показатели относятся к интервалу записи. + +PostgreSQL, Nginx и Redis наблюдаются через один постоянный docker exec на сервис +с паузой 2 с между выборками. Наблюдатель версии 3 выполняет SQL через одно +постоянное psql-соединение (`\watch 2`); результат находится в `postgres-sql.jsonl`. +Сохраняются cgroup CPU/memory, ожидания активных +запросов PostgreSQL, число простаивающих транзакций, состав upstream Nginx и события +reload. Тексты SQL, токены, пароли и сообщения не записываются. Наблюдатели потребляют +часть ресурсов тех же контейнеров; это одинаковая методика для всех профилей. + +В каталоге прогона: + +- `benchmark.json`: исходные HTTP-замеры и границы измеряемого окна в epoch ms; +- `api-*.jsonl`: пул, event loop и cgroup API (включают также прогрев и предыдущие + повторы того же профиля; summary выбирает только текущее измеряемое окно); +- `postgres/nginx/redis.jsonl`: наблюдения остальных сервисов; +- `postgres-sql.jsonl`: SQL-снимки постоянного psql-наблюдателя версии 3; +- `*.stderr`, `nginx-events.log`: ошибки наблюдателей и события Nginx; +- `summary.json`: показатели в измеряемом окне; скорости CPU рассчитаны из + приращений счётчиков, память — максимум по выборкам; +- `execution.json`: команда и временные границы прогона. + +`manifest.json` в корне фиксирует настройки, причины остановки нагрузки, ID образов, +хеши сборщиков, окружение Docker и лимиты контейнеров. После завершения или исключения runner восстанавливает профиль +two без диагностического preload. При принудительном завершении процесса это можно +сделать вручную: + +```powershell +docker compose -f compose.yaml -f configs/two.yaml up -d --no-build --no-deps --wait api +``` + +Проверки сборщика: + +```powershell +node --test test/pool-diagnostics.mjs test/benchmark-scaling.mjs +python -X utf8 test/diagnostic-summary.py +``` + +Для отдельной проверки влияния Windows-клиента и публикации порта можно запустить +тот же генератор в Linux-контейнере: + +```powershell +python -X utf8 scripts/run-scaling-diagnostics.py --client container --rates 100 --repetitions 3 --output .artifacts/scaling/diagnostics-linux-client-r100 +``` + +Клиент использует тот же собранный образ (только Node и benchmark-скрипт), не имеет +лимита CPU/RAM и обращается к `http://nginx` по сети Compose. Это другой путь HTTP: +без Windows port forwarding, но с конкуренцией за ресурсы той же Docker VM. Такой +контроль помогает проверить влияние клиентского пути, но не заменяет внешний +генератор на отдельной машине. Не запускайте его одновременно с основной серией. + +После нагрузки можно оценить накладные расходы наблюдателя PostgreSQL на простое: + +```powershell +python -X utf8 scripts/calibrate-scaling-observer.py --output .artifacts/scaling/observer-calibration +``` + +Выполняются три фазы по 30 с: без наблюдателя, с наблюдателем и снова без него. +Это оценка собственных расходов сборщика, а не поправочный коэффициент к нагрузке. + +После завершения серии соберите таблицу и графики. Matplotlib можно запустить +через временное окружение uv, не меняя зависимости API: + +```powershell +python -X utf8 scripts/summarize-scaling-diagnostics.py .artifacts/scaling/diagnostics-pg1cpu-full-20261028 +uv run --no-project --with "matplotlib>=3.9,<4" python scripts/plot-scaling-diagnostics.py .artifacts/scaling/diagnostics-pg1cpu-full-20261028 +``` + +Графики `performance`, `resources`, `delivered-load` сохраняются в PNG и SVG. +Линии показывают медианы повторов, затенение — диапазон min/max, а не доверительный +интервал. Отдельный график задержек и ошибок по фактически отправленным RPS помогает +учесть пропуски генератора. Превышение номинальной нагрузки не означает, что сервер +фактически получил столько запросов. diff --git a/scripts/diagnostics/observer.sh b/scripts/diagnostics/observer.sh new file mode 100755 index 00000000..e6649e46 --- /dev/null +++ b/scripts/diagnostics/observer.sh @@ -0,0 +1,70 @@ +#!/bin/sh +# One persistent docker exec per service; stdout contains only numeric diagnostics. +set -eu +role=$1 +stop=$2 +watch_pid='' +cleanup() { + if [ -n "$watch_pid" ]; then + kill "$watch_pid" 2>/dev/null || true + wait "$watch_pid" 2>/dev/null || true + fi +} +trap cleanup EXIT +trap 'exit 0' TERM INT +printf '{"kind":"observer","version":3,"time_ms":%s000}\n' "$(date +%s)" +if [ "$role" = postgres ]; then + PGAPPNAME=scaling-observer psql -X -qAt -v ON_ERROR_STOP=1 -U "$POSTGRES_USER" -d "$POSTGRES_DB" > "${stop}.pg.jsonl" <<'SQL' & +SELECT json_build_object( + 'kind', 'postgres', 'time_ms', (extract(epoch FROM clock_timestamp())*1000)::bigint, + 'activity', (SELECT coalesce(json_agg(a), '[]'::json) FROM ( + SELECT state, wait_event_type, wait_event, count(*) AS count, + max(extract(epoch FROM clock_timestamp()-query_start)) FILTER (WHERE state = 'active') AS max_active_seconds + FROM pg_stat_activity WHERE datname=current_database() AND backend_type='client backend' + AND application_name <> 'scaling-observer' + GROUP BY state,wait_event_type,wait_event + ) a), + 'db', (SELECT row_to_json(d) FROM ( + SELECT xact_commit,xact_rollback,blks_read,blks_hit,temp_files,temp_bytes,deadlocks,stats_reset + FROM pg_stat_database WHERE datname=current_database() + ) d) +)::jsonb +\watch 2 +SQL + watch_pid=$! +fi +while [ ! -f "$stop" ]; do + stamp="$(date +%s)000" + awk -v stamp="$stamp" ' + BEGIN {printf "{\"kind\":\"cgroup\",\"time_ms\":%s", stamp} + FILENAME ~ /cpu.stat$/ {printf ",\"cpu_%s\":%s", $1, $2} + FILENAME ~ /memory.events$/ {printf ",\"memory_%s\":%s", $1, $2} + FILENAME ~ /memory.current$/ {printf ",\"memory_bytes\":%s", $1} + END {print "}"} + ' /sys/fs/cgroup/cpu.stat /sys/fs/cgroup/memory.events /sys/fs/cgroup/memory.current + if [ "$role" = postgres ]; then + awk -v stamp="$stamp" ' + BEGIN {printf "{\"kind\":\"host\",\"time_ms\":%s", stamp} + FILENAME ~ /pressure\// { + name=FILENAME; sub(/^.*\//,"",name) + for (i=2;i<=NF;i++) { + split($i,value,"=") + if (value[1] == "total") printf ",\"%s_%s_total_usec\":%s",name,$1,value[2] + } + } + FILENAME ~ /meminfo$/ && ($1 == "MemAvailable:" || $1 == "SwapFree:" || $1 == "SwapTotal:") { + name=$1; sub(/:$/,"",name); printf ",\"%s_kib\":%s",name,$2 + } + END {print "}"} + ' /proc/pressure/cpu /proc/pressure/memory /proc/pressure/io /proc/meminfo + fi + if [ "$role" = nginx ]; then + awk -v stamp="$stamp" ' + BEGIN {printf "{\"kind\":\"upstream\",\"time_ms\":%s,\"servers\":[", stamp; sep=""} + /^server .*:8080 / {printf "%s\"%s\"", sep, $2; sep=","} + END {print "]}"} + ' /etc/nginx/ready-upstreams.conf + fi + sleep 2 +done +rm -f "$stop" diff --git a/scripts/diagnostics/pool.cjs b/scripts/diagnostics/pool.cjs new file mode 100644 index 00000000..18835bcc --- /dev/null +++ b/scripts/diagnostics/pool.cjs @@ -0,0 +1,73 @@ +// Loaded only by test/compose.diagnostics.yaml. No HTTP endpoint or credentials. +const { Pool } = require('pg'); +const fs = require('node:fs'); +const { performance, monitorEventLoopDelay } = require('node:perf_hooks'); + +const states = new Map(); +const originalConnect = Pool.prototype.connect; +Pool.prototype.connect = function (...args) { + let state = states.get(this); + if (!state) { + state = { acquisitions: 0, errors: 0, acquire_ms: 0, interval_max_ms: 0, + interval_max_waiting: 0, interval_max_busy: 0 }; + states.set(this, state); + } + const started = performance.now(); + const finish = (error) => { + const elapsed = performance.now() - started; + state.acquisitions += 1; + state.errors += Number(Boolean(error)); + state.acquire_ms += elapsed; + state.interval_max_ms = Math.max(state.interval_max_ms, elapsed); + }; + if (typeof args[0] === 'function') { + const callback = args[0]; + args[0] = (error, client, release) => { + finish(error); + callback(error, client, release); + }; + return originalConnect.apply(this, args); + } + return originalConnect.apply(this, args).then( + (client) => { finish(null); return client; }, + (error) => { finish(error); throw error; }, + ); +}; + +const output = '/tmp/scaling-pool.jsonl'; +fs.writeFileSync(output, ''); +const delay = monitorEventLoopDelay({ resolution: 20 }); +delay.enable(); +function counters(path) { + try { + return Object.fromEntries(fs.readFileSync(path, 'utf8').trim().split('\n') + .map((line) => { const [key, value] = line.split(/\s+/); return [key, Number(value)]; })); + } catch { return null; } +} +let lastWrite = performance.now(); +const timer = setInterval(() => { + for (const [pool, state] of states) { + state.interval_max_waiting = Math.max(state.interval_max_waiting, pool.waitingCount); + state.interval_max_busy = Math.max(state.interval_max_busy, pool.totalCount - pool.idleCount); + } + if (performance.now() - lastWrite < 1000) return; + lastWrite = performance.now(); + const pools = [...states].map(([pool, state]) => ({ + ...state, total: pool.totalCount, idle: pool.idleCount, waiting: pool.waitingCount, + })); + let memory = null; + try { memory = Number(fs.readFileSync('/sys/fs/cgroup/memory.current', 'utf8')); } catch {} + fs.appendFileSync(output, JSON.stringify({ time_ms: Date.now(), pid: process.pid, + instance: process.env.INSTANCE_ID, pools, cpu: counters('/sys/fs/cgroup/cpu.stat'), + memory_bytes: memory, memory_events: counters('/sys/fs/cgroup/memory.events'), + rss_bytes: process.memoryUsage().rss, process_cpu: process.cpuUsage(), + event_loop_delay_ms: { mean: delay.mean / 1e6, p99: delay.percentile(99) / 1e6 }, + }) + '\n'); + delay.reset(); + for (const state of states.values()) { + state.interval_max_ms = 0; + state.interval_max_waiting = 0; + state.interval_max_busy = 0; + } +}, 100); +timer.unref(); diff --git a/scripts/diagnostics/sql-snapshot.py b/scripts/diagnostics/sql-snapshot.py new file mode 100644 index 00000000..4579c725 --- /dev/null +++ b/scripts/diagnostics/sql-snapshot.py @@ -0,0 +1,39 @@ +#!/usr/bin/env python3 +"""One read-only snapshot of SQL classes, never SQL text or parameters.""" +import argparse +import json +from pathlib import Path +import subprocess + +SQL = """ +SELECT jsonb_build_object('time_ms',(extract(epoch FROM clock_timestamp())*1000)::bigint, + 'activity', (SELECT coalesce(jsonb_agg(a),'[]'::jsonb) FROM ( + SELECT state,wait_event_type,wait_event, + CASE + WHEN query LIKE '%INSERT INTO "public"."chat_message_epochs"%' THEN 'message_and_epoch_write' + WHEN query LIKE '%message_idempotency%' THEN 'idempotency' + WHEN lower(ltrim(query)) LIKE 'commit%' THEN 'commit' + WHEN query LIKE '%token_hash%' THEN 'authentication' + WHEN query LIKE '%chat_message_epochs%' THEN 'epoch_read' + WHEN query LIKE '%messages%' THEN 'message_read' + ELSE 'other' + END AS operation, + count(*) AS count, + max(extract(epoch FROM clock_timestamp()-query_start)) AS max_query_seconds, + max(cardinality(pg_blocking_pids(pid))) AS max_blockers + FROM pg_stat_activity + WHERE datname=current_database() AND backend_type='client backend' + AND application_name <> 'scaling-observer' AND state='active' + GROUP BY state,wait_event_type,wait_event,operation + ) a)); +""" + +parser = argparse.ArgumentParser(description=__doc__) +parser.add_argument("--output", type=Path, required=True) +args = parser.parse_args() +result = subprocess.run(["docker", "compose", "exec", "-T", "-e", "PGAPPNAME=scaling-observer", + "postgres", "psql", "-X", "-qAt", "-U", "app", "-d", "chat", "-c", SQL], + capture_output=True, text=True, encoding="utf-8", timeout=30, check=True) +data = json.loads(result.stdout) +args.output.write_text(json.dumps(data, indent=2) + "\n", encoding="utf-8") +print(json.dumps(data)) diff --git a/scripts/plot-scaling-diagnostics.py b/scripts/plot-scaling-diagnostics.py new file mode 100644 index 00000000..a9cba419 --- /dev/null +++ b/scripts/plot-scaling-diagnostics.py @@ -0,0 +1,159 @@ +#!/usr/bin/env python3 +"""Plot completed diagnostic runs using matplotlib; reads results.csv and manifest.json.""" +import argparse +import csv +import json +from pathlib import Path +import statistics + +import matplotlib +matplotlib.use("Agg") +import matplotlib.pyplot as plt + + +def main(): + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument("directory", type=Path) + parser.add_argument("--phase", help="Only plot this CSV phase, e.g. confirmation") + parser.add_argument("--all-latency", action="store_true", help="Use all-request p95, including failures") + parser.add_argument("--valid-delivery-only", action="store_true", help="Exclude runs with unverified arrival rate") + args = parser.parse_args() + manifest = json.loads((args.directory / "manifest.json").read_text(encoding="utf-8")) + with (args.directory / "results.csv").open(encoding="utf-8") as stream: + rows = list(csv.DictReader(stream)) + if args.phase: + rows = [row for row in rows if row.get("phase") == args.phase] + if args.valid_delivery_only: + rows = [row for row in rows if row.get("delivery_valid") in ("True", "true", "1")] + if not rows: + parser.error("no results") + for row in rows: + row['configuration'] = row.get('configuration') or next( + (profile for profile in manifest.get('profiles', []) if row['label'].startswith(profile + '-r')), + str(row['replicas'])) + for key in ("replicas", "offered_rps"): + row[key] = int(row[key]) + for key in ("successful_rps", "attempted_rps", "p95_ms", "drop_percent", "acquisition_mean_ms", + "pool_max_waiting", "api_cpu_cores", "api_max_throttle_percent", + "pg_cpu_cores", "pg_throttle_percent"): + row[key] = float(row[key] or 'nan') + if args.all_latency: + if not row.get("all_request_p95_ms"): + parser.error("all-request latency is missing from this dataset") + row["p95_ms"] = float(row["all_request_p95_ms"]) + summary = json.loads((args.directory / row["label"] / "summary.json").read_text(encoding="utf-8")) + m = summary["measurement"]["all"] + row["error_percent"] = 100*m["errors"]/max(m["attempted"], 1) + pg = next(c for group in manifest["containers"].values() for c in group if "-postgres-" in c["name"]) + pg_cpus = pg["nano_cpus"]/1e9 + memory_mib = pg["memory_bytes"]/1024**2 + configurations = sorted({r['configuration'] for r in rows}) + palette = ['#2563eb', '#059669', '#d97706', '#9333ea', '#db2777', '#0891b2', '#64748b'] + colors = {configuration: palette[i % len(palette)] for i, configuration in enumerate(configurations)} + budgets = {} + labels = {} + for configuration in configurations: + apis = [c for c in manifest.get('containers', {}).get(configuration, []) if '-api-' in c['name']] + replicas = next(r['replicas'] for r in rows if r['configuration'] == configuration) + if apis: + cpu = sum(c['nano_cpus'] for c in apis) / 1e9 + memory = sum(c['memory_bytes'] for c in apis) / 1024**3 + budgets[configuration] = (cpu, memory) + labels[configuration] = f'{replicas} API ({cpu:g} CPU / {memory:g} GiB)' + else: + labels[configuration] = f'{configuration}: {replicas} API' + budget_description = '; '.join(f'{cpu:g} CPU / {memory:g} GiB' + for cpu, memory in sorted(set(budgets.values()))) or 'see manifest' + + def draw(ax, field, title, ylabel, log=False): + for configuration in configurations: + selected = [r for r in rows if r['configuration'] == configuration] + rates = sorted({r["offered_rps"] for r in selected}) + samples = [[r[field] for r in selected if r["offered_rps"] == rate] for rate in rates] + values = [statistics.median(v) for v in samples] + ax.plot(rates, values, marker="o", color=colors[configuration], label=labels[configuration]) + ax.fill_between(rates, [min(v) for v in samples], [max(v) for v in samples], + color=colors[configuration], alpha=0.12) + ax.set(title=title, xlabel="Scheduled requests/s", ylabel=ylabel) + ax.grid(alpha=0.25) + if log: + ax.set_yscale("log") + else: + ax.set_ylim(bottom=0) + + def save(fig, name, caption): + if args.valid_delivery_only: + caption += "\nUnderfed runs excluded; sample counts can differ between points." + fig.text(0.5, 0.015, caption, ha="center", fontsize=9) + fig.tight_layout(rect=(0, 0.055, 1, 0.94)) + for extension in ("png", "svg"): + fig.savefig(args.directory / f"{name}.{extension}", dpi=160, bbox_inches="tight", pad_inches=0.25) + plt.close(fig) + + plt.rcParams.update({"font.size": 10, "axes.titlesize": 11}) + fig, axes = plt.subplots(2, 2, figsize=(12, 8)) + fig.suptitle(f"PostgreSQL {pg_cpus:g} CPU / {memory_mib:g} MiB; API budgets: {budget_description}", fontsize=12) + draw(axes[0, 0], "successful_rps", "Successful throughput", "Successful requests/s") + rates = sorted({r["offered_rps"] for r in rows}) + axes[0, 0].plot(rates, rates, color="#475569", linestyle="--", alpha=0.7, label="Scheduled") + axes[0, 0].set_ylim(0, max(axes[0, 0].get_ylim()[1], max(rates)*1.05)) + axes[0, 0].legend() + draw(axes[0, 1], "p95_ms", "Latency of all requests" if args.all_latency else "Latency of successful requests", "p95, ms (log scale)", log=True) + if args.all_latency: + axes[0, 1].axhline(1000, color="#64748b", linestyle="--", linewidth=1, label="1000 ms criterion") + axes[0, 1].legend(fontsize=8) + draw(axes[1, 0], "error_percent", "Errors among attempted requests", "Errors, %") + axes[1, 0].axhline(1, color="#64748b", linestyle="--", linewidth=1) + axes[1, 0].set_ylim(0, max(axes[1, 0].get_ylim()[1], 1.05)) + draw(axes[1, 1], "drop_percent", "Slots dropped by client", "Dropped scheduled slots, %") + drop_limit = 2 if args.valid_delivery_only else 5 + axes[1, 1].axhline(drop_limit, color="#64748b", linestyle="--", linewidth=1) + axes[1, 1].set_ylim(0, max(axes[1, 1].get_ylim()[1], drop_limit*1.05)) + save(fig, "performance", "Lines: medians of repeats; shading: min-max. High client-drop points do not establish server capacity.") + + fig, axes = plt.subplots(2, 3, figsize=(15, 8)) + fig.suptitle("Resource and connection-pool diagnostics", fontsize=14) + draw(axes[0, 0], "pg_cpu_cores", "PostgreSQL CPU usage", "CPU cores") + axes[0, 0].axhline(pg_cpus, color="#64748b", linestyle="--", linewidth=1, label="CPU limit") + axes[0, 0].set_ylim(0, max(axes[0, 0].get_ylim()[1], pg_cpus*1.05)) + draw(axes[0, 1], "api_cpu_cores", "Total API CPU usage", "CPU cores") + for configuration, (cpu, _) in budgets.items(): + axes[0, 1].axhline(cpu, color=colors[configuration], linestyle='--', linewidth=1, + label=f'{configuration} limit: {cpu:g} CPU') + if budgets: + axes[0, 1].set_ylim(0, max(axes[0, 1].get_ylim()[1], max(cpu for cpu, _ in budgets.values()) * 1.05)) + axes[0, 1].legend(fontsize=8) + draw(axes[0, 2], "pg_throttle_percent", "PostgreSQL CPU throttling", "Throttled periods, %") + draw(axes[1, 0], "api_max_throttle_percent", "Most throttled API replica", "Throttled periods, %") + draw(axes[1, 1], "acquisition_mean_ms", "Mean connection acquisition", "Acquisition, ms (log scale)", log=True) + draw(axes[1, 2], "pool_max_waiting", "Largest observed pool queue", "Waiting requests") + axes[0, 0].legend() + save(fig, "resources", "Lines: medians of repeats; shading: min-max. Queue sampled every 100 ms; acquisition includes connection setup.") + fig, axes = plt.subplots(1, 2, figsize=(12, 5)) + fig.suptitle("Latency and errors against the workload actually delivered", fontsize=14) + for configuration in configurations: + selected = [r for r in rows if r['configuration'] == configuration] + rates = sorted({r["offered_rps"] for r in selected}) + groups = [[r for r in selected if r["offered_rps"] == rate] for rate in rates] + x = [statistics.median(r["attempted_rps"] for r in group) for group in groups] + for axis, field, title, ylabel in ( + (axes[0], "p95_ms", "Latency", "p95, ms (log scale)"), + (axes[1], "error_percent", "Errors", "Errors among attempts, %"), + ): + y = [statistics.median(r[field] for r in group) for group in groups] + axis.plot(x, y, marker="o", color=colors[configuration], label=labels[configuration]) + for rate, xp, yp in zip(rates, x, y): + axis.annotate(str(rate), (xp, yp), xytext=(4, 4), textcoords="offset points", fontsize=8) + axis.set(title=title, xlabel="Actually attempted requests/s", ylabel=ylabel) + axis.grid(alpha=0.25) + axes[0].set_yscale("log") + if args.all_latency: + axes[0].axhline(1000, color="#64748b", linestyle="--", linewidth=1, label="1000 ms criterion") + axes[1].set_ylim(bottom=0) + axes[0].legend() + save(fig, "delivered-load", "Points: medians of repeats. Small labels: scheduled RPS. Client shares the Docker VM; no server-capacity claim.") + print(f"Wrote performance/resources/delivered-load PNG and SVG for {len(rows)} runs to {args.directory}") + + +if __name__ == "__main__": + main() diff --git a/scripts/plot-small-cpu-controls.py b/scripts/plot-small-cpu-controls.py new file mode 100644 index 00000000..2c89f7ef --- /dev/null +++ b/scripts/plot-small-cpu-controls.py @@ -0,0 +1,10 @@ +#!/usr/bin/env python3 +"""Compatibility entry point for the consolidated report figures.""" +import runpy +from pathlib import Path +import sys + +if __name__ == '__main__': + helper = Path(__file__).with_name('report-evidence.py') + sys.argv = [str(helper), '--plot', *sys.argv[1:]] + runpy.run_path(str(helper), run_name='__main__') diff --git a/scripts/report-evidence.py b/scripts/report-evidence.py new file mode 100644 index 00000000..02b85b04 --- /dev/null +++ b/scripts/report-evidence.py @@ -0,0 +1,220 @@ +#!/usr/bin/env python3 +"""Keep report evidence in one JSON, one CSV, two figures and checks.json.""" +import argparse +from collections import Counter +import csv +from datetime import datetime, timezone +import hashlib +import json +from pathlib import Path +import statistics +import subprocess + +ROOT = Path(__file__).resolve().parents[1] +SERIES = [ + ('api-cpu', None, 'api-small-growth-20261029'), + ('pg-cpu', 'pg0.5', 'diagnostics-v3-linux-20261028'), + ('pg-cpu', 'pg1', 'diagnostics-pg1cpu-linux-20261028'), + ('pool-limit', 'pool60', 'pool15-four-r100-short-20261028'), + ('pool-limit', 'pool32', 'pool8-four-r100-short-20261028'), + ('pg-upper-cpu', 'pg1', 'api-small-db-control-20261029/pg1'), + ('pg-upper-cpu', 'pg2', 'api-small-db-control-20261029/pg2'), +] + + +def digest(path): + return hashlib.sha256(path.read_bytes()).hexdigest() + + +def flatten(bundle): + rows = [] + for run in bundle['runs']: + profile, measurement = run['profile'], run['measurement'] + all_requests = measurement['all'] + diagnostics = run['diagnostics'] + resources, pools = diagnostics['resources'], diagnostics['pools'] + manifest = bundle['manifests'][run['manifest']] + containers = manifest['containers'][run['configuration']] + apis = [c for c in containers if '-api-' in c['name']] + pg = next(c for c in containers if '-postgres-' in c['name']) + seconds, rate = profile['duration_seconds'], profile['offered_rps'] + acquired = sum(p['acquisitions'] for p in pools.values()) + fraction = all_requests['attempted'] / (seconds * rate) + latency = all_requests['successful_latency_ms'] + all_latency = run.get('all_latency_ms') or {} + rows.append({ + 'dataset': run['dataset'], 'variant': run['variant'], 'label': run['label'], + 'replicas': len(apis), 'api_cpu': sum(c['nano_cpus'] for c in apis) / 1e9, + 'api_ram_mib': sum(c['memory_bytes'] for c in apis) / 1024**2, + 'pool_total': sum(int(c['pool_max']) for c in apis), + 'pg_cpu': pg['nano_cpus'] / 1e9, 'pg_ram_mib': pg['memory_bytes'] / 1024**2, + 'offered_rps': rate, 'duration_seconds': seconds, + 'warmup_seconds': profile.get('warmup_seconds', manifest['warmup_seconds']), + 'attempted': all_requests['attempted'], 'successful': all_requests['successful'], + 'errors': all_requests['errors'], 'successful_rps': all_requests['successful'] / seconds, + 'attempted_rps': all_requests['attempted'] / seconds, + 'delivery_fraction': fraction, 'delivery_valid': .98 <= fraction <= 1.02, + 'p50_ms': latency['p50'], 'p95_ms': latency['p95'], 'p99_ms': latency['p99'], + 'all_request_p95_ms': all_latency.get('p95'), + 'api_cpu_cores': sum(r.get('mean_cpu_cores', 0) for name, r in resources.items() if name.startswith('api-')), + 'api_peak_memory_mib_sum': sum(r.get('peak_memory_mib', 0) for name, r in resources.items() if name.startswith('api-')), + 'api_max_throttle_percent': max((p.get('throttled_period_fraction', 0) for name, p in resources.items() if name.startswith('api-')), default=0) * 100, + 'pg_cpu_cores': resources['postgres'].get('mean_cpu_cores'), + 'pg_peak_memory_mib': resources['postgres'].get('peak_memory_mib'), + 'pg_throttle_percent': resources['postgres'].get('throttled_period_fraction', 0) * 100, + 'host_cpu_pressure_percent': diagnostics['host'].get('cpu_some_fraction', 0) * 100, + 'acquisition_mean_ms': sum(p['mean_acquisition_ms'] * p['acquisitions'] for p in pools.values()) / max(acquired, 1), + 'acquisition_errors': sum(p['acquisition_errors'] for p in pools.values()), + 'pool_max_waiting': max((p['max_waiting'] for p in pools.values()), default=0), + 'nginx_min_ready': diagnostics['nginx']['min_ready'], + 'diagnostics_complete': diagnostics['diagnostics_complete'], + }) + return rows + + +def collect(source, output): + manifests, runs = {}, [] + for dataset, variant, directory in SERIES: + path = source / directory + manifest = json.loads((path / 'manifest.json').read_text(encoding='utf-8')) + manifests[directory] = manifest + for label in manifest['runs']: + location = path / label + benchmark = json.loads((location / 'benchmark.json').read_text(encoding='utf-8')) + summary = json.loads((location / 'summary.json').read_text(encoding='utf-8')) + configuration = next(p for p in manifest['profiles'] if label.startswith(p + '-r')) + runs.append({ + 'dataset': dataset, 'variant': variant or configuration, 'configuration': configuration, + 'manifest': directory, 'label': label, + 'profile': benchmark['profile'], 'measurement': benchmark['measurement'], + 'timing': benchmark.get('timing'), 'client': benchmark.get('client'), + 'all_latency_ms': benchmark.get('all_latency_ms'), + 'criterion': summary.get('criterion'), + 'diagnostics': {key: summary[key] for key in + ('resources', 'pools', 'host', 'postgres', 'nginx', 'limits_reached', 'diagnostics_complete')}, + 'source_hashes': {'benchmark': digest(location / 'benchmark.json'), + 'summary': digest(location / 'summary.json')}, + }) + sources = sorted([p for p in (ROOT / 'src').rglob('*.ts') if 'generated' not in p.parts] + + list((ROOT / 'prisma').rglob('*.sql')) + + list((ROOT / 'configs').glob('*.yaml')) + + [ROOT / p for p in ('compose.yaml', 'Dockerfile', 'infra/nginx.conf', 'infra/start-nginx.sh', 'pnpm-lock.yaml')]) + host_path = source / 'diagnostics-pg1cpu-full-20261028/host-environment.json' + host = json.loads(host_path.read_text(encoding='utf-8')) + bundle = { + 'schema_version': 1, 'recorded_at': datetime.now(timezone.utc).isoformat(), + 'git_base': subprocess.check_output(['git', 'rev-parse', 'HEAD'], cwd=ROOT, text=True).strip(), + 'revision_note': 'Implementation is in the working tree; git_base identifies the scaffold, not a committed implementation.', + 'retained_data': 'Per-run HTTP aggregates, profiles, CPU/RAM/pool/SQL-state diagnostics, original manifests and source hashes. Request samples, stdout/stderr, traces and duplicate documentation omitted.', + 'hardware': {'processor': host['processor'], 'windows_total_visible_kib': host['windows_memory_kib']['total_visible']}, + 'application_source_sha256': {p.relative_to(ROOT).as_posix(): digest(p) for p in sources}, + 'manifests': manifests, 'runs': runs, + } + (output / 'measurements.json').write_text(json.dumps(bundle, ensure_ascii=False, indent=2) + '\n', encoding='utf-8') + return bundle + + +def verify(bundle, rows): + counts = Counter(r['dataset'] for r in rows) + assert counts == {'api-cpu': 36, 'pg-cpu': 6, 'pool-limit': 6, 'pg-upper-cpu': 6}, counts + assert len({(r['dataset'], r['variant'], r['label']) for r in rows}) == 54 + assert all(r['attempted'] == r['successful'] + r['errors'] for r in rows) + assert all(r['diagnostics_complete'] for r in rows) + matrix = [r for r in rows if r['dataset'] == 'api-cpu'] + assert all(r['pool_total'] == 32 and r['api_ram_mib'] == 1024 and r['pg_cpu'] == 1 for r in matrix) + assert all(n == 3 for n in Counter((r['variant'], r['offered_rps']) for r in matrix).values()) + for name, expected in [('pg-cpu', {'pg0.5': .5, 'pg1': 1}), + ('pg-upper-cpu', {'pg1': 1, 'pg2': 2})]: + assert all(r['pg_cpu'] == expected[r['variant']] for r in rows if r['dataset'] == name) + assert {r['pool_total'] for r in rows if r['dataset'] == 'pool-limit'} == {32, 60} + assert len(bundle['manifests']) == 7 + + +def plot(rows, output): + import matplotlib + matplotlib.use('Agg') + import matplotlib.pyplot as plt + + matrix = [r for r in rows if r['dataset'] == 'api-cpu'] + fig, axes = plt.subplots(2, 2, figsize=(12, 8)) + for cpu, color in ((1, '#9333ea'), (2, '#059669')): + for ax, rate, field, title, ylabel in ( + (axes[0, 0], 40, 'all_request_p95_ms', '40 scheduled RPS: all-request latency', 'Median p95, ms'), + (axes[0, 1], 80, 'successful_rps', '80 scheduled RPS: successful throughput', 'Median successful requests/s'), + (axes[1, 0], 40, 'api_max_throttle_percent', '40 RPS: most throttled API', 'Median throttled periods, %'), + (axes[1, 1], 80, 'delivery_fraction', '80 RPS: actual load delivery', 'Median started / scheduled, %'), + ): + groups = [[r for r in matrix if r['api_cpu'] == cpu and r['replicas'] == n and r['offered_rps'] == rate] for n in (1, 2, 4)] + scale = 100 if field == 'delivery_fraction' else 1 + values = [statistics.median(r[field] for r in g) * scale for g in groups] + ax.plot([1, 2, 4], values, marker='o', color=color, label=f'API total {cpu} CPU / 1 GiB') + ax.fill_between([1, 2, 4], [min(r[field] for r in g) * scale for g in groups], + [max(r[field] for r in g) * scale for g in groups], color=color, alpha=.1) + ax.set(title=title, xlabel='API replicas', ylabel=ylabel, xticks=[1, 2, 4]) + ax.grid(alpha=.25) + ax.legend(fontsize=8) + axes[0, 0].axhline(1000, color='#64748b', linestyle='--') + axes[1, 1].axhline(98, color='#64748b', linestyle='--') + fig.suptitle('Fixed budgets and CPU growth; PG 1 CPU / 512 MiB; total pool 32', fontsize=13) + fig.text(.5, .012, 'All repeats shown, including underfed runs. Lines: medians; bands: min/max, not confidence intervals. No measured plateau claim.', ha='center', fontsize=8) + fig.tight_layout(rect=(0, .04, 1, .95)) + fig.savefig(output / 'scaling.png', dpi=160) + plt.close(fig) + + fig, axes = plt.subplots(2, 2, figsize=(12, 8)) + panels = [ + ('api-cpu', ['two-small', 'two'], 'all_request_p95_ms', ['API 1 CPU', 'API 2 CPU'], '2 API, 40 RPS: CPU increase', 'All-request p95, ms', 40), + ('pg-cpu', ['pg0.5', 'pg1'], 'p95_ms', ['PG 0.5 CPU', 'PG 1 CPU'], '4 API, 60 RPS: database quota', 'Successful-request p95, ms', 60), + ('pool-limit', ['pool60', 'pool32'], 'successful_rps', ['60 connections', '32 connections'], '4 API, 100 scheduled RPS: pool limit', 'Successful requests/s', 100), + ('pg-upper-cpu', ['pg1', 'pg2'], 'all_request_p95_ms', ['PG 1 CPU', 'PG 2 CPU'], '2 API, 80 RPS: further PG CPU increase', 'All-request p95, ms', 80), + ] + for ax, (dataset, variants, field, labels, title, ylabel, rate) in zip(axes.flat, panels): + for i, variant in enumerate(variants): + group = [r for r in rows if r['dataset'] == dataset and r['variant'] == variant and r['offered_rps'] == rate] + assert len(group) == 3 + color = '#9333ea' if i == 0 else '#059669' + for j, r in enumerate(group): + # Older Node series use a different scheduler: show their observations without a retroactive k6 classification. + underfed = dataset in {'api-cpu', 'pg-upper-cpu'} and not r['delivery_valid'] + ax.scatter(i + (j - 1) * .08, r[field], color=color, marker='x' if underfed else 'o', s=55) + value = (sum(r['successful'] for r in group) / sum(r['duration_seconds'] for r in group) + if dataset == 'pool-limit' else statistics.median(r[field] for r in group)) + ax.hlines(value, i - .17, i + .17, color='#0f172a', linewidth=2) + ax.annotate(f'{value:.0f}' if value > 100 else f'{value:.2f}', (i, value), + xytext=(12, 8), textcoords='offset points', fontsize=9) + ax.set(title=title, ylabel=ylabel, xticks=[0, 1], xticklabels=labels, xlim=(-.4, 1.4)) + ax.grid(axis='y', alpha=.25) + if field == 'all_request_p95_ms': + ax.axhline(1000, color='#64748b', linestyle='--', linewidth=1) + maximum = max(r[field] for r in rows if r['dataset'] == dataset and r['variant'] in variants and r['offered_rps'] == rate) + ax.set_ylim(0, maximum * 1.2) + fig.suptitle('Separate experiments: compare variants within each panel', fontsize=13) + fig.text(.5, .012, 'Dots: individual runs; black bars: medians (pool panel: aggregate successful RPS). Crosses: k6 underdelivery. See REPORT.md for scheduler differences.', ha='center', fontsize=8) + fig.tight_layout(rect=(0, .04, 1, .95)) + fig.savefig(output / 'improvements.png', dpi=160) + plt.close(fig) + + +def main(): + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument('--collect', action='store_true', help='Import the selected raw experiment directories before cleanup') + parser.add_argument('--source-root', type=Path, default=ROOT / '.artifacts/scaling') + parser.add_argument('--output', type=Path, default=ROOT / 'evidence') + parser.add_argument('--input', type=Path, default=ROOT / 'evidence/measurements.json') + parser.add_argument('--plot', action='store_true') + args = parser.parse_args() + args.output.mkdir(parents=True, exist_ok=True) + bundle = collect(args.source_root, args.output) if args.collect else json.loads(args.input.read_text(encoding='utf-8')) + rows = flatten(bundle) + verify(bundle, rows) + with (args.output / 'scaling.csv').open('w', encoding='utf-8', newline='') as stream: + writer = csv.DictWriter(stream, fieldnames=rows[0].keys()) + writer.writeheader() + writer.writerows(rows) + if args.plot: + plot(rows, args.output) + print(f'Verified {len(rows)} runs from {len(bundle["manifests"])} source series; compact evidence in {args.output}') + + +if __name__ == '__main__': + main() diff --git a/scripts/restart.cmd b/scripts/restart.cmd new file mode 100644 index 00000000..1bc9b618 --- /dev/null +++ b/scripts/restart.cmd @@ -0,0 +1,10 @@ +@echo off +setlocal +if defined GIT_BASH goto run +set "GIT_BASH=%ProgramFiles%\Git\bin\bash.exe" +if exist "%GIT_BASH%" goto run +echo Git Bash was not found. Set GIT_BASH to the full path to bash.exe. 1>&2 +exit /b 2 +:run +"%GIT_BASH%" "%~dp0restart.sh" +exit /b %ERRORLEVEL% diff --git a/scripts/restart.sh b/scripts/restart.sh new file mode 100755 index 00000000..a35988e9 --- /dev/null +++ b/scripts/restart.sh @@ -0,0 +1,23 @@ +#!/bin/sh +set -eu + +project_dir=$(CDPATH= cd -- "$(dirname -- "$0")/.." && pwd) +cd "$project_dir" + +for service in api nginx postgres redis; do + if [ -z "$(docker compose ps --all --quiet "$service")" ]; then + printf '%s\n' "Missing container for $service; start the Compose stack first." >&2 + exit 1 + fi +done + +replicas=$(docker compose ps --all --quiet api | wc -l | tr -d ' ') +if [ "$replicas" -lt 1 ]; then + printf 'No API replicas found.\n' >&2 + exit 1 +fi + +docker compose stop --timeout 30 nginx api postgres redis +docker compose up --detach --no-recreate --no-build --no-deps --wait --wait-timeout 45 postgres redis +docker compose up --detach --no-recreate --no-build --no-deps --scale "api=$replicas" --wait --wait-timeout 45 api +docker compose up --detach --no-recreate --no-build --no-deps nginx diff --git a/scripts/run-saturation.py b/scripts/run-saturation.py new file mode 100644 index 00000000..5feaf120 --- /dev/null +++ b/scripts/run-saturation.py @@ -0,0 +1,291 @@ +#!/usr/bin/env python3 +"""Bracket an empirical SLO boundary with k6; preserve separate probe/confirmation data.""" +import argparse +from datetime import datetime, timezone +import hashlib +import importlib.util +import json +import os +from pathlib import Path +import subprocess +import time +import uuid + +ROOT = Path(__file__).resolve().parents[1] +PROFILE_REPLICAS = {'one': 1, 'two': 2, 'four': 4, 'four-large': 4, + 'one-small': 1, 'two-small': 2, 'four-small': 4} +spec = importlib.util.spec_from_file_location('diagnostics', ROOT/'scripts/run-scaling-diagnostics.py') +diag = importlib.util.module_from_spec(spec) +spec.loader.exec_module(diag) + + +def call(args, timeout=180, env=None): + result = subprocess.run(args, cwd=ROOT, capture_output=True, text=True, + encoding='utf-8', errors='replace', timeout=timeout, env=env) + if result.returncode: + raise RuntimeError(f'{args[0]} {args[1]}: {result.stderr[-1800:]}') + return result.stdout.strip() + + +def watch(container, role, directory): + stop = '/tmp/saturation-' + uuid.uuid4().hex + '.stop' + output = (directory/f'{role}.jsonl').open('wb') + error = (directory/f'{role}.stderr').open('wb') + process = subprocess.Popen(['docker', 'exec', '-i', container, 'sh', '-s', role, stop], + cwd=ROOT, stdin=subprocess.PIPE, stdout=output, stderr=error) + process.stdin.write((ROOT/'scripts/diagnostics/observer.sh').read_bytes()) + process.stdin.close() + return container, role, stop, process, output, error + + +def stop_watch(worker, directory): + container, role, stop, process, output, error = worker + try: + call(['docker', 'exec', container, 'touch', stop], timeout=15) + process.wait(timeout=15) + finally: + if process.poll() is None: + process.terminate() + process.wait(timeout=10) + output.close() + error.close() + if role == 'postgres': + call(['docker', 'cp', f'{container}:{stop}.pg.jsonl', str(directory/'postgres-sql.jsonl')]) + call(['docker', 'exec', container, 'rm', '-f', stop+'.pg.jsonl']) + + +def classify(benchmark): + m = benchmark['measurement'] + count = m['all']['attempted'] + ratio = count/max(m['scheduled_slots'], 1) + error_fraction = m['all']['errors']/max(count, 1) + p95 = benchmark['all_latency_ms']['p95'] + delivered = 0.98 <= ratio <= 1.02 and m['client_dropped_slots']/max(m['scheduled_slots'], 1) <= 0.02 + slo = count > 0 and error_fraction <= 0.01 and p95 is not None and p95 <= 1000 + return {'delivery_fraction': ratio, 'error_fraction': error_fraction, + 'all_request_p95_ms': p95, 'delivery_valid': delivered, 'slo_pass': slo, + 'classification': 'pass' if delivered and slo else 'slo_fail' if delivered else 'generator_limited'} + + +def main(): + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument('--output', required=True, type=Path) + parser.add_argument('--image', default='grafana/k6:1.3.0') + parser.add_argument('--profiles', nargs='+', choices=list(PROFILE_REPLICAS), default=['one', 'two', 'four']) + parser.add_argument('--probe-seconds', type=int, default=15) + parser.add_argument('--confirm-seconds', type=int, default=30) + parser.add_argument('--warmup-seconds', type=int, default=10, + help='Mixed-load warmup before each confirmation run') + parser.add_argument('--calibration-only', action='store_true') + parser.add_argument('--confirm-rates', nargs='+', type=int, help='Confirm these rates directly, skipping coarse search') + parser.add_argument('--no-expand', action='store_true', + help='With --confirm-rates, run only the requested rates for a controlled comparison') + args = parser.parse_args() + if args.no_expand and not args.confirm_rates: + parser.error('--no-expand requires --confirm-rates') + if args.warmup_seconds < 1: + parser.error('--warmup-seconds must be positive') + out = args.output.resolve() + out.mkdir(parents=True, exist_ok=False) + manifest = {'started': datetime.now(timezone.utc).isoformat(), 'profiles': args.profiles, + 'client': 'container', 'engine': 'k6', 'duration_seconds': args.confirm_seconds, + 'warmup_seconds': args.warmup_seconds, 'probe_duration_seconds': args.probe_seconds, 'probe_warmup_seconds': 5, + 'repetitions': 3, 'rates': [], 'containers': {}, 'runs': [], 'boundaries': {}, + 'stopped_profiles': {}, 'observer_version': 3, + 'criterion': 'delivery 98..102%, dropped iterations <=2%, errors <=1%, all-request p95 <=1000 ms', + 'pool_budget': 32, 'notes': ['Local empirical SLO boundary, not universal maximum throughput.', + 'Native sequential warmup/measurement scenarios at target-rate 80/20; custom counters belong only to measurement.', + 'Generator shares Docker VM CPU; calibration does not eliminate competition during API load.', + 'Probe durations differ; use confirmation rows for reported bounds.'], + 'source_sha256': {p: hashlib.sha256((ROOT/p).read_bytes()).hexdigest() for p in + ['scripts/saturation.k6.js', 'scripts/saturation-mock.cjs', 'scripts/run-saturation.py', + 'scripts/run-scaling-diagnostics.py', 'scripts/diagnostics/pool.cjs', 'scripts/diagnostics/observer.sh', + 'compose.yaml', 'test/compose.diagnostics.yaml', + *[f'configs/{profile}.yaml' for profile in args.profiles]]}} + save = lambda: (out/'manifest.json').write_text(json.dumps(manifest, indent=2)+'\n', encoding='utf-8') + manifest['requested_confirmation_rates'] = args.confirm_rates + manifest['expand_confirmation_rates'] = not args.no_expand + for name in manifest['source_sha256']: + target = out/'sources'/name + target.parent.mkdir(parents=True, exist_ok=True) + target.write_bytes((ROOT/name).read_bytes()) + save() + nginx = json.loads(call(['docker', 'inspect', call(diag.compose('two', False)+['ps', '-q', 'nginx'])]))[0] + network = next(iter(nginx['NetworkSettings']['Networks'])) + api_id = call(diag.compose('two', False)+['ps', '-q', 'api']).split()[0] + api_image = json.loads(call(['docker', 'inspect', api_id]))[0]['Image'] + suffix = uuid.uuid4().hex + generator = 'lab3-saturation-client-' + suffix + mock = 'lab3-saturation-mock-' + suffix + generator_watch = None + counter = 0 + manifest['generator_container'] = generator + manifest['mock_container'] = mock + save() + + def run(profile, rate, phase, seconds, warm, expected, base='http://nginx'): + nonlocal counter + if (out/'CANCEL').exists(): + raise InterruptedError('Cancellation requested; restoring ordinary profile') + counter += 1 + label = f'{profile}-r{rate}-{phase}-{counter}' + directory = out/label + directory.mkdir() + print(f'START {label} ({seconds}s)', flush=True) + envs = {'BASE_URL': base, 'RATE': str(rate), 'SECONDS': str(seconds), 'WARMUP': str(warm), + 'EXPECTED': str(expected), 'LABEL': label, 'PHASE': phase, + 'OUTPUT': f'/results/{label}/benchmark.json', 'CALIBRATION': str(int(profile == 'calibration'))} + command = ['docker', 'exec'] + for k, v in envs.items(): + command += ['-e', f'{k}={v}'] + command += [generator, 'k6', 'run', '--quiet', '/scripts/saturation.k6.js'] + started = datetime.now(timezone.utc).isoformat() + result = subprocess.run(command, cwd=ROOT, capture_output=True, text=True, + encoding='utf-8', errors='replace', timeout=seconds+warm+150) + (directory/'execution.json').write_text(json.dumps({'returncode': result.returncode, + 'started': started, 'ended': datetime.now(timezone.utc).isoformat(), 'command': command}, indent=2)+'\n') + (directory/'k6.stdout').write_text(result.stdout, encoding='utf-8') + (directory/'k6.stderr').write_text(result.stderr, encoding='utf-8') + if result.returncode or not (directory/'benchmark.json').exists(): + raise RuntimeError(f'{label}: k6 execution failed: {result.stderr[-1000:]}') + b = json.loads((directory/'benchmark.json').read_text(encoding='utf-8')) + if not b['timing']['measurement_started_epoch_ms']: + raise RuntimeError(f'{label}: no measured requests') + verdict = classify(b) + (directory/'criterion.json').write_text(json.dumps(verdict, indent=2)+'\n') + print(f"DONE {label}: {verdict['classification']} delivered={verdict['delivery_fraction']:.3f} " + f"RPS={b['measurement']['all']['successful_rps']:.2f} p95={verdict['all_request_p95_ms']:.0f}ms " + f"errors={b['measurement']['all']['errors']}", flush=True) + if profile != 'calibration': + manifest['runs'].append(label) + manifest['rates'] = sorted(set(manifest['rates']+[rate])) + save() + time.sleep(1 if verdict['classification'] == 'pass' else 5) + return label, verdict + + try: + call(['docker', 'run', '-d', '--name', generator, '--network', network, + '-v', f'{ROOT / "scripts"}:/scripts:ro', '-v', f'{out}:/results', + '--entrypoint', 'sh', args.image, '-c', 'while :; do sleep 3600; done']) + manifest['generator_image'] = json.loads(call(['docker', 'inspect', generator]))[0]['Image'] + manifest['generator_version'] = call(['docker', 'exec', generator, 'k6', 'version']) + manifest['docker'] = json.loads(call(['docker', 'info', '--format', + '{"cpus":{{.NCPU}},"memory_bytes":{{.MemTotal}},"version":{{json .ServerVersion}}}'])) + generator_watch = watch(generator, 'generator', out) + call(['docker', 'run', '-d', '--name', mock, '--network', network, + '-v', f'{ROOT / "scripts/saturation-mock.cjs"}:/mock.cjs:ro', + '--entrypoint', 'node', api_image, '/mock.cjs']) + calibrations = [] + for calibration_rate in [400, 200, 100]: + label, calibration = run('calibration', calibration_rate, 'calibration', 10, 3, 1, f'http://{mock}:8080') + calibrations.append({'label': label, 'rate': calibration_rate, **calibration}) + if calibration['classification'] == 'pass': break + manifest['calibration_attempts'] = calibrations + manifest['calibration'] = {'label': label, **calibration} + low_label, low_calibration = run('calibration', 40, 'calibration-low-rate', 10, 3, 1, f'http://{mock}:8080') + manifest['calibration_low_rate'] = {'label': low_label, **low_calibration} + save() + call(['docker', 'rm', '-f', mock]) + if calibration['classification'] != 'pass' or low_calibration['classification'] != 'pass': + raise RuntimeError('Generator calibration failed; do not claim API saturation') + if args.calibration_only: + return + for profile in args.profiles: + profile_started = datetime.now(timezone.utc).isoformat() + n = PROFILE_REPLICAS[profile] + print(f'SWITCH {profile}, pool={32//n} per replica', flush=True) + env = {**os.environ, 'DB_POOL_MAX': str(32//n)} + call(diag.compose(profile)+['up', '-d', '--no-build', '--no-deps', '--wait', '--wait-timeout', '120', 'api'], env=env) + time.sleep(6) + containers = {role: call(diag.compose(profile)+['ps', '-q', role]).split() for role in ['api', 'postgres', 'nginx', 'redis']} + details = json.loads(call(['docker', 'inspect', *[c for group in containers.values() for c in group]])) + manifest['containers'][profile] = [{'id': c['Id'], 'name': c['Name'], 'image': c['Image'], + 'nano_cpus': c['HostConfig']['NanoCpus'], 'memory_bytes': c['HostConfig']['Memory'], + 'pool_max': next((e.split('=', 1)[1] for e in c['Config']['Env'] if e.startswith('DB_POOL_MAX=')), None)} for c in details] + profile_dir = out/f'observers-{profile}' + profile_dir.mkdir() + workers = [] + first = len(manifest['runs']) + save() + try: + for role in ['postgres', 'nginx', 'redis']: + workers.append(watch(containers[role][0], role, profile_dir)) + low = None + high = None + for rate in ([] if args.confirm_rates else [40, 80, 120, 160, 240, 320, 480]): + _, v = run(profile, rate, 'probe', args.probe_seconds, 5, n) + if v['classification'] == 'pass': low = rate + else: + high = rate + break + if low is None and not args.confirm_rates: + for rate in [20, 10]: + _, v = run(profile, rate, 'probe', args.probe_seconds, 5, n) + if v['classification'] == 'pass': low = rate; break + high = rate + if low is not None and high is not None: + for _ in range(2): + if high-low <= 20: break + middle = ((low+high)//20)*10 + _, v = run(profile, middle, 'probe', args.probe_seconds, 5, n) + if v['classification'] == 'pass': low = middle + else: high = middle + confirmations = {} + for repeat in range(3): + for rate in sorted(set(args.confirm_rates or [r for r in [low, high] if r is not None])): + _, v = run(profile, rate, 'confirmation', args.confirm_seconds, args.warmup_seconds, n) + confirmations.setdefault(rate, []).append(v) + for _ in range(0 if args.no_expand else 2): + good = [r for r, vv in confirmations.items() if all(v['classification'] == 'pass' for v in vv)] + bad = [r for r, vv in confirmations.items() if sum(v['classification'] == 'slo_fail' for v in vv) >= 2] + if good and bad and max(good) < min(bad): break + if any(v['classification'] == 'generator_limited' for vv in confirmations.values() for v in vv): break + rate = max(10, min(confirmations)-20) if not good else max(confirmations)+20 + if rate in confirmations: break + confirmations[rate] = [run(profile, rate, 'confirmation', args.confirm_seconds, args.warmup_seconds, n)[1] for _ in range(3)] + good = [r for r, vv in confirmations.items() if all(v['classification'] == 'pass' for v in vv)] + bad = [r for r, vv in confirmations.items() if sum(v['classification'] == 'slo_fail' for v in vv) >= 2] + manifest['boundaries'][profile] = {'confirmed_good': max(good) if good else None, + 'confirmed_bad': min(bad) if bad else None, 'confirmations': confirmations, + 'bracketed': bool(good and bad and max(good) < min(bad))} + print(f"BOUNDARY {profile}: {manifest['boundaries'][profile]['confirmed_good']} .. " + f"{manifest['boundaries'][profile]['confirmed_bad']} RPS", flush=True) + finally: + for worker in workers: stop_watch(worker, profile_dir) + log_result = subprocess.run(['docker', 'logs', '--timestamps', '--since', profile_started, + containers['nginx'][0]], cwd=ROOT, capture_output=True, text=True, + encoding='utf-8', errors='replace', timeout=30) + events = [line for line in (log_result.stdout+'\n'+log_result.stderr).splitlines() + if any(term in line for term in ['worker_connections', 'no live upstreams', + 'upstream timed out', 'download timed out', 'signal process started'])] + (profile_dir/'nginx-events.log').write_text('\n'.join(events)+'\n', encoding='utf-8') + for index, container in enumerate(containers['api'], 1): + call(['docker', 'cp', f'{container}:/tmp/scaling-pool.jsonl', str(profile_dir/f'api-{index}.jsonl')]) + for label in manifest['runs'][first:]: + directory = out/label + for p in profile_dir.glob('*.jsonl'): + (directory/p.name).write_bytes(p.read_bytes()) + (directory/'generator.jsonl').write_bytes((out/'generator.jsonl').read_bytes()) + b = json.loads((directory/'benchmark.json').read_text()) + summary = diag.summarize(directory, b) + samples = [r for r in diag.rows(directory/'generator.jsonl') if r['kind'] == 'cgroup' + and b['timing']['measurement_started_epoch_ms'] <= r['time_ms'] <= b['timing']['measurement_scheduled_end_epoch_ms']] + summary['resources']['generator'] = diag.resource_summary(samples) + summary['all_latency_ms'] = b['all_latency_ms'] + summary['criterion'] = json.loads((directory/'criterion.json').read_text()) + summary['diagnostics_complete'] = len(summary['pools']) == n and all(v['samples'] >= 2 for v in summary['resources'].values()) + (directory/'summary.json').write_text(json.dumps(summary, indent=2)+'\n') + save() + finally: + if generator_watch: stop_watch(generator_watch, out) + for name in [mock, generator]: + subprocess.run(['docker', 'rm', '-f', name], cwd=ROOT, capture_output=True, timeout=30) + if not args.calibration_only: + print('RESTORE normal two profile, original pool setting', flush=True) + call(diag.compose('two', False)+['up', '-d', '--no-build', '--no-deps', '--wait', '--wait-timeout', '120', 'api']) + manifest['finished'] = datetime.now(timezone.utc).isoformat() + save() + + +if __name__ == '__main__': + main() diff --git a/scripts/run-scaling-diagnostics.py b/scripts/run-scaling-diagnostics.py new file mode 100644 index 00000000..cdca419d --- /dev/null +++ b/scripts/run-scaling-diagnostics.py @@ -0,0 +1,325 @@ +#!/usr/bin/env python3 +"""Run a bounded scaling sweep and collect diagnostics without HTTP metric endpoints.""" +import argparse +from datetime import datetime, timezone +import json +from pathlib import Path +import subprocess +import time +import uuid +import hashlib + +ROOT = Path(__file__).resolve().parents[1] + + +def command(args, timeout=180): + result = subprocess.run(args, cwd=ROOT, capture_output=True, text=True, + encoding="utf-8", errors="replace", timeout=timeout) + if result.returncode: + raise RuntimeError(f"{args[0]} {args[1]} failed: {result.stderr[-1500:]}") + return result.stdout + + +def compose(profile, diagnostics=True): + args = ["docker", "compose", "-f", "compose.yaml", "-f", f"configs/{profile}.yaml"] + if diagnostics: + args += ["-f", "test/compose.diagnostics.yaml"] + return args + + +def rows(path): + data = [] + if path.exists(): + text = path.read_text(encoding="utf-8") + decoder = json.JSONDecoder() + position = 0 + while position < len(text): + if text[position].isspace(): + position += 1 + continue + try: + value, position = decoder.raw_decode(text, position) + data.append(value) + except json.JSONDecodeError: + break # Last record can be in progress when a running observer is copied. + return data + + +def delta(first, last, name): + return max(0, last.get(name, 0) - first.get(name, 0)) + + +def resource_summary(samples): + if len(samples) < 2: + return {"samples": len(samples)} + first, last = samples[0], samples[-1] + elapsed = (last["time_ms"] - first["time_ms"]) / 1000 + periods = delta(first, last, "cpu_nr_periods") + return { + "samples": len(samples), "coverage_seconds": elapsed, + "max_sample_gap_seconds": max((b["time_ms"] - a["time_ms"]) / 1000 for a, b in zip(samples, samples[1:])), + "mean_cpu_cores": delta(first, last, "cpu_usage_usec") / max(elapsed * 1e6, 1), + "throttled_seconds": delta(first, last, "cpu_throttled_usec") / 1e6, + "throttled_period_fraction": delta(first, last, "cpu_nr_throttled") / max(periods, 1), + "peak_memory_mib": max(s.get("memory_bytes", 0) or 0 for s in samples) / 1024**2, + "oom_kills": delta(first, last, "memory_oom_kill"), + } + + +def summarize(directory, benchmark): + start = benchmark["timing"]["measurement_started_epoch_ms"] + end = benchmark["timing"]["measurement_scheduled_end_epoch_ms"] + within = lambda data: [r for r in data if start <= r["time_ms"] <= end] + resources = {} + pools = {} + for path in sorted(directory.glob("api-*.jsonl")): + data = within(rows(path)) + flattened = [{**r, **{f"cpu_{k}": v for k, v in (r.get("cpu") or {}).items()}, + **{f"memory_{k}": v for k, v in (r.get("memory_events") or {}).items()}} + for r in data] + resources[path.stem] = resource_summary(flattened) + if len(data) < 2: + continue + first, last = data[0]["pools"], data[-1]["pools"] + acquisitions = sum(p["acquisitions"] for p in last) - sum(p["acquisitions"] for p in first) + acquire_ms = sum(p["acquire_ms"] for p in last) - sum(p["acquire_ms"] for p in first) + intervals = [p for r in data for p in r["pools"]] + totals = [sum(p["total"] for p in r["pools"]) for r in data] + pools[path.stem] = { + "samples": len(data), "acquisitions": acquisitions, + "acquisition_errors": sum(p["errors"] for p in last) - sum(p["errors"] for p in first), + "mean_acquisition_ms": acquire_ms / max(acquisitions, 1), + "max_acquisition_ms": max((p["interval_max_ms"] for p in intervals), default=0), + "max_waiting": max((p["interval_max_waiting"] for p in intervals), default=0), + "queued_interval_fraction": sum(p["interval_max_waiting"] > 0 for p in intervals) / max(len(intervals), 1), + "max_total": max((p["total"] for p in intervals), default=0), + "observed_connection_increases": sum(max(0, b-a) for a, b in zip(totals, totals[1:])), + "observed_connection_decreases": sum(max(0, a-b) for a, b in zip(totals, totals[1:])), + "event_loop_p99_max_ms": max(r["event_loop_delay_ms"]["p99"] for r in data), + } + pg = within(rows(directory / "postgres.jsonl")) + pg_samples = [r for r in pg if r["kind"] == "postgres"] + pg_samples += within(rows(directory / "postgres-sql.jsonl")) + pg_samples.sort(key=lambda r: r["time_ms"]) + host_samples = [r for r in pg if r["kind"] == "host"] + host = {"samples": len(host_samples)} + if len(host_samples) > 1: + host_seconds = (host_samples[-1]["time_ms"] - host_samples[0]["time_ms"])/1000 + host.update({key + "_fraction": delta(host_samples[0], host_samples[-1], key + "_total_usec") / max(host_seconds*1e6, 1) + for key in ("cpu_some", "memory_some", "memory_full", "io_some", "io_full")}) + host["min_available_mib"] = min(r["MemAvailable_kib"] for r in host_samples)/1024 + host["max_swap_used_mib"] = max(r["SwapTotal_kib"] - r["SwapFree_kib"] for r in host_samples)/1024 + waits = {} + max_active = max_idle_tx = 0 + for sample in pg_samples: + max_active = max(max_active, sum(a["count"] for a in sample["activity"] if a["state"] == "active")) + max_idle_tx = max(max_idle_tx, sum(a["count"] for a in sample["activity"] if a["state"] == "idle in transaction")) + for a in sample["activity"]: + if a["state"] == "active": + key = f"{a['wait_event_type'] or 'no_wait_event'}/{a['wait_event'] or '-'}" + waits[key] = waits.get(key, 0) + a["count"] + for role in ("postgres", "nginx", "redis"): + resources[role] = resource_summary([r for r in within(rows(directory / f"{role}.jsonl")) if r["kind"] == "cgroup"]) + upstream = [r for r in within(rows(directory / "nginx.jsonl")) if r["kind"] == "upstream"] + changes = sum(a["servers"] != b["servers"] for a, b in zip(upstream, upstream[1:])) + m = benchmark["measurement"] + return { + "label": benchmark["label"], "profile": benchmark["profile"], + "measurement": m, "client": benchmark["client"], + "resources": resources, "pools": pools, + "host": host, + "postgres": {"samples": len(pg_samples), "max_active": max_active, + "max_idle_in_transaction": max_idle_tx, "active_wait_observations": waits}, + "nginx": {"samples": len(upstream), "upstream_changes": changes, + "min_ready": min((len(r["servers"]) for r in upstream), default=None), + "max_ready": max((len(r["servers"]) for r in upstream), default=None)}, + "limits_reached": { + "generator_late": m["scheduler_late_slots"] / m["scheduled_slots"] > 0.05, + "client_capacity": (m["client_dropped_slots"] - m["scheduler_late_slots"]) / m["scheduled_slots"] > 0.05, + "request_errors": m["all"]["errors"] / max(m["all"]["attempted"], 1) > 0.01, + "latency": (m["all"]["successful_latency_ms"]["p95"] or 0) > 1000, + }, + } + + +def run_one(config, profile, rate, repeat, containers): + label = f"{profile}-r{rate}-repeat{repeat}" + directory = config.output / label + directory.mkdir(parents=True, exist_ok=False) + workers = [] + stop = f"/tmp/scaling-observer-{uuid.uuid4().hex}.stop" + observer = (ROOT / "scripts/diagnostics/observer.sh").read_bytes() + client_container = None + try: + for role in ("postgres", "nginx", "redis"): + output = (directory / f"{role}.jsonl").open("wb") + errors = (directory / f"{role}.stderr").open("wb") + child = subprocess.Popen(["docker", "exec", "-i", containers[role][0], + "sh", "-s", role, stop], cwd=ROOT, + stdin=subprocess.PIPE, stdout=output, stderr=errors) + workers.append((role, child, output, errors)) + child.stdin.write(observer) + child.stdin.close() + started = datetime.now(timezone.utc).isoformat() + target = directory / "benchmark.json" + args = ["node", "scripts/benchmark-scaling.mjs", "--base-url", config.base_url, + "--label", label, "--rate", str(rate), "--duration-seconds", str(config.duration_seconds), + "--warmup-seconds", str(config.warmup_seconds), "--seed-messages", "30", + "--expected-instances", str({"one": 1, "two": 2, "four": 4}[profile]), + "--output", str(target)] + if config.client == "container": + nginx = json.loads(command(["docker", "inspect", containers["nginx"][0]]))[0] + api = json.loads(command(["docker", "inspect", containers["api"][0]]))[0] + networks = set(nginx["NetworkSettings"]["Networks"]) & set(api["NetworkSettings"]["Networks"]) + if len(networks) != 1: + raise RuntimeError("expected one common API/nginx network") + client_container = "lab3-diagnostic-client-" + uuid.uuid4().hex + args[args.index("--base-url") + 1] = config.container_url + args[args.index("--output") + 1] = "/tmp/scaling-benchmark.json" + args[1] = "/benchmark.mjs" + args = ["docker", "run", "--name", client_container, "--no-healthcheck", + "--network", next(iter(networks)), + "-v", f"{ROOT / 'scripts/benchmark-scaling.mjs'}:/benchmark.mjs:ro", + "--entrypoint", "node", api["Image"], *args[1:]] + result = subprocess.run(args, cwd=ROOT, capture_output=True, text=True, + encoding="utf-8", errors="replace", + timeout=config.duration_seconds + config.warmup_seconds + 120) + (directory / "benchmark.stderr").write_text(result.stderr, encoding="utf-8") + if client_container is not None: + command(["docker", "cp", f"{client_container}:/tmp/scaling-benchmark.json", str(target)]) + if not target.exists(): + raise RuntimeError(f"{label}: benchmark did not produce results: {result.stderr}") + benchmark = json.loads(target.read_text(encoding="utf-8")) + for index, container in enumerate(containers["api"], 1): + command(["docker", "cp", f"{container}:/tmp/scaling-pool.jsonl", str(directory / f"api-{index}.jsonl")]) + ended = datetime.now(timezone.utc).isoformat() + # Docker puts nginx stderr notices on CLI stderr; collect both streams. + log_result = subprocess.run(["docker", "logs", "--timestamps", "--since", started, + "--until", ended, containers["nginx"][0]], cwd=ROOT, + capture_output=True, text=True, encoding="utf-8", errors="replace", timeout=30) + diagnostic_lines = [line for line in (log_result.stdout + log_result.stderr).splitlines() + if any(key in line for key in ("signal process started", "download timed out", + "no live upstreams", "upstream timed out"))] + (directory / "nginx-events.log").write_text("\n".join(diagnostic_lines), encoding="utf-8") + (directory / "execution.json").write_text(json.dumps({"returncode": result.returncode, + "started": started, "ended": ended, "command": args}, indent=2), encoding="utf-8") + finally: + if client_container is not None: + # Only the uniquely named disposable generator created by this run. + subprocess.run(["docker", "rm", "-f", client_container], cwd=ROOT, capture_output=True, timeout=30) + for role, child, output, errors in workers: + try: + command(["docker", "exec", containers[role][0], "touch", stop], timeout=15) + child.wait(timeout=15) + except (RuntimeError, subprocess.TimeoutExpired): + child.terminate() + child.wait(timeout=10) + output.close() + errors.close() + if role == "postgres": + command(["docker", "cp", f"{containers[role][0]}:{stop}.pg.jsonl", str(directory / "postgres-sql.jsonl")]) + command(["docker", "exec", containers[role][0], "rm", "-f", stop + ".pg.jsonl"]) + summary = summarize(directory, benchmark) + summary["diagnostics_complete"] = ( + len(summary["pools"]) == len(containers["api"]) + and summary["postgres"]["samples"] > 0 + and summary["nginx"]["samples"] > 0 + and all(v["samples"] > 0 for v in summary["resources"].values()) + ) + (directory / "summary.json").write_text(json.dumps(summary, indent=2) + "\n", encoding="utf-8") + if not summary["diagnostics_complete"]: + raise RuntimeError(f"{label}: diagnostics incomplete; inspect observer stderr files") + m = summary["measurement"] + print(f"DONE {label}: RPS={m['all']['successful_rps']} p95={m['all']['successful_latency_ms']['p95']}ms " + f"errors={m['all']['errors']} drops={m['client_dropped_slots']}/{m['scheduled_slots']} " + f"pool_wait_max={max((p['max_waiting'] for p in summary['pools'].values()), default=0)}", flush=True) + return summary + + +def main(): + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument("--base-url", default="http://127.0.0.1:18080") + parser.add_argument("--client", choices=("host", "container"), default="host") + parser.add_argument("--container-url", default="http://nginx") + parser.add_argument("--profiles", nargs="+", choices=("one", "two", "four"), default=["one", "two", "four"]) + parser.add_argument("--rates", nargs="+", type=int, default=[100], help="Scheduled requests/s (default: 100 only)") + parser.add_argument("--duration-seconds", type=int, default=60, help="Measured phase per run (default: 60 seconds)") + parser.add_argument("--warmup-seconds", type=int, default=15, help="Read-only warmup per run (default: 15 seconds)") + parser.add_argument("--repetitions", type=int, default=3) + parser.add_argument("--full-matrix", action="store_true", help="Run all requested rates; record threshold crossings instead of stopping a profile") + parser.add_argument("--output", type=Path, required=True) + config = parser.parse_args() + if config.repetitions < 1 or config.duration_seconds < 1 or config.warmup_seconds < 0 or any(r < 1 or r > 1000 for r in config.rates): + parser.error("invalid duration, repetitions or rates") + config.output = config.output.resolve() + config.output.mkdir(parents=True, exist_ok=False) + manifest = {"started": datetime.now(timezone.utc).isoformat(), "profiles": config.profiles, + "client": config.client, + "rates": config.rates, "duration_seconds": config.duration_seconds, + "warmup_seconds": config.warmup_seconds, "repetitions": config.repetitions, + "full_matrix": config.full_matrix, + "stop_rule": ("record only; continue all requested rates after >=2 repeats exceed thresholds: " if config.full_matrix + else "stop a profile after >=2 repeats at one rate exceed any threshold: ") + + "scheduler late >5%, capacity drops >5%, request errors >1%, success p95 >1000ms", + "sampling": "API queue every 100ms; API JSON/cgroup about 1s; other services and PG about 2s", + "observer_version": 3, + "source_sha256": {name: hashlib.sha256((ROOT/name).read_bytes()).hexdigest() for name in ( + "scripts/diagnostics/pool.cjs", "scripts/diagnostics/observer.sh", + "scripts/benchmark-scaling.mjs", "scripts/run-scaling-diagnostics.py")}, + "notes": ["All profiles use the same instrumentation; actual per-replica pool limits are recorded in containers.", + "A container client uses the nginx service directly; it shares Docker VM CPU and bypasses Windows port forwarding.", + "Acquisition latency includes opening new connections; it is not SQL execution time.", + "Observers consume resources inside the existing container budgets.", + "Instrumentation stores no tokens, passwords, message text or SQL parameters."], + "containers": {}, "environments": {}, "runs": [], "stopped_profiles": {}, "threshold_crossings": {}} + manifest_path = config.output / "manifest.json" + save = lambda: manifest_path.write_text(json.dumps(manifest, indent=2) + "\n", encoding="utf-8") + save() + try: + for profile in config.profiles: + print(f"SWITCH {profile}", flush=True) + command(compose(profile) + ["up", "-d", "--no-build", "--no-deps", "--wait", "--wait-timeout", "120", "api"]) + time.sleep(6) # Allow readiness's two successes and nginx reload to settle. + containers = {} + for role in ("api", "postgres", "nginx", "redis"): + containers[role] = command(compose(profile) + ["ps", "-q", role]).split() + if not containers[role]: + raise RuntimeError(f"no running {role}") + details = json.loads(command(["docker", "inspect", *[c for ids in containers.values() for c in ids]])) + running = [json.loads(line) for line in command(["docker", "ps", "--format", "{{json .}}"]).splitlines()] + manifest["environments"][profile] = { + "docker": json.loads(command(["docker", "info", "--format", + '{"cpus":{{.NCPU}},"memory_bytes":{{.MemTotal}},"version":{{json .ServerVersion}},"kernel":{{json .KernelVersion}}}'])), + "running_containers": [{"name": row.get("Names"), "image": row.get("Image")} for row in running], + } + manifest["containers"][profile] = [{"id": c["Id"], "name": c["Name"], "image": c["Image"], + "nano_cpus": c["HostConfig"]["NanoCpus"], "memory_bytes": c["HostConfig"]["Memory"], + "pool_max": next((e.split("=", 1)[1] for e in c["Config"]["Env"] if e.startswith("DB_POOL_MAX=")), None)} for c in details] + save() + for rate in config.rates: + batch = [] + for repeat in range(1, config.repetitions + 1): + print(f"START {profile} rate={rate} repeat={repeat}", flush=True) + summary = run_one(config, profile, rate, repeat, containers) + batch.append(summary) + manifest["runs"].append(summary["label"]) + save() + reasons = [key for key in batch[0]["limits_reached"] + if sum(r["limits_reached"][key] for r in batch) >= min(2, config.repetitions)] + if reasons: + manifest["threshold_crossings"].setdefault(profile, []).append({"rate": rate, "reasons": reasons}) + if not config.full_matrix: + manifest["stopped_profiles"][profile] = {"rate": rate, "reasons": reasons} + print(f"{'CONTINUE (full matrix)' if config.full_matrix else 'STOP'} {profile} at {rate}: {', '.join(reasons)}", flush=True) + save() + if not config.full_matrix: + break + finally: + print("RESTORE two (without diagnostic preload)", flush=True) + command(compose("two", diagnostics=False) + ["up", "-d", "--no-build", "--no-deps", "--wait", "--wait-timeout", "120", "api"]) + manifest["finished"] = datetime.now(timezone.utc).isoformat() + save() + + +if __name__ == "__main__": + main() diff --git a/scripts/saturation-mock.cjs b/scripts/saturation-mock.cjs new file mode 100644 index 00000000..e650094a --- /dev/null +++ b/scripts/saturation-mock.cjs @@ -0,0 +1,23 @@ +// Generator calibration only: no application or database state. +const http = require('node:http'); +const item = { id: '00000000-0000-4000-8000-000000000001', + chat_id: '00000000-0000-4000-8000-000000000002', + sender_id: '00000000-0000-4000-8000-000000000003', + text: 'Synthetic benchmark payload '.repeat(3), created_at: '2026-01-01T00:00:00.000Z' }; +const page = JSON.stringify({ items: Array.from({ length: 50 }, () => item), next_cursor: null }); +const keys = new Set(); +http.createServer(async (req, res) => { + for await (const chunk of req) { /* consume POST body */ } + if (req.method === 'POST') { + const key = req.headers['idempotency-key']; + if (!key || keys.has(key)) { + res.writeHead(409, { 'Content-Type': 'application/json', 'X-Instance-Id': 'calibration' }); + res.end(JSON.stringify({ error: 'calibration detected a repeated write key' })); + return; + } + keys.add(key); + } + res.writeHead(req.method === 'GET' ? 200 : 201, + { 'Content-Type': 'application/json', 'X-Instance-Id': 'calibration' }); + res.end(req.method === 'GET' ? page : JSON.stringify(item)); +}).listen(8080, '0.0.0.0'); diff --git a/scripts/saturation.k6.js b/scripts/saturation.k6.js new file mode 100644 index 00000000..6c2b6e29 --- /dev/null +++ b/scripts/saturation.k6.js @@ -0,0 +1,166 @@ +import http from 'k6/http'; +import encoding from 'k6/encoding'; +import execution from 'k6/execution'; +import { check, fail, sleep } from 'k6'; +import { Counter, Trend } from 'k6/metrics'; + +const base = __ENV.BASE_URL || 'http://nginx'; +const rate = Number(__ENV.RATE || 100); +const seconds = Number(__ENV.SECONDS || 30); +const warmup = Number(__ENV.WARMUP || 10); +const expected = Number(__ENV.EXPECTED || 1); +const calibration = __ENV.CALIBRATION === '1'; +const attempts = new Counter('bench_attempts'); +const successes = new Counter('bench_successes'); +const failures = new Counter('bench_failures'); +const latency = new Trend('bench_latency', true); +const successLatency = new Trend('bench_success_latency', true); +const epoch = new Trend('bench_start_epoch'); +const operations = Object.fromEntries(['read', 'write'].map((op) => [op, { + attempts: new Counter(`bench_${op}_attempts`), + successes: new Counter(`bench_${op}_successes`), + failures: new Counter(`bench_${op}_failures`), + latency: new Trend(`bench_${op}_latency`, true), +}])); +const statuses = Object.fromEntries(['200', '201', 'other', 'network'].map((key) => [key, new Counter(`bench_status_${key}`)])); + +const arrival = { executor: 'constant-arrival-rate', rate, timeUnit: '1s', + preAllocatedVUs: 128, maxVUs: 128 }; +export const options = { + scenarios: { + warmup: { ...arrival, exec: 'warmupLoad', duration: `${warmup}s`, gracefulStop: '5s' }, + measurement: { ...arrival, exec: 'default', startTime: `${warmup}s`, + duration: `${seconds}s`, gracefulStop: '10s' }, + }, + summaryTrendStats: ['min', 'med', 'avg', 'max', 'p(95)', 'p(99)'], + setupTimeout: '120s', +}; + +function request(method, path, token, body, key) { + const headers = { Accept: 'application/json' }; + if (token) headers.Authorization = token; + if (key) headers['Idempotency-Key'] = key; + if (body !== undefined) headers['Content-Type'] = 'application/json'; + return http.request(method, base + path, body === undefined ? null : JSON.stringify(body), { + headers, timeout: '5s', tags: { name: path.includes('/messages') ? 'messages' : 'setup' }, + }); +} + +function required(response, status, field) { + let data; + try { data = response.json(); } catch { fail(`setup: invalid JSON, status ${response.status}`); } + if (response.status !== status || !data?.[field]) fail(`setup: expected ${status}/${field}, got ${response.status}`); + return data; +} + +export function setup() { + const salt = `${Date.now().toString(36)}-${Math.floor(Math.random() * 1e9)}`; + let token = 'Bearer calibration'; + let path = '/messages'; + if (!calibration) { + const users = ['alice', 'bob'].map((label) => { + const username = `bench_${label}_${salt.replaceAll('-', '')}`; + const password = `T3st-${salt}-Aa1!`; + const user = required(request('POST', '/api/v1/users', null, + { username, display_name: `Benchmark ${label}`, password }), 201, 'id'); + const auth = `Basic ${encoding.b64encode(`${username}:${password}`)}`; + const session = required(request('POST', '/api/v1/auth/sessions', auth), 201, 'token'); + return { id: user.id, token: session.token }; + }); + token = `Bearer ${users[0].token}`; + const chat = required(request('POST', '/api/v1/chats', token, + { title: 'Saturation benchmark', member_ids: users.map((u) => u.id) }), 201, 'id'); + path = `/api/v1/chats/${chat.id}/messages`; + for (let i = 0; i < 30; i++) required(request('POST', path, token, + { text: `seed-${salt}-${i}` }, `seed-${salt}-${i}`), 201, 'id'); + } + const seen = new Set(); + const until = Date.now() + 20000; + do { + const response = request('GET', `${path}?limit=50`, token); + if (response.status !== 200) fail(`warmup status ${response.status}`); + const id = response.headers['X-Instance-Id']; + if (id) seen.add(id); + if (seen.size === expected) break; + sleep(0.02); + } while (Date.now() < until); + if (seen.size !== expected) fail(`warmup observed ${seen.size} instances, expected ${expected}`); + return { token, path, salt }; +} + +export function warmupLoad(data) { iteration(data, false); } +export default function (data) { iteration(data, true); } + +function iteration(data, measuring) { + if (measuring && execution.scenario.iterationInTest === 0) epoch.add(Date.now()); + const sequence = execution.scenario.iterationInTest; + const identity = `${execution.scenario.name}-${sequence}`; + const op = ((sequence * 37 + 17) % 100) < 80 ? 'read' : 'write'; + if (measuring) { attempts.add(1); operations[op].attempts.add(1); } + const response = op === 'read' + ? request('GET', `${data.path}?limit=50`, data.token) + : request('POST', data.path, data.token, { text: `bench-${identity}-${data.salt}` }, `${data.salt}-${identity}`); + if (!measuring) return; + let payload; + try { payload = response.json(); } catch { payload = null; } + const instance = response.headers['X-Instance-Id']; + const ok = response.status === (op === 'read' ? 200 : 201) && Boolean(instance) + && (op === 'read' ? Array.isArray(payload?.items) : Boolean(payload?.id)); + const elapsed = response.timings.duration + response.timings.blocked; + latency.add(elapsed); + successes.add(ok ? 1 : 0); + failures.add(ok ? 0 : 1); + operations[op].successes.add(ok ? 1 : 0); + operations[op].failures.add(ok ? 0 : 1); + if (ok) { successLatency.add(elapsed); operations[op].latency.add(elapsed); } + statuses[String(response.status)]?.add(1); + if (![200, 201].includes(response.status)) statuses[response.status === 0 ? 'network' : 'other'].add(1); + if (instance) check(response, { [`instance:${instance}`]: () => true }); +} + +export function handleSummary(data) { + const count = (name) => data.metrics[name]?.values.count || 0; + const times = (name) => ({ p50: data.metrics[name]?.values.med ?? null, + p95: data.metrics[name]?.values['p(95)'] ?? null, + p99: data.metrics[name]?.values['p(99)'] ?? null }); + const start = data.metrics.bench_start_epoch?.values.min; + const totalDropped = count('dropped_iterations'); + const dropped = Math.max(0, rate * seconds - count('bench_attempts')); + const instances = Object.fromEntries((data.root_group.checks || []).filter((c) => c.name.startsWith('instance:')) + .map((c) => [c.name.slice(9), c.passes])); + const group = (op) => { + const prefix = op === 'all' ? 'bench' : `bench_${op}`; + return { attempted: count(`${prefix}_attempts`), successful: count(`${prefix}_successes`), + errors: count(`${prefix}_failures`), successful_rps: count(`${prefix}_successes`) / seconds, + successful_latency_ms: times(op === 'all' ? 'bench_success_latency' : `${prefix}_latency`), + status_counts: {}, error_counts: {}, instance_counts: op === 'all' ? instances : {} }; + }; + const result = { + label: __ENV.LABEL, profile: { arrival_model: 'k6 constant-arrival-rate; one HTTP request per iteration', + offered_rps: rate, duration_seconds: seconds, warmup_seconds: warmup, warmup_profile: 'same 80/20 workload at target rate', + read_percent: 80, write_percent: 20, initial_messages: calibration ? 0 : 30, history_limit: 50, + max_in_flight: 128, timeout_ms: 5000, automatic_retries: false, expected_instances: expected, + phase: __ENV.PHASE || 'probe' }, + measurement: { scheduled_slots: rate * seconds, client_dropped_slots: dropped, + scheduler_late_slots: 0, read: group('read'), write: group('write'), all: group('all') }, + timing: { measurement_started_epoch_ms: start, + measurement_scheduled_end_epoch_ms: start + seconds * 1000, + measurement_completed_epoch_ms: Date.now() }, + client: { engine: 'k6', scheduler_lateness_measured: false, + raw_dropped_iterations_including_warmup: totalDropped, + peak_vus: data.metrics.vus?.values.max, max_vus: 128 }, + all_latency_ms: times('bench_latency'), raw_metrics: data.metrics, + notes: ['Setup and in-scenario mixed warmup excluded from custom bench metrics.', + 'Native warmup and measurement scenarios; no Date.now gating of measured requests.', + 'Latency uses native HTTP duration plus blocked time, not subtraction of wall-clock timestamps.', + 'Measurement missing slots are planned minus actual starts; raw k6 dropped iterations also include warmup.', + 'scheduler_late_slots is a compatibility placeholder, not a k6 measurement.', + 'Dropped iterations and actual delivered fraction must be checked.', + 'No credentials or message bodies are exported.'], + }; + result.measurement.all.status_counts = Object.fromEntries(['200', '201', 'other', 'network'] + .map((status) => [status, count(`bench_status_${status}`)])); + return { [__ENV.OUTPUT]: JSON.stringify(result, null, 2), + stdout: JSON.stringify({ label: result.label, attempted: result.measurement.all.attempted, + errors: result.measurement.all.errors, p95: result.all_latency_ms.p95, dropped }) + '\n' }; +} diff --git a/scripts/stop-one.cmd b/scripts/stop-one.cmd new file mode 100644 index 00000000..67a6d62e --- /dev/null +++ b/scripts/stop-one.cmd @@ -0,0 +1,18 @@ +@echo off +setlocal +cd /d "%~dp0.." +if not defined TARGET_INSTANCE_ID ( + echo TARGET_INSTANCE_ID is required 1>&2 + exit /b 2 +) +for /f "delims=" %%I in ('docker compose ps --all --quiet api') do ( + for /f "delims=" %%H in ('docker inspect --format "{{.Config.Hostname}}" %%I') do ( + if "%%H"=="%TARGET_INSTANCE_ID%" ( + docker stop --time 2 %%I >nul + if errorlevel 1 exit /b 1 + exit /b 0 + ) + ) +) +echo No API container matches X-Instance-Id 1>&2 +exit /b 2 diff --git a/scripts/stop-one.sh b/scripts/stop-one.sh new file mode 100755 index 00000000..4a0ecdd0 --- /dev/null +++ b/scripts/stop-one.sh @@ -0,0 +1,24 @@ +#!/bin/sh +set -eu + +project_dir=$(CDPATH= cd -- "$(dirname -- "$0")/.." && pwd) +cd "$project_dir" + +target=${TARGET_INSTANCE_ID:?test provides target API instance ID} + +containers=$(docker compose ps --all --quiet api) +if [ -z "$containers" ]; then + printf 'No API containers found\n' >&2 + exit 2 +fi +for entry in $(docker inspect --format '{{.Config.Hostname}}:{{.Id}}' $containers); do + instance=${entry%%:*} + container=${entry#*:} + if [ "$instance" = "$target" ]; then + docker stop --time 30 "$container" >/dev/null + exit 0 + fi +done + +printf 'No API container matches X-Instance-Id\n' >&2 +exit 2 diff --git a/scripts/summarize-scaling-diagnostics.py b/scripts/summarize-scaling-diagnostics.py new file mode 100644 index 00000000..65099f6a --- /dev/null +++ b/scripts/summarize-scaling-diagnostics.py @@ -0,0 +1,155 @@ +#!/usr/bin/env python3 +"""Create CSV and Markdown from completed diagnostic runs (can run during a sweep).""" +import argparse +import csv +import json +from pathlib import Path +import statistics +import importlib.util + + +def main(): + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument("directory", type=Path) + parser.add_argument("--refresh", action="store_true", help="Recompute summaries from raw records") + args = parser.parse_args() + manifest = json.loads((args.directory / "manifest.json").read_text(encoding="utf-8")) + results = [] + raw_summaries = [] + if args.refresh: + spec = importlib.util.spec_from_file_location("diagnostics", Path(__file__).with_name("run-scaling-diagnostics.py")) + diagnostics = importlib.util.module_from_spec(spec) + spec.loader.exec_module(diagnostics) + for label in manifest["runs"]: + path = args.directory / label / "summary.json" + if not path.exists(): + continue + s = json.loads(path.read_text(encoding="utf-8")) + if args.refresh: + benchmark = json.loads((path.parent / "benchmark.json").read_text(encoding="utf-8")) + refreshed = diagnostics.summarize(path.parent, benchmark) + refreshed["diagnostics_complete"] = s.get("diagnostics_complete", False) + s = refreshed + path.write_text(json.dumps(s, indent=2) + "\n", encoding="utf-8") + raw_summaries.append(s) + m, p, r = s["measurement"], s["pools"], s["resources"] + acquisitions = sum(v["acquisitions"] for v in p.values()) + results.append({ + "label": label, "replicas": s["profile"]["expected_instances"], + "configuration": next((profile for profile in manifest.get("profiles", []) + if label.startswith(profile + "-r")), str(s["profile"]["expected_instances"])), + "phase": s["profile"].get("phase", "measurement"), + "delivery_valid": s.get("criterion", {}).get("delivery_valid"), + "duration_seconds": s["profile"]["duration_seconds"], + "offered_rps": s["profile"]["offered_rps"], "successful_rps": m["all"]["successful_rps"], + "attempted_rps": m["all"]["attempted"] / s["profile"]["duration_seconds"], + "p50_ms": m["all"]["successful_latency_ms"]["p50"], + "p95_ms": m["all"]["successful_latency_ms"]["p95"], + "all_request_p95_ms": s.get("all_latency_ms", {}).get("p95"), + "p99_ms": m["all"]["successful_latency_ms"]["p99"], + "errors": m["all"]["errors"], "dropped": m["client_dropped_slots"], + "drop_percent": 100*m["client_dropped_slots"]/m["scheduled_slots"], + "late_percent": 100*m["scheduler_late_slots"]/m["scheduled_slots"], + "acquisition_mean_ms": sum(v["mean_acquisition_ms"]*v["acquisitions"] for v in p.values()) / max(acquisitions, 1), + "acquisition_max_ms": max((v["max_acquisition_ms"] for v in p.values()), default=0), + "pool_max_waiting": max((v["max_waiting"] for v in p.values()), default=0), + "pool_observed_connection_increases": sum(v.get("observed_connection_increases", 0) for v in p.values()), + "pool_observed_connection_decreases": sum(v.get("observed_connection_decreases", 0) for v in p.values()), + "api_cpu_cores": sum(v.get("mean_cpu_cores", 0) for k, v in r.items() if k.startswith("api-")), + "api_max_throttle_percent": 100*max((v.get("throttled_period_fraction", 0) for k, v in r.items() if k.startswith("api-")), default=0), + "pg_cpu_cores": r["postgres"].get("mean_cpu_cores"), + "pg_throttle_percent": 100*r["postgres"].get("throttled_period_fraction", 0), + "nginx_cpu_cores": r["nginx"].get("mean_cpu_cores"), + "redis_cpu_cores": r["redis"].get("mean_cpu_cores"), + "host_cpu_pressure_percent": 100*s.get("host", {}).get("cpu_some_fraction", 0) if s.get("host", {}).get("samples", 0) > 1 else None, + "host_memory_pressure_percent": 100*s.get("host", {}).get("memory_full_fraction", 0) if s.get("host", {}).get("samples", 0) > 1 else None, + "host_io_pressure_percent": 100*s.get("host", {}).get("io_full_fraction", 0) if s.get("host", {}).get("samples", 0) > 1 else None, + "host_min_available_mib": s.get("host", {}).get("min_available_mib"), + "host_max_swap_used_mib": s.get("host", {}).get("max_swap_used_mib"), + "pg_max_active": s["postgres"]["max_active"], + "pg_max_idle_tx": s["postgres"]["max_idle_in_transaction"], + "pg_active_wait_observations": json.dumps(s["postgres"]["active_wait_observations"], sort_keys=True), + "nginx_min_ready": s["nginx"]["min_ready"], "nginx_changes": s["nginx"]["upstream_changes"], + "min_resource_coverage_seconds": min(v.get("coverage_seconds", 0) for v in r.values()), + }) + if not results: + print("No completed runs yet") + return + with (args.directory / "results.csv").open("w", encoding="utf-8", newline="") as output: + writer = csv.DictWriter(output, fieldnames=results[0].keys()) + writer.writeheader() + writer.writerows(results) + pg_limits = next((c for containers in manifest.get("containers", {}).values() + for c in containers if "-postgres-" in c.get("name", "")), None) + pg_description = (f"PostgreSQL — {pg_limits['nano_cpus']/1e9:g} CPU/{pg_limits['memory_bytes']/1024**2:g} МиБ." + if pg_limits else "Лимиты PostgreSQL не записаны в manifest.") + pool_descriptions = [f"{profile}: " + "/".join(sorted({str(c['pool_max']) for c in containers + if "-api-" in c.get("name", "") and c.get("pool_max") is not None})) + for profile, containers in manifest.get("containers", {}).items()] + pool_description = "; ".join(pool_descriptions) or "см. manifest" + api_budgets = [] + for profile, containers in manifest.get("containers", {}).items(): + apis = [c for c in containers if "-api-" in c.get("name", "")] + if apis: + cpu = sum(c['nano_cpus'] for c in apis) / 1e9 + memory = sum(c['memory_bytes'] for c in apis) / 1024**2 + api_budgets.append(f"{profile}: {cpu:g} CPU/{memory:g} МиБ") + api_description = "; ".join(api_budgets) or "см. manifest" + probe_description = (f"Разведочные прогоны: {manifest['probe_duration_seconds']} с после " + f"{manifest['probe_warmup_seconds']} с прогрева. Указанная ниже длительность " + "относится к подтверждающим прогонам. " if "probe_duration_seconds" in manifest else "") + lines = ["# Диагностическая серия масштабирования", "", + probe_description + f"Завершено прогонов: {len(results)}. Длительность измерения — {manifest['duration_seconds']} с, " + f"прогрев — {manifest['warmup_seconds']} с. Пул на реплику — {pool_description}. Общий бюджет API — {api_description}; " + pg_description, "", + ("Клиент: Linux-контейнер через внутренний адрес Nginx; разделяет ресурсы Docker VM." if manifest.get("client") == "container" + else "Клиент: Windows-хост через опубликованный порт Nginx."), + f"Версия SQL-наблюдателя: {manifest.get('observer_version', '1/2, первоначальная серия')}. " + "Серия с версиями 1/2 имеет повышенные накладные расходы наблюдения; см. калибровку в итоговой интерпретации.", "", + "Методика и повторение: [scripts/diagnostics/README.md](../../../scripts/diagnostics/README.md). " + "Исходные HTTP-данные, временные ряды и summary каждого прогона находятся в его подкаталоге. " + "Полная таблица метрик: [results.csv](results.csv). Все настройки и причины остановки нагрузки: [manifest.json](manifest.json).", "", + "Показатели ниже — результаты каждого прогона. CPU выражен в долях одного ядра; " + "throttle — доля периодов CPU, в которых cgroup ограничивала выполнение. Получение соединения " + "включает установку новых соединений и задержки event loop. Очередь наблюдалась каждые 100 мс. " + "Наблюдатели имеют собственные накладные расходы; результаты не являются ненаблюдаемой максимальной ёмкостью API.", "", + "| Прогон | Успешные RPS | p95, мс | Ошибки | Пропуски, % | Пул: среднее / max, мс | Max очередь | CPU API / PG | Throttle API max / PG, % | Upstream min / изменений |", + "| --- | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: |"] + for r in results: + lines.append(f"| [{r['label']}]({r['label']}/summary.json) | {r['successful_rps']:.2f} | " + f"{r['p95_ms']:.0f} | {r['errors']} | {r['drop_percent']:.1f} | " + f"{r['acquisition_mean_ms']:.2f} / {r['acquisition_max_ms']:.0f} | {r['pool_max_waiting']} | " + f"{r['api_cpu_cores']:.2f} / {r['pg_cpu_cores'] or 0:.2f} | " + f"{r['api_max_throttle_percent']:.1f} / {r['pg_throttle_percent']:.1f} | " + f"{r['nginx_min_ready']} / {r['nginx_changes']} |") + lines += ["", "## Повторы на одном уровне нагрузки", "", + "Здесь показаны медианы результатов отдельных прогонов. Медиана p95 не является p95 объединённых запросов.", "", + "| Профиль | Задано RPS | Повторов | Медиана отправленных RPS | Медиана успешных RPS | Медиана p95, мс | Всего ошибок | Медиана пропусков, % |", + "| --- | ---: | ---: | ---: | ---: | ---: | ---: | ---: |"] + for key in sorted({(r["configuration"], r["offered_rps"]) for r in results}): + group = [r for r in results if (r["configuration"], r["offered_rps"]) == key] + lines.append(f"| {key[0]} | {key[1]} | {len(group)} | " + f"{statistics.median(r['attempted_rps'] for r in group):.2f} | " + f"{statistics.median(r['successful_rps'] for r in group):.2f} | " + f"{statistics.median(r['p95_ms'] for r in group):.0f} | " + f"{sum(r['errors'] for r in group)} | " + f"{statistics.median(r['drop_percent'] for r in group):.1f} |") + lines += ["", "## Границы серии", ""] + for profile, stop in manifest["stopped_profiles"].items(): + lines.append(f"- {profile}: повышение остановлено после {stop['rate']} запросов/с: {', '.join(stop['reasons'])}.") + if manifest.get("full_matrix"): + lines.append("Режим полной матрицы: превышения порогов не останавливают повышение нагрузки; все перечисленные точки запланированы к выполнению.") + for profile, crossings in manifest.get("threshold_crossings", {}).items(): + for crossing in crossings: + lines.append(f"- {profile}, {crossing['rate']} запросов/с: {', '.join(crossing['reasons'])}.") + lines += ["", "Превышение порога задержки или пропусков не доказывает насыщение конкретного компонента. " + "Для интерпретации необходимо сопоставить очередь пула, ограничения CPU, ожидания PostgreSQL и изменения upstream. " + "SQL-тексты, токены и пароли в этой серии не сохраняются.", ""] + if (args.directory / "findings.md").exists(): + lines += ["## Итоговая интерпретация", "", + "[Выводы и графики](findings.md). Проверка полноты серии: [audit.json](audit.json).", ""] + (args.directory / "README.md").write_text("\n".join(lines), encoding="utf-8") + print(f"Wrote {len(results)} runs to {args.directory / 'results.csv'}") + + +if __name__ == "__main__": + main() diff --git a/scripts/test-persistence.py b/scripts/test-persistence.py new file mode 100644 index 00000000..e55872fd --- /dev/null +++ b/scripts/test-persistence.py @@ -0,0 +1,101 @@ +#!/usr/bin/env python3 +import argparse +import datetime as dt +import json +import os +from pathlib import Path +import subprocess +import sys +import time + +ROOT = Path(__file__).resolve().parents[1] +SERVICES = {'backend', 'postgres', 'redis'} + + +def snapshot(): + ids = subprocess.check_output( + ['docker', 'compose', 'ps', '--all', '--quiet', *sorted(SERVICES)], + cwd=ROOT, text=True, timeout=30, + ).split() + if len(ids) != len(SERVICES): + raise RuntimeError('Start backend, postgres and redis before this test') + template = ( + '{"service":{{json (index .Config.Labels "com.docker.compose.service")}},' + '"id":{{json .Id}},"started_at":{{json .State.StartedAt}},' + '"running":{{json .State.Running}},"mounts":{{json .Mounts}}}' + ) + output = subprocess.check_output( + ['docker', 'inspect', '--format', template, *ids], + cwd=ROOT, text=True, timeout=30, + ) + result = {} + for line in output.splitlines(): + entry = json.loads(line) + service = entry.pop('service') + entry['volumes'] = [ + {'name': mount['Name'], 'destination': mount['Destination']} + for mount in entry.pop('mounts') if mount['Type'] == 'volume' + ] + result[service] = entry + if set(result) != SERVICES or not all(v['running'] for v in result.values()): + raise RuntimeError('All three services must be running') + return result + + +def main(): + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument('--base-url', default=os.getenv('BASE_URL', 'http://localhost:8080')) + parser.add_argument('--ca-file') + parser.add_argument('--scenario', choices=['public', 'full-restart'], default='public') + parser.add_argument('--output', type=Path, default=ROOT / 'evidence' / 'persistence.json') + args = parser.parse_args() + before = snapshot() + hook = ROOT / 'scripts' / ('restart.cmd' if os.name == 'nt' else 'restart.sh') + if args.scenario == 'public': + command = [sys.executable, '-X', 'utf8', str(ROOT / 'tests' / 'resilience.py'), '--mode', 'persistence'] + else: + command = [sys.executable, '-X', 'utf8', str(ROOT / 'test' / 'full-restart.py')] + command += ['--action-script', str(hook), '--base-url', args.base_url] + if args.ca_file: + command += ['--ca-file', args.ca_file] + started = time.monotonic() + proc = subprocess.run(command, cwd=ROOT, text=True, encoding='utf-8', capture_output=True) + print(proc.stdout, end='') + print(proc.stderr, end='', file=sys.stderr) + if proc.returncode: + args.output.parent.mkdir(parents=True, exist_ok=True) + args.output.write_text(json.dumps({ + 'recorded_at': dt.datetime.now(dt.timezone.utc).isoformat(), + 'scenario': args.scenario, + 'command': f'python scripts/test-persistence.py --scenario {args.scenario} --base-url {args.base_url}', + 'hook': hook.relative_to(ROOT).as_posix(), + 'result': 'FAIL', 'exit_code': proc.returncode, + 'test_output': proc.stdout.strip(), 'test_error': proc.stderr.strip(), + 'before': before, + }, ensure_ascii=False, indent=2) + '\n', encoding='utf-8') + return proc.returncode + after = snapshot() + for service in sorted(SERVICES): + old, new = before[service], after[service] + if old['id'] != new['id'] or old['started_at'] == new['started_at']: + raise RuntimeError(f'{service}: expected a restart of the same container') + if not old['volumes'] or old['volumes'] != new['volumes']: + raise RuntimeError(f'{service}: persistent volumes changed or are missing') + evidence = { + 'recorded_at': dt.datetime.now(dt.timezone.utc).isoformat(), + 'scenario': args.scenario, + 'command': f'python scripts/test-persistence.py --scenario {args.scenario} --base-url {args.base_url}', + 'hook': hook.relative_to(ROOT).as_posix(), + 'elapsed_seconds': round(time.monotonic() - started, 3), + 'result': 'PASS', 'test_output': proc.stdout.strip(), + 'before': before, 'after': after, + } + args.output.parent.mkdir(parents=True, exist_ok=True) + args.output.write_text(json.dumps(evidence, ensure_ascii=False, indent=2) + '\n', encoding='utf-8') + print('PASS: backend, postgres and redis restarted; named volumes preserved.') + print(f'Evidence: {args.output}') + return 0 + + +if __name__ == '__main__': + sys.exit(main()) diff --git a/src/Auth/auth.controller.ts b/src/Auth/auth.controller.ts new file mode 100644 index 00000000..03123c06 --- /dev/null +++ b/src/Auth/auth.controller.ts @@ -0,0 +1,69 @@ +import { + Body, + Controller, + Delete, + HttpCode, + HttpStatus, + Post, + Req, + UseGuards, +} from '@nestjs/common'; +import { + ApiBasicAuth, + ApiBearerAuth, + ApiCreatedResponse, + ApiNoContentResponse, + ApiOperation, + ApiTags, + ApiUnauthorizedResponse, +} from '@nestjs/swagger'; +import { UserGuard, type AuthenticatedRequest } from '../User/user.guard'; +import { AuthService } from './auth.service'; +import { Session } from './auth.schema'; + +@ApiTags('auth') +@Controller('api/v1/auth/sessions') +export class AuthController { + constructor(private readonly auth: AuthService) {} + + @Post() + @HttpCode(HttpStatus.CREATED) + @ApiBasicAuth('basicAuth') + @ApiOperation({ + operationId: 'createSession', + summary: 'Вход', + }) + @ApiCreatedResponse({ type: Session }) + @ApiUnauthorizedResponse({ + headers: { + 'WWW-Authenticate': { + schema: { type: 'string' }, + example: 'Basic realm="messenger", charset="UTF-8"', + }, + }, + }) + create(@Req() request: AuthenticatedRequest, @Body() body: unknown) { + return this.auth.login(request.headers.authorization, body); + } + + @Delete('current') + @HttpCode(HttpStatus.NO_CONTENT) + @UseGuards(UserGuard) + @ApiBearerAuth('bearerAuth') + @ApiOperation({ + operationId: 'revokeSession', + summary: 'Отзыв текущей сессии', + }) + @ApiNoContentResponse() + @ApiUnauthorizedResponse({ + headers: { + 'WWW-Authenticate': { + schema: { type: 'string' }, + example: 'Bearer realm="messenger"', + }, + }, + }) + logout(@Req() request: AuthenticatedRequest) { + return this.auth.logout(request.currentSessionId); + } +} diff --git a/src/Auth/auth.exception.ts b/src/Auth/auth.exception.ts new file mode 100644 index 00000000..e7cc4561 --- /dev/null +++ b/src/Auth/auth.exception.ts @@ -0,0 +1,18 @@ +import { HttpStatus } from '@nestjs/common'; +import { ApiException } from '../common/exceptions/api.exception'; + +export class AuthException extends ApiException { + readonly challenge: string; + + constructor(scheme: 'Basic' | 'Bearer') { + super( + HttpStatus.UNAUTHORIZED, + 'unauthorized', + 'Требуется действительная аутентификация', + ); + this.challenge = + scheme === 'Basic' + ? 'Basic realm="messenger", charset="UTF-8"' + : 'Bearer realm="messenger"'; + } +} diff --git a/src/Auth/auth.schema.ts b/src/Auth/auth.schema.ts new file mode 100644 index 00000000..394f637f --- /dev/null +++ b/src/Auth/auth.schema.ts @@ -0,0 +1,15 @@ +import { ApiProperty } from '@nestjs/swagger'; +import { User } from '../User/user.schema'; + +export class Session { + token!: string; + + @ApiProperty({ enum: ['Bearer'] }) + token_type!: 'Bearer'; + + @ApiProperty({ format: 'date-time' }) + expires_at!: string; + + @ApiProperty({ type: User }) + user!: User; +} diff --git a/src/Auth/auth.service.ts b/src/Auth/auth.service.ts new file mode 100644 index 00000000..2c9ae88f --- /dev/null +++ b/src/Auth/auth.service.ts @@ -0,0 +1,182 @@ +import { Injectable } from '@nestjs/common'; +import { createHash, randomBytes } from 'node:crypto'; +import { TextDecoder } from 'node:util'; +import { PrismaService } from '../prisma/prisma.service'; +import { Prisma } from '../generated/prisma/client'; +import { UserService } from '../User/user.service'; +import type { User } from '../User/user.schema'; +import { invalidRequest, uuid, uuidPattern } from '../common/validation'; +import { ApiException } from '../common/exceptions/api.exception'; +import { AuthException } from './auth.exception'; +import { PasswordService, validPassword } from './password.service'; +import type { Session } from './auth.schema'; + +export interface ChatAccess { + chatId: string; + userId: string; + messagesEpoch: string; +} + +@Injectable() +export class AuthService { + private readonly ttlSeconds: number; + + constructor( + private readonly prisma: PrismaService, + private readonly users: UserService, + private readonly passwords: PasswordService, + ) { + this.ttlSeconds = Number(process.env.SESSION_TTL_SECONDS ?? 3600); + if ( + !Number.isSafeInteger(this.ttlSeconds) || + this.ttlSeconds <= 0 || + Number.isNaN(new Date(Date.now() + this.ttlSeconds * 1000).getTime()) + ) { + throw new Error( + 'SESSION_TTL_SECONDS must be a positive integer representing a valid expiry', + ); + } + } + + async login(authorization: unknown, body: unknown): Promise { + const { username, password } = this.basicCredentials(authorization); + const user = await this.prisma.user.findUnique({ where: { username } }); + const verified = await this.passwords.verify( + password, + user?.passwordHash ?? null, + ); + if (!user || !verified) throw new AuthException('Basic'); + if (body !== undefined) + return invalidRequest('Вход через Basic не принимает тело запроса'); + const token = randomBytes(32).toString('base64url'); + const session = await this.prisma.session.create({ + data: { + userId: user.id, + tokenHash: this.tokenHash(token), + expiresAt: new Date(Date.now() + this.ttlSeconds * 1000), + }, + }); + return { + token, + token_type: 'Bearer', + expires_at: session.expiresAt.toISOString(), + user: this.users.serialize(user), + }; + } + + async authenticate( + authorization: unknown, + chatId?: unknown, + ): Promise<{ + user: User; + sessionId: string; + chatsEpoch: string; + chatAccess?: ChatAccess; + }> { + const match = + typeof authorization === 'string' && + /^Bearer +([A-Za-z0-9_-]{43})$/i.exec(authorization); + if (!match) throw new AuthException('Bearer'); + const requestedChat = + typeof chatId === 'string' && uuidPattern.test(chatId) + ? chatId.toLowerCase() + : null; + const [session] = await this.prisma.$queryRaw< + { + id: string; + userId: string; + username: string; + displayName: string; + createdAt: Date; + chatsEpoch: bigint; + chatId: string | null; + messagesEpoch: bigint | null; + }[] + >(Prisma.sql` + SELECT s.id, s.user_id AS "userId", u.chats_epoch AS "chatsEpoch", + u.username, u.display_name AS "displayName", u.created_at AS "createdAt", + ${ + chatId === undefined + ? Prisma.sql`NULL::uuid AS "chatId", NULL::bigint AS "messagesEpoch"` + : Prisma.sql`c.id AS "chatId", COALESCE((SELECT SUM(e.epoch) FROM "public"."chat_message_epochs" AS e WHERE e.chat_id = c.id), 0)::bigint AS "messagesEpoch"` + } + FROM sessions AS s + JOIN users AS u ON u.id = s.user_id + ${ + chatId === undefined + ? Prisma.empty + : Prisma.sql` + LEFT JOIN chat_members AS cm + ON cm.user_id = s.user_id AND cm.chat_id = ${requestedChat}::uuid + LEFT JOIN chats AS c ON c.id = cm.chat_id + ` + } + WHERE s.token_hash = ${this.tokenHash(match[1])} + AND s.revoked_at IS NULL AND s.expires_at > ${new Date()} + LIMIT 1 + `); + if (!session) throw new AuthException('Bearer'); + if (chatId !== undefined) { + uuid(chatId, 'chat_id'); + if (session.chatId === null || session.messagesEpoch === null) + throw new ApiException(404, 'not_found', 'Объект не найден'); + } + return { + user: this.users.serialize({ ...session, id: session.userId }), + sessionId: session.id, + chatsEpoch: session.chatsEpoch.toString(), + chatAccess: + session.chatId !== null && session.messagesEpoch !== null + ? { + chatId: session.chatId, + userId: session.userId, + messagesEpoch: session.messagesEpoch.toString(), + } + : undefined, + }; + } + + async logout(sessionId: string): Promise { + const now = new Date(); + const result = await this.prisma.session.updateMany({ + where: { id: sessionId, revokedAt: null, expiresAt: { gt: now } }, + data: { revokedAt: now }, + }); + if (result.count !== 1) throw new AuthException('Bearer'); + } + + private tokenHash(token: string): string { + return createHash('sha256').update(token).digest('hex'); + } + + private basicCredentials(authorization: unknown): { + username: string; + password: string; + } { + const match = + typeof authorization === 'string' && + /^Basic +([A-Za-z0-9+/]+={0,2})$/i.exec(authorization); + if (!match) throw new AuthException('Basic'); + try { + const bytes = Buffer.from(match[1], 'base64'); + if ( + bytes.toString('base64').replace(/=+$/, '') !== + match[1].replace(/=+$/, '') + ) + throw new AuthException('Basic'); + const value = new TextDecoder('utf-8', { fatal: true }).decode(bytes); + const colon = value.indexOf(':'); + const username = value.slice(0, colon); + const password = value.slice(colon + 1); + if ( + colon < 0 || + !/^[a-z0-9_]{3,32}$/.test(username) || + !validPassword(password) + ) + throw new AuthException('Basic'); + return { username, password }; + } catch { + throw new AuthException('Basic'); + } + } +} diff --git a/src/Auth/password.service.ts b/src/Auth/password.service.ts new file mode 100644 index 00000000..b1428fd6 --- /dev/null +++ b/src/Auth/password.service.ts @@ -0,0 +1,72 @@ +import { Injectable } from '@nestjs/common'; +import { argon2, randomBytes, timingSafeEqual } from 'node:crypto'; +import { invalidRequest } from '../common/validation'; + +const argonParameters = { + memory: 19456, + passes: 2, + parallelism: 1, + tagLength: 32, +}; +const argonPrefix = '$argon2id$v=19$m=19456,t=2,p=1'; + +function decodeBase64(value: string, length: number) { + const decoded = Buffer.from(value, 'base64'); + return decoded.length === length && + decoded.toString('base64').replace(/=+$/, '') === value + ? decoded + : undefined; +} + +function argonHash(value: string | null) { + const parts = value?.split('$'); + if (parts?.length !== 6 || parts.slice(0, 4).join('$') !== argonPrefix) + return undefined; + const salt = decodeBase64(parts[4], 16); + const key = decodeBase64(parts[5], 32); + return salt && key ? { salt, key } : undefined; +} + +export function validPassword(value: unknown): value is string { + if (typeof value !== 'string' || value.trim().length === 0) return false; + const length = Array.from(value).length; + return length >= 12 && length <= 128; +} + +export function registrationPassword(value: unknown): string { + if (!validPassword(value)) + return invalidRequest('Пароль должен содержать 12–128 Unicode-символов'); + return value; +} + +@Injectable() +export class PasswordService { + async hash(password: string): Promise { + const salt = randomBytes(16); + const key = await this.deriveArgon(password, salt); + return `${argonPrefix}$${salt.toString('base64').replace(/=+$/, '')}$${key.toString('base64').replace(/=+$/, '')}`; + } + + async verify(password: string, storedHash: string | null): Promise { + const stored = argonHash(storedHash); + const key = await this.deriveArgon( + password, + stored?.salt ?? Buffer.alloc(16), + ); + const matches = timingSafeEqual(key, stored?.key ?? Buffer.alloc(32)); + return Boolean(stored && matches); + } + + private deriveArgon(password: string, salt: Buffer): Promise { + return new Promise((resolve, reject) => { + argon2( + 'argon2id', + { ...argonParameters, message: password, nonce: salt }, + (error, key) => { + if (error) reject(error); + else resolve(key); + }, + ); + }); + } +} diff --git a/src/Chat/chat.controller.ts b/src/Chat/chat.controller.ts new file mode 100644 index 00000000..17baa304 --- /dev/null +++ b/src/Chat/chat.controller.ts @@ -0,0 +1,132 @@ +import { + Body, + Controller, + Get, + Headers, + HttpCode, + HttpStatus, + Param, + Post, + Query, + Req, + UseGuards, +} from '@nestjs/common'; +import { + ApiBody, + ApiBearerAuth, + ApiCreatedResponse, + ApiHeader, + ApiOkResponse, + ApiOperation, + ApiQuery, + ApiTags, +} from '@nestjs/swagger'; +import { UserGuard, type AuthenticatedRequest } from '../User/user.guard'; +import { + CreateChatDto, + CreateMessageDto, + Chat, + Message, + ChatPage, + MessagePage, +} from './chat.schema'; +import { ChatService } from './chat.service'; + +@ApiTags('chats') +@ApiBearerAuth('bearerAuth') +@UseGuards(UserGuard) +@Controller('api/v1/chats') +export class ChatController { + constructor(private readonly chats: ChatService) {} + + @Post() + @HttpCode(HttpStatus.CREATED) + @ApiBody({ type: CreateChatDto }) + @ApiOperation({ operationId: 'createChat' }) + @ApiCreatedResponse({ type: Chat }) + create(@Req() request: AuthenticatedRequest, @Body() body: unknown) { + return this.chats.create(body, request.currentUser.id); + } + + @Get() + @ApiOperation({ operationId: 'listChats' }) + @ApiOkResponse({ type: ChatPage }) + @ApiQuery({ + name: 'limit', + required: false, + schema: { type: 'integer', minimum: 1, maximum: 100, default: 50 }, + }) + @ApiQuery({ name: 'cursor', required: false, type: String }) + list( + @Req() request: AuthenticatedRequest, + @Query('limit') limit: unknown, + @Query('cursor') cursor: unknown, + ) { + return this.chats.list( + request.currentUser.id, + limit, + cursor, + request.currentChatsEpoch, + ); + } + + @Get(':chat_id') + @ApiOperation({ operationId: 'getChat' }) + @ApiOkResponse({ type: Chat }) + get(@Req() request: AuthenticatedRequest, @Param('chat_id') chatId: string) { + return this.chats.get(chatId, request.currentUser.id); + } + + @Post(':chat_id/messages') + @HttpCode(HttpStatus.CREATED) + @ApiBody({ type: CreateMessageDto }) + @ApiHeader({ + name: 'Idempotency-Key', + required: true, + schema: { + type: 'string', + minLength: 1, + maxLength: 128, + pattern: '^[A-Za-z0-9._:-]+$', + }, + }) + @ApiOperation({ operationId: 'createMessage' }) + @ApiCreatedResponse({ type: Message }) + createMessage( + @Req() request: AuthenticatedRequest, + @Param('chat_id') chatId: string, + @Headers('idempotency-key') idempotencyKey: unknown, + @Body() body: unknown, + ) { + return this.chats.createMessage( + chatId, + body, + request.currentUser.id, + idempotencyKey, + ); + } + + @Get(':chat_id/messages') + @ApiOperation({ operationId: 'listMessages' }) + @ApiOkResponse({ type: MessagePage }) + @ApiQuery({ + name: 'limit', + required: false, + schema: { type: 'integer', minimum: 1, maximum: 100, default: 50 }, + }) + @ApiQuery({ name: 'cursor', required: false, type: String }) + listMessages( + @Req() request: AuthenticatedRequest, + @Param('chat_id') chatId: string, + @Query('limit') limit: unknown, + @Query('cursor') cursor: unknown, + ) { + return this.chats.listMessages( + chatId, + request.currentUser.id, + limit, + cursor, + request.currentChatAccess, + ); + } +} diff --git a/src/Chat/chat.module.ts b/src/Chat/chat.module.ts new file mode 100644 index 00000000..ff1053ba --- /dev/null +++ b/src/Chat/chat.module.ts @@ -0,0 +1,11 @@ +import { Module } from '@nestjs/common'; +import { UserModule } from '../User/user.module'; +import { ChatController } from './chat.controller'; +import { ChatService } from './chat.service'; + +@Module({ + imports: [UserModule], + controllers: [ChatController], + providers: [ChatService], +}) +export class ChatModule {} diff --git a/src/Chat/chat.schema.ts b/src/Chat/chat.schema.ts new file mode 100644 index 00000000..de1eea53 --- /dev/null +++ b/src/Chat/chat.schema.ts @@ -0,0 +1,57 @@ +import { ApiProperty } from '@nestjs/swagger'; + +export class CreateChatDto { + @ApiProperty({ example: 'Проект по ВНП', maxLength: 100 }) + title!: string; + + @ApiProperty({ type: [String], format: 'uuid' }) + member_ids!: string[]; +} + +export class CreateMessageDto { + @ApiProperty({ example: 'Привет, Боб!', maxLength: 4000 }) + text!: string; +} + +export class Chat { + @ApiProperty({ format: 'uuid' }) + id!: string; + @ApiProperty({ maxLength: 100 }) + title!: string; + @ApiProperty({ type: [String], format: 'uuid' }) + member_ids!: string[]; + @ApiProperty({ format: 'date-time' }) + created_at!: string; +} + +export class Message { + @ApiProperty({ format: 'uuid' }) + id!: string; + @ApiProperty({ format: 'uuid' }) + chat_id!: string; + @ApiProperty({ format: 'uuid' }) + sender_id!: string; + @ApiProperty({ maxLength: 4000 }) + text!: string; + @ApiProperty({ format: 'date-time' }) + created_at!: string; +} + +export class ChatPage { + @ApiProperty({ type: [Chat] }) + items!: Chat[]; + @ApiProperty({ type: String, nullable: true }) + next_cursor!: string | null; +} + +export class MessagePage { + @ApiProperty({ type: [Message] }) + items!: Message[]; + @ApiProperty({ type: String, nullable: true }) + next_cursor!: string | null; +} + +export interface Page { + items: T[]; + next_cursor: string | null; +} diff --git a/src/Chat/chat.service.ts b/src/Chat/chat.service.ts new file mode 100644 index 00000000..0498f909 --- /dev/null +++ b/src/Chat/chat.service.ts @@ -0,0 +1,399 @@ +import { HttpStatus, Injectable } from '@nestjs/common'; +import { randomUUID } from 'node:crypto'; +import type { ChatAccess } from '../Auth/auth.service'; +import { + Prisma, + type Message as StoredMessage, +} from '../generated/prisma/client'; +import { PrismaService } from '../prisma/prisma.service'; +import { ApiException } from '../common/exceptions/api.exception'; +import { + invalidRequest, + objectBody, + pageLimit, + requiredText, + uuid, +} from '../common/validation'; +import type { Chat, Message, Page } from './chat.schema'; +import { CacheService, CACHE_TTL } from '../cache/cache.service'; + +interface Cursor { + scope: string; + created_at: string; + id: string; +} + +const chatInclude = { + members: { orderBy: { position: 'asc' as const } }, +} satisfies Prisma.ChatInclude; +type StoredChat = Prisma.ChatGetPayload<{ include: typeof chatInclude }>; + +@Injectable() +export class ChatService { + private readonly idempotencyTtlSeconds: number; + + constructor( + private readonly prisma: PrismaService, + private readonly cache: CacheService, + ) { + this.idempotencyTtlSeconds = Number( + process.env.IDEMPOTENCY_TTL_SECONDS ?? 86400, + ); + if ( + !Number.isSafeInteger(this.idempotencyTtlSeconds) || + this.idempotencyTtlSeconds < 86400 || + Number.isNaN( + new Date(Date.now() + this.idempotencyTtlSeconds * 1000).getTime(), + ) + ) { + throw new Error('IDEMPOTENCY_TTL_SECONDS must be at least 86400'); + } + } + + async create(value: unknown, userId: string): Promise { + const body = objectBody(value, ['title', 'member_ids']); + const title = requiredText(body.title, 'title', 100); + if ( + !Array.isArray(body.member_ids) || + body.member_ids.length < 1 || + body.member_ids.length > 100 + ) { + return invalidRequest('Некорректный member_ids'); + } + const memberIds = body.member_ids.map((id: unknown) => + uuid(id, 'member_ids'), + ); + if ( + new Set(memberIds).size !== memberIds.length || + !memberIds.includes(userId) + ) { + return invalidRequest( + 'Список участников содержит дубликат или не содержит вызывающего', + ); + } + try { + const chat = await this.prisma.$transaction(async (tx) => { + const count = await tx.user.count({ where: { id: { in: memberIds } } }); + if (count !== memberIds.length) + return invalidRequest('Неизвестный участник чата'); + const created = await tx.chat.create({ + data: { + title, + members: { + create: memberIds.map((userId, position) => ({ + userId, + position, + })), + }, + }, + include: chatInclude, + }); + await tx.$executeRaw(Prisma.sql` + WITH locked AS MATERIALIZED ( + SELECT id FROM users + WHERE id IN (${Prisma.join(memberIds.map((id) => Prisma.sql`${id}::uuid`))}) + ORDER BY id FOR UPDATE + ) + UPDATE users AS u SET chats_epoch = u.chats_epoch + 1 + FROM locked WHERE u.id = locked.id + `); + return created; + }); + return this.serializeChat(chat); + } catch (error) { + if ( + error instanceof Prisma.PrismaClientKnownRequestError && + error.code === 'P2003' + ) { + return invalidRequest('Неизвестный участник чата'); + } + throw error; + } + } + + async list( + userId: string, + limitValue: unknown, + cursorValue: unknown, + epoch: string, + ): Promise> { + const limit = pageLimit(limitValue); + const scope = `chats:${userId}`; + const cursor = this.decodeCursor(cursorValue, scope); + return this.cache.remember( + scope, + { limit, cursor }, + CACHE_TTL.page, + async () => { + const chats = await this.prisma.chat.findMany({ + where: { members: { some: { userId } }, ...this.after(cursor) }, + include: chatInclude, + orderBy: [{ createdAt: 'asc' }, { id: 'asc' }], + take: limit + 1, + }); + return this.page( + chats.map((chat) => this.serializeChat(chat)), + limit, + scope, + ); + }, + epoch, + ); + } + + async get(value: unknown, userId: string): Promise { + const { id } = await this.authorizeChat(value, userId); + return this.getMetadata(id); + } + + private async authorizeChat(value: unknown, userId: string) { + const id = uuid(value, 'chat_id'); + const [membership] = await this.prisma.$queryRaw< + { id: string; messagesEpoch: bigint }[] + >(Prisma.sql` + SELECT c.id, COALESCE((SELECT SUM(e.epoch) FROM "public"."chat_message_epochs" AS e WHERE e.chat_id = c.id), 0)::bigint AS "messagesEpoch" + FROM chat_members AS cm JOIN chats AS c ON c.id = cm.chat_id + WHERE cm.chat_id = ${id}::uuid AND cm.user_id = ${userId}::uuid + `); + if (!membership) { + throw new ApiException( + HttpStatus.NOT_FOUND, + 'not_found', + 'Объект не найден', + ); + } + return membership; + } + + private getMetadata(id: string): Promise { + return this.cache.remember( + `chat:${id}`, + 'metadata', + CACHE_TTL.entity, + async () => { + const chat = await this.prisma.chat.findUnique({ + where: { id }, + include: chatInclude, + }); + if (!chat) + throw new ApiException( + HttpStatus.NOT_FOUND, + 'not_found', + 'Объект не найден', + ); + return this.serializeChat(chat); + }, + ); + } + + async createMessage( + chatId: unknown, + value: unknown, + userId: string, + keyValue: unknown, + ): Promise { + const id = uuid(chatId, 'chat_id'); + if ( + typeof keyValue !== 'string' || + !/^[A-Za-z0-9._:-]{1,128}$/.test(keyValue) + ) { + return invalidRequest('Некорректный Idempotency-Key'); + } + const body = objectBody(value, ['text']); + const text = requiredText(body.text, 'text', 4000); + await this.authorizeChat(id, userId); + return this.prisma.$transaction(async (tx) => { + await tx.$executeRaw(Prisma.sql` + DELETE FROM message_idempotency + WHERE user_id = ${userId}::uuid AND chat_id = ${id}::uuid + AND "key" = ${keyValue} AND expires_at <= NOW() + `); + const claimed = await tx.$queryRaw<{ key: string }[]>(Prisma.sql` + INSERT INTO message_idempotency (user_id, chat_id, "key", expires_at) + VALUES ( + ${userId}::uuid, ${id}::uuid, ${keyValue}, + NOW() + (${this.idempotencyTtlSeconds} * INTERVAL '1 second') + ) + ON CONFLICT (user_id, chat_id, "key") DO NOTHING + RETURNING "key" + `); + if (claimed.length === 0) { + const [existing] = await tx.$queryRaw(Prisma.sql` + SELECT m.id, m.chat_id AS "chatId", m.sender_id AS "senderId", + m.text, m.created_at AS "createdAt" + FROM message_idempotency AS i + JOIN messages AS m ON m.id = i.message_id + WHERE i.user_id = ${userId}::uuid AND i.chat_id = ${id}::uuid + AND i."key" = ${keyValue} + `); + if (!existing) throw new Error('Idempotency record has no message'); + if (existing.text !== text) { + throw new ApiException( + HttpStatus.CONFLICT, + 'conflict', + 'Idempotency-Key уже использован с другим сообщением', + ); + } + return this.serializeMessage(existing); + } + + const messageId = randomUUID(); + const bucket = parseInt(messageId.slice(0, 2), 16) % 16; + const [message] = await tx.$queryRaw(Prisma.sql` + WITH updated AS ( + INSERT INTO "public"."chat_message_epochs" AS e (chat_id, bucket, epoch) + SELECT cm.chat_id, ${bucket}::smallint, 1 FROM chat_members AS cm + WHERE cm.chat_id = ${id}::uuid AND cm.user_id = ${userId}::uuid + ON CONFLICT (chat_id, bucket) DO UPDATE SET epoch = e.epoch + 1 + RETURNING chat_id + ) + INSERT INTO messages (id, chat_id, sender_id, text) + SELECT ${messageId}::uuid, updated.chat_id, ${userId}::uuid, ${text} FROM updated + RETURNING id, chat_id AS "chatId", sender_id AS "senderId", text, created_at AS "createdAt" + `); + if (!message) + throw new ApiException( + HttpStatus.NOT_FOUND, + 'not_found', + 'Объект не найден', + ); + await tx.$executeRaw(Prisma.sql` + UPDATE message_idempotency SET message_id = ${message.id}::uuid + WHERE user_id = ${userId}::uuid AND chat_id = ${id}::uuid + AND "key" = ${keyValue} + `); + return this.serializeMessage(message); + }); + } + + async listMessages( + chatId: unknown, + userId: string, + limitValue: unknown, + cursorValue: unknown, + access?: ChatAccess, + ): Promise> { + const id = uuid(chatId, 'chat_id'); + const chat = + access?.chatId === id && access.userId === userId + ? { id, messagesEpoch: access.messagesEpoch } + : await this.authorizeChat(id, userId); + const limit = pageLimit(limitValue); + const scope = `messages:${chat.id}`; + const cursor = this.decodeCursor(cursorValue, scope); + return this.cache.remember( + scope, + { limit, cursor }, + CACHE_TTL.page, + async () => { + const messages = cursor + ? await this.prisma.$queryRaw(Prisma.sql` + SELECT id, chat_id AS "chatId", sender_id AS "senderId", + text, created_at AS "createdAt" + FROM "public"."messages" + WHERE chat_id = ${chat.id}::uuid + AND (created_at, id) > + (${new Date(cursor.created_at)}::timestamptz, ${cursor.id}::uuid) + ORDER BY created_at ASC, id ASC + LIMIT ${limit + 1} + `) + : await this.prisma.message.findMany({ + where: { chatId: chat.id }, + orderBy: [{ createdAt: 'asc' }, { id: 'asc' }], + take: limit + 1, + }); + return this.page( + messages.map((message) => this.serializeMessage(message)), + limit, + scope, + ); + }, + chat.messagesEpoch.toString(), + ); + } + + private after(cursor: Cursor | null) { + if (!cursor) return {}; + const createdAt = new Date(cursor.created_at); + return { + OR: [ + { createdAt: { gt: createdAt } }, + { createdAt, id: { gt: cursor.id } }, + ], + }; + } + + private serializeChat(chat: StoredChat): Chat { + return { + id: chat.id, + title: chat.title, + member_ids: chat.members.map((member) => member.userId), + created_at: chat.createdAt.toISOString(), + }; + } + + private serializeMessage(message: StoredMessage): Message { + return { + id: message.id, + chat_id: message.chatId, + sender_id: message.senderId, + text: message.text, + created_at: message.createdAt.toISOString(), + }; + } + + private page( + items: T[], + limit: number, + scope: string, + ): Page { + const result = items.slice(0, limit); + const last = result.at(-1); + return { + items: result, + next_cursor: + items.length > limit && last + ? Buffer.from( + JSON.stringify({ + scope, + created_at: last.created_at, + id: last.id, + }), + ).toString('base64url') + : null, + }; + } + + private decodeCursor(value: unknown, scope: string): Cursor | null { + if (value === undefined) return null; + if (typeof value !== 'string' || !/^[A-Za-z0-9_-]+$/.test(value)) + return invalidRequest('Некорректный cursor'); + try { + const cursor: unknown = JSON.parse( + Buffer.from(value, 'base64url').toString('utf8'), + ); + if ( + typeof cursor !== 'object' || + cursor === null || + Array.isArray(cursor) + ) + return invalidRequest('Некорректный cursor'); + const data = cursor as Record; + if ( + data.scope !== scope || + typeof data.created_at !== 'string' || + Number.isNaN(Date.parse(data.created_at)) || + typeof data.id !== 'string' + ) { + return invalidRequest('Некорректный cursor'); + } + return { + scope, + created_at: data.created_at, + id: uuid(data.id, 'cursor'), + }; + } catch { + return invalidRequest('Некорректный cursor'); + } + } +} diff --git a/src/User/user.controller.ts b/src/User/user.controller.ts new file mode 100644 index 00000000..1a34887f --- /dev/null +++ b/src/User/user.controller.ts @@ -0,0 +1,45 @@ +import { + Body, + Controller, + Get, + HttpCode, + HttpStatus, + Post, + Req, + UseGuards, +} from '@nestjs/common'; +import { + ApiBody, + ApiBearerAuth, + ApiCreatedResponse, + ApiOkResponse, + ApiOperation, + ApiTags, +} from '@nestjs/swagger'; +import { UserGuard, type AuthenticatedRequest } from './user.guard'; +import { CreateUserDto, User } from './user.schema'; +import { UserService } from './user.service'; + +@ApiTags('users') +@Controller('api/v1/users') +export class UserController { + constructor(private readonly users: UserService) {} + + @Post() + @HttpCode(HttpStatus.CREATED) + @ApiBody({ type: CreateUserDto }) + @ApiOperation({ operationId: 'registerUser' }) + @ApiCreatedResponse({ type: User }) + create(@Body() body: unknown) { + return this.users.create(body); + } + + @Get('me') + @UseGuards(UserGuard) + @ApiBearerAuth('bearerAuth') + @ApiOperation({ operationId: 'currentUser' }) + @ApiOkResponse({ type: User }) + me(@Req() request: AuthenticatedRequest) { + return request.currentUser; + } +} diff --git a/src/User/user.guard.ts b/src/User/user.guard.ts new file mode 100644 index 00000000..108fca4b --- /dev/null +++ b/src/User/user.guard.ts @@ -0,0 +1,34 @@ +import { CanActivate, ExecutionContext, Injectable } from '@nestjs/common'; +import type { FastifyRequest } from 'fastify'; +import { AuthService, type ChatAccess } from '../Auth/auth.service'; +import type { User } from './user.schema'; + +export type AuthenticatedRequest = FastifyRequest & { + currentUser: User; + currentSessionId: string; + currentChatsEpoch: string; + currentChatAccess?: ChatAccess; +}; + +@Injectable() +export class UserGuard implements CanActivate { + constructor(private readonly auth: AuthService) {} + + async canActivate(context: ExecutionContext): Promise { + const request = context.switchToHttp().getRequest(); + const chatId = + request.method === 'GET' && + request.routeOptions.url === '/api/v1/chats/:chat_id/messages' + ? (request.params as { chat_id: string }).chat_id + : undefined; + const session = await this.auth.authenticate( + request.headers.authorization, + chatId, + ); + request.currentUser = session.user; + request.currentSessionId = session.sessionId; + request.currentChatsEpoch = session.chatsEpoch; + request.currentChatAccess = session.chatAccess; + return true; + } +} diff --git a/src/User/user.module.ts b/src/User/user.module.ts new file mode 100644 index 00000000..f90c564f --- /dev/null +++ b/src/User/user.module.ts @@ -0,0 +1,14 @@ +import { Module } from '@nestjs/common'; +import { UserController } from './user.controller'; +import { UserGuard } from './user.guard'; +import { UserService } from './user.service'; +import { AuthController } from '../Auth/auth.controller'; +import { AuthService } from '../Auth/auth.service'; +import { PasswordService } from '../Auth/password.service'; + +@Module({ + controllers: [UserController, AuthController], + providers: [UserService, UserGuard, AuthService, PasswordService], + exports: [UserService, UserGuard, AuthService], +}) +export class UserModule {} diff --git a/src/User/user.schema.ts b/src/User/user.schema.ts new file mode 100644 index 00000000..7974ebba --- /dev/null +++ b/src/User/user.schema.ts @@ -0,0 +1,28 @@ +import { ApiProperty } from '@nestjs/swagger'; + +export class CreateUserDto { + @ApiProperty({ example: 'alice', pattern: '^[a-z0-9_]{3,32}$' }) + username!: string; + + @ApiProperty({ example: 'Алиса', maxLength: 100 }) + display_name!: string; + + @ApiProperty({ + writeOnly: true, + minLength: 12, + maxLength: 128, + example: 'Example-only-not-a-real-secret-123', + }) + password!: string; +} + +export class User { + @ApiProperty({ format: 'uuid' }) + id!: string; + @ApiProperty({ pattern: '^[a-z0-9_]{3,32}$' }) + username!: string; + @ApiProperty({ minLength: 1, maxLength: 100 }) + display_name!: string; + @ApiProperty({ format: 'date-time' }) + created_at!: string; +} diff --git a/src/User/user.service.ts b/src/User/user.service.ts new file mode 100644 index 00000000..bec2bb86 --- /dev/null +++ b/src/User/user.service.ts @@ -0,0 +1,77 @@ +import { HttpStatus, Injectable } from '@nestjs/common'; +import { Prisma, type User as StoredUser } from '../generated/prisma/client'; +import { PrismaService } from '../prisma/prisma.service'; +import { ApiException } from '../common/exceptions/api.exception'; +import { objectBody, requiredText } from '../common/validation'; +import { + PasswordService, + registrationPassword, +} from '../Auth/password.service'; +import type { User } from './user.schema'; +import { CacheService, CACHE_TTL } from '../cache/cache.service'; + +@Injectable() +export class UserService { + constructor( + private readonly prisma: PrismaService, + private readonly passwords: PasswordService, + private readonly cache: CacheService, + ) {} + + async create(value: unknown): Promise { + const body = objectBody(value, ['username', 'display_name', 'password']); + const username = body.username; + if (typeof username !== 'string' || !/^[a-z0-9_]{3,32}$/.test(username)) { + throw new ApiException( + HttpStatus.BAD_REQUEST, + 'invalid_request', + 'Некорректный username', + ); + } + const displayName = requiredText(body.display_name, 'display_name', 100); + const password = registrationPassword(body.password); + const passwordHash = await this.passwords.hash(password); + try { + return this.serialize( + await this.prisma.user.create({ + data: { username, displayName, passwordHash }, + }), + ); + } catch (error) { + if ( + error instanceof Prisma.PrismaClientKnownRequestError && + error.code === 'P2002' + ) { + throw new ApiException( + HttpStatus.CONFLICT, + 'conflict', + 'Username уже занят', + ); + } + throw error; + } + } + + async get(id: string): Promise { + return this.cache.remember( + `user:${id}`, + 'profile', + CACHE_TTL.entity, + async () => { + const user = await this.prisma.user.findUnique({ where: { id } }); + return user ? this.serialize(user) : undefined; + }, + ); + } + + serialize( + user: Pick, + ): User { + return { + id: user.id, + username: user.username, + display_name: user.displayName, + created_at: user.createdAt.toISOString(), + }; + } +} diff --git a/src/app.controller.spec.ts b/src/app.controller.spec.ts new file mode 100644 index 00000000..7925cb42 --- /dev/null +++ b/src/app.controller.spec.ts @@ -0,0 +1,38 @@ +import { Test, TestingModule } from '@nestjs/testing'; +import { AppController } from './app.controller'; +import { AppService } from './app.service'; +import { PrismaService } from './prisma/prisma.service'; + +describe('AppController', () => { + let appController: AppController; + const queryRaw = jest.fn(); + + beforeEach(async () => { + queryRaw.mockReset(); + const app: TestingModule = await Test.createTestingModule({ + controllers: [AppController], + providers: [ + AppService, + { provide: PrismaService, useValue: { $queryRaw: queryRaw } }, + ], + }).compile(); + + appController = app.get(AppController); + }); + + describe('root', () => { + it('should return "Hello World!"', () => { + expect(appController.getHello()).toBe('Hello World!'); + }); + }); + + it('reports ready when PostgreSQL is reachable', async () => { + queryRaw.mockResolvedValue([{ '?column?': 1 }]); + await expect(appController.ready()).resolves.toEqual({ status: 'ok' }); + }); + + it('returns 503 when PostgreSQL is unavailable', async () => { + queryRaw.mockRejectedValue(new Error('connection refused')); + await expect(appController.ready()).rejects.toMatchObject({ status: 503 }); + }); +}); diff --git a/src/app.controller.ts b/src/app.controller.ts new file mode 100644 index 00000000..ccf11fb0 --- /dev/null +++ b/src/app.controller.ts @@ -0,0 +1,52 @@ +import { Controller, Get, HttpStatus } from '@nestjs/common'; +import { HttpAdapterHost } from '@nestjs/core'; +import { AppService } from './app.service'; +import { PrismaService } from './prisma/prisma.service'; +import { ApiException } from './common/exceptions/api.exception'; +import { DrainingFastifyAdapter } from './common/http/fastify-adapter'; + +@Controller() +export class AppController { + constructor( + private readonly appService: AppService, + private readonly prisma: PrismaService, + private readonly adapterHost: HttpAdapterHost, + ) {} + + @Get() + getHello(): string { + return this.appService.getHello(); + } + + @Get('health/live') + live() { + return { status: 'ok' }; + } + + @Get('health/ready') + async ready() { + this.assertNotDraining(); + try { + await this.prisma.$queryRaw`SELECT 1`; + } catch { + throw new ApiException( + HttpStatus.SERVICE_UNAVAILABLE, + 'unavailable', + 'База данных недоступна', + ); + } + this.assertNotDraining(); + return { status: 'ok' }; + } + + private assertNotDraining(): void { + const adapter = this.adapterHost.httpAdapter; + if (adapter instanceof DrainingFastifyAdapter && adapter.isDraining) { + throw new ApiException( + HttpStatus.SERVICE_UNAVAILABLE, + 'unavailable', + 'API завершает работу', + ); + } + } +} diff --git a/src/app.module.ts b/src/app.module.ts new file mode 100644 index 00000000..12a6825e --- /dev/null +++ b/src/app.module.ts @@ -0,0 +1,58 @@ +import { Module } from '@nestjs/common'; +import { APP_FILTER } from '@nestjs/core'; +import { LoggerModule } from 'nestjs-pino'; +import { AppController } from './app.controller'; +import { AppService } from './app.service'; +import { AllExceptionsFilter } from './common/filters/all-exceptions.filter'; +import { UserModule } from './User/user.module'; +import { ChatModule } from './Chat/chat.module'; +import { PrismaModule } from './prisma/prisma.module'; +import { CacheModule } from './cache/cache.module'; + +@Module({ + imports: [ + PrismaModule, + CacheModule, + UserModule, + ChatModule, + LoggerModule.forRoot({ + pinoHttp: { + level: process.env.NODE_ENV === 'production' ? 'info' : 'debug', + + transport: + process.env.NODE_ENV !== 'production' + ? { + target: 'pino-pretty', + options: { + colorize: true, + singleLine: true, + translateTime: 'SYS:standard', + }, + } + : undefined, + + redact: { + paths: [ + 'req.headers.authorization', + 'req.headers.cookie', + 'res.headers.set-cookie', + ], + censor: '[REDACTED]', + }, + + autoLogging: { + ignore: (request) => request.url === '/health', + }, + }, + }), + ], + controllers: [AppController], + providers: [ + AppService, + { + provide: APP_FILTER, + useClass: AllExceptionsFilter, + }, + ], +}) +export class AppModule {} diff --git a/src/app.service.ts b/src/app.service.ts new file mode 100644 index 00000000..927d7cca --- /dev/null +++ b/src/app.service.ts @@ -0,0 +1,8 @@ +import { Injectable } from '@nestjs/common'; + +@Injectable() +export class AppService { + getHello(): string { + return 'Hello World!'; + } +} diff --git a/src/cache/cache.module.ts b/src/cache/cache.module.ts new file mode 100644 index 00000000..2d194dd8 --- /dev/null +++ b/src/cache/cache.module.ts @@ -0,0 +1,6 @@ +import { Global, Module } from '@nestjs/common'; +import { CacheService } from './cache.service'; + +@Global() +@Module({ providers: [CacheService], exports: [CacheService] }) +export class CacheModule {} diff --git a/src/cache/cache.service.ts b/src/cache/cache.service.ts new file mode 100644 index 00000000..816debf7 --- /dev/null +++ b/src/cache/cache.service.ts @@ -0,0 +1,149 @@ +import { + Injectable, + Logger, + type OnModuleDestroy, + type OnModuleInit, +} from '@nestjs/common'; +import { createHash, randomUUID } from 'node:crypto'; +import Redis from 'ioredis'; + +export const CACHE_TTL = { entity: 300, page: 30 } as const; +const generationTtl = 600; +const storeIfCurrent = ` +if redis.call('GET', KEYS[1]) == ARGV[1] then + return redis.call('SET', KEYS[2], ARGV[2], 'EX', ARGV[3]) +end +return false`; + +@Injectable() +export class CacheService implements OnModuleInit, OnModuleDestroy { + private readonly logger = new Logger(CacheService.name); + private readonly redis?: Redis; + private readonly prefix = process.env.CACHE_PREFIX ?? 'messenger:cache:v1'; + private warned = false; + + constructor() { + if (process.env.CACHE_URL) { + this.redis = new Redis(process.env.CACHE_URL, { + lazyConnect: true, + connectTimeout: 1000, + commandTimeout: 300, + maxRetriesPerRequest: 0, + enableOfflineQueue: false, + autoResendUnfulfilledCommands: false, + retryStrategy: () => 1000, + }); + this.redis.on('error', () => this.unavailable()); + this.redis.on('ready', () => { + this.warned = false; + }); + } + } + + async onModuleInit(): Promise { + try { + await this.redis?.connect(); + } catch { + this.unavailable(); + } + } + + onModuleDestroy(): void { + this.redis?.disconnect(); + } + + async remember( + namespace: string, + parameters: unknown, + ttl: number, + load: () => Promise, + epoch?: string, + ): Promise { + if (!this.redis || this.redis.status !== 'ready') return load(); + if (epoch !== undefined) { + const digest = createHash('sha256') + .update(JSON.stringify(parameters)) + .digest('hex'); + const key = `${this.prefix}:${namespace}:epoch:${epoch}:${digest}`; + try { + const value = await this.redis.get(key); + if (value !== null) return JSON.parse(value) as T; + } catch { + this.unavailable(); + } + const result = await load(); + const serialized = JSON.stringify(result); + if (serialized !== undefined && this.redis.status === 'ready') { + try { + await this.redis.set(key, serialized, 'EX', ttl); + } catch { + this.unavailable(); + } + } + return result; + } + const versionKey = `${this.prefix}:${namespace}:generation`; + let version: string | null = null; + let dataKey = ''; + try { + await this.redis.set(versionKey, randomUUID(), 'EX', generationTtl, 'NX'); + version = await this.redis.get(versionKey); + if (version) { + const digest = createHash('sha256') + .update(JSON.stringify(parameters)) + .digest('hex'); + dataKey = `${this.prefix}:${namespace}:${version}:${digest}`; + const value = await this.redis.get(dataKey); + if (value !== null) return JSON.parse(value) as T; + } + } catch { + this.unavailable(); + } + + const result = await load(); + const serialized = JSON.stringify(result); + if (version && serialized !== undefined && this.redis.status === 'ready') { + try { + await this.redis.eval( + storeIfCurrent, + 2, + versionKey, + dataKey, + version, + serialized, + ttl, + ); + } catch { + this.unavailable(); + } + } + return result; + } + + async invalidate(...namespaces: string[]): Promise { + if (!this.redis || this.redis.status !== 'ready' || namespaces.length === 0) + return; + try { + const transaction = this.redis.multi(); + for (const namespace of new Set(namespaces)) { + transaction.set( + `${this.prefix}:${namespace}:generation`, + randomUUID(), + 'EX', + generationTtl, + ); + } + const results = await transaction.exec(); + if (results?.some(([error]) => error !== null)) this.unavailable(); + } catch { + this.unavailable(); + } + } + + private unavailable(): void { + if (!this.warned) { + this.logger.warn('Redis cache unavailable'); + this.warned = true; + } + } +} diff --git a/src/common/exceptions/api.exception.ts b/src/common/exceptions/api.exception.ts new file mode 100644 index 00000000..067e5cee --- /dev/null +++ b/src/common/exceptions/api.exception.ts @@ -0,0 +1,16 @@ +import { + HttpException, + HttpExceptionOptions, + HttpStatus, +} from '@nestjs/common'; + +export class ApiException extends HttpException { + constructor( + status: HttpStatus, + code: string, + message: string, + options?: HttpExceptionOptions, + ) { + super({ code, message }, status, options); + } +} diff --git a/src/common/filters/all-exceptions.filter.ts b/src/common/filters/all-exceptions.filter.ts new file mode 100644 index 00000000..a25ee70c --- /dev/null +++ b/src/common/filters/all-exceptions.filter.ts @@ -0,0 +1,177 @@ +import { + ArgumentsHost, + Catch, + ExceptionFilter, + HttpException, + HttpStatus, +} from '@nestjs/common'; +import type { FastifyReply, FastifyRequest } from 'fastify'; +import { Prisma } from '../../generated/prisma/client'; +import { ApiException } from '../exceptions/api.exception'; +import { AuthException } from '../../Auth/auth.exception'; + +interface ExceptionPayload { + code?: unknown; +} + +const defaultCodes: Partial> = { + [HttpStatus.BAD_REQUEST]: 'invalid_request', + [HttpStatus.UNAUTHORIZED]: 'unauthorized', + [HttpStatus.FORBIDDEN]: 'forbidden', + [HttpStatus.NOT_FOUND]: 'not_found', + [HttpStatus.CONFLICT]: 'conflict', + [HttpStatus.PAYLOAD_TOO_LARGE]: 'payload_too_large', + [HttpStatus.UNSUPPORTED_MEDIA_TYPE]: 'unsupported_media_type', + [HttpStatus.TOO_MANY_REQUESTS]: 'rate_limited', + [HttpStatus.SERVICE_UNAVAILABLE]: 'unavailable', +}; + +const defaultMessages: Partial> = { + [HttpStatus.BAD_REQUEST]: 'Некорректный запрос', + [HttpStatus.UNAUTHORIZED]: 'Требуется авторизация', + [HttpStatus.FORBIDDEN]: 'Доступ запрещён', + [HttpStatus.NOT_FOUND]: 'Ресурс не найден', + [HttpStatus.METHOD_NOT_ALLOWED]: 'Метод не поддерживается', + [HttpStatus.CONFLICT]: 'Конфликт данных', + [HttpStatus.PAYLOAD_TOO_LARGE]: 'Тело запроса слишком большое', + [HttpStatus.UNSUPPORTED_MEDIA_TYPE]: 'Неподдерживаемый формат данных', + [HttpStatus.TOO_MANY_REQUESTS]: 'Слишком много запросов', + [HttpStatus.INTERNAL_SERVER_ERROR]: 'Внутренняя ошибка сервера', + [HttpStatus.SERVICE_UNAVAILABLE]: 'Сервис временно недоступен', +}; + +const databaseUnavailableCodes = new Set([ + 'P1000', + 'P1001', + 'P1002', + 'P1008', + 'P1017', + 'P2024', + 'P2037', + 'ECONNREFUSED', + 'ECONNRESET', + 'ETIMEDOUT', + 'EPIPE', + 'ENOTFOUND', + 'EAI_AGAIN', + 'EACCES', + '08000', + '08001', + '08003', + '08004', + '08006', + '53300', + '57P01', + '57P02', + '57P03', + '57014', +]); +const driverTimeoutMessages = [ + 'Query read timeout', + 'timeout exceeded when trying to connect', + 'Connection terminated unexpectedly', + 'Connection terminated due to connection timeout', +]; + +function databaseUnavailable(exception: unknown): boolean { + if (exception instanceof Prisma.PrismaClientInitializationError) return true; + if (exception instanceof HttpException || !(exception instanceof Error)) + return false; + const error = exception as Error & { code?: unknown }; + if ( + typeof error.code === 'string' && + databaseUnavailableCodes.has(error.code) + ) + return true; + if (exception instanceof Prisma.PrismaClientKnownRequestError) { + const originalCode = exception.meta?.code; + if ( + typeof originalCode === 'string' && + databaseUnavailableCodes.has(originalCode) + ) + return true; + const adapter = exception.meta?.driverAdapterError; + if (adapter !== null && typeof adapter === 'object' && 'cause' in adapter) { + const cause = adapter.cause; + if (cause !== null && typeof cause === 'object') { + if ('kind' in cause && cause.kind === 'ConnectionClosed') return true; + if ( + 'originalCode' in cause && + typeof cause.originalCode === 'string' && + databaseUnavailableCodes.has(cause.originalCode) + ) + return true; + } + } + } + return driverTimeoutMessages.some((message) => + exception.message.includes(message), + ); +} + +@Catch() +export class AllExceptionsFilter implements ExceptionFilter { + catch(exception: unknown, host: ArgumentsHost): void { + if (databaseUnavailable(exception)) { + exception = new ApiException( + HttpStatus.SERVICE_UNAVAILABLE, + 'unavailable', + 'База данных недоступна', + ); + } + const context = host.switchToHttp(); + const request = context.getRequest(); + const response = context.getResponse(); + if (exception instanceof AuthException) { + void response.header('WWW-Authenticate', exception.challenge); + } + + const status = + exception instanceof HttpException + ? exception.getStatus() + : HttpStatus.INTERNAL_SERVER_ERROR; + const payload = + exception instanceof HttpException ? exception.getResponse() : undefined; + const { code, message } = this.extractError(status, payload); + const requestId = request.id; + + if (status >= HttpStatus.INTERNAL_SERVER_ERROR) { + request.raw.log?.error( + { err: exception, status, requestId }, + 'Request failed', + ); + } + + void response.status(status).send({ + error: { code, message, request_id: requestId }, + }); + } + + private extractError( + status: HttpStatus, + payload: string | object | undefined, + ): { code: string; message: string } { + if (status === HttpStatus.INTERNAL_SERVER_ERROR) { + return { + code: 'internal_error', + message: defaultMessages[status] ?? 'Ошибка сервера', + }; + } + + const body = ( + payload !== null && typeof payload === 'object' ? payload : {} + ) as ExceptionPayload; + + return { + code: + typeof body.code === 'string' + ? body.code + : (defaultCodes[status] ?? 'http_error'), + message: + defaultMessages[status] ?? + (status >= HttpStatus.INTERNAL_SERVER_ERROR + ? 'Ошибка сервера' + : 'Ошибка запроса'), + }; + } +} diff --git a/src/common/http/fastify-adapter.ts b/src/common/http/fastify-adapter.ts new file mode 100644 index 00000000..37442943 --- /dev/null +++ b/src/common/http/fastify-adapter.ts @@ -0,0 +1,66 @@ +import { randomUUID } from 'node:crypto'; +import { + FastifyAdapter, + NestFastifyApplication, +} from '@nestjs/platform-fastify'; + +const requestIdHeader = 'x-request-id'; +const instanceIdHeader = 'x-instance-id'; +const instanceId = process.env.INSTANCE_ID?.trim() || randomUUID(); + +// Two parallel readiness rounds: 2 * (1s request timeout + 2s interval), +// plus one second for the upstream reload. Keep below the public hook's 10s limit. +export const DRAIN_DELAY_MS = 7000; + +export class DrainingFastifyAdapter extends FastifyAdapter { + private draining = false; + private closing?: Promise; + private httpClosing?: Promise; + + constructor(private readonly drainDelayMs: number) { + super({ requestIdHeader, genReqId: () => randomUUID() }); + this.getInstance().addHook('onSend', (_request, reply, payload, done) => { + // An already active request may finish after Fastify starts closing. + // Finish its response, then close its keep-alive socket as well. + if (this.httpClosing) void reply.header('connection', 'close'); + done(null, payload); + }); + } + + get isDraining(): boolean { + return this.draining; + } + + override beforeClose(): Promise { + return (this.closing ??= this.drainAndClose()); + } + + override close(): Promise { + return (this.httpClosing ??= super.close()); + } + + private async drainAndClose(): Promise { + this.draining = true; + if (this.drainDelayMs > 0) { + await new Promise((resolve) => setTimeout(resolve, this.drainDelayMs)); + } + // Nest awaits beforeClose before destroying Prisma/Redis providers. + // Fastify first stops new connections and finishes active HTTP requests. + await this.close(); + } +} + +export function createFastifyAdapter(drainDelayMs = 0): DrainingFastifyAdapter { + return new DrainingFastifyAdapter(drainDelayMs); +} + +export function exposeRequestIdHeader(app: NestFastifyApplication): void { + app + .getHttpAdapter() + .getInstance() + .addHook('onRequest', (request, reply, done) => { + void reply.header(requestIdHeader, request.id); + void reply.header(instanceIdHeader, instanceId); + done(); + }); +} diff --git a/src/common/validation.ts b/src/common/validation.ts new file mode 100644 index 00000000..cbbdf046 --- /dev/null +++ b/src/common/validation.ts @@ -0,0 +1,54 @@ +import { ApiException } from './exceptions/api.exception'; +import { HttpStatus } from '@nestjs/common'; + +export const uuidPattern = + /^[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i; + +export function invalidRequest(message: string): never { + throw new ApiException(HttpStatus.BAD_REQUEST, 'invalid_request', message); +} + +export function objectBody( + value: unknown, + keys: string[], +): Record { + if (typeof value !== 'object' || value === null || Array.isArray(value)) { + return invalidRequest('Ожидается JSON-объект'); + } + const body = value as Record; + if (Object.keys(body).some((key) => !keys.includes(key))) { + return invalidRequest('Неизвестное поле запроса'); + } + return body; +} + +export function requiredText( + value: unknown, + field: string, + max: number, +): string { + if (typeof value !== 'string' || value.trim().length === 0) { + return invalidRequest(`Некорректное поле ${field}`); + } + let codePoints = 0; + for (const _character of value) codePoints++; + if (codePoints > max) return invalidRequest(`Некорректное поле ${field}`); + return value; +} + +export function uuid(value: unknown, field: string): string { + if (typeof value !== 'string' || !uuidPattern.test(value)) { + return invalidRequest(`Некорректное поле ${field}`); + } + return value.toLowerCase(); +} + +export function pageLimit(value: unknown): number { + if (value === undefined) return 50; + if (typeof value !== 'string' || !/^[1-9]\d*$/.test(value)) { + return invalidRequest('Некорректный limit'); + } + const limit = Number(value); + if (limit > 100) return invalidRequest('Некорректный limit'); + return limit; +} diff --git a/src/main.ts b/src/main.ts new file mode 100644 index 00000000..628b8de5 --- /dev/null +++ b/src/main.ts @@ -0,0 +1,56 @@ +import { NestFactory } from '@nestjs/core'; +import { NestFastifyApplication } from '@nestjs/platform-fastify'; +import { DocumentBuilder, SwaggerModule } from '@nestjs/swagger'; +import { apiReference } from '@scalar/nestjs-api-reference'; +import { AppModule } from './app.module'; +import { Logger } from 'nestjs-pino'; +import { + createFastifyAdapter, + DRAIN_DELAY_MS, + exposeRequestIdHeader, +} from './common/http/fastify-adapter'; + +async function bootstrap() { + const app = await NestFactory.create( + AppModule, + createFastifyAdapter(DRAIN_DELAY_MS), + { + bufferLogs: true, + }, + ); + + exposeRequestIdHeader(app); + app.useLogger(app.get(Logger)); + app.enableShutdownHooks(); + + const swaggerConfig = new DocumentBuilder() + .setTitle('Messenger API') + .setDescription('Документация API') + .setVersion('1.3.0') + .addBasicAuth({ type: 'http', scheme: 'basic' }, 'basicAuth') + .addBearerAuth( + { type: 'http', scheme: 'bearer', bearerFormat: 'opaque' }, + 'bearerAuth', + ) + .build(); + + const document = SwaggerModule.createDocument(app, swaggerConfig); + + SwaggerModule.setup('swagger', app, document); + + app.use( + '/docs', + apiReference({ + content: document, + theme: 'laserwave', + withFastify: true, + }), + ); + + await app.listen( + Number(process.env.APP_PORT ?? process.env.PORT ?? 8080), + process.env.APP_HOST ?? '0.0.0.0', + ); +} + +void bootstrap(); diff --git a/src/prisma/prisma.module.ts b/src/prisma/prisma.module.ts new file mode 100644 index 00000000..930cb0ff --- /dev/null +++ b/src/prisma/prisma.module.ts @@ -0,0 +1,6 @@ +import { Global, Module } from '@nestjs/common'; +import { PrismaService } from './prisma.service'; + +@Global() +@Module({ providers: [PrismaService], exports: [PrismaService] }) +export class PrismaModule {} diff --git a/src/prisma/prisma.service.ts b/src/prisma/prisma.service.ts new file mode 100644 index 00000000..8e326f30 --- /dev/null +++ b/src/prisma/prisma.service.ts @@ -0,0 +1,42 @@ +import 'dotenv/config'; +import { + Injectable, + type OnModuleDestroy, + type OnModuleInit, +} from '@nestjs/common'; +import { PrismaPg } from '@prisma/adapter-pg'; +import { PrismaClient } from '../generated/prisma/client'; + +@Injectable() +export class PrismaService + extends PrismaClient + implements OnModuleInit, OnModuleDestroy +{ + constructor() { + const connectionString = process.env.DATABASE_URL; + if (!connectionString) throw new Error('DATABASE_URL is required'); + const poolMax = Number(process.env.DB_POOL_MAX ?? 15); + if (!Number.isSafeInteger(poolMax) || poolMax < 1) { + throw new Error('DB_POOL_MAX must be a positive integer'); + } + super({ + adapter: new PrismaPg({ + connectionString, + max: poolMax, + connectionTimeoutMillis: 5000, + query_timeout: 5000, + idleTimeoutMillis: 30000, + options: '-c statement_timeout=5000', + }), + transactionOptions: { maxWait: 5000, timeout: 10000 }, + }); + } + + async onModuleInit(): Promise { + await this.$connect(); + } + + async onModuleDestroy(): Promise { + await this.$disconnect(); + } +} diff --git a/test/auth-startup.mjs b/test/auth-startup.mjs new file mode 100644 index 00000000..6bd1c282 --- /dev/null +++ b/test/auth-startup.mjs @@ -0,0 +1,50 @@ +import { createRequire } from 'node:module'; +import { randomUUID } from 'node:crypto'; +import { performance } from 'node:perf_hooks'; +const require = createRequire(`${process.cwd()}/package.json`); +const { NestFactory } = require('@nestjs/core'); +const { AppModule } = require(`${process.cwd()}/dist/app.module`); +const { PrismaService } = require(`${process.cwd()}/dist/prisma/prisma.service`); +const { UserService } = require(`${process.cwd()}/dist/User/user.service`); +const { PasswordService } = require(`${process.cwd()}/dist/Auth/password.service`); +const { createFastifyAdapter } = require(`${process.cwd()}/dist/common/http/fastify-adapter`); +process.env.CACHE_URL = ''; +const app = await NestFactory.create(AppModule, createFastifyAdapter(), { logger: false, abortOnError: false }); +await app.init(); +require('nestjs-pino').PinoLogger.root.level = 'silent'; +const server = app.getHttpAdapter().getInstance(); +await server.ready(); +const prisma = app.get(PrismaService); +const passwords = app.get(PasswordService); +const originalHash = passwords.hash.bind(passwords); +const spans = []; +passwords.hash = async (password) => { + const start = performance.now(); + const value = await originalHash(password); + spans.push({ phase: 'kdf', ms: Math.round(performance.now() - start) }); + return value; +}; +app.get(UserService).prisma = prisma.$extends({ query: { user: { async create({ args, query }) { + const start = performance.now(); + const value = await query(args); + spans.push({ phase: 'sql_user_create', ms: Math.round(performance.now() - start) }); + return value; +} } } }); +const ids = []; +try { + const health = await server.inject({ method: 'GET', url: '/health/ready' }); + console.log(JSON.stringify({ phase: 'health', status: health.statusCode })); + for (let sample = 1; sample <= 3; sample++) { + spans.length = 0; + const start = performance.now(); + const response = await server.inject({ method: 'POST', url: '/api/v1/users', payload: { + username: `warm_${randomUUID().replaceAll('-', '').slice(0, 20)}`, + display_name: 'Synthetic startup diagnostic', password: 'Synthetic-diagnostic-password-123', + } }); + if (response.statusCode === 201) ids.push(response.json().id); + console.log(JSON.stringify({ sample, status: response.statusCode, total_ms: Math.round(performance.now() - start), spans })); + } +} finally { + await prisma.user.deleteMany({ where: { id: { in: ids } } }); + await app.close(); +} diff --git a/test/benchmark-scaling.mjs b/test/benchmark-scaling.mjs new file mode 100644 index 00000000..4ee8bfe7 --- /dev/null +++ b/test/benchmark-scaling.mjs @@ -0,0 +1,64 @@ +import assert from 'node:assert/strict'; +import { spawn } from 'node:child_process'; +import { createServer } from 'node:http'; +import test from 'node:test'; + +test('scaling benchmark schedules reads and writes and reports distinct instances', async () => { + let sequence = 0; + const server = createServer(async (request, response) => { + for await (const _ of request) { + // Consume the request body before responding. + } + response.setHeader('Content-Type', 'application/json'); + response.setHeader('X-Instance-Id', 'mock1'); + let status = 200; + let body = {}; + if (request.url === '/api/v1/users' && request.method === 'POST') { + status = 201; + body = { id: `user-${++sequence}` }; + } else if (request.url === '/api/v1/auth/sessions') { + status = 201; + body = { token: 'synthetic-token' }; + } else if (request.url === '/api/v1/chats' && request.method === 'POST') { + status = 201; + body = { id: 'chat-1' }; + } else if (request.url.startsWith('/api/v1/chats/chat-1/messages')) { + if (request.method === 'POST') { + status = 201; + body = { id: `message-${++sequence}` }; + } else { + body = { items: [] }; + } + } else { + status = 404; + } + response.writeHead(status); + response.end(JSON.stringify(body)); + }); + await new Promise((resolve) => server.listen(0, '127.0.0.1', resolve)); + try { + const port = server.address().port; + const args = [ + 'scripts/benchmark-scaling.mjs', '--base-url', `http://127.0.0.1:${port}`, + '--label', 'mock', '--rate', '20', '--duration-seconds', '2', + '--warmup-seconds', '1', '--seed-messages', '2', + '--read-percent', '50', '--expected-instances', '1', + ]; + const child = spawn(process.execPath, args, { cwd: process.cwd() }); + let stdout = ''; + let stderr = ''; + child.stdout.on('data', (chunk) => { stdout += chunk; }); + child.stderr.on('data', (chunk) => { stderr += chunk; }); + const code = await new Promise((resolve) => child.on('close', resolve)); + assert.equal(code, 0, stderr); + const result = JSON.parse(stdout); + assert.equal(result.measurement.scheduled_slots, 40); + assert.equal(result.measurement.client_dropped_slots, 0); + assert.equal(result.measurement.all.successful, 40); + assert.equal(result.measurement.all.instance_counts.mock1, 40); + assert.ok(result.measurement.read.successful > 0); + assert.ok(result.measurement.write.successful > 0); + } finally { + await new Promise((resolve) => server.close(resolve)); + } +}); diff --git a/test/cache-benchmark.mjs b/test/cache-benchmark.mjs new file mode 100644 index 00000000..007291e2 --- /dev/null +++ b/test/cache-benchmark.mjs @@ -0,0 +1,541 @@ +import assert from 'node:assert/strict'; +import { createHash, randomBytes, randomUUID } from 'node:crypto'; +import { createRequire } from 'node:module'; +import { readFile, writeFile } from 'node:fs/promises'; +import { performance } from 'node:perf_hooks'; +import { faultProxy } from './helpers/fault-proxy.mjs'; +import { messageEpoch } from './helpers/message-epoch.mjs'; + +const require = createRequire(`${process.cwd()}/package.json`); +const pg = require('pg'); +let counts = {}; +const originalQuery = pg.Client.prototype.query; +pg.Client.prototype.query = function (query, ...args) { + const sql = typeof query === 'string' ? query : query.text; + const verb = sql.trim().split(/\s+/)[0].toUpperCase(); + const table = + ['messages', 'chat_members', 'sessions', 'users', 'chats'].find((name) => + new RegExp(`\\b${name}\\b`).test(sql), + ) ?? 'other'; + const label = `${verb}:${table}`; + counts[label] = (counts[label] ?? 0) + 1; + return originalQuery.call(this, query, ...args); +}; +const Redis = require('ioredis').default; +const { NestFactory } = require('@nestjs/core'); +const { AppModule } = require(`${process.cwd()}/dist/app.module`); +const { PrismaService } = require( + `${process.cwd()}/dist/prisma/prisma.service`, +); +const { CacheService } = require(`${process.cwd()}/dist/cache/cache.service`); +const { createFastifyAdapter, exposeRequestIdHeader } = require( + `${process.cwd()}/dist/common/http/fastify-adapter`, +); +const stage = process.argv[2]; +const compareRedis = process.argv.includes('--compare-redis'); +const historyControl = !process.argv.includes('--skip-history-control'); +function integerOption(name, fallback) { + const index = process.argv.indexOf(`--${name}`); + const value = index === -1 ? fallback : Number(process.argv[index + 1]); + assert.ok(Number.isSafeInteger(value) && value > 0, `Invalid --${name}`); + return value; +} +const concurrency = integerOption('concurrency', 16); +const duration = integerOption('duration-seconds', 10); +const warmup = integerOption('warmup-seconds', 3); +const repetitions = integerOption('repetitions', 3); +const seedMessages = integerOption('seed-messages', 10000); +const coldBurst = integerOption('cold-burst', 32); +const writesPerRepeat = integerOption('writes-per-repeat', 512); +assert.ok(['before', 'after'].includes(stage)); +const prefix = `experiment:epochs:${randomUUID()}`; +const proxy = await faultProxy(process.env.CACHE_URL, 6379); +const observer = new Redis(process.env.CACHE_URL); +process.env.CACHE_PREFIX = prefix; +process.env.CACHE_URL = proxy.url; +const apps = []; +async function start() { + const app = await NestFactory.create(AppModule, createFastifyAdapter(), { + logger: false, + abortOnError: false, + }); + apps.push(app); + exposeRequestIdHeader(app); + await app.listen(0, '127.0.0.1'); + require('nestjs-pino').PinoLogger.root.level = 'silent'; + return { app, url: await app.getUrl() }; +} +const first = await start(); +const prisma = first.app.get(PrismaService); +let userId; +const chatIds = []; +const report = { + stage, + recorded_at: new Date().toISOString(), + node: process.version, + methodology: { + requests: + 'real loopback HTTP; instrumented API process in measured backend image', + sql: 'pg.Client.query calls; transaction control counted separately', + concurrency, + duration_seconds: duration, + warmup_seconds: warmup, + repetitions, + seed_messages: seedMessages, + cold_burst_requests: coldBurst, + writes_per_repeat: writesPerRepeat, + history_control: historyControl, + resources: + 'process CPU/RSS includes HTTP generator and instrumentation; not container CPU', + limitations: + 'closed loop, client and API share process/CPU; other Docker workloads share host resources; no capacity/SLA claim; fixtures bypass password KDF', + }, + dist_sha256: {}, + dependencies: {}, + samples: [], + correctness: {}, +}; +for (const name of [ + '@nestjs/core', + '@prisma/adapter-pg', + 'pg', + 'ioredis', + 'fastify', +]) { + try { + report.dependencies[name] = require(`${name}/package.json`).version; + } catch { + report.dependencies[name] = 'package metadata not exported'; + } +} +for (const name of [ + 'Chat/chat.service.js', + 'cache/cache.service.js', + 'Auth/auth.service.js', + 'User/user.guard.js', + 'Chat/chat.controller.js', +]) { + report.dist_sha256[name] = createHash('sha256') + .update(await readFile(`${process.cwd()}/dist/${name}`)) + .digest('hex'); +} +const sleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms)); +async function clearCache() { + let cursor = '0'; + do { + const [next, keys] = await observer.scan( + cursor, + 'MATCH', + `${prefix}:*`, + 'COUNT', + 100, + ); + cursor = next; + if (keys.length) await observer.del(...keys); + } while (cursor !== '0'); +} +let token; +async function request(method, path, body, target = first) { + const response = await fetch(`${target.url}${path}`, { + method, + headers: { + authorization: `Bearer ${token}`, + ...(body ? { 'content-type': 'application/json' } : {}), + ...(method === 'POST' && /\/messages$/.test(path) + ? { 'idempotency-key': randomUUID() } + : {}), + }, + ...(body ? { body: JSON.stringify(body) } : {}), + signal: AbortSignal.timeout(10000), + }); + const json = await response.json(); + assert.equal( + response.status, + method === 'POST' ? 201 : 200, + `HTTP ${response.status}`, + ); + return json; +} +async function newChat() { + const chat = await prisma.chat.create({ + data: { + title: 'Synthetic epoch benchmark', + members: { create: { userId, position: 0 } }, + }, + }); + chatIds.push(chat.id); + return chat.id; +} +async function measure( + workload, + repeat, + operation, + { + duration: secondsToRun = duration, + total, + concurrency: clients = concurrency, + } = {}, +) { + counts = {}; + const cpu = process.cpuUsage(); + let peakRss = process.memoryUsage().rss; + const timer = setInterval(() => { + peakRss = Math.max(peakRss, process.memoryUsage().rss); + }, 100); + const latencies = []; + let errors = 0, + index = 0; + const start = performance.now(); + await Promise.all( + Array.from({ length: clients }, async () => { + while ( + total === undefined + ? performance.now() - start < secondsToRun * 1000 + : index < total + ) { + const item = index++; + const began = performance.now(); + try { + await operation(item); + latencies.push(performance.now() - began); + } catch { + errors++; + } + } + }), + ); + const seconds = (performance.now() - start) / 1000; + clearInterval(timer); + peakRss = Math.max(peakRss, process.memoryUsage().rss); + const used = process.cpuUsage(cpu); + latencies.sort((a, b) => a - b); + const percentile = (p) => + latencies.length + ? +latencies[Math.ceil(p * latencies.length) - 1].toFixed(3) + : null; + const sql = Object.entries(counts) + .filter(([key]) => !/^(BEGIN|COMMIT|ROLLBACK|SET):/.test(key)) + .reduce((sum, [, n]) => sum + n, 0); + const sample = { + workload, + repeat, + concurrency: clients, + elapsed_seconds: +seconds.toFixed(3), + successes: latencies.length, + errors, + error_ratio: errors / (latencies.length + errors), + successful_rps: +(latencies.length / seconds).toFixed(3), + latency_ms: { + mean: latencies.length + ? +( + latencies.reduce((sum, value) => sum + value, 0) / latencies.length + ).toFixed(3) + : null, + p50: percentile(0.5), + p95: percentile(0.95), + p99: percentile(0.99), + }, + sql_queries: sql, + sql_per_request: +(sql / (latencies.length + errors)).toFixed(4), + sql_calls: { ...counts }, + process_cpu_percent_one_core: +( + (used.user + used.system) / + (seconds * 10000) + ).toFixed(2), + peak_process_rss_mib: +(peakRss / 1048576).toFixed(2), + }; + report.samples.push(sample); + console.log(JSON.stringify(sample)); + assert.equal(errors, 0, 'load errors recorded in report'); +} +try { + const user = await prisma.user.create({ + data: { + username: `epoch_${randomUUID().replaceAll('-', '').slice(0, 20)}`, + displayName: 'Synthetic benchmark', + }, + }); + userId = user.id; + token = randomBytes(32).toString('base64url'); + await prisma.session.create({ + data: { + userId, + tokenHash: createHash('sha256').update(token).digest('hex'), + expiresAt: new Date(Date.now() + 3600000), + }, + }); + const readChat = await newChat(); + for (let offset = 0; offset < seedMessages; offset += 1000) { + await prisma.message.createMany({ + data: Array.from( + { length: Math.min(1000, seedMessages - offset) }, + (_, i) => ({ + chatId: readChat, + senderId: userId, + text: `Synthetic message ${offset + i}`, + createdAt: new Date(1700000000000 + offset + i), + }), + ), + }); + } + await prisma.chatMessageEpoch.createMany({ + data: Array.from({ length: 16 }, (_, bucket) => ({ + chatId: readChat, + bucket, + epoch: BigInt( + Math.floor(seedMessages / 16) + (bucket < seedMessages % 16 ? 1 : 0), + ), + })), + }); + const path = `/api/v1/chats/${readChat}/messages?limit=50`; + if (compareRedis) { + const cacheUrl = process.env.CACHE_URL; + delete process.env.CACHE_URL; + let withoutRedis; + try { + withoutRedis = await start(); + } finally { + process.env.CACHE_URL = cacheUrl; + } + assert.equal(withoutRedis.app.get(CacheService).redis, undefined); + report.methodology.comparison = { + modes: ['redis', 'no-redis'], + no_redis: + 'API started without CACHE_URL; all application Redis caches disabled', + epochs: 'PostgreSQL epochs and atomic CTE writes retained in both modes', + order: 'redis first in repeats 1/3, no-redis first in repeat 2', + processes: + 'both API instances and HTTP generator share one measured Node process', + }; + report.correctness.read_after_write = {}; + for (let repeat = 1; repeat <= repetitions; repeat++) { + const variants = [ + { name: 'redis', target: first }, + { name: 'no-redis', target: withoutRedis }, + ]; + if (repeat % 2 === 0) variants.reverse(); + for (const { name, target } of variants) { + await clearCache(); + await measure( + `cold-history-burst:${name}`, + repeat, + () => request('GET', path, undefined, target), + { total: coldBurst, concurrency: coldBurst }, + ); + const warmUntil = performance.now() + warmup * 1000; + while (performance.now() < warmUntil) + await request('GET', path, undefined, target); + await measure(`warm-history:${name}`, repeat, () => + request('GET', path, undefined, target), + ); + const writeChat = await newChat(); + const writePath = `/api/v1/chats/${writeChat}/messages`; + assert.equal( + (await request('GET', writePath, undefined, target)).items.length, + 0, + ); + await measure( + `writes-single-chat:${name}`, + repeat, + (i) => + request( + 'POST', + writePath, + { text: `Concurrent write ${i}` }, + target, + ), + { total: writesPerRepeat }, + ); + assert.equal( + await prisma.message.count({ where: { chatId: writeChat } }), + writesPerRepeat, + ); + assert.equal( + await messageEpoch(prisma, writeChat), + BigInt(writesPerRepeat), + ); + const page = await request('GET', writePath, undefined, target); + assert.equal(page.items.length, 50); + assert.equal(new Set(page.items.map((message) => message.id)).size, 50); + report.correctness.read_after_write[`${name}:${repeat}`] = true; + } + } + } else { + const cache = first.app.get(CacheService); + const remember = cache.remember.bind(cache); + for (let repeat = 1; repeat <= repetitions; repeat++) { + await clearCache(); + await request('GET', `/api/v1/chats/${readChat}`); + await measure('cold-history-burst', repeat, () => request('GET', path), { + total: coldBurst, + concurrency: coldBurst, + }); + const warmUntil = performance.now() + warmup * 1000; + while (performance.now() < warmUntil) await request('GET', path); + await measure('warm-history', repeat, () => request('GET', path)); + if (historyControl) { + cache.remember = (namespace, parameters, ttl, load) => + namespace.startsWith('messages:') + ? load() + : remember(namespace, parameters, ttl, load); + const directUntil = performance.now() + warmup * 1000; + while (performance.now() < directUntil) await request('GET', path); + await measure('history-cache-bypassed', repeat, () => + request('GET', path), + ); + cache.remember = remember; + } + const writeChat = await newChat(); + await request('GET', `/api/v1/chats/${writeChat}`); + await measure( + 'writes-single-chat', + repeat, + (i) => + request('POST', `/api/v1/chats/${writeChat}/messages`, { + text: `Concurrent write ${i}`, + }), + { total: writesPerRepeat }, + ); + assert.equal( + await prisma.message.count({ where: { chatId: writeChat } }), + writesPerRepeat, + ); + } + const second = await start(); + const faultChat = await newChat(); + const faultPath = `/api/v1/chats/${faultChat}/messages`; + assert.equal( + (await request('GET', faultPath, undefined, second)).items.length, + 0, + ); + const keysBefore = await observer.keys(`${prefix}:messages:${faultChat}:*`); + assert.ok(keysBefore.length); + proxy.setMode('cut'); + await sleep(100); + const written = await request('POST', faultPath, { + text: 'Committed while Redis is unavailable', + }); + const during = await request('GET', faultPath, undefined, second); + proxy.setMode('online'); + for (let i = 0; i < 60; i++) { + if (apps.every((app) => app.get(CacheService).redis?.status === 'ready')) + break; + await sleep(100); + } + assert.ok( + apps.every((app) => app.get(CacheService).redis?.status === 'ready'), + ); + const recovered = await request('GET', faultPath, undefined, second); + report.correctness.redis_reconnect = { + old_keys_retained: + (await observer.exists(...keysBefore)) === keysBefore.length, + read_after_write_during_outage: during.items.some( + (x) => x.id === written.id, + ), + read_after_write_after_reconnect_other_replica: recovered.items.some( + (x) => x.id === written.id, + ), + }; + await clearCache(); + const cold = await request('GET', faultPath, undefined, second); + report.correctness.empty_cache_recovery = cold.items.some( + (x) => x.id === written.id, + ); + const raceChat = await newChat(); + const racePath = `/api/v1/chats/${raceChat}/messages`; + const service = first.app.get( + require(`${process.cwd()}/dist/Chat/chat.service`).ChatService, + ); + const actualPrisma = service.prisma; + let release, began; + const started = new Promise((resolve) => { + began = resolve; + }); + const held = new Promise((resolve) => { + release = resolve; + }); + service.prisma = actualPrisma.$extends({ + query: { + message: { + async findMany({ args, query }) { + const rows = await query(args); + if (args.where?.chatId === raceChat) { + began(); + await held; + } + return rows; + }, + }, + }, + }); + const pending = request('GET', racePath); + let fresh; + try { + await Promise.race([ + started, + sleep(10000).then(() => { + throw new Error('race load did not start'); + }), + ]); + proxy.setMode('cut'); + await sleep(100); + fresh = await request( + 'POST', + racePath, + { text: 'New message after old SELECT' }, + second, + ); + proxy.setMode('online'); + for (let i = 0; i < 60; i++) { + if ( + apps.every((app) => app.get(CacheService).redis?.status === 'ready') + ) + break; + await sleep(100); + } + assert.ok( + apps.every((app) => app.get(CacheService).redis?.status === 'ready'), + ); + } finally { + release(); + service.prisma = actualPrisma; + } + await pending; + report.correctness.delayed_old_fill = ( + await request('GET', racePath, undefined, second) + ).items.some((x) => x.id === fresh.id); + if (stage === 'after') { + assert.equal( + report.correctness.redis_reconnect + .read_after_write_after_reconnect_other_replica, + true, + ); + assert.equal(report.correctness.delayed_old_fill, true); + assert.equal(report.correctness.empty_cache_recovery, true); + } + } + report.completed = true; +} finally { + proxy.setMode('online'); + try { + await prisma.chat.deleteMany({ where: { id: { in: chatIds } } }); + if (userId) await prisma.user.delete({ where: { id: userId } }); + await clearCache(); + report.cleanup = 'only experiment chats/user/cache prefix removed'; + } finally { + for (const app of apps) await app.close(); + observer.disconnect(); + await proxy.close(); + await writeFile( + process.argv[3] ?? `/tmp/cache-epochs-${stage}.json`, + JSON.stringify(report, null, 2) + '\n', + ); + } +} +console.log( + JSON.stringify({ + stage, + correctness: report.correctness, + completed: report.completed, + }), +); diff --git a/test/cache-environment.ps1 b/test/cache-environment.ps1 new file mode 100644 index 00000000..3223737e --- /dev/null +++ b/test/cache-environment.ps1 @@ -0,0 +1,25 @@ +$ErrorActionPreference = 'Stop' +$dockerInfo = docker info --format '{{json .}}' | ConvertFrom-Json +if ($LASTEXITCODE -ne 0) { throw 'docker info failed' } +$processor = Get-CimInstance Win32_Processor | Select-Object -First 1 +$computer = Get-CimInstance Win32_ComputerSystem +$containers = docker inspect mtusi2026lab2-fork-backend-1 mtusi2026lab2-fork-postgres-1 mtusi2026lab2-fork-redis-1 | ConvertFrom-Json +if ($LASTEXITCODE -ne 0) { throw 'docker inspect failed' } +$metadata = [ordered]@{ + recorded_at = [DateTime]::UtcNow.ToString('o') + host_cpu = $processor.Name + host_physical_cores = $processor.NumberOfCores + host_logical_processors = $processor.NumberOfLogicalProcessors + host_ram_bytes = $computer.TotalPhysicalMemory + docker_version = $dockerInfo.ServerVersion + docker_cpu_count = $dockerInfo.NCPU + docker_ram_bytes = $dockerInfo.MemTotal + docker_kernel = $dockerInfo.KernelVersion + containers = @($containers | ForEach-Object { + [ordered]@{ name = $_.Name; image = $_.Image; memory_limit_bytes = $_.HostConfig.Memory; nano_cpus_limit = $_.HostConfig.NanoCpus; cpu_quota = $_.HostConfig.CpuQuota } + }) + before_image = 'sha256:075170aed76a42aa98b435cfb918d83879259b7e17177275d5274e328198e119' + before_image_local_tag = 'lab2-cache-epochs:before' +} +$metadataPath = Join-Path (Get-Location).Path 'evidence/cache-epochs-environment.json' +[System.IO.File]::WriteAllText($metadataPath, ($metadata | ConvertTo-Json -Depth 6) + [Environment]::NewLine, [System.Text.UTF8Encoding]::new($false)) diff --git a/test/cache-epochs-optimization-summary.mjs b/test/cache-epochs-optimization-summary.mjs new file mode 100644 index 00000000..4a896706 --- /dev/null +++ b/test/cache-epochs-optimization-summary.mjs @@ -0,0 +1,91 @@ +import assert from 'node:assert/strict'; +import { readFile, writeFile } from 'node:fs/promises'; + +const reports = await Promise.all( + ['after', 'optimized'].map(async (name) => + JSON.parse(await readFile(`evidence/cache-epochs-${name}.json`, 'utf8')), + ), +); +assert.ok(reports.every((report) => report.completed)); +assert.deepEqual(reports[0].methodology, reports[1].methodology); +const median = (values) => + [...values].sort((a, b) => a - b)[Math.floor(values.length / 2)]; +const labels = ['Отдельная транзакция', 'Один CTE']; +const lines = [ + '# Оптимизация эпохи кэша в PostgreSQL', + '', + `Запуски UTC: ${reports.map((report) => report.recorded_at).join(' → ')}.`, + '', + 'Сравнение сохранённого замера прежней реализации и нового замера после оптимизации. В обоих вариантах эпоха хранится в PostgreSQL; новый вариант объединяет проверку членства, UPDATE эпохи и INSERT сообщения одним запросом. При чтении истории убрано получение неиспользуемых метаданных чата.', + '', + 'Медианы трёх повторов. Перцентили — медианы перцентилей повторов, без объединения выборок.', + '', + '| Сценарий | Вариант | RPS | p50, мс | p95, мс | p99, мс | SQL/HTTP | BEGIN/COMMIT на HTTP | CPU, % ядра | RSS, MiB | Ошибки |', + '| --- | --- | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: |', +]; +for (const workload of new Set( + reports[0].samples.map((sample) => sample.workload), +)) { + for (const [index, report] of reports.entries()) { + const samples = report.samples.filter( + (sample) => sample.workload === workload, + ); + assert.equal(samples.length, 3); + const get = (select) => median(samples.map(select)).toFixed(3); + const controls = (sample) => + Object.entries(sample.sql_calls) + .filter(([key]) => /^(BEGIN|COMMIT):/.test(key)) + .reduce((total, [, count]) => total + count, 0) / + (sample.successes + sample.errors); + lines.push( + `| ${workload} | ${labels[index]} | ${get((sample) => sample.successful_rps)} | ${get((sample) => sample.latency_ms.p50)} | ${get((sample) => sample.latency_ms.p95)} | ${get((sample) => sample.latency_ms.p99)} | ${get((sample) => sample.sql_per_request)} | ${get(controls)} | ${get((sample) => sample.process_cpu_percent_one_core)} | ${get((sample) => sample.peak_process_rss_mib)} | ${samples.reduce((total, sample) => total + sample.errors, 0)} |`, + ); + } +} +lines.push( + '', + '| Проверка | Отдельная транзакция | Один CTE |', + '| --- | --- | --- |', +); +for (const [label, select] of [ + [ + 'Чтение после записи при отказе Redis', + (report) => + report.correctness.redis_reconnect.read_after_write_during_outage, + ], + [ + 'Чтение другой репликой после восстановления Redis', + (report) => + report.correctness.redis_reconnect + .read_after_write_after_reconnect_other_replica, + ], + [ + 'Старые ключи сохранились в Redis', + (report) => report.correctness.redis_reconnect.old_keys_retained, + ], + [ + 'Восстановление с пустым кэшем', + (report) => report.correctness.empty_cache_recovery, + ], + [ + 'Задержанная загрузка старой истории', + (report) => report.correctness.delayed_old_fill, + ], +]) { + lines.push( + `| ${label} | ${reports.map((report) => (select(report) ? 'PASS' : 'FAIL')).join(' | ')} |`, + ); +} +lines.push( + '', + 'Методика: тот же `test/cache-benchmark.mjs`, 10 000 сообщений, limit=50, конкурентность 16, 3 с прогрева и 10 с чтения, 512 записей в новый чат, три повтора. Реальный HTTP по loopback в отдельных benchmark-контейнерах; общий PostgreSQL/Redis. Токены и пользователи создаются напрямую, хеширование паролей не измеряется. BEGIN/COMMIT исключены из SQL/HTTP; запрос WITH учитывается как один вызов pg.Client.query.', + '', + 'CPU/RSS включают API, генератор HTTP и инструментацию. Docker-host разделяется с другими работающими сервисами. Старый и новый замеры сделаны в разное время; изменение фоновой нагрузки и состояния host ограничивает сравнение RPS/latency. Замеры не доказывают максимальную ёмкость или SLA. UPDATE общей строки эпохи по-прежнему сериализует записи одного чата.', + '', + 'Сырые результаты: [до оптимизации](cache-epochs-after.json), [после оптимизации](cache-epochs-optimized.json). Хеши измеренных модулей сохранены в JSON. Исторические замеры до введения эпох остаются в `cache-epochs-summary.md`.', +); +await writeFile( + 'evidence/cache-epochs-optimization-summary.md', + lines.join('\n') + '\n', +); +console.log(lines.join('\n')); diff --git a/test/cache-epochs.mjs b/test/cache-epochs.mjs new file mode 100644 index 00000000..cac3aa13 --- /dev/null +++ b/test/cache-epochs.mjs @@ -0,0 +1,200 @@ +import 'dotenv/config'; +import assert from 'node:assert/strict'; +import { createHash, randomBytes, randomUUID } from 'node:crypto'; +import { createRequire } from 'node:module'; +import test from 'node:test'; +import { faultProxy } from './helpers/fault-proxy.mjs'; +import { messageEpoch } from './helpers/message-epoch.mjs'; + +const require = createRequire(import.meta.url); +const Redis = require('ioredis').default; +const { NestFactory } = require('@nestjs/core'); +const { AppModule } = require('../dist/app.module'); +const { PrismaService } = require('../dist/prisma/prisma.service'); +const { CacheService } = require('../dist/cache/cache.service'); +const { ChatService } = require('../dist/Chat/chat.service'); +const { + createFastifyAdapter, + exposeRequestIdHeader, +} = require('../dist/common/http/fastify-adapter'); +const pause = (ms) => new Promise((resolve) => setTimeout(resolve, ms)); + +test( + 'DB cache epochs: two replicas, retained Redis keys, concurrent writes and atomic rollback', + { timeout: 90000 }, + async (t) => { + assert.ok(process.env.CACHE_URL && process.env.DATABASE_URL); + const oldUrl = process.env.CACHE_URL; + const oldPrefix = process.env.CACHE_PREFIX; + const prefix = `test:epochs:${randomUUID()}`; + const proxy = await faultProxy(oldUrl, 6379); + const observer = new Redis(oldUrl); + process.env.CACHE_URL = proxy.url; + process.env.CACHE_PREFIX = prefix; + const apps = []; + let prisma, userId; + const chatIds = []; + t.after(async () => { + proxy.setMode('online'); + try { + if (prisma) { + await prisma.chat.deleteMany({ where: { id: { in: chatIds } } }); + if (userId) await prisma.user.delete({ where: { id: userId } }); + } + let cursor = '0'; + do { + const [next, keys] = await observer.scan( + cursor, + 'MATCH', + `${prefix}:*`, + 'COUNT', + 100, + ); + cursor = next; + if (keys.length) await observer.del(...keys); + } while (cursor !== '0'); + } finally { + for (const app of apps) await app.close(); + observer.disconnect(); + await proxy.close(); + process.env.CACHE_URL = oldUrl; + if (oldPrefix === undefined) delete process.env.CACHE_PREFIX; + else process.env.CACHE_PREFIX = oldPrefix; + } + }); + for (let i = 0; i < 2; i++) { + const app = await NestFactory.create(AppModule, createFastifyAdapter(), { + logger: false, + abortOnError: false, + }); + apps.push(app); + exposeRequestIdHeader(app); + await app.init(); + await app.getHttpAdapter().getInstance().ready(); + require('nestjs-pino').PinoLogger.root.level = 'silent'; + } + prisma = apps[0].get(PrismaService); + const user = await prisma.user.create({ + data: { + username: `epoch_${randomUUID().replaceAll('-', '').slice(0, 20)}`, + displayName: 'Synthetic epochs', + }, + }); + userId = user.id; + const token = randomBytes(32).toString('base64url'); + await prisma.session.create({ + data: { + userId, + tokenHash: createHash('sha256').update(token).digest('hex'), + expiresAt: new Date(Date.now() + 600000), + }, + }); + const call = async (replica, method, url, payload) => { + const response = await apps[replica] + .getHttpAdapter() + .getInstance() + .inject({ + method, + url, + headers: { + authorization: `Bearer ${token}`, + ...(method === 'POST' && /\/messages$/.test(url) + ? { 'idempotency-key': randomUUID() } + : {}), + }, + ...(payload ? { payload } : {}), + }); + return { status: response.statusCode, body: response.json() }; + }; + const createChat = async () => { + const response = await call(0, 'POST', '/api/v1/chats', { + title: 'Epoch test', + member_ids: [userId], + }); + assert.equal(response.status, 201); + chatIds.push(response.body.id); + return response.body.id; + }; + assert.equal((await call(1, 'GET', '/api/v1/chats')).body.items.length, 0); + proxy.setMode('cut'); + await pause(100); + const chatId = await createChat(); + proxy.setMode('online'); + const reconnect = async () => { + for (let i = 0; i < 60; i++) { + if (apps.every((app) => app.get(CacheService).redis.status === 'ready')) + return; + await pause(100); + } + assert.fail('Redis did not reconnect'); + }; + await reconnect(); + assert.deepEqual( + (await call(1, 'GET', '/api/v1/chats')).body.items.map((x) => x.id), + [chatId], + ); + assert.equal( + (await prisma.user.findUniqueOrThrow({ where: { id: userId } })) + .chatsEpoch, + 1n, + ); + + const path = `/api/v1/chats/${chatId}/messages`; + assert.equal((await call(1, 'GET', path)).body.items.length, 0); + const oldKeys = await observer.keys(`${prefix}:messages:${chatId}:*`); + assert.ok(oldKeys.length); + proxy.setMode('cut'); + await pause(100); + const posted = await call(0, 'POST', path, { + text: 'Write during Redis outage', + }); + assert.equal(posted.status, 201); + proxy.setMode('online'); + await reconnect(); + assert.equal( + await observer.exists(...oldKeys), + oldKeys.length, + 'old cache keys must still exist', + ); + assert.deepEqual( + (await call(1, 'GET', path)).body.items.map((x) => x.id), + [posted.body.id], + ); + + const service = apps[0].get(ChatService); + const original = service.prisma; + service.prisma = original.$extends({ + query: { + $queryRaw({ args, query }) { + const index = args.values.indexOf('Must roll back'); + if (index !== -1) args.values[index] = 'x'.repeat(4001); + return query(args); + }, + }, + }); + try { + assert.equal( + (await call(0, 'POST', path, { text: 'Must roll back' })).status, + 500, + ); + } finally { + service.prisma = original; + } + assert.equal(await prisma.message.count({ where: { chatId } }), 1); + assert.equal(await messageEpoch(prisma, chatId), 1n); + + const writes = await Promise.all( + Array.from({ length: 20 }, (_, i) => + call(i % 2, 'POST', path, { text: `Concurrent ${i}` }), + ), + ); + assert.ok(writes.every((x) => x.status === 201)); + assert.equal(await prisma.message.count({ where: { chatId } }), 21); + assert.equal(await messageEpoch(prisma, chatId), 21n); + const history = (await call(1, 'GET', path)).body.items; + assert.equal(new Set(history.map((x) => x.id)).size, 21); + assert.ok( + writes.every((x) => history.some((message) => message.id === x.body.id)), + ); + }, +); diff --git a/test/cache-metrics-summary.mjs b/test/cache-metrics-summary.mjs new file mode 100644 index 00000000..def3db52 --- /dev/null +++ b/test/cache-metrics-summary.mjs @@ -0,0 +1,73 @@ +import assert from 'node:assert/strict'; +import { readFile, writeFile } from 'node:fs/promises'; +const before = JSON.parse( + await readFile('evidence/cache-epochs-before.json', 'utf8'), +); +const after = JSON.parse( + await readFile('evidence/cache-epochs-after.json', 'utf8'), +); +assert.ok(before.completed && after.completed); +assert.deepEqual(before.methodology, after.methodology); +const median = (values) => + values.sort((a, b) => a - b)[Math.floor(values.length / 2)]; +const lines = [ + '# Эпохи кэша — сравнение 2026-10-13', + '', + 'Медианы трёх повторов. p50/p95/p99 — медианы перцентилей отдельных повторов, не перцентили объединённой выборки.', + '', + '| Сценарий | Вариант | RPS | p50, мс | p95, мс | p99, мс | SQL/HTTP | CPU процесса, % ядра | Пиковый RSS, MiB | Ошибки |', + '| --- | --- | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: |', +]; +for (const workload of [...new Set(before.samples.map((x) => x.workload))]) { + for (const report of [before, after]) { + const samples = report.samples.filter((x) => x.workload === workload); + assert.equal(samples.length, 3); + const get = (fn) => median(samples.map(fn)).toFixed(3); + lines.push( + `| ${workload} | ${report.stage} | ${get((x) => x.successful_rps)} | ${get((x) => x.latency_ms.p50)} | ${get((x) => x.latency_ms.p95)} | ${get((x) => x.latency_ms.p99)} | ${get((x) => x.sql_per_request)} | ${get((x) => x.process_cpu_percent_one_core)} | ${get((x) => x.peak_process_rss_mib)} | ${samples.reduce((sum, x) => sum + x.errors, 0)} |`, + ); + } +} +lines.push('', '| Проверка | До | После |', '| --- | --- | --- |'); +for (const [label, select] of [ + [ + 'Чтение после успешной записи при недоступном Redis', + (x) => x.correctness.redis_reconnect.read_after_write_during_outage, + ], + [ + 'Чтение другой репликой после восстановления Redis со старыми ключами', + (x) => + x.correctness.redis_reconnect + .read_after_write_after_reconnect_other_replica, + ], + [ + 'Старые ключи действительно сохранились', + (x) => x.correctness.redis_reconnect.old_keys_retained, + ], + ['Восстановление с пустым кэшем', (x) => x.correctness.empty_cache_recovery], + [ + 'Задержанная загрузка старой истории не отравляет следующий GET', + (x) => x.correctness.delayed_old_fill, + ], +]) + lines.push( + `| ${label} | ${select(before) ? 'PASS' : 'FAIL'} | ${select(after) ? 'PASS' : 'FAIL'} |`, + ); +lines.push( + '', + 'Методика: `test/cache-benchmark.mjs`, сырой результат: `cache-epochs-before.json` и `cache-epochs-after.json`. Конфигурация: `cache-epochs-environment.json`.', + '', + 'Реальный HTTP по loopback, 10 000 синтетических сообщений, первая страница limit=50. На повтор: холодная волна 32 запросов; прогрев 3 с; чтение с конкурентностью 16 в течение 10 с; прогрев 3 с и такой же контроль с отключённым кэшем истории; 512 записей в новый чат с конкурентностью 16. Три повтора. SQL считается на уровне pg.Client.query; BEGIN/COMMIT/ROLLBACK/SET вынесены в raw sql_calls и исключены из SQL/HTTP. Пароли не измеряются: пользователь и сессия создаются напрямую, токен остаётся в памяти.', + '', + 'CPU/RSS относятся к процессу эксперимента, включающему API, генератор HTTP и инструментацию. Docker Desktop: 4 CPU, около 2.80 GiB RAM, отдельные лимиты сервисов не заданы. Замеры closed-loop, короткие и последовательные before → after; разброс и прогрев ограничивают выводы о latency/RPS. Это не тест максимальной ёмкости или SLA. Первый холодный повтор также включает прогрев runtime.', + '', + 'Первичные короткие замеры (1 с прогрева, 5 с чтений, 128 записей) сохранены отдельно в cache-epochs-before-short.json и cache-epochs-after-short.json. Из-за большого разброса сделано одно повторное сравнение с увеличенным прогревом и нагрузкой; основные результаты получены в отдельных контейнерах benchmark из соответствующих образов. PostgreSQL/Redis и остальные контейнеры разделяют ресурсы Docker-host. Другие проекты на этом host не останавливались. Формулировки provenance в основных JSON уточнены после перехода от docker exec к отдельному контейнеру; численные измерения не менялись.', + '', + 'До изменений использован фактически запущенный образ (локальный тег lab2-cache-epochs:before), после — пересобранный проект. Старый образ ещё использовал OR для курсорной пагинации; измеряемая первая страница не содержит курсора, поэтому этот путь в нагрузочном сравнении не выполняется. Хеши измеренных модулей записаны в JSON.', + '', + 'Эпоха истории читается JOIN-ом вместе с проверкой членства; эпоха списка чатов — JOIN-ом с проверкой сессии. Для отдельного запроса дополнительного чтения эпохи нет. Однако raw JOIN проверки членства не использует прежний batching findUnique в Prisma: под конкуренцией суммарный SQL/HTTP может вырасти. Запись добавляет UPDATE чата и транзакционные команды; обновления одного чата сериализуются. Старые ключи недоступны новым читателям и удаляются по TTL.', + '', + 'Корректность зависит от основного PostgreSQL и обновления эпох во всех путях изменения данных. Прямые SQL-изменения в обход приложения требуют увеличения соответствующей эпохи. После восстановления PostgreSQL из старого backup следует сменить CACHE_PREFIX или очистить кэш, чтобы исключить повторное использование эпох. Сохранность Docker-host и высокая доступность PostgreSQL не исследовались. Cache stampede не устраняется этим изменением.', +); +await writeFile('evidence/cache-epochs-summary.md', lines.join('\n') + '\n'); +console.log(lines.slice(0, 14).join('\n')); diff --git a/test/cache-strategy-summary.mjs b/test/cache-strategy-summary.mjs new file mode 100644 index 00000000..e7b2cc7b --- /dev/null +++ b/test/cache-strategy-summary.mjs @@ -0,0 +1,117 @@ +import assert from 'node:assert/strict'; +import { readFile, writeFile } from 'node:fs/promises'; + +const resultPrefix = process.argv[2] ?? 'cache-strategy'; +assert.match(resultPrefix, /^[a-z0-9-]+$/); + +const reports = await Promise.all( + ['full', 'no-redis-no-epochs'].map(async (name) => + JSON.parse(await readFile(`evidence/${resultPrefix}-${name}.json`, 'utf8')), + ), +); +const provenance = JSON.parse( + await readFile(`evidence/${resultPrefix}-experiment.json`, 'utf8'), +); +assert.ok(reports.every((report) => report.completed)); +assert.deepEqual(reports[0].methodology, reports[1].methodology); +assert.equal(provenance.exit_code, 0); +assert.ok(provenance.sources_unchanged); +assert.ok(reports[1].correctness.epochs_unchanged); +assert.ok(reports[1].correctness.no_redis_client); +const median = (values) => + [...values].sort((a, b) => a - b)[Math.floor(values.length / 2)]; +const labels = ['Redis и эпохи', 'Без Redis и эпох']; +const aggregates = []; +const settings = reports[0].methodology; +const lines = [ + '# Полная стратегия кэша и вариант без Redis и эпох', + '', + `Запуски UTC: ${reports.map((report) => report.recorded_at).join(' → ')}.`, + '', + 'Сначала выполнен свежий прогон текущего образа с Redis, PostgreSQL-эпохами и записью сообщения через CTE. Затем шесть модулей приложения заменены временными версиями без поддержания эпох: убраны изменения счётчиков и чтения эпох в проверках сессии/членства. Объединённые проверки сессии, публичного профиля и доступа к истории сохранены. Сообщение вставляется одним INSERT ... SELECT с проверкой членства, без обновления счётчиков. Второй API запущен без CACHE_URL: все кэши приложения отключены. Исходники рабочего проекта и запущенный backend не изменены.', + '', + `Параметры обоих прогонов совпадают: ${settings.repetitions} повтора, конкурентность ${settings.concurrency}, ${settings.seed_messages} сообщений, limit=50, прогрев ${settings.warmup_seconds} с и чтение ${settings.duration_seconds} с, ${settings.writes_per_repeat} записей в новый чат. RPS = общее число успешных запросов / общее время повторов. Средняя задержка взвешена по числу успешных запросов. p95 — среднее отдельных p95, не перцентиль объединённой выборки. SQL/HTTP исключает команды транзакций.`, + '', + '| Сценарий | Вариант | Средний RPS | Средняя задержка, мс | Среднее p95, мс | SQL/HTTP | Медиана RPS | Ошибки |', + '| --- | --- | ---: | ---: | ---: | ---: | ---: | ---: |', +]; +for (const [workload, label] of [ + ['cold-history-burst', 'Холодная волна истории'], + ['warm-history', 'Прогретая история'], + ['history-cache-bypassed', 'Контроль без кэша истории'], + ['writes-single-chat', 'Запись в один чат'], +]) { + if ( + reports.every( + (report) => + !report.samples.some((sample) => sample.workload === workload), + ) + ) + continue; + for (const [index, report] of reports.entries()) { + const samples = report.samples.filter( + (sample) => sample.workload === workload, + ); + assert.equal(samples.length, settings.repetitions); + const sum = (select) => + samples.reduce((total, sample) => total + select(sample), 0); + const successes = sum((sample) => sample.successes); + const errors = sum((sample) => sample.errors); + const aggregate = { + workload, + variant: labels[index], + successes, + errors, + mean_rps: successes / sum((sample) => sample.elapsed_seconds), + mean_latency_ms: + sum((sample) => sample.latency_ms.mean * sample.successes) / successes, + mean_p95_ms: sum((sample) => sample.latency_ms.p95) / samples.length, + sql_per_request: + sum((sample) => sample.sql_queries) / (successes + errors), + median_rps: median(samples.map((sample) => sample.successful_rps)), + repeat_rps: samples.map((sample) => sample.successful_rps), + }; + aggregates.push(aggregate); + lines.push( + `| ${label} | ${labels[index]} | ${aggregate.mean_rps.toFixed(3)} | ${aggregate.mean_latency_ms.toFixed(3)} | ${aggregate.mean_p95_ms.toFixed(3)} | ${aggregate.sql_per_request.toFixed(3)} | ${aggregate.median_rps.toFixed(3)} | ${errors} |`, + ); + } +} +lines.push( + '', + `Учтено успешных HTTP-запросов: ${reports.map((report, index) => `${labels[index]} — ${report.samples.reduce((sum, sample) => sum + sample.successes, 0)}`).join('; ')}.`, + '', + ...['warm-history', 'writes-single-chat'].map((workload) => { + const pair = aggregates.filter( + (aggregate) => aggregate.workload === workload, + ); + return `${workload}: отношение среднего RPS полной стратегии к варианту без стратегии — ${(pair[0].mean_rps / pair[1].mean_rps).toFixed(3)}. RPS по повторам: ${pair.map((aggregate) => `${aggregate.variant}: ${aggregate.repeat_rps.join(' / ')}`).join('; ')}.`; + }), + '', + settings.history_control === false + ? 'Дополнительный контроль с частично отключённым кэшем в этом прогоне пропущен. Сравниваются только полная стратегия и отсутствие Redis/поддержания эпох.' + : 'В контрольном сценарии у первого API отключён только кэш истории; кэш профиля продолжает работать. У второго API отключены все кэши. Поэтому этот контроль не измеряет отдельно чистую стоимость эпох.', + '', + `Проверки полной стратегии: чтение после записи при отказе Redis, чтение другой репликой после восстановления со старыми ключами, восстановление с пустым кэшем, задержанная загрузка старой истории. Проверки варианта без стратегии: приложение не создало Redis-клиент, эпохи синтетических пользователей/чатов остались равны 0 после всех записей, ${settings.writes_per_repeat} сообщений записаны в каждом новом чате, история читается после записи без повторяющихся ID.`, + '', + `Оба прогона используют один базовый образ; изменённые модули временной версии скомпилированы TypeScript без полной пересборки контейнера и подключены отдельными bind mounts. Хеши исходников и JS сохранены в [метаданных эксперимента](${resultPrefix}-experiment.json). Колонки эпох остаются в схеме; это исключает миграцию и позволяет сохранить рабочую БД. SQL-проверки профиля и членства во втором варианте не используют эпохи. Временные файлы удалены, хеши рабочих исходников проверены.`, + '', + 'Ограничения: прогоны последовательные, Docker-host разделяется с другими сервисами; большой разброс ограничивает выводы о скорости. CPU/RSS процесса включают API, HTTP-генератор и инструментацию; CPU PostgreSQL отдельно не измерен. Синтетические сессии обходят KDF. Холодная волна означает пустой кэш приложения, а не холодный PostgreSQL. Отдельные цены Redis и эпох этим сравнением не разделяются: меняется вся стратегия. Данные рабочей БД и volumes сохранены, удалены только фикстуры эксперимента.', + '', + 'Повторение:', + '', + '```powershell', + `docker compose -f compose.yaml -f test/compose.benchmark.yaml run --rm --no-deps --pull never benchmark node test/cache-benchmark.mjs after /results/${resultPrefix}-full.json --concurrency ${settings.concurrency} --duration-seconds ${settings.duration_seconds} --warmup-seconds ${settings.warmup_seconds} --repetitions ${settings.repetitions} --seed-messages ${settings.seed_messages} --cold-burst ${settings.cold_burst_requests} --writes-per-repeat ${settings.writes_per_repeat}${settings.history_control === false ? ' --skip-history-control' : ''}`, + `$env:EXPERIMENT_PREFIX='${resultPrefix}'`, + `node test/no-epochs-experiment.cjs --concurrency ${settings.concurrency} --duration-seconds ${settings.duration_seconds} --warmup-seconds ${settings.warmup_seconds} --repetitions ${settings.repetitions} --seed-messages ${settings.seed_messages} --cold-burst ${settings.cold_burst_requests} --writes-per-repeat ${settings.writes_per_repeat}${settings.history_control === false ? ' --skip-history-control' : ''}`, + `node test/cache-strategy-summary.mjs ${resultPrefix}`, + '```', + '', + `Сырые результаты: [полная стратегия](${resultPrefix}-full.json), [без Redis и эпох](${resultPrefix}-no-redis-no-epochs.json).`, +); +await writeFile(`evidence/${resultPrefix}-summary.md`, lines.join('\n') + '\n'); +await writeFile( + `evidence/${resultPrefix}-averages.json`, + JSON.stringify(aggregates, null, 2) + '\n', +); +console.log(lines.slice(0, 18).join('\n')); diff --git a/test/cache.mjs b/test/cache.mjs new file mode 100644 index 00000000..d6484107 --- /dev/null +++ b/test/cache.mjs @@ -0,0 +1,292 @@ +import 'dotenv/config'; +import assert from 'node:assert/strict'; +import { createHash, randomBytes, randomUUID } from 'node:crypto'; +import { createRequire } from 'node:module'; +import test from 'node:test'; + +const require = createRequire(import.meta.url); +const Redis = require('ioredis').default; +const { NestFactory } = require('@nestjs/core'); +const { AppModule } = require('../dist/app.module'); +const { PrismaService } = require('../dist/prisma/prisma.service'); +const { CacheService } = require('../dist/cache/cache.service'); +const { + createFastifyAdapter, + exposeRequestIdHeader, +} = require('../dist/common/http/fastify-adapter'); + +async function isolatedCache(t) { + assert.ok(process.env.CACHE_URL, 'Set CACHE_URL to a running Redis instance'); + const previous = process.env.CACHE_PREFIX; + const prefix = `test:cache:${randomUUID()}`; + process.env.CACHE_PREFIX = prefix; + const observer = new Redis(process.env.CACHE_URL, { + maxRetriesPerRequest: 0, + connectTimeout: 1000, + commandTimeout: 1000, + }); + observer.on('error', () => {}); + await observer.ping(); + t.after(async () => { + try { + let cursor = '0'; + do { + const [next, keys] = await observer.scan( + cursor, + 'MATCH', + `${prefix}:*`, + 'COUNT', + 100, + ); + cursor = next; + if (keys.length) await observer.del(...keys); + } while (cursor !== '0'); + } finally { + observer.disconnect(); + if (previous === undefined) delete process.env.CACHE_PREFIX; + else process.env.CACHE_PREFIX = previous; + } + }); + return { prefix, observer }; +} + +test('Redis cache: hits, expiry, invalidation race and unavailable-server fallback', async (t) => { + await isolatedCache(t); + const cache = new CacheService(); + t.after(() => cache.onModuleDestroy()); + await cache.onModuleInit(); + let reads = 0; + const load = async () => ({ value: ++reads }); + assert.deepEqual(await cache.remember('hits', 'page', 30, load), { + value: 1, + }); + assert.deepEqual(await cache.remember('hits', 'page', 30, load), { + value: 1, + }); + assert.equal(reads, 1); + assert.deepEqual(await cache.remember('expiry', 'page', 1, load), { + value: 2, + }); + await new Promise((resolve) => setTimeout(resolve, 1100)); + assert.deepEqual(await cache.remember('expiry', 'page', 1, load), { + value: 3, + }); + await cache.invalidate('expiry'); + assert.deepEqual(await cache.remember('expiry', 'page', 1, load), { + value: 4, + }); + + let resolveOld; + let began; + const started = new Promise((resolve) => { + began = resolve; + }); + const pending = cache.remember('race', 'page', 30, () => { + began(); + return new Promise((resolve) => { + resolveOld = resolve; + }); + }); + await started; + await cache.invalidate('race'); + resolveOld({ value: 'old' }); + await pending; + assert.deepEqual( + await cache.remember('race', 'page', 30, async () => ({ value: 'new' })), + { value: 'new' }, + ); + assert.deepEqual( + await cache.remember('race', 'page', 30, async () => { + throw new Error('cache miss'); + }), + { value: 'new' }, + ); + await assert.rejects( + cache.remember('db-error', 'page', 30, async () => { + throw new Error('database failure'); + }), + /database failure/, + ); + + const previous = process.env.CACHE_URL; + process.env.CACHE_URL = 'redis://127.0.0.1:1/0'; + const offline = new CacheService(); + process.env.CACHE_URL = previous; + t.after(() => offline.onModuleDestroy()); + await offline.onModuleInit(); + assert.deepEqual( + await offline.remember('offline', 'page', 30, async () => ({ + value: 'database', + })), + { value: 'database' }, + ); + await offline.invalidate('offline'); +}); + +test('API cache: fewer SQL reads, write invalidation, permissions, logout and Redis fallback', async (t) => { + assert.ok(process.env.DATABASE_URL); + const { prefix, observer } = await isolatedCache(t); + const app = await NestFactory.create(AppModule, createFastifyAdapter(), { + logger: false, + abortOnError: false, + }); + exposeRequestIdHeader(app); + await app.init(); + const server = app.getHttpAdapter().getInstance(); + await server.ready(); + const prisma = app.get(PrismaService); + const userIds = []; + const chatIds = []; + t.after(async () => { + try { + await prisma.chat.deleteMany({ where: { id: { in: chatIds } } }); + await prisma.user.deleteMany({ where: { id: { in: userIds } } }); + } finally { + await app.close(); + } + }); + const actors = []; + for (let i = 0; i < 2; i++) { + const user = await prisma.user.create({ + data: { + username: `cache_${randomUUID().replaceAll('-', '').slice(0, 20)}`, + displayName: 'Cache test', + }, + }); + userIds.push(user.id); + const token = randomBytes(32).toString('base64url'); + const session = await prisma.session.create({ + data: { + userId: user.id, + tokenHash: createHash('sha256').update(token).digest('hex'), + expiresAt: new Date(Date.now() + 600000), + }, + }); + actors.push({ id: user.id, token, sessionId: session.id }); + } + const [alice, outsider] = actors; + const request = (method, url, payload, actor = alice) => + server.inject({ + method, + url, + headers: { + authorization: `Bearer ${actor.token}`, + ...(method === 'POST' && /\/messages$/.test(url) + ? { 'idempotency-key': randomUUID() } + : {}), + }, + ...(payload === undefined ? {} : { payload }), + }); + const counts = new Map(); + const tracked = prisma.$extends({ + query: { + $allModels: { + $allOperations({ model, operation, args, query }) { + const key = `${model}:${operation}`; + counts.set(key, (counts.get(key) ?? 0) + 1); + return query(args); + }, + }, + }, + }); + for (const name of [ + 'User/user.service', + 'Chat/chat.service', + 'Auth/auth.service', + ]) { + const exported = require(`../dist/${name}`); + const Service = Object.values(exported)[0]; + app.get(Service).prisma = tracked; + } + const spy = (model, operation) => ({ + mock: { callCount: () => counts.get(`${model}:${operation}`) ?? 0 }, + }); + const profileReads = spy('User', 'findUnique'); + assert.equal((await request('GET', '/api/v1/users/me')).statusCode, 200); + assert.equal((await request('GET', '/api/v1/users/me')).statusCode, 200); + assert.equal(profileReads.mock.callCount(), 0); + + const chatListReads = spy('Chat', 'findMany'); + assert.equal((await request('GET', '/api/v1/chats')).json().items.length, 0); + assert.equal((await request('GET', '/api/v1/chats')).json().items.length, 0); + assert.equal(chatListReads.mock.callCount(), 1); + const created = await request('POST', '/api/v1/chats', { + title: 'Cached chat', + member_ids: [alice.id], + }); + assert.equal(created.statusCode, 201); + const chatId = created.json().id; + chatIds.push(chatId); + assert.deepEqual( + (await request('GET', '/api/v1/chats')).json().items.map((x) => x.id), + [chatId], + ); + assert.equal(chatListReads.mock.callCount(), 2); + + const metadataReads = spy('Chat', 'findUnique'); + const messageReads = spy('Message', 'findMany'); + const path = `/api/v1/chats/${chatId}/messages`; + assert.equal((await request('GET', path)).json().items.length, 0); + assert.equal((await request('GET', path)).json().items.length, 0); + assert.equal(metadataReads.mock.callCount(), 0); + assert.equal(messageReads.mock.callCount(), 1); + const message = await request('POST', path, { + text: 'Invalidate cached empty history', + }); + assert.equal(message.statusCode, 201); + assert.deepEqual( + (await request('GET', path)).json().items.map((x) => x.id), + [message.json().id], + ); + assert.equal(messageReads.mock.callCount(), 2); + assert.equal( + (await request('GET', path, undefined, outsider)).statusCode, + 404, + ); + await prisma.chatMember.delete({ + where: { chatId_userId: { chatId, userId: alice.id } }, + }); + assert.equal((await request('GET', path)).statusCode, 404); + await prisma.chatMember.create({ + data: { chatId, userId: alice.id, position: 0 }, + }); + await prisma.session.update({ + where: { id: outsider.sessionId }, + data: { revokedAt: new Date() }, + }); + assert.equal( + (await request('GET', '/api/v1/users/me', undefined, outsider)).statusCode, + 401, + ); + + const keys = []; + let cursor = '0'; + do { + const [next, batch] = await observer.scan( + cursor, + 'MATCH', + `${prefix}:*`, + 'COUNT', + 100, + ); + cursor = next; + keys.push(...batch); + } while (cursor !== '0'); + assert.ok(keys.length >= 4, 'Redis must contain the cached responses'); + for (const key of keys) { + const value = await observer.get(key); + assert.ok( + !value.includes('password_hash') && !value.includes('passwordHash'), + ); + for (const actor of actors) assert.ok(!value.includes(actor.token)); + } + app.get(CacheService).onModuleDestroy(); + assert.equal((await request('GET', path)).statusCode, 200); + assert.equal(messageReads.mock.callCount(), 3); + assert.equal( + (await request('POST', path, { text: 'Write while Redis is unavailable' })) + .statusCode, + 201, + ); + assert.equal((await request('GET', path)).json().items.length, 2); +}); diff --git a/test/check_migration_compat.py b/test/check_migration_compat.py new file mode 100644 index 00000000..11da40ee --- /dev/null +++ b/test/check_migration_compat.py @@ -0,0 +1,257 @@ +#!/usr/bin/env python3 +"""Run the lab3 migration while a lab2 API uses an isolated temporary database.""" + +import base64 +import json +from pathlib import Path +import secrets +import subprocess +import sys +import threading +import time +import urllib.error +from urllib.parse import quote +import urllib.request +import uuid + +ROOT = Path(__file__).resolve().parents[1] +NETWORK = 'mtusi2026lab3-fork_default' +OLD_API = 'mtusi2026lab2-fork-backend:latest' +OLD_MIGRATE = 'mtusi2026lab2-fork-migrate:latest' +NEW_API = 'mtusi2026lab3-fork-api:latest' +NEW_MIGRATE = 'mtusi2026lab3-fork-migrate:latest' + + +def docker(*args, timeout=60): + result = subprocess.run(['docker', *args], cwd=ROOT, capture_output=True, + text=True, timeout=timeout, check=False) + if result.returncode: + raise RuntimeError(f'docker {args[0]} failed with code {result.returncode}') + return result.stdout.strip() + + +def request(base, method, path, body=None, token=None, basic=None, key=None): + headers = {'Accept': 'application/json'} + if token: + headers['Authorization'] = 'Bearer ' + token + if basic: + headers['Authorization'] = 'Basic ' + base64.b64encode( + (basic[0] + ':' + basic[1]).encode()).decode() + if key: + headers['Idempotency-Key'] = key + data = None + if body is not None: + data = json.dumps(body).encode() + headers['Content-Type'] = 'application/json' + req = urllib.request.Request(base + path, data=data, headers=headers, + method=method) + try: + with urllib.request.urlopen(req, timeout=3) as response: + raw = response.read() + return response.status, json.loads(raw) if raw else None + except urllib.error.HTTPError as exc: + raise RuntimeError(f'{method} {path}: HTTP {exc.code}') from None + except (urllib.error.URLError, TimeoutError, OSError) as exc: + raise RuntimeError(f'{method} {path}: {type(exc).__name__}') from None + + +def wait_http(base): + deadline = time.monotonic() + 45 + while time.monotonic() < deadline: + try: + if request(base, 'GET', '/health/ready')[0] == 200: + return + except RuntimeError: + pass + time.sleep(0.2) + raise RuntimeError('temporary API did not become ready') + + +def publish_port(name): + value = docker('port', name, '8080/tcp') + return 'http://127.0.0.1:' + value.rsplit(':', 1)[1] + + +def make_user(base, label): + username = 'compat_' + label + '_' + uuid.uuid4().hex[:8] + password = 'T3st-' + uuid.uuid4().hex + status, user = request(base, 'POST', '/api/v1/users', + {'username': username, 'display_name': label, + 'password': password}) + assert status == 201 + status, session = request(base, 'POST', '/api/v1/auth/sessions', + basic=(username, password)) + assert status == 201 + return user, session['token'] + + +def message(base, token, chat_id, text, key=None): + status, item = request(base, 'POST', + f'/api/v1/chats/{chat_id}/messages', + {'text': text}, token=token, key=key) + assert status == 201 + return item + + +def history(base, token, chat_id): + items = [] + cursor = None + for _ in range(100): + path = f'/api/v1/chats/{chat_id}/messages?limit=100' + if cursor: + path += '&cursor=' + quote(cursor, safe='') + status, page = request(base, 'GET', path, token=token) + assert status == 200 + items.extend(page['items']) + cursor = page['next_cursor'] + if cursor is None: + return items + raise RuntimeError('history pagination exceeded safety bound') + + +def run(): + suffix = uuid.uuid4().hex[:10] + names = {label: 'lab3-compat-' + suffix + '-' + label + for label in ('pg', 'redis', 'old', 'new')} + password = secrets.token_urlsafe(18) + db_url = f'postgresql://app:{password}@{names["pg"]}:5432/compat' + cache_url = f'redis://{names["redis"]}:6379/0' + created = [] + try: + print('Starting isolated PostgreSQL and Redis...', flush=True) + docker('run', '--rm', '-d', '--name', names['pg'], '--network', NETWORK, + '--tmpfs', '/var/lib/postgresql/data:rw,mode=0700', + '-e', 'POSTGRES_DB=compat', '-e', 'POSTGRES_USER=app', + '-e', 'POSTGRES_PASSWORD=' + password, + 'postgres:17.6-bookworm') + created.append(names['pg']) + docker('run', '--rm', '-d', '--name', names['redis'], '--network', NETWORK, + 'redis:7.4.5-alpine', 'redis-server', '--save', '', + '--appendonly', 'no') + created.append(names['redis']) + deadline = time.monotonic() + 30 + while True: + try: + docker('exec', names['pg'], 'pg_isready', '-U', 'app', + '-d', 'compat', timeout=5) + break + except RuntimeError: + if time.monotonic() >= deadline: + raise RuntimeError('temporary PostgreSQL did not start') + time.sleep(0.3) + docker('run', '--rm', '--network', NETWORK, '-e', 'DATABASE_URL=' + db_url, + OLD_MIGRATE, timeout=90) + print('Lab2 schema applied.', flush=True) + before_table = docker('exec', names['pg'], 'psql', '-U', 'app', '-d', + 'compat', '-tAc', + "SELECT to_regclass('public.message_idempotency') IS NOT NULL") + assert before_table == 'f', 'new table exists before migration' + base_env = ['-e', 'DATABASE_URL=' + db_url, + '-e', 'CACHE_URL=' + cache_url, + '-e', 'CACHE_PREFIX=compat:' + suffix, + '-e', 'APP_HOST=0.0.0.0', '-e', 'APP_PORT=8080', + '-e', 'APP_ENV=lab', '-e', 'SESSION_STORE=postgres'] + docker('run', '--rm', '-d', '--name', names['old'], '--network', NETWORK, + '-p', '127.0.0.1::8080', *base_env, OLD_API) + created.append(names['old']) + old_base = publish_port(names['old']) + wait_http(old_base) + print('Lab2 API ready; preparing synthetic chat.', flush=True) + alice, token = make_user(old_base, 'alice') + bob, _ = make_user(old_base, 'bob') + status, chat = request(old_base, 'POST', '/api/v1/chats', + {'title': 'Migration compatibility', + 'member_ids': [alice['id'], bob['id']]}, + token=token) + assert status == 201 + pre = message(old_base, token, chat['id'], 'before migration') + + stop = threading.Event() + events = [] + + def old_writer(): + index = 0 + while not stop.is_set(): + at = time.monotonic() + try: + item = message(old_base, token, chat['id'], + f'during migration {index}') + events.append((at, True, item['id'])) + except (RuntimeError, AssertionError): + events.append((at, False, None)) + index += 1 + stop.wait(0.3) + + thread = threading.Thread(target=old_writer, daemon=True) + thread.start() + time.sleep(0.5) + started = time.monotonic() + try: + print('Applying lab3 migration while lab2 API writes...', flush=True) + docker('run', '--rm', '--network', NETWORK, + '-e', 'DATABASE_URL=' + db_url, + NEW_MIGRATE, timeout=90) + finally: + migrated = time.monotonic() + time.sleep(0.7) + stop.set() + thread.join(timeout=5) + after_table = docker('exec', names['pg'], 'psql', '-U', 'app', '-d', + 'compat', '-tAc', + "SELECT to_regclass('public.message_idempotency') IS NOT NULL") + assert after_table == 't', 'new table was not created' + assert any(ok and at < started for at, ok, _ in events), 'no old writes before migration' + assert any(ok and at > migrated for at, ok, _ in events), 'no old writes after migration' + assert all(ok for _, ok, _ in events), 'old API write failed near migration' + after = message(old_base, token, chat['id'], 'after migration') + print('Lab2 API still reads and writes; starting lab3 API.', flush=True) + + docker('run', '--rm', '-d', '--name', names['new'], '--network', NETWORK, + '-p', '127.0.0.1::8080', *base_env, + '-e', 'INSTANCE_ID=compat-new', NEW_API) + created.append(names['new']) + new_base = publish_port(names['new']) + wait_http(new_base) + print('Lab3 API ready; checking mixed-version reads and writes.', flush=True) + status, profile = request(new_base, 'GET', '/api/v1/users/me', token=token) + assert status == 200 and profile['id'] == alice['id'], 'session not shared' + key = uuid.uuid4().hex + new_message = message(new_base, token, chat['id'], 'from new version', key) + replay = message(new_base, token, chat['id'], 'from new version', key) + assert replay == new_message, 'new API idempotent replay changed response' + old_after_new = message(old_base, token, chat['id'], 'from old version') + for version, base in (('old', old_base), ('new', new_base)): + items = history(base, token, chat['id']) + ids = [item['id'] for item in items] + for label, item in (('pre', pre), ('after', after), + ('new', new_message), ('old-after-new', old_after_new)): + assert ids.count(item['id']) == 1, f'{version} API cannot see {label} message' + result = { + 'old_image': OLD_API, 'new_image': NEW_API, + 'migration_image': NEW_MIGRATE, + 'migration_seconds': round(migrated - started, 3), + 'old_writes_near_migration': len(events), + 'old_write_errors': sum(not ok for _, ok, _ in events), + 'old_and_new_read_each_others_messages': True, + 'existing_session_accepted_by_new_api': True, + 'new_api_idempotent_replay': True, + 'temporary_database': True, + } + print(json.dumps(result, indent=2)) + print('PASS: additive migration compatible with running lab2 API') + finally: + print('Stopping isolated test containers...', flush=True) + for name in reversed(created): + try: + docker('stop', name, timeout=30) + except (RuntimeError, subprocess.TimeoutExpired): + print(f'WARNING: stop temporary container {name} manually', + file=sys.stderr) + + +if __name__ == '__main__': + try: + run() + except (RuntimeError, AssertionError, OSError, subprocess.TimeoutExpired) as exc: + print(f'FAIL: {exc}', file=sys.stderr) + raise SystemExit(1) from None diff --git a/test/check_shutdown.py b/test/check_shutdown.py new file mode 100644 index 00000000..0b09eec8 --- /dev/null +++ b/test/check_shutdown.py @@ -0,0 +1,170 @@ +#!/usr/bin/env python3 +"""Check readiness 200 -> 503 -> closed, liveness and LB withdrawal on SIGTERM.""" +import argparse +import json +from pathlib import Path +import subprocess +import sys +import time +import urllib.error +import urllib.request + +ROOT = Path(__file__).resolve().parents[1] +PROBE = r''' +import json, sys, threading, time, urllib.error, urllib.request +url = sys.argv[1] +live_url = url.replace('/health/ready', '/health/live') +phase = 'before' +events = [] +def commands(): + global phase + for line in sys.stdin: + phase = line.strip() + if phase == 'end': break +def status(address): + try: + with urllib.request.urlopen(address, timeout=1) as response: + return str(response.status) + except urllib.error.HTTPError as error: + return str(error.code) + except (urllib.error.URLError, TimeoutError, OSError): + return 'connection_error' +threading.Thread(target=commands, daemon=True).start() +print('READY', flush=True) +while phase != 'end': + current = phase + ready = status(url) + live = status(live_url) + events.append({'phase': current, 'ready': ready, 'live': live}) + time.sleep(0.05) +print(json.dumps(events), flush=True) +''' + + +def command(*args, timeout=45): + result = subprocess.run(args, cwd=ROOT, capture_output=True, text=True, + timeout=timeout, check=False) + if result.returncode: + raise RuntimeError(f'{args[0]} {args[1]} failed (code {result.returncode})') + return result.stdout.strip() + + +def both_ready(base_url, expected): + seen = set() + deadline = time.monotonic() + 45 + while time.monotonic() < deadline: + try: + with urllib.request.urlopen(base_url + '/health/ready', timeout=2) as response: + seen.add(response.headers['X-Instance-Id']) + except (urllib.error.URLError, TimeoutError, OSError): + pass + if seen == expected: + return + time.sleep(0.1) + raise RuntimeError(f'both replicas did not recover: {seen}') + + +def main(): + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument('--base-url', default='http://127.0.0.1:8080') + args = parser.parse_args() + ids = command('docker', 'compose', 'ps', '--all', '-q', 'api').splitlines() + if len(ids) != 2: + raise RuntimeError('shutdown probe requires two API replicas') + expected = {command('docker', 'inspect', '--format', '{{.Config.Hostname}}', item) for item in ids} + target = ids[0] + networks = json.loads(command('docker', 'inspect', '--format', '{{json .NetworkSettings.Networks}}', target)) + network, settings = next(iter(networks.items())) + address = settings['IPAddress'] + nginx = command('docker', 'compose', 'ps', '-q', 'nginx') + both_ready(args.base_url, expected) + probe = subprocess.Popen( + ['docker', 'run', '--rm', '-i', '--network', network, + 'python:3.11-slim-bookworm', 'python', '-u', '-c', PROBE, + f'http://{address}:8080/health/ready'], + cwd=ROOT, stdin=subprocess.PIPE, stdout=subprocess.PIPE, + stderr=subprocess.DEVNULL, text=True) + stop = None + + def phase(value): + probe.stdin.write(value + '\n') + probe.stdin.flush() + + try: + if probe.stdout.readline().strip() != 'READY': + raise RuntimeError('direct readiness probe did not start') + time.sleep(1) + phase('stopping') + started = time.monotonic() + stop = subprocess.Popen(['docker', 'stop', '--time', '30', target], cwd=ROOT, + stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True) + withdrawn_at = None + withdrawn_while_running = False + while stop.poll() is None and time.monotonic() - started < 35: + upstreams = command('docker', 'exec', nginx, 'cat', '/etc/nginx/ready-upstreams.conf', timeout=10) + if f'server {address}:8080 ' not in upstreams: + withdrawn_at = time.monotonic() - started + withdrawn_while_running = command('docker', 'inspect', '--format', '{{.State.Running}}', target) == 'true' + if withdrawn_while_running: + phase('withdrawn') + break + time.sleep(0.1) + stop.communicate(timeout=40) + if stop.returncode: + raise RuntimeError('docker stop failed') + stop_seconds = time.monotonic() - started + exit_code = int(command('docker', 'inspect', '--format', '{{.State.ExitCode}}', target)) + phase('stopped') + time.sleep(1) + phase('end') + output, _ = probe.communicate(timeout=15) + if probe.returncode: + raise RuntimeError('direct probe failed') + events = json.loads(output.strip()) + summary = {name: {value: sum(e['phase'] == name and e['ready'] == value for e in events) + for value in sorted({e['ready'] for e in events if e['phase'] == name})} + for name in ('before', 'stopping', 'withdrawn', 'stopped')} + draining = [e for e in events if e['ready'] == '503'] + first_503 = next((i for i, e in enumerate(events) if e['ready'] == '503'), None) + if summary['before'].get('200', 0) < 5: + raise RuntimeError('readiness was not healthy before SIGTERM') + if first_503 is None or any(e['ready'] == '200' for e in events[first_503:]): + raise RuntimeError('expected readiness 200 -> 503 with no late 200') + # These are separate requests; transport failures can straddle HTTP + # close or the client's deadline. Do not confuse them with unhealthy + # HTTP responses. Record them separately rather than hiding them. + if not draining or not any(e['live'] == '200' for e in draining): + raise RuntimeError('liveness must remain 200 while readiness is 503') + if any(e['live'] not in {'200', 'connection_error'} for e in draining): + raise RuntimeError('liveness returned an unhealthy HTTP status during draining') + if not withdrawn_while_running or not any(e['phase'] == 'withdrawn' and e['ready'] == '503' for e in events): + raise RuntimeError('LB did not withdraw the replica while its HTTP server was alive') + if summary['stopped'].get('200', 0) or summary['stopped'].get('503', 0) or not summary['stopped'].get('connection_error', 0): + raise RuntimeError('replica did not close HTTP after draining') + if exit_code == 137: + raise RuntimeError('container required SIGKILL instead of graceful shutdown') + print(json.dumps({'stop_seconds': round(stop_seconds, 3), + 'lb_withdrawn_seconds': round(withdrawn_at, 3), + 'lb_withdrawn_before_http_close': True, + 'readiness_sequence': [200, 503, 'connection_error'], + 'readiness_503_samples': len(draining), + 'liveness_200_while_draining': sum(e['live'] == '200' for e in draining), + 'liveness_connection_errors_while_draining': sum(e['live'] == 'connection_error' for e in draining), + 'exit_code': exit_code, 'direct_ready_responses': summary}, indent=2)) + print('PASS: readiness 200 -> 503 -> closed; liveness 200; LB withdrawal before HTTP close') + finally: + if probe.poll() is None: + probe.kill() + probe.communicate() + if stop is not None and stop.poll() is None: + stop.communicate(timeout=40) + command('docker', 'start', target) + both_ready(args.base_url, expected) + + +if __name__ == '__main__': + try: + main() + except (RuntimeError, OSError, subprocess.TimeoutExpired) as exc: + print(f'FAIL: {exc}', file=sys.stderr) + raise SystemExit(1) from None diff --git a/test/compose.benchmark.yaml b/test/compose.benchmark.yaml new file mode 100644 index 00000000..445d2d53 --- /dev/null +++ b/test/compose.benchmark.yaml @@ -0,0 +1,12 @@ +services: + benchmark: + image: ${BENCHMARK_IMAGE:-mtusi2026lab2-fork-backend} + working_dir: /app + environment: + NODE_ENV: production + DATABASE_URL: postgresql://${POSTGRES_USER:-app}:${POSTGRES_PASSWORD:-local_dev_password}@postgres:5432/${POSTGRES_DB:-chat} + CACHE_URL: redis://redis:6379/0 + volumes: + - ./test:/app/test:ro + - ./evidence:/results + command: ['node', 'test/cache-benchmark.mjs', '${BENCHMARK_STAGE:-after}', '/results/cache-epochs-${BENCHMARK_STAGE:-after}.json'] diff --git a/test/compose.diagnostics.yaml b/test/compose.diagnostics.yaml new file mode 100644 index 00000000..ab4f6273 --- /dev/null +++ b/test/compose.diagnostics.yaml @@ -0,0 +1,5 @@ +services: + api: + command: ['sh', '-c', 'INSTANCE_ID=$$(hostname) exec node --require /app/diagnostics/pool.cjs dist/main.js'] + volumes: + - ./scripts/diagnostics/pool.cjs:/app/diagnostics/pool.cjs:ro diff --git a/test/diagnostic-summary.py b/test/diagnostic-summary.py new file mode 100644 index 00000000..02a0ed3e --- /dev/null +++ b/test/diagnostic-summary.py @@ -0,0 +1,35 @@ +import importlib.util +from pathlib import Path +import unittest +import tempfile + +spec = importlib.util.spec_from_file_location("diagnostics", Path(__file__).resolve().parents[1] / "scripts/run-scaling-diagnostics.py") +diagnostics = importlib.util.module_from_spec(spec) +spec.loader.exec_module(diagnostics) + + +class SummaryTest(unittest.TestCase): + def test_cumulative_counters_become_interval_rates(self): + summary = diagnostics.resource_summary([ + {"time_ms": 1000, "cpu_usage_usec": 100, "cpu_nr_periods": 10, + "cpu_nr_throttled": 1, "cpu_throttled_usec": 100, "memory_bytes": 1024**2}, + {"time_ms": 3000, "cpu_usage_usec": 1000100, "cpu_nr_periods": 30, + "cpu_nr_throttled": 6, "cpu_throttled_usec": 500100, "memory_bytes": 2*1024**2}, + ]) + self.assertEqual(summary["mean_cpu_cores"], 0.5) + self.assertEqual(summary["throttled_period_fraction"], 0.25) + self.assertEqual(summary["throttled_seconds"], 0.5) + self.assertEqual(summary["peak_memory_mib"], 2) + + def test_short_sample_does_not_invent_rates(self): + self.assertEqual(diagnostics.resource_summary([]), {"samples": 0}) + + def test_postgres_multiline_json_and_incomplete_tail(self): + with tempfile.TemporaryDirectory() as directory: + path = Path(directory) / "postgres.jsonl" + path.write_text('{"kind":"postgres",\n"activity":[\n{"state":"active"}\n]}\n{"kind":"cgroup"}\n{"unfinished":', encoding="utf-8") + self.assertEqual([r["kind"] for r in diagnostics.rows(path)], ["postgres", "cgroup"]) + + +if __name__ == "__main__": + unittest.main() diff --git a/test/draining.mjs b/test/draining.mjs new file mode 100644 index 00000000..2a1ffaf3 --- /dev/null +++ b/test/draining.mjs @@ -0,0 +1,88 @@ +import assert from 'node:assert/strict'; +import { createRequire } from 'node:module'; +import { setImmediate, setTimeout } from 'node:timers/promises'; +import test from 'node:test'; + +const require = createRequire(import.meta.url); +const { Module } = require('@nestjs/common'); +const { NestFactory } = require('@nestjs/core'); +const { AppController } = require('../dist/app.controller'); +const { AppService } = require('../dist/app.service'); +const { PrismaService } = require('../dist/prisma/prisma.service'); +const { createFastifyAdapter } = require('../dist/common/http/fastify-adapter'); + +async function fixture(t, query = async () => []) { + const state = { queries: 0, destroyed: false }; + const database = { + async $queryRaw() { + state.queries += 1; + return query(); + }, + onModuleDestroy() { + state.destroyed = true; + }, + }; + class FixtureModule {} + Module({ + controllers: [AppController], + providers: [AppService, { provide: PrismaService, useValue: database }], + })(FixtureModule); + const adapter = createFastifyAdapter(30); + const app = await NestFactory.create(FixtureModule, adapter, { logger: false }); + t.after(async () => { + state.release?.(); + await app.close(); + }); + return { app, adapter, state, controller: app.get(AppController) }; +} + +test('draining keeps liveness and dependencies alive until active HTTP work completes', { timeout: 30000 }, async (t) => { + const { app, adapter, state, controller } = await fixture(t); + const entered = Promise.withResolvers(); + const release = Promise.withResolvers(); + // Always release the request, including when an assertion fails. + state.release = () => release.resolve(); + adapter.getInstance().get('/slow-work', async () => { + entered.resolve(); + await release.promise; + assert.equal(state.destroyed, false, 'database was destroyed during active work'); + return { completed: true }; + }); + await app.listen(0, '127.0.0.1'); + t.diagnostic('HTTP listener started'); + const { port } = app.getHttpServer().address(); + await controller.ready(); + const response = fetch(`http://127.0.0.1:${port}/slow-work`, { signal: AbortSignal.timeout(5000) }); + await entered.promise; + t.diagnostic('Slow request started'); + let closed = false; + const closing = app.close('SIGTERM').then(() => { closed = true; }); + await setImmediate(); + assert.equal(adapter.isDraining, true); + assert.equal(adapter.beforeClose(), adapter.beforeClose(), 'shutdown must be idempotent'); + await assert.rejects(controller.ready(), (error) => error.getStatus() === 503); + assert.equal(state.queries, 1, 'draining readiness must not acquire a DB connection'); + assert.deepEqual(controller.live(), { status: 'ok' }); + await setTimeout(80); + assert.equal(closed, false, 'server closed before the active request completed'); + assert.equal(state.destroyed, false, 'dependencies closed before the active request'); + release.resolve(); + t.diagnostic('Slow request released'); + assert.deepEqual(await (await response).json(), { completed: true }); + await closing; + t.diagnostic('Application shutdown completed'); + assert.equal(state.destroyed, true); +}); + +test('readiness already querying the DB cannot return 200 after draining begins', { timeout: 10000 }, async (t) => { + const query = Promise.withResolvers(); + const { app, adapter, controller } = await fixture(t, () => query.promise); + await app.init(); + const pending = assert.rejects(controller.ready(), (error) => error.getStatus() === 503); + const closing = app.close('SIGTERM'); + await setImmediate(); + assert.equal(adapter.isDraining, true); + query.resolve([]); + await pending; + await closing; +}); diff --git a/test/epoch-variants-benchmark.mjs b/test/epoch-variants-benchmark.mjs new file mode 100644 index 00000000..52dbb55b --- /dev/null +++ b/test/epoch-variants-benchmark.mjs @@ -0,0 +1,475 @@ +import assert from 'node:assert/strict'; +import { createHash, randomBytes, randomUUID } from 'node:crypto'; +import { createRequire } from 'node:module'; +import Module from 'node:module'; +import { readFile, writeFile } from 'node:fs/promises'; +import { performance } from 'node:perf_hooks'; +import { faultProxy } from './helpers/fault-proxy.mjs'; + +const require = createRequire('/app/package.json'); +const manifest = JSON.parse(await readFile('/variants/manifest.json', 'utf8')); +const pg = require('pg'); +let counts = {}; +const originalQuery = pg.Client.prototype.query; +pg.Client.prototype.query = function (query, ...args) { + const sql = typeof query === 'string' ? query : query.text; + const verb = sql.trim().split(/\s+/)[0].toUpperCase(); + counts[verb] = (counts[verb] ?? 0) + 1; + return originalQuery.call(this, query, ...args); +}; +const { NestFactory } = require('@nestjs/core'); +const { AppModule } = require('/app/dist/app.module'); +const { PrismaService } = require('/app/dist/prisma/prisma.service'); +const { CacheService } = require('/app/dist/cache/cache.service'); +const { ChatService } = require('/app/dist/Chat/chat.service'); +const { + createFastifyAdapter, + exposeRequestIdHeader, +} = require('/app/dist/common/http/fastify-adapter'); +const exportedClasses = { + 'Auth/auth.service.ts': 'AuthService', + 'User/user.service.ts': 'UserService', + 'User/user.guard.ts': 'UserGuard', + 'Chat/chat.service.ts': 'ChatService', + 'Chat/chat.controller.ts': 'ChatController', +}; +const originals = {}; +const variants = {}; +for (const [relative, name] of Object.entries(exportedClasses)) { + const filename = `/app/dist/${relative.replace(/\.ts$/, '.js')}`; + originals[name] = require(filename)[name]; +} +for (const variant of manifest.variants) { + variants[variant.name] = {}; + for (const [relative, name] of Object.entries(exportedClasses)) { + const filename = `/app/dist/${relative.replace(/\.ts$/, '.js')}`; + const source = await readFile( + `/variants/${variant.name}/${relative.replace(/\.ts$/, '.js')}`, + 'utf8', + ); + const loaded = new Module(filename); + loaded.filename = filename; + loaded.paths = Module._nodeModulePaths('/app'); + loaded._compile(source, filename); + variants[variant.name][name] = loaded.exports[name]; + } +} +function activate(name) { + for (const [className, replacement] of Object.entries(variants[name])) { + const target = originals[className].prototype; + for (const method of Object.getOwnPropertyNames(replacement.prototype)) { + if (method === 'constructor') continue; + const descriptor = Object.getOwnPropertyDescriptor( + replacement.prototype, + method, + ); + const previous = target[method]; + if ( + typeof descriptor.value === 'function' && + typeof previous === 'function' + ) { + for (const key of Reflect.getMetadataKeys(previous)) + Reflect.defineMetadata( + key, + Reflect.getMetadata(key, previous), + descriptor.value, + ); + } + Object.defineProperty(target, method, descriptor); + } + } +} + +const Redis = require('ioredis').default; +const prefix = `experiment:epoch-variants:${randomUUID()}`; +const proxy = await faultProxy(process.env.CACHE_URL, 6379); +const observer = new Redis(process.env.CACHE_URL); +process.env.CACHE_URL = proxy.url; +const apps = {}; +const chatIds = []; +const userIds = []; +let prisma, token; +const report = { + recorded_at: new Date().toISOString(), + methodology: { + concurrency: 32, + duration_seconds: 60, + warmup_seconds: 10, + repetitions: 3, + seed_messages: 100000, + writes_per_repeat: 4096, + order: [ + ['baseline', 'profile-join', 'access-join', 'striped'], + ['striped', 'access-join', 'profile-join', 'baseline'], + ['profile-join', 'striped', 'baseline', 'access-join'], + ], + requests: + 'Real loopback HTTP; shared read fixtures, separate write chats and cache prefixes', + resources: + 'Four idle/active API instances and HTTP generator share one Node process; only one workload active at a time', + sql: 'pg.Client.query; transaction-control commands excluded; no changes to database pool size', + }, + variants: manifest.variants, + samples: [], + correctness: {}, + completed: false, +}; +const pause = (ms) => new Promise((resolve) => setTimeout(resolve, ms)); + +async function request(name, method, url, body, bearer = token) { + const response = await fetch(`${apps[name].url}${url}`, { + method, + headers: { + authorization: `Bearer ${bearer}`, + ...(body ? { 'content-type': 'application/json' } : {}), + }, + ...(body ? { body: JSON.stringify(body) } : {}), + signal: AbortSignal.timeout(10000), + }); + const json = await response.json(); + return { status: response.status, json }; +} +async function call(name, method, url, body) { + const result = await request(name, method, url, body); + assert.equal(result.status, method === 'POST' ? 201 : 200); + return result.json; +} +async function clearCache() { + let cursor = '0'; + do { + const [next, keys] = await observer.scan( + cursor, + 'MATCH', + `${prefix}:*`, + 'COUNT', + 100, + ); + cursor = next; + if (keys.length) await observer.del(...keys); + } while (cursor !== '0'); +} +async function newChat(userId) { + const chat = await prisma.chat.create({ + data: { + title: 'Variant benchmark', + members: { create: { userId, position: 0 } }, + }, + }); + chatIds.push(chat.id); + return chat.id; +} +async function epoch(name, chatId) { + if (name !== 'striped') + return (await prisma.chat.findUniqueOrThrow({ where: { id: chatId } })) + .messagesEpoch; + const [row] = await prisma.$queryRawUnsafe( + `SELECT COALESCE(SUM(epoch), 0)::bigint AS epoch FROM "${manifest.schema}".chat_message_epochs WHERE chat_id = $1::uuid`, + chatId, + ); + return row.epoch; +} +async function measure(name, workload, repeat, operation, total) { + counts = {}; + const latencies = []; + let errors = 0, + index = 0; + const cpu = process.cpuUsage(); + const start = performance.now(); + await Promise.all( + Array.from({ length: 32 }, async () => { + while ( + total === undefined ? performance.now() - start < 60000 : index < total + ) { + const item = index++; + const began = performance.now(); + try { + await operation(item); + latencies.push(performance.now() - began); + } catch { + errors++; + } + } + }), + ); + const seconds = (performance.now() - start) / 1000; + const used = process.cpuUsage(cpu); + latencies.sort((a, b) => a - b); + const calls = { ...counts }; + const queries = Object.entries(calls) + .filter(([verb]) => !['BEGIN', 'COMMIT', 'ROLLBACK', 'SET'].includes(verb)) + .reduce((sum, [, count]) => sum + count, 0); + const sample = { + variant: name, + workload, + repeat, + successes: latencies.length, + errors, + elapsed_seconds: +seconds.toFixed(3), + rps: +(latencies.length / seconds).toFixed(3), + mean_latency_ms: +( + latencies.reduce((sum, value) => sum + value, 0) / latencies.length + ).toFixed(3), + p95_ms: +latencies[Math.ceil(latencies.length * 0.95) - 1]?.toFixed(3), + sql_queries: queries, + sql_per_request: +(queries / (latencies.length + errors)).toFixed(4), + sql_calls: calls, + cpu_percent_one_core: +( + (used.user + used.system) / + (seconds * 10000) + ).toFixed(2), + rss_mib: +(process.memoryUsage().rss / 1048576).toFixed(2), + }; + report.samples.push(sample); + console.log(JSON.stringify(sample)); + assert.equal(errors, 0, 'HTTP workload errors'); +} +async function reconnect() { + proxy.setMode('online'); + for (let attempt = 0; attempt < 80; attempt++) { + if ( + Object.values(apps).every( + ({ app }) => app.get(CacheService).redis.status === 'ready', + ) + ) + return; + await pause(100); + } + assert.fail('Redis reconnect timeout'); +} +async function correctness(name, userId, otherToken) { + activate(name); + await clearCache(); + const replica = Object.keys(apps).find((candidate) => candidate !== name); + const chatId = await newChat(userId); + const url = `/api/v1/chats/${chatId}/messages`; + assert.equal( + ( + await request( + name, + 'GET', + url, + undefined, + randomBytes(32).toString('base64url'), + ) + ).status, + 401, + ); + assert.equal( + (await request(name, 'GET', url, undefined, otherToken)).status, + 404, + ); + assert.equal( + (await request(name, 'POST', url, { text: 'Forbidden' }, otherToken)) + .status, + 404, + ); + assert.equal( + (await request(name, 'GET', '/api/v1/chats/invalid/messages')).status, + 400, + ); + assert.equal( + ( + await request( + name, + 'GET', + '/api/v1/chats/invalid/messages', + undefined, + randomBytes(32).toString('base64url'), + ) + ).status, + 401, + ); + assert.equal((await call(replica, 'GET', url)).items.length, 0); + const keys = await observer.keys(`${prefix}:${replica}:messages:${chatId}:*`); + assert.ok(keys.length); + proxy.setMode('cut'); + await pause(100); + const posted = await call(name, 'POST', url, { text: 'During outage' }); + assert.equal((await call(replica, 'GET', url)).items[0].id, posted.id); + await reconnect(); + assert.equal(await observer.exists(...keys), keys.length); + assert.equal((await call(replica, 'GET', url)).items[0].id, posted.id); + const service = apps[name].app.get(ChatService); + const actual = service.prisma; + service.prisma = actual.$extends({ + query: { + $queryRaw({ args, query }) { + const index = args.values.indexOf('Must roll back'); + if (index !== -1) args.values[index] = 'x'.repeat(4001); + return query(args); + }, + }, + }); + try { + assert.equal( + (await request(name, 'POST', url, { text: 'Must roll back' })).status, + 500, + ); + } finally { + service.prisma = actual; + } + assert.equal(await epoch(name, chatId), 1n); + assert.equal(await prisma.message.count({ where: { chatId } }), 1); + const raceChat = await newChat(userId); + const raceUrl = `/api/v1/chats/${raceChat}/messages`; + let began, release; + const started = new Promise((resolve) => { + began = resolve; + }); + const held = new Promise((resolve) => { + release = resolve; + }); + service.prisma = actual.$extends({ + query: { + message: { + async findMany({ args, query }) { + const rows = await query(args); + if (args.where?.chatId === raceChat) { + began(); + await held; + } + return rows; + }, + }, + }, + }); + const pending = call(name, 'GET', raceUrl); + try { + await Promise.race([ + started, + pause(10000).then(() => { + throw new Error('Race load timeout'); + }), + ]); + const fresh = await call(replica, 'POST', raceUrl, { + text: 'After old SELECT', + }); + release(); + await pending; + assert.equal((await call(name, 'GET', raceUrl)).items[0].id, fresh.id); + } finally { + release(); + service.prisma = actual; + } + await clearCache(); + assert.equal((await call(name, 'GET', url)).items[0].id, posted.id); + report.correctness[name] = { + access_statuses: true, + redis_outage_and_retained_keys: true, + rollback: true, + delayed_old_fill: true, + empty_cache: true, + }; + console.log(JSON.stringify({ correctness: name, result: 'PASS' })); +} + +try { + for (const variant of manifest.variants) { + activate(variant.name); + process.env.CACHE_PREFIX = `${prefix}:${variant.name}`; + const app = await NestFactory.create(AppModule, createFastifyAdapter(), { + logger: false, + abortOnError: false, + }); + apps[variant.name] = { app }; + exposeRequestIdHeader(app); + await app.listen(0, '127.0.0.1'); + require('nestjs-pino').PinoLogger.root.level = 'silent'; + apps[variant.name].url = await app.getUrl(); + } + prisma = apps.baseline.app.get(PrismaService); + const user = await prisma.user.create({ + data: { + username: `variant_${randomUUID().replaceAll('-', '').slice(0, 20)}`, + displayName: 'Variant user', + }, + }); + userIds.push(user.id); + token = randomBytes(32).toString('base64url'); + await prisma.session.create({ + data: { + userId: user.id, + tokenHash: createHash('sha256').update(token).digest('hex'), + expiresAt: new Date(Date.now() + 3600000), + }, + }); + const other = await prisma.user.create({ + data: { + username: `other_${randomUUID().replaceAll('-', '').slice(0, 20)}`, + displayName: 'Other user', + }, + }); + userIds.push(other.id); + const otherToken = randomBytes(32).toString('base64url'); + await prisma.session.create({ + data: { + userId: other.id, + tokenHash: createHash('sha256').update(otherToken).digest('hex'), + expiresAt: new Date(Date.now() + 3600000), + }, + }); + for (const name of Object.keys(apps)) + await correctness(name, user.id, otherToken); + const readChat = await newChat(user.id); + for (let offset = 0; offset < 100000; offset += 1000) { + await prisma.message.createMany({ + data: Array.from({ length: 1000 }, (_, i) => ({ + chatId: readChat, + senderId: user.id, + text: `Synthetic message ${offset + i}`, + createdAt: new Date(1700000000000 + offset + i), + })), + }); + } + await prisma.chat.update({ where: { id: readChat }, data: { messagesEpoch: 100000n } }); + await prisma.$executeRawUnsafe(`INSERT INTO "${manifest.schema}".chat_message_epochs (chat_id, bucket, epoch) SELECT $1::uuid, bucket::smallint, 6250 FROM generate_series(0, 15) AS bucket ON CONFLICT (chat_id, bucket) DO UPDATE SET epoch = EXCLUDED.epoch`, readChat); + for (const [index, order] of report.methodology.order.entries()) { + for (const name of order) { + activate(name); + await clearCache(); + const url = `/api/v1/chats/${readChat}/messages?limit=50`; + const warmUntil = performance.now() + 10000; + while (performance.now() < warmUntil) await call(name, 'GET', url); + await measure(name, 'warm-history', index + 1, () => + call(name, 'GET', url), + ); + const writeChat = await newChat(user.id); + const writeUrl = `/api/v1/chats/${writeChat}/messages`; + assert.equal((await call(name, 'GET', writeUrl)).items.length, 0); + await measure( + name, + 'writes-single-chat', + index + 1, + (i) => call(name, 'POST', writeUrl, { text: `Concurrent ${i}` }), + 4096, + ); + assert.equal( + await prisma.message.count({ where: { chatId: writeChat } }), + 4096, + ); + assert.equal(await epoch(name, writeChat), 4096n); + assert.equal((await call(name, 'GET', writeUrl)).items.length, 50); + } + } + report.completed = true; +} finally { + await reconnect(); + if (prisma) { + await prisma.chat.deleteMany({ where: { id: { in: chatIds } } }); + await prisma.user.deleteMany({ where: { id: { in: userIds } } }); + } + await clearCache(); + for (const { app } of Object.values(apps)) await app.close(); + observer.disconnect(); + await proxy.close(); + await writeFile( + '/results/epoch-variants.json', + JSON.stringify(report, null, 2) + '\n', + ); +} +console.log( + JSON.stringify({ + completed: report.completed, + correctness: report.correctness, + }), +); diff --git a/test/epoch-variants-experiment.cjs b/test/epoch-variants-experiment.cjs new file mode 100644 index 00000000..77fed41b --- /dev/null +++ b/test/epoch-variants-experiment.cjs @@ -0,0 +1,261 @@ +const assert = require('node:assert/strict'); +const fs = require('node:fs'); +const os = require('node:os'); +const path = require('node:path'); +const { randomUUID, createHash } = require('node:crypto'); +const { spawn } = require('node:child_process'); +const ts = require('typescript'); +require('dotenv').config({ quiet: true }); + +const root = path.resolve(__dirname, '..'); +const statePath = path.join(root, '.epoch-variants-state.json'); +const files = [ + 'Auth/auth.service.ts', + 'User/user.service.ts', + 'User/user.guard.ts', + 'Chat/chat.service.ts', + 'Chat/chat.controller.ts', +]; +const digest = (value) => createHash('sha256').update(value).digest('hex'); +const command = process.argv[2]; + +async function main() { + let state; + if (command === 'init') { + assert.ok(!fs.existsSync(statePath)); + assert.ok( + /messagesEpoch\s+BigInt/.test( + fs.readFileSync(path.join(root, 'prisma/schema.prisma'), 'utf8'), + ), + 'Historical comparison requires the pre-bucket schema. Original sources are saved in evidence/epoch-variants-sources.json', + ); + state = { + directory: fs.mkdtempSync(path.join(os.tmpdir(), 'lab2-epoch-variants-')), + schema: 'epoch_variants_' + randomUUID().replaceAll('-', ''), + variants: [], + }; + await database(async (client) => { + await client.query(`CREATE SCHEMA "${state.schema}"`); + await client.query( + `CREATE TABLE "${state.schema}".chat_message_epochs (chat_id uuid NOT NULL REFERENCES public.chats(id) ON DELETE CASCADE, bucket smallint NOT NULL CHECK (bucket BETWEEN 0 AND 15), epoch bigint NOT NULL DEFAULT 0, PRIMARY KEY (chat_id, bucket))`, + ); + }); + capture(state, 'baseline'); + } else { + state = JSON.parse(fs.readFileSync(statePath, 'utf8')); + } + if (command === 'capture') capture(state, process.argv[3]); + if (command === 'capture-striped') capture(state, 'striped', true); + if (command === 'apply-striped') { + const sources = {}; + for (const variant of state.variants) { + sources[variant.name] = Object.fromEntries( + files.map((relative) => [ + relative, + fs.readFileSync( + path.join(state.directory, variant.name, relative), + 'utf8', + ), + ]), + ); + } + fs.writeFileSync( + path.join(root, 'evidence/epoch-variants-sources.json'), + JSON.stringify(sources, null, 2) + '\n', + ); + for (const relative of ['Auth/auth.service.ts', 'Chat/chat.service.ts']) { + const source = sources.striped[relative].replaceAll( + `"${state.schema}".chat_message_epochs`, + '"public"."chat_message_epochs"', + ); + fs.writeFileSync(path.join(root, 'src', relative), source); + } + console.log( + 'Applied striped epochs to application sources; saved all source snapshots', + ); + } + if (['init', 'capture', 'capture-striped'].includes(command)) { + fs.writeFileSync(statePath, JSON.stringify(state, null, 2)); + console.log( + 'Captured:', + state.variants.map((variant) => variant.name).join(', '), + ); + return; + } + if (command === 'run') { + assert.equal(state.variants.length, 4); + fs.writeFileSync( + path.join(state.directory, 'manifest.json'), + JSON.stringify(state, null, 2), + ); + const override = path.join(state.directory, 'compose.json'); + fs.writeFileSync( + override, + JSON.stringify({ + services: { + benchmark: { + volumes: [ + { + type: 'bind', + source: state.directory, + target: '/variants', + read_only: true, + }, + ], + }, + }, + }), + ); + const args = [ + 'compose', + '-f', + 'compose.yaml', + '-f', + 'test/compose.benchmark.yaml', + '-f', + override, + 'run', + '--rm', + '--no-deps', + '--pull', + 'never', + 'benchmark', + 'node', + 'test/epoch-variants-benchmark.mjs', + ]; + const code = await new Promise((resolve, reject) => { + const child = spawn('docker', args, { cwd: root, stdio: 'inherit' }); + child.once('error', reject); + child.once('exit', resolve); + }); + fs.writeFileSync( + path.join(root, 'evidence/epoch-variants-code.json'), + JSON.stringify( + { + variants: state.variants, + schema: state.schema, + exit_code: code, + implementation: + 'TypeScript source snapshots; variant methods activated sequentially before HTTP workloads. Separate cache prefixes and API instances, shared fixtures and Node process.', + }, + null, + 2, + ), + ); + process.exitCode = code ?? 1; + } + if (command === 'seed-read-fixture') { + await database(async (client) => { + const result = await client.query( + `SELECT c.id FROM public.chats c JOIN public.messages m ON m.chat_id = c.id WHERE c.title = 'Variant benchmark' GROUP BY c.id HAVING COUNT(*) = 100000`, + ); + assert.equal(result.rows.length, 1); + const chatId = result.rows[0].id; + await client.query( + 'UPDATE public.chats SET messages_epoch = 100000 WHERE id = $1::uuid', + [chatId], + ); + await client.query( + `INSERT INTO "${state.schema}".chat_message_epochs (chat_id, bucket, epoch) SELECT $1::uuid, bucket::smallint, 6250 FROM generate_series(0, 15) AS bucket ON CONFLICT (chat_id, bucket) DO UPDATE SET epoch = EXCLUDED.epoch`, + [chatId], + ); + console.log('Seeded read fixture with 16 nonzero epoch buckets'); + }); + } + if (command === 'cleanup') { + await database((client) => + client.query(`DROP SCHEMA "${state.schema}" CASCADE`), + ); + const resolved = path.resolve(state.directory); + assert.equal(path.dirname(resolved), path.resolve(os.tmpdir())); + assert.ok(path.basename(resolved).startsWith('lab2-epoch-variants-')); + fs.rmSync(resolved, { recursive: true, force: true }); + fs.unlinkSync(statePath); + console.log('Removed experiment schema and temporary source snapshots'); + } +} + +function capture(state, name, striped = false) { + assert.match(name, /^[a-z-]+$/); + assert.ok(!state.variants.some((variant) => variant.name === name)); + const modules = {}; + const table = `"${state.schema}".chat_message_epochs`; + for (const relative of files) { + let source = fs + .readFileSync(path.join(root, 'src', relative), 'utf8') + .replace(/\r\n/g, '\n'); + if ( + striped && + ['Auth/auth.service.ts', 'Chat/chat.service.ts'].includes(relative) + ) { + source = source.replaceAll( + 'c.messages_epoch', + `COALESCE((SELECT SUM(e.epoch) FROM ${table} AS e WHERE e.chat_id = c.id), 0)::bigint`, + ); + if (relative === 'Chat/chat.service.ts') { + const start = source.indexOf(' const [message] ='); + const end = source.indexOf(' if (!message)', start); + assert.ok(start !== -1 && end > start); + source = + source.slice(0, start) + + ' const messageId = randomUUID();\n' + + ' const bucket = parseInt(messageId.slice(0, 2), 16) % 16;\n' + + ' const [message] = await this.prisma.$queryRaw(Prisma.sql`\n' + + ` WITH updated AS (\n INSERT INTO ${table} AS e (chat_id, bucket, epoch)\n` + + ' SELECT cm.chat_id, ${bucket}::smallint, 1 FROM chat_members AS cm\n' + + ' WHERE cm.chat_id = ${id}::uuid AND cm.user_id = ${userId}::uuid\n' + + ' ON CONFLICT (chat_id, bucket) DO UPDATE SET epoch = e.epoch + 1\n' + + ' RETURNING chat_id\n )\n' + + ' INSERT INTO messages (id, chat_id, sender_id, text)\n' + + ' SELECT ${messageId}::uuid, updated.chat_id, ${userId}::uuid, ${text} FROM updated\n' + + ' RETURNING id, chat_id AS "chatId", sender_id AS "senderId", text, created_at AS "createdAt"\n' + + ' `);\n' + + source.slice(end); + } + } + const compiled = ts.transpileModule(source, { + compilerOptions: { + target: ts.ScriptTarget.ES2023, + module: ts.ModuleKind.CommonJS, + experimentalDecorators: true, + emitDecoratorMetadata: true, + }, + reportDiagnostics: true, + }); + assert.ok( + !compiled.diagnostics.some( + (diagnostic) => diagnostic.category === ts.DiagnosticCategory.Error, + ), + ); + const destination = path.join( + state.directory, + name, + relative.replace(/\.ts$/, '.js'), + ); + fs.mkdirSync(path.dirname(destination), { recursive: true }); + fs.writeFileSync(destination, compiled.outputText); + fs.writeFileSync(destination.replace(/\.js$/, '.ts'), source); + modules[relative] = { + source_sha256: digest(source), + js_sha256: digest(compiled.outputText), + }; + } + state.variants.push({ name, modules, striped }); +} + +async function database(operation) { + const client = new (require('pg').Client)({ + connectionString: process.env.DATABASE_URL, + }); + await client.connect(); + try { + return await operation(client); + } finally { + await client.end(); + } +} + +main().catch((error) => { + console.error(error.message); + process.exitCode = 1; +}); diff --git a/test/epoch-variants-summary.mjs b/test/epoch-variants-summary.mjs new file mode 100644 index 00000000..4055449c --- /dev/null +++ b/test/epoch-variants-summary.mjs @@ -0,0 +1,72 @@ +import assert from 'node:assert/strict'; +import { readFile, writeFile } from 'node:fs/promises'; + +const report = JSON.parse( + await readFile('evidence/epoch-variants.json', 'utf8'), +); +assert.ok(report.completed); +const labels = { + baseline: 'Текущая схема', + 'profile-join': 'Профиль из JOIN', + 'access-join': 'Профиль + единая проверка доступа', + striped: 'Единая проверка + 16 счётчиков', +}; +const aggregates = []; +const lines = [ + '# Сравнение трёх оптимизаций эпох и текущей схемы', + '', + `Дата UTC: ${report.recorded_at}.`, + '', + 'Все режимы используют Redis. Варианты последовательно добавляют оптимизации: профиль из запроса сессии; объединённую проверку сессии, членства и эпохи; 16 счётчиков истории, увеличиваемых независимо, с суммой как версией кэша. Порядок вариантов меняется между тремя повторами. Чтения: 100 000 сообщений, limit=50, конкурентность 32, прогрев 10 с, измерение 60 с. Запись: 4096 сообщений в отдельный новый чат на вариант/повтор. Только один workload активен одновременно.', + '', + 'RPS рассчитан по общему числу успешных запросов и времени повторов. Средняя задержка взвешена по числу запросов. p95 — среднее p95 отдельных повторов, а не перцентиль объединённой выборки. SQL/HTTP исключает BEGIN/COMMIT/ROLLBACK/SET.', + '', + '| Сценарий | Вариант | Средний RPS | Средняя задержка, мс | Среднее p95, мс | SQL/HTTP | RPS по повторам | Ошибки |', + '| --- | --- | ---: | ---: | ---: | ---: | --- | ---: |', +]; +for (const workload of ['warm-history', 'writes-single-chat']) { + for (const [name, label] of Object.entries(labels)) { + const samples = report.samples.filter( + (sample) => sample.variant === name && sample.workload === workload, + ); + assert.equal(samples.length, 3); + const sum = (select) => + samples.reduce((total, sample) => total + select(sample), 0); + const successes = sum((sample) => sample.successes); + const errors = sum((sample) => sample.errors); + const aggregate = { + variant: name, + workload, + successes, + errors, + rps: successes / sum((sample) => sample.elapsed_seconds), + mean_latency_ms: + sum((sample) => sample.mean_latency_ms * sample.successes) / successes, + mean_p95_ms: sum((sample) => sample.p95_ms) / samples.length, + sql_per_request: + sum((sample) => sample.sql_queries) / (successes + errors), + repeat_rps: samples.map((sample) => sample.rps), + }; + aggregates.push(aggregate); + lines.push( + `| ${workload} | ${label} | ${aggregate.rps.toFixed(3)} | ${aggregate.mean_latency_ms.toFixed(3)} | ${aggregate.mean_p95_ms.toFixed(3)} | ${aggregate.sql_per_request.toFixed(3)} | ${aggregate.repeat_rps.map((value) => value.toFixed(1)).join(' / ')} | ${errors} |`, + ); + assert.ok(Object.values(report.correctness[name]).every(Boolean)); + } +} +lines.push( + '', + 'Все варианты прошли проверки 401/404/400, доступа постороннего пользователя, чтения после записи при недоступном Redis и после восстановления со старыми ключами, отката счётчика при ошибке INSERT, задержанного заполнения старого кэша и работы с пустым кэшем. После каждого нагрузочного блока проверены число сообщений и значение эпохи 4096.', + '', + 'Четыре API и HTTP-генератор работают в одном Node-процессе, каждый API имеет отдельный Redis-prefix и пул Prisma прежнего размера. Методы переключаются между скомпилированными снимками исходников перед каждым workload; скрипт сохраняет метаданные маршрутов. Idle-экземпляры присутствуют во всех режимах. CPU/RSS включает генератор и все экземпляры. Другие сервисы Docker-host продолжают работать. Сессии создаются напрямую, KDF не измеряется. Порядок меняется, но три повтора и фоновые нагрузки всё ещё ограничивают выводы об устойчивых коэффициентах ускорения.', + '', + 'Распределённые счётчики находятся в отдельной временной схеме. Рабочая схема приложения не переключается на них. В нагрузочном чате 16 ненулевых счётчиков; стоимость их суммирования входит в запрос доступа. Первое чтение baseline выполнено до заполнения счётчиков временной схемы; данные истории неизменны, счётчики подготовлены до первого измерения striped. Это изменение подготовки фикстуры добавлено в скрипт для следующих запусков.', + '', + 'Сырые результаты: [epoch-variants.json](epoch-variants.json). Хеши исходников вариантов: [epoch-variants-code.json](epoch-variants-code.json).', +); +await writeFile('evidence/epoch-variants-summary.md', lines.join('\n') + '\n'); +await writeFile( + 'evidence/epoch-variants-averages.json', + JSON.stringify(aggregates, null, 2) + '\n', +); +console.log(lines.slice(0, 19).join('\n')); diff --git a/test/explain-history.mjs b/test/explain-history.mjs new file mode 100644 index 00000000..f2560fa0 --- /dev/null +++ b/test/explain-history.mjs @@ -0,0 +1,195 @@ +import 'dotenv/config'; +import assert from 'node:assert/strict'; +import { createHash, randomUUID } from 'node:crypto'; +import { mkdir, writeFile } from 'node:fs/promises'; +import { createRequire } from 'node:module'; +import { resolve } from 'node:path'; +import { spawnSync } from 'node:child_process'; + +const require = createRequire(import.meta.url); +const { Client } = require('pg'); +assert.ok(process.env.DATABASE_URL, 'Set DATABASE_URL for the project PostgreSQL'); +const output = resolve('evidence'); +const schema = `explain_history_${randomUUID().replaceAll('-', '')}`; +const table = `"${schema}"."messages"`; +const client = new Client({ + connectionString: process.env.DATABASE_URL, + connectionTimeoutMillis: 5000, + query_timeout: 60000, + options: '-c statement_timeout=60000 -c lock_timeout=2000', +}); +const seed = ` +WITH base AS ( + SELECT n, CASE WHEN (n - 1) % 6 < 2 THEN 0 ELSE (n - 1) % 6 - 1 END AS chat_no + FROM generate_series(1, 60000) AS n +), ranked AS ( + SELECT n, chat_no, row_number() OVER (PARTITION BY chat_no ORDER BY n) AS chat_seq + FROM base +) +INSERT INTO ${table} (id, chat_id, sender_id, text, created_at) +SELECT md5('message:' || n)::uuid, md5('chat:' || chat_no)::uuid, + md5('sender:' || (n % 20))::uuid, + rpad('Synthetic message ' || n || ' ', 256, '.'), + '2026-01-01T00:00:00Z'::timestamptz + ((chat_seq - 1) / 10) * interval '1 second' +FROM ranked ORDER BY n`; +const columns = 'id, chat_id, sender_id, text, created_at'; +const firstSql = `SELECT ${columns} FROM ${table} +WHERE chat_id = $1::uuid ORDER BY created_at ASC, id ASC LIMIT $2`; +const orSql = `SELECT ${columns} FROM ${table} +WHERE chat_id = $1::uuid + AND (created_at > $2::timestamptz OR (created_at = $2::timestamptz AND id > $3::uuid)) +ORDER BY created_at ASC, id ASC LIMIT $4`; +const tupleSql = `SELECT ${columns} FROM ${table} +WHERE chat_id = $1::uuid AND (created_at, id) > ($2::timestamptz, $3::uuid) +ORDER BY created_at ASC, id ASC LIMIT $4`; + +function nodes(plan) { + return [plan, ...(plan.Plans ?? []).flatMap(nodes)]; +} + +function median(values) { + const sorted = [...values].sort((a, b) => a - b); + return sorted[Math.floor(sorted.length / 2)]; +} + +function inspectDocker() { + const template = '{"cpus":{{.NCPU}},"memory_bytes":{{.MemTotal}},"server_version":{{json .ServerVersion}},"os":{{json .OperatingSystem}},"arch":{{json .Architecture}}}'; + const result = spawnSync('docker', ['info', '--format', template], { + encoding: 'utf8', timeout: 10000, windowsHide: true, + }); + try { + if (result.status !== 0) return null; + const info = JSON.parse(result.stdout); + const ids = spawnSync('docker', ['compose', 'ps', '--quiet', 'postgres'], { + encoding: 'utf8', timeout: 10000, windowsHide: true, + }); + if (ids.status === 0 && ids.stdout.trim()) { + const limitsTemplate = '{"image":{{json .Config.Image}},"memory_limit_bytes":{{.HostConfig.Memory}},"nano_cpus":{{.HostConfig.NanoCpus}},"cpu_quota":{{.HostConfig.CpuQuota}},"cpu_period":{{.HostConfig.CpuPeriod}},"cpuset_cpus":{{json .HostConfig.CpusetCpus}}}'; + const limits = spawnSync('docker', ['inspect', '--format', limitsTemplate, ids.stdout.trim()], { + encoding: 'utf8', timeout: 10000, windowsHide: true, + }); + if (limits.status === 0) info.postgres_container = JSON.parse(limits.stdout); + } + return info; + } catch { + return null; + } +} + +await client.connect(); +const runs = []; +const raw = []; +const signatures = new Map(); +let metadata; +let queries; +let cleanup = false; +let sourceIndexes; +try { + sourceIndexes = (await client.query("SELECT indexname, indexdef FROM pg_indexes WHERE schemaname = 'public' AND tablename = 'messages' ORDER BY indexname")).rows; + await client.query('BEGIN'); + await client.query(`CREATE SCHEMA "${schema}"`); + await client.query(`CREATE TABLE ${table} (LIKE public.messages INCLUDING DEFAULTS INCLUDING CONSTRAINTS INCLUDING STORAGE)`); + await client.query(seed); + await client.query(`ANALYZE ${table}`); + const distribution = (await client.query(`SELECT chat_id, count(*)::integer AS messages FROM ${table} GROUP BY chat_id ORDER BY messages DESC, chat_id`)).rows; + assert.equal(distribution.reduce((sum, row) => sum + row.messages, 0), 60000); + const chatId = distribution.find((row) => row.messages === 20000).chat_id; + const cursor = async (offset) => (await client.query( + `SELECT id, created_at FROM ${table} WHERE chat_id = $1::uuid ORDER BY created_at, id OFFSET $2 LIMIT 1`, + [chatId, offset], + )).rows[0]; + const middle = await cursor(9999); + const late = await cursor(17999); + queries = [ + { name: 'first_page', sql: firstSql, parameters: [chatId, 51] }, + { name: 'middle_page_or', sql: orSql, parameters: [chatId, middle.created_at.toISOString(), middle.id, 51] }, + { name: 'late_page_or', sql: orSql, parameters: [chatId, late.created_at.toISOString(), late.id, 51] }, + { name: 'late_page_tuple', sql: tupleSql, parameters: [chatId, late.created_at.toISOString(), late.id, 51] }, + ]; + const settings = (await client.query( + 'SELECT name, setting, unit FROM pg_settings WHERE name = ANY($1::text[]) ORDER BY name', + [['server_version', 'shared_buffers', 'work_mem', 'random_page_cost', 'effective_cache_size', 'max_parallel_workers_per_gather', 'jit', 'block_size']], + )).rows; + metadata = { + recorded_at: new Date().toISOString(), + command: 'node test/explain-history.mjs', + node_version: process.version, + docker: inspectDocker(), + settings, + source_table_indexes_before: sourceIndexes, + dataset: { total_messages: 60000, target_chat_messages: 20000, chats: 5, distribution, text_length: 256, timestamp_ties: 10, insertion_order: 'interleaved chats' }, + method: { warmup_runs_per_query_per_phase: 1, measured_runs: 5, page_size: 50, fetched_rows: 51, cursor_positions: [10000, 18000], cache: 'warm PostgreSQL buffers; Redis is bypassed', cleanup: 'ROLLBACK the experiment schema; live tables and indexes unchanged', planner: 'default scan settings; no forced index or disabled sequential scans', schema_difference: 'copied columns/checks/defaults; foreign keys omitted equally in all phases', tuple_variant: 'current cursor SQL in ChatService.listMessages; OR is the pre-fix baseline' }, + }; + const phases = [ + { name: 'no_indexes', ddl: [] }, + { name: 'without_history_index', ddl: [`CREATE UNIQUE INDEX messages_pkey ON ${table} (id)`, `CREATE INDEX messages_sender_id_idx ON ${table} (sender_id)`] }, + { name: 'with_history_index', ddl: [`CREATE INDEX messages_chat_id_created_at_id_idx ON ${table} (chat_id, created_at, id)`] }, + ]; + for (const phase of phases) { + for (const ddl of phase.ddl) await client.query(ddl); + await client.query(`ANALYZE ${table}`); + const indexes = (await client.query('SELECT indexname, indexdef FROM pg_indexes WHERE schemaname = $1 ORDER BY indexname', [schema])).rows; + const phaseRuns = new Map(queries.map((query) => [query.name, []])); + for (const query of queries) { + const rows = (await client.query(query.sql, query.parameters)).rows; + assert.equal(rows.length, 51); + const signature = createHash('sha256').update(JSON.stringify(rows)).digest('hex'); + if (signatures.has(query.name)) assert.equal(signature, signatures.get(query.name)); + else signatures.set(query.name, signature); + if (query.name === 'late_page_tuple') assert.equal(signature, signatures.get('late_page_or')); + await client.query(`EXPLAIN (ANALYZE, BUFFERS, FORMAT JSON) ${query.sql}`, query.parameters); + } + for (let repetition = 1; repetition <= 5; repetition++) { + for (const query of queries) { + const plan = (await client.query(`EXPLAIN (ANALYZE, BUFFERS, FORMAT JSON) ${query.sql}`, query.parameters)).rows[0]['QUERY PLAN'][0]; + phaseRuns.get(query.name).push(plan); + } + } + for (const query of queries) { + const plans = phaseRuns.get(query.name); + const medianMs = median(plans.map((plan) => plan['Execution Time'])); + const representative = plans.find((plan) => plan['Execution Time'] === medianMs); + const flat = nodes(representative.Plan); + const scan = flat.find((node) => node['Node Type'].includes('Scan')); + runs.push({ + phase: phase.name, query: query.name, indexes, sql: query.sql, parameters: query.parameters, + result_sha256: signatures.get(query.name), execution_ms: plans.map((plan) => plan['Execution Time']), + median_execution_ms: medianMs, representative_plan: representative, + scan_type: scan?.['Node Type'], index_name: scan?.['Index Name'] ?? null, + rows_removed_by_filter: scan?.['Rows Removed by Filter'] ?? 0, + scanned_rows: ((scan?.['Actual Rows'] ?? 0) + (scan?.['Rows Removed by Filter'] ?? 0)) * (scan?.['Actual Loops'] ?? 1), + sort: flat.some((node) => node['Node Type'] === 'Sort'), + shared_buffer_hits: representative.Plan['Shared Hit Blocks'] ?? 0, + shared_buffer_reads: representative.Plan['Shared Read Blocks'] ?? 0, + raw_plans: plans, + }); + const textPlan = (await client.query(`EXPLAIN (ANALYZE, BUFFERS) ${query.sql}`, query.parameters)).rows.map((row) => row['QUERY PLAN']).join('\n'); + raw.push(`=== ${phase.name} / ${query.name} ===\nIndexes: ${indexes.map((index) => index.indexname).join(', ') || '(none)'}\nSQL:\n${query.sql}\nParameters: ${JSON.stringify(query.parameters)}\n\n${textPlan}\n`); + console.log(`${phase.name} / ${query.name}: median ${medianMs.toFixed(3)} ms; ${scan?.['Node Type']}; scanned ${runs.at(-1).scanned_rows}; sort=${runs.at(-1).sort}`); + } + } +} finally { + try { + await client.query('ROLLBACK'); + if (metadata) { + metadata.source_table_indexes_after = (await client.query("SELECT indexname, indexdef FROM pg_indexes WHERE schemaname = 'public' AND tablename = 'messages' ORDER BY indexname")).rows; + assert.deepEqual(metadata.source_table_indexes_after, sourceIndexes); + const leftovers = (await client.query('SELECT count(*)::integer AS count FROM pg_namespace WHERE nspname = $1', [schema])).rows[0].count; + assert.equal(leftovers, 0); + metadata.experiment_schema_absent = true; + } + cleanup = true; + } finally { + await client.end(); + } +} +assert.equal(cleanup, true); +await mkdir(output, { recursive: true }); +await writeFile(resolve(output, 'history-index-explain.json'), JSON.stringify({ ...metadata, cleanup_completed: cleanup, runs }, null, 2) + '\n'); +await writeFile(resolve(output, 'history-index-plans.txt'), raw.join('\n')); +const labels = { no_indexes: 'Без индексов', without_history_index: 'PK + sender_id, без индекса истории', with_history_index: 'С индексом истории' }; +const tableRows = runs.map((row) => `| ${labels[row.phase]} | ${row.query} | ${row.median_execution_ms.toFixed(3)} | ${row.scan_type} | ${row.scanned_rows} | ${row.sort ? 'да' : 'нет'} | ${row.shared_buffer_hits} / ${row.shared_buffer_reads} |`).join('\n'); +const speedup = (query) => runs.find((row) => row.query === query && row.phase === 'no_indexes').median_execution_ms / runs.find((row) => row.query === query && row.phase === 'with_history_index').median_execution_ms; +const summary = `# EXPLAIN истории сообщений: с индексами и без\n\nДата UTC: ${metadata.recorded_at}. PostgreSQL ${metadata.settings.find((setting) => setting.name === 'server_version').setting}.\n\nКоманда: \`node test/explain-history.mjs\` (нужен \`DATABASE_URL\`; PostgreSQL проекта с применёнными миграциями).\n\n60 000 синтетических сообщений в пяти чатах; в целевом чате 20 000. Чаты перемежаются при вставке, текст 256 символов, по 10 сообщений имеют одинаковый created_at. Страница API: 50 сообщений + 1 для next_cursor. Курсоры после 10 000-го и 18 000-го сообщений. Запросы первой страницы и с OR соответствуют прежнему \`ChatService.listMessages\`; tuple — исправленное условие курсора, используемое в текущем API. Скрипт сравнивает прежний и исправленный запросы; сам код API не меняет.\n\n| Индексы | Запрос | Медиана, мс | Scan | Проверено строк | Sort | Buffers hit/read |\n| --- | --- | ---: | --- | ---: | --- | ---: |\n${tableRows}\n\nПервая страница с индексом быстрее варианта без индексов в ${speedup('first_page').toFixed(1)} раза на этом наборе и стенде. Само наличие PK и индекса sender_id не заменяет индекс истории. Составной B-tree \`(chat_id, created_at, id)\` соответствует равенству chat_id и порядку истории; наличие Sort и границы Index Cond видны в сохранённых планах. ORDER BY нужен и при наличии индекса.\n\nПоздняя страница с OR: ${runs.find((row) => row.phase === 'with_history_index' && row.query === 'late_page_or').scanned_rows} проверенных строк. Эквивалентное сравнение пары: ${runs.find((row) => row.phase === 'with_history_index' && row.query === 'late_page_tuple').scanned_rows} строк. Это показывает, удалось ли передать границу курсора в Index Cond или она осталась Filter. Совпадение результатов всех фаз и OR/tuple проверено SHA-256 от полных 51 строк.\n\nМетодика: отдельная таблица с колонками текущей public.messages в случайной схеме; одинаковые данные во всех фазах; ANALYZE после загрузки и изменений индексов; 1 прогрев + 5 измерений каждого запроса в каждой фазе, медиана PostgreSQL Execution Time. Планы не принуждались настройками enable_seqscan/enable_indexscan. Фаза с индексом сохраняет PK и sender_id. Все создание таблиц, данных и индексов выполнены внутри транзакции; ROLLBACK удалил экспериментальную схему. Рабочие таблицы и индексы не изменялись.\n\nОграничения: это прогретый SQL-тест без HTTP, Redis, аутентификации и конкуренции; не cold-cache benchmark, не измерение RPS и не доказательство latency всего API. FK не копировались, поскольку сравнивается чтение; это одинаково во всех фазах. Измерения зависят от ресурсов и нагрузки Docker-host. Лимиты и настройки PostgreSQL записаны в JSON; текстовые планы сняты отдельным запуском, поэтому их времена могут отличаться от медиан JSON.\n\nФайлы: [полные текстовые планы](history-index-plans.txt), [JSON, пять повторов, настройки и результаты](history-index-explain.json).\n`; +await writeFile(resolve(output, 'history-index-summary.md'), summary); +console.log(`Saved EXPLAIN evidence to ${output}; experiment schema rolled back.`); diff --git a/test/failover-target.py b/test/failover-target.py new file mode 100644 index 00000000..f1133cf1 --- /dev/null +++ b/test/failover-target.py @@ -0,0 +1,107 @@ +#!/usr/bin/env python3 +"""Check failover of a named Compose API replica without changing public tests.""" + +import argparse +import os +from pathlib import Path +import subprocess +import sys +import time +import uuid + +ROOT = Path(__file__).resolve().parents[1] +sys.path.insert(0, str(ROOT / "tests")) +from client import Client, Failure, check # noqa: E402 + + +def main(): + parser = argparse.ArgumentParser() + parser.add_argument("--base-url", default="http://127.0.0.1:8080") + parser.add_argument("--target-index", type=int, choices=(1, 2), required=True) + args = parser.parse_args() + + ids = subprocess.run( + ["docker", "compose", "ps", "--all", "-q", "api"], + cwd=ROOT, capture_output=True, text=True, check=True, + ).stdout.splitlines() + check(len(ids) == 2, "targeted failover requires two API replicas") + target = subprocess.run( + ["docker", "inspect", "--format", "{{.Config.Hostname}}", + ids[args.target_index - 1]], + cwd=ROOT, capture_output=True, text=True, check=True, + ).stdout.strip() + expected = { + subprocess.run( + ["docker", "inspect", "--format", "{{.Config.Hostname}}", item], + cwd=ROOT, capture_output=True, text=True, check=True, + ).stdout.strip() + for item in ids + } + + client = Client(args.base_url, timeout=10) + alice, bob, _, chat = client.bootstrap() + before = client.message(alice, chat, "Before targeted failover")["json"] + observed = { + client.call("GET", "/api/v1/users/me", actor=alice, schema="User")[ + "headers" + ]["X-Instance-Id"] + for _ in range(40) + } + check(observed == expected, "both replicas must answer before failure") + client.timeout = 2 + + hook = ROOT / "scripts" / ("stop-one.cmd" if os.name == "nt" else "stop-one.sh") + env = dict(os.environ, TARGET_INSTANCE_ID=target) + started = time.monotonic() + result = subprocess.run( + [str(hook)], cwd=ROOT, env=env, stdout=subprocess.DEVNULL, + stderr=subprocess.DEVNULL, timeout=10, check=False, + ) + check(result.returncode == 0, "stop-one hook failed") + + key = uuid.uuid4().hex + text = "Targeted failover " + key + failures = 0 + while True: + try: + written = client.message(alice, chat, text, key=key) + break + except Failure: + failures += 1 + check(time.monotonic() - started <= 10, "write recovery exceeded 10 seconds") + time.sleep(0.1) + recovery = time.monotonic() - started + check(recovery <= 10, "write recovery exceeded 10 seconds") + check(written["headers"]["X-Instance-Id"] != target, + "stopped replica answered the write") + + reads = 0 + first_read = None + while reads < 10: + try: + response = client.call("GET", "/api/v1/users/me", actor=alice, + schema="User") + except Failure: + failures += 1 + check(time.monotonic() - started <= 10, + "read recovery exceeded 10 seconds") + continue + if first_read is None: + first_read = time.monotonic() - started + check(first_read <= 10, "read recovery exceeded 10 seconds") + check(response["headers"]["X-Instance-Id"] != target, + "stopped replica still serves traffic") + reads += 1 + messages = client.call( + "GET", f"/api/v1/chats/{chat['id']}/messages?limit=100", + actor=bob, schema="MessagePage", + )["json"]["items"] + check(before in messages, "confirmed pre-failure message disappeared") + check(sum(message["text"] == text for message in messages) == 1, + "uncertain retry created a duplicate") + print(f"PASS: replica {args.target_index} stopped; write_recovery={recovery:.3f}s; " + f"read_recovery={first_read:.3f}s; transient_failures={failures}") + + +if __name__ == "__main__": + main() diff --git a/test/full-restart.py b/test/full-restart.py new file mode 100644 index 00000000..0c2d813e --- /dev/null +++ b/test/full-restart.py @@ -0,0 +1,57 @@ +#!/usr/bin/env python3 +import argparse +from pathlib import Path +import subprocess +import sys +import time + +ROOT = Path(__file__).resolve().parents[1] +sys.path.insert(0, str(ROOT / 'tests')) +from client import Client, Failure, check, run +from resilience import history + + +def main(): + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument('--base-url', default='http://127.0.0.1:8080') + parser.add_argument('--ca-file') + parser.add_argument('--action-script', required=True) + args = parser.parse_args() + client = Client(args.base_url, args.ca_file, timeout=30) + alice, bob, eve, chat = client.bootstrap() + original = client.message(alice, chat, 'Сохранность после полного перезапуска')['json'] + check(history(client, bob, chat) == [original], 'pre-restart history mismatch') + hook = Path(args.action_script).resolve() + check(hook.is_file(), 'restart hook not found') + print('Restarting backend, PostgreSQL and Redis; hook output suppressed.', flush=True) + try: + proc = subprocess.run([str(hook)], cwd=ROOT, stdout=subprocess.DEVNULL, + stderr=subprocess.DEVNULL, timeout=90) + except subprocess.TimeoutExpired: + raise Failure('restart hook exceeded 90 seconds') from None + check(proc.returncode == 0, 'restart hook failed') + deadline = time.monotonic() + 90 + while True: + try: + client.call('GET', '/health/ready', schema='Health') + break + except Failure: + check(time.monotonic() < deadline, 'API did not recover within 90 seconds') + time.sleep(0.5) + for actor in (alice, bob, eve): + check(client.call('GET', '/api/v1/users/me', actor=actor, schema='User')['json'] + == actor['user'], 'user or existing session changed after restart') + check(client.call('GET', '/api/v1/chats/' + chat['id'], actor=bob, schema='Chat')['json'] + == chat, 'chat or membership changed after restart') + check(history(client, bob, chat) == [original], 'confirmed message lost, changed or duplicated') + client.call('GET', '/api/v1/chats/' + chat['id'], 404, actor=eve, schema='Error') + followup = client.message(bob, chat, 'Запись после восстановления')['json'] + check(history(client, alice, chat) == [original, followup], 'post-restart write/read mismatch') + client.call('DELETE', '/api/v1/auth/sessions/current', 204, actor=alice) + client.call('GET', '/api/v1/users/me', 401, actor=alice, schema='Error') + print('PASS: users, chat, membership, confirmed message and all existing sessions survived; ' + 'access control, new writes and logout work after restart.') + + +if __name__ == '__main__': + run(main) diff --git a/test/grade4.py b/test/grade4.py new file mode 100644 index 00000000..cc9283c8 --- /dev/null +++ b/test/grade4.py @@ -0,0 +1,332 @@ +#!/usr/bin/env python3 +"""Lab 3 grade 4: measured replica failover or sequential replacement.""" + +import argparse +from collections import Counter +from concurrent.futures import ThreadPoolExecutor +import json +from pathlib import Path +import subprocess +import sys +import threading +import time +import uuid + +ROOT = Path(__file__).resolve().parents[1] +sys.path.insert(0, str(ROOT / "tests")) +from client import Client, Failure, check # noqa: E402 +from resilience import history # noqa: E402 + +def compose(*args, timeout=60): + try: + result = subprocess.run( + ["docker", "compose", "-f", "compose.yaml", "-f", "configs/two.yaml", *args], + cwd=ROOT, capture_output=True, + text=True, timeout=timeout, check=False, + ) + except (OSError, subprocess.TimeoutExpired) as exc: + raise Failure(f"docker compose {args[0]} failed: {type(exc).__name__}") from None + check(result.returncode == 0, f"docker compose {args[0]} failed; inspect Docker logs") + return result.stdout.strip() + + +def docker(*args, timeout=60): + try: + result = subprocess.run( + ["docker", *args], cwd=ROOT, capture_output=True, + text=True, timeout=timeout, check=False, + ) + except (OSError, subprocess.TimeoutExpired) as exc: + raise Failure(f"docker {args[0]} failed: {type(exc).__name__}") from None + check(result.returncode == 0, f"docker {args[0]} failed; inspect Docker logs") + return result.stdout.strip() + + +def inspect(container_id, field): + try: + result = subprocess.run( + ["docker", "inspect", "--format", field, container_id], + cwd=ROOT, capture_output=True, text=True, timeout=10, check=False, + ) + except (OSError, subprocess.TimeoutExpired) as exc: + raise Failure(f"docker inspect failed: {type(exc).__name__}") from None + check(result.returncode == 0, "docker inspect failed") + return result.stdout.strip() + + +def containers(service): + ids = compose("ps", "--all", "-q", service).splitlines() + check(bool(ids), f"{service} container is missing") + return ids + + +def container(service): + ids = containers(service) + check(len(ids) == 1, f"expected one {service} container") + return ids[0] + + +def instance(container_id): + return inspect(container_id, "{{.Config.Hostname}}") + + +def healthy(container_id, timeout=60): + deadline = time.monotonic() + timeout + while time.monotonic() < deadline: + if inspect(container_id, "{{.State.Health.Status}}") == "healthy": + return + time.sleep(0.5) + raise Failure(f"API container did not become healthy in {timeout} seconds") + + +def both_observed(client, actor, expected, timeout=30): + seen = set() + deadline = time.monotonic() + timeout + while time.monotonic() < deadline: + try: + response = client.call("GET", "/api/v1/users/me", actor=actor, + schema="User") + seen.add(response["headers"]["X-Instance-Id"]) + except Failure: + pass + if seen == expected: + return + time.sleep(0.1) + raise Failure(f"both replicas were not observed; saw {sorted(seen)}") + + +class Traffic: + def __init__(self, base_url, actor, chat, concurrency): + self.base_url = base_url + self.actor = actor + self.chat = chat + self.concurrency = concurrency + self.stop = threading.Event() + self.lock = threading.Lock() + self.events = [] + self.confirmed = set() + self.attempted = set() + self.pool = ThreadPoolExecutor(max_workers=concurrency) + + def start(self): + self.futures = [self.pool.submit(self.worker, i) + for i in range(self.concurrency)] + + def worker(self, worker_id): + client = Client(self.base_url, timeout=2) + index = 0 + pending = None + while not self.stop.is_set(): + write = worker_id % 2 == 0 + if write and pending is None: + key = uuid.uuid4().hex + pending = (key, f"grade4-{worker_id}-{index}-{key}") + index += 1 + with self.lock: + self.attempted.add(pending[1]) + try: + if write: + response = client.message(self.actor, self.chat, + pending[1], key=pending[0]) + else: + response = client.call("GET", "/api/v1/users/me", + actor=self.actor, schema="User") + event = (time.monotonic(), "write" if write else "read", True, + response["headers"]["X-Instance-Id"]) + if write: + with self.lock: + self.confirmed.add(pending[1]) + pending = None + except Failure: + event = (time.monotonic(), "write" if write else "read", False, None) + with self.lock: + self.events.append(event) + self.stop.wait(0.05) + + def finish(self): + self.stop.set() + try: + for future in self.futures: + future.result(timeout=5) + finally: + self.pool.shutdown(wait=True) + + def snapshot(self): + with self.lock: + return list(self.events) + + +def metrics(events, started, ended, target, action_done, scenario): + window = [event for event in events if started <= event[0] <= ended] + check(bool(window), "no traffic was recorded during the action") + counts = {} + for kind in ("read", "write"): + records = [event for event in window if event[1] == kind] + successes = [event for event in records if event[2]] + check(bool(successes), f"no successful {kind}s during the action") + survivor = next((event[0] for event in successes + if event[0] >= started and event[3] != target), None) + check(survivor is not None, f"no {kind} served by surviving replica") + after_action = next((event[0] for event in successes + if event[0] >= action_done), None) + check(after_action is not None, f"no {kind} succeeded after the action") + counts[kind] = { + "successful": len(successes), + "errors": len(records) - len(successes), + "successful_rps": round(len(successes) / (ended - started), 3), + "first_survivor_seconds": round(survivor - started, 3), + "first_success_after_action_seconds": round(after_action - started, 3), + } + after = [event for event in window if event[0] >= action_done + 1 and event[2]] + check(bool(after), "no successful traffic after the action") + if scenario == "failover": + check(all(event[3] != target for event in after), + "stopped replica still served traffic after the action") + target_times = [event[0] for event in window + if event[2] and event[3] == target] + counts["last_target_response_seconds"] = ( + round(max(target_times) - started, 3) if target_times else None + ) + for kind in ("read", "write"): + check(counts[kind]["first_success_after_action_seconds"] <= 10, + f"{kind} did not recover within 10 seconds") + return counts + + +def verify_history(client, actor, chat, original, traffic): + messages = history(client, actor, chat) + counts = Counter(message["text"] for message in messages) + check(any(message == original for message in messages), + "confirmed pre-action message disappeared") + for text in traffic.attempted: + check(counts[text] <= 1, "an uncertain retry created a duplicate") + for text in traffic.confirmed: + check(counts[text] == 1, "confirmed write disappeared") + + +def resource_limits(): + expected = { + "nginx": (500_000_000, 128 * 1024**2), + "migrate": (1_000_000_000, 512 * 1024**2), + "postgres": (1_000_000_000, 512 * 1024**2), + "redis": (500_000_000, 256 * 1024**2), + } + ids = containers("api") + check(len(ids) in (1, 2, 4), "expected 1, 2 or 4 API replicas") + api_limits = (2_000_000_000 // len(ids), 1024 * 1024**2 // len(ids)) + observed = {"api": []} + for container_id in ids: + actual = ( + int(inspect(container_id, "{{.HostConfig.NanoCpus}}")), + int(inspect(container_id, "{{.HostConfig.Memory}}")), + ) + check(actual == api_limits, "API resource limits differ from fixed budget") + observed["api"].append({"instance": instance(container_id), + "cpus": actual[0] / 1e9, + "memory_mib": actual[1] // 1024**2}) + for service, limits in expected.items(): + container_id = container(service) + actual = ( + int(inspect(container_id, "{{.HostConfig.NanoCpus}}")), + int(inspect(container_id, "{{.HostConfig.Memory}}")), + ) + check(actual == limits, f"{service} resource limits differ from compose.yaml") + observed[service] = {"cpus": actual[0] / 1e9, + "memory_mib": actual[1] // 1024**2} + return observed + + +def run(args): + check(2 <= args.concurrency <= 8, "concurrency must be 2..8") + check(3 <= args.observe_seconds <= 60, + "observe-seconds must be 3..60") + result = {"scenario": args.scenario, "resources": resource_limits(), + "actions": []} + if args.scenario == "resources": + return result + targets = containers("api") + check(len(targets) == 2, "failover and rolling scenarios require the two-replica profile") + + client = Client(args.base_url, timeout=10) + alice, bob, _, chat = client.bootstrap() + original = client.message(alice, chat, "Before grade 4 actions")["json"] + both_observed(client, alice, {instance(item) for item in targets}) + migrate_id = container("migrate") + traffic = Traffic(args.base_url, alice, chat, args.concurrency) + traffic.start() + try: + for before_id in targets: + target = instance(before_id) + healthy(before_id) + before_ids = set(containers("api")) + both_observed(client, alice, {instance(item) for item in before_ids}) + time.sleep(1) + started = time.monotonic() + if args.scenario == "failover": + docker("stop", "--time", "30", before_id, timeout=40) + check(inspect(before_id, "{{.State.Status}}") == "exited", + "target API container was not stopped") + else: + docker("stop", "--time", "30", before_id, timeout=40) + docker("rm", before_id) + compose("up", "-d", "--no-build", "--no-deps", + "--scale", "api=2", "api", timeout=90) + replacements = set(containers("api")) - before_ids + check(len(replacements) == 1, "one API container was not replaced") + healthy(next(iter(replacements))) + action_done = time.monotonic() + time.sleep(args.observe_seconds) + ended = time.monotonic() + item = {"target": target, + "action_seconds": round(action_done - started, 3), + "window_seconds": round(ended - started, 3), + "traffic": metrics(traffic.snapshot(), started, ended, + target, action_done, args.scenario)} + if args.scenario == "failover": + docker("start", before_id) + healthy(before_id) + both_observed(client, alice, + {instance(item) for item in containers("api")}) + result["actions"].append(item) + check(container("migrate") == migrate_id, + "migration container changed during API replacement") + finally: + traffic.finish() + # Restore both API replicas after a failed test; never remove volumes. + try: + compose("up", "-d", "--no-build", "--no-deps", + "--scale", "api=2", "api") + except Failure: + print("WARNING: restore API replicas manually", file=sys.stderr) + verify_history(client, bob, chat, original, traffic) + result["confirmed_writes"] = len(traffic.confirmed) + result["attempted_unique_writes"] = len(traffic.attempted) + result["migration_container_unchanged"] = True + return result + + +def main(): + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument("--scenario", choices=("resources", "failover", "rolling"), + required=True) + parser.add_argument("--base-url", default="http://127.0.0.1:8080") + parser.add_argument("--concurrency", type=int, default=4) + parser.add_argument("--observe-seconds", type=float, default=10) + parser.add_argument("--output", help="optional JSON result path without tokens") + args = parser.parse_args() + try: + result = run(args) + output = json.dumps(result, ensure_ascii=False, indent=2) + if args.output: + path = Path(args.output) + path.parent.mkdir(parents=True, exist_ok=True) + path.write_text(output + "\n", encoding="utf-8") + print(output) + print("PASS: grade 4 scenario") + except (Failure, ValueError, OSError) as exc: + print(f"FAIL: {exc}", file=sys.stderr) + raise SystemExit(1) from None + + +if __name__ == "__main__": + main() diff --git a/test/helpers/fault-proxy.mjs b/test/helpers/fault-proxy.mjs new file mode 100644 index 00000000..223dbf45 --- /dev/null +++ b/test/helpers/fault-proxy.mjs @@ -0,0 +1,56 @@ +import assert from 'node:assert/strict'; +import net from 'node:net'; + +export async function faultProxy(connectionUrl, defaultPort) { + const upstreamUrl = new URL(connectionUrl); + const host = upstreamUrl.hostname.replace(/^\[|\]$/g, ''); + const port = Number(upstreamUrl.port || defaultPort); + let mode = 'online'; + const sockets = new Set(); + const track = (socket) => { + sockets.add(socket); + socket.on('error', () => {}); + socket.on('close', () => sockets.delete(socket)); + return socket; + }; + const server = net.createServer((client) => { + track(client); + if (mode === 'cut') { + client.destroy(); + return; + } + const upstream = track(net.connect({ host, port })); + client.on('data', (chunk) => { + if (mode === 'online' && !upstream.destroyed) upstream.write(chunk); + }); + upstream.on('data', (chunk) => { + if (mode === 'online' && !client.destroyed) client.write(chunk); + }); + client.on('close', () => upstream.destroy()); + upstream.on('close', () => client.destroy()); + }); + await new Promise((resolve, reject) => { + server.once('error', reject); + server.listen(0, '127.0.0.1', () => { + server.off('error', reject); + resolve(); + }); + }); + const relayUrl = new URL(connectionUrl); + relayUrl.hostname = '127.0.0.1'; + relayUrl.port = String(server.address().port); + return { + url: relayUrl.toString(), + setMode(nextMode) { + assert.ok(['online', 'cut', 'hang'].includes(nextMode)); + mode = nextMode; + if (mode === 'cut') { + for (const socket of sockets) socket.destroy(); + } + }, + async close() { + for (const socket of sockets) socket.destroy(); + await new Promise((resolve, reject) => server.close((error) => error ? reject(error) : resolve())); + }, + }; +} diff --git a/test/helpers/message-epoch.mjs b/test/helpers/message-epoch.mjs new file mode 100644 index 00000000..1e2f49a4 --- /dev/null +++ b/test/helpers/message-epoch.mjs @@ -0,0 +1,7 @@ +export async function messageEpoch(prisma, chatId) { + const [row] = await prisma.$queryRawUnsafe( + 'SELECT COALESCE(SUM(epoch), 0)::bigint AS epoch FROM public.chat_message_epochs WHERE chat_id = $1::uuid', + chatId, + ); + return row.epoch; +} diff --git a/test/idempotency.mjs b/test/idempotency.mjs new file mode 100644 index 00000000..88b89923 --- /dev/null +++ b/test/idempotency.mjs @@ -0,0 +1,146 @@ +import 'dotenv/config'; +import assert from 'node:assert/strict'; +import { randomUUID } from 'node:crypto'; +import { createRequire } from 'node:module'; +import test from 'node:test'; + +const require = createRequire(import.meta.url); +const { NestFactory } = require('@nestjs/core'); +const { AppModule } = require('../dist/app.module'); +const { PrismaService } = require('../dist/prisma/prisma.service'); +const { + createFastifyAdapter, + exposeRequestIdHeader, +} = require('../dist/common/http/fastify-adapter'); + +test( + 'message idempotency is shared by two API instances', + { timeout: 120000 }, + async (t) => { + assert.ok( + process.env.DATABASE_URL, + 'Set DATABASE_URL and apply migrations', + ); + const apps = []; + let db; + let chatId; + const userIds = []; + t.after(async () => { + if (db && chatId) { + await db.$executeRawUnsafe( + 'DELETE FROM message_idempotency WHERE chat_id = $1::uuid', + chatId, + ); + await db.chat.deleteMany({ where: { id: chatId } }); + } + if (db && userIds.length) { + await db.user.deleteMany({ where: { id: { in: userIds } } }); + } + for (const app of apps) await app.close(); + }); + + for (let index = 0; index < 2; index++) { + const app = await NestFactory.create(AppModule, createFastifyAdapter(), { + logger: false, + }); + exposeRequestIdHeader(app); + await app.init(); + await app.getHttpAdapter().getInstance().ready(); + apps.push(app); + } + db = apps[0].get(PrismaService); + const servers = apps.map((app) => app.getHttpAdapter().getInstance()); + const call = (index, method, url, token, payload, key) => + servers[index].inject({ + method, + url, + headers: { + ...(token ? { authorization: `Bearer ${token}` } : {}), + ...(key === undefined ? {} : { 'idempotency-key': key }), + }, + ...(payload === undefined ? {} : { payload }), + }); + const register = async (label) => { + const username = `idem_${label}_${randomUUID().replaceAll('-', '').slice(0, 12)}`; + const password = `T3st-${randomUUID()}`; + const response = await call(0, 'POST', '/api/v1/users', undefined, { + username, + display_name: label, + password, + }); + assert.equal(response.statusCode, 201, response.body); + const user = response.json(); + userIds.push(user.id); + const login = await servers[0].inject({ + method: 'POST', + url: '/api/v1/auth/sessions', + headers: { + authorization: `Basic ${Buffer.from(`${username}:${password}`).toString('base64')}`, + }, + }); + assert.equal(login.statusCode, 201, login.body); + return { user, token: login.json().token }; + }; + + const owner = await register('owner'); + const outsider = await register('outsider'); + const created = await call(0, 'POST', '/api/v1/chats', owner.token, { + title: 'Idempotency test', + member_ids: [owner.user.id], + }); + assert.equal(created.statusCode, 201, created.body); + chatId = created.json().id; + const path = `/api/v1/chats/${chatId}/messages`; + const key = randomUUID(); + const body = { text: 'One message' }; + + assert.equal( + (await call(0, 'POST', path, owner.token, body)).statusCode, + 400, + ); + assert.equal( + (await call(0, 'POST', path, owner.token, body, 'bad key')).statusCode, + 400, + ); + const first = await call(0, 'POST', path, owner.token, body, key); + assert.equal(first.statusCode, 201, first.body); + const replay = await call(1, 'POST', path, owner.token, body, key); + assert.equal(replay.statusCode, 201, replay.body); + assert.deepEqual(replay.json(), first.json()); + assert.equal( + (await call(1, 'POST', path, owner.token, { text: 'Changed' }, key)) + .statusCode, + 409, + ); + assert.equal( + (await call(1, 'POST', path, outsider.token, body, key)).statusCode, + 404, + ); + + const concurrentKey = randomUUID(); + const concurrent = await Promise.all( + Array.from({ length: 12 }, (_, index) => + call( + index % 2, + 'POST', + path, + owner.token, + { text: 'Concurrent' }, + concurrentKey, + ), + ), + ); + for (const response of concurrent) { + assert.equal(response.statusCode, 201, response.body); + assert.deepEqual(response.json(), concurrent[0].json()); + } + assert.equal(await db.message.count({ where: { chatId } }), 2); + const [record] = await db.$queryRawUnsafe( + 'SELECT expires_at AS "expiresAt" FROM message_idempotency WHERE user_id = $1::uuid AND chat_id = $2::uuid AND "key" = $3', + owner.user.id, + chatId, + concurrentKey, + ); + assert.ok(record.expiresAt.getTime() - Date.now() >= 23 * 3600 * 1000); + }, +); diff --git a/test/message-pagination.mjs b/test/message-pagination.mjs new file mode 100644 index 00000000..bc92b1e3 --- /dev/null +++ b/test/message-pagination.mjs @@ -0,0 +1,137 @@ +import 'dotenv/config'; +import assert from 'node:assert/strict'; +import { createHash, randomBytes, randomUUID } from 'node:crypto'; +import { createRequire } from 'node:module'; +import test from 'node:test'; + +const require = createRequire(import.meta.url); +const { NestFactory } = require('@nestjs/core'); +const { AppModule } = require('../dist/app.module'); +const { PrismaService } = require('../dist/prisma/prisma.service'); +const { + createFastifyAdapter, + exposeRequestIdHeader, +} = require('../dist/common/http/fastify-adapter'); + +test('message keyset pagination: timestamp ties, chat isolation and deleted cursor row', async (t) => { + assert.ok(process.env.DATABASE_URL); + const previousCacheUrl = process.env.CACHE_URL; + process.env.CACHE_URL = ''; + const app = await NestFactory.create(AppModule, createFastifyAdapter(), { + logger: false, + abortOnError: false, + }); + const prisma = app.get(PrismaService); + let userId; + const chatIds = []; + t.after(async () => { + try { + await prisma.chat.deleteMany({ where: { id: { in: chatIds } } }); + if (userId) await prisma.user.delete({ where: { id: userId } }); + } finally { + await app.close(); + if (previousCacheUrl === undefined) delete process.env.CACHE_URL; + else process.env.CACHE_URL = previousCacheUrl; + } + }); + exposeRequestIdHeader(app); + await app.init(); + const server = app.getHttpAdapter().getInstance(); + await server.ready(); + const user = await prisma.user.create({ + data: { + username: `page_${randomUUID().replaceAll('-', '').slice(0, 20)}`, + displayName: 'Synthetic pagination test', + }, + }); + userId = user.id; + const token = randomBytes(32).toString('base64url'); + await prisma.session.create({ + data: { + userId, + tokenHash: createHash('sha256').update(token).digest('hex'), + expiresAt: new Date(Date.now() + 600000), + }, + }); + for (let i = 0; i < 2; i++) { + const chat = await prisma.chat.create({ + data: { + title: `Pagination ${i}`, + members: { create: { userId, position: 0 } }, + }, + }); + chatIds.push(chat.id); + } + const [chatId, otherChatId] = chatIds; + const rows = Array.from({ length: 140 }, (_, i) => ({ + id: randomUUID(), + chatId, + senderId: userId, + text: `Message ${i}`, + createdAt: new Date(Date.UTC(2026, 0, 1) + Math.floor(i / 10) * 1000), + })); + await prisma.message.createMany({ + data: [ + ...rows, + ...rows.map((row) => ({ + ...row, + id: randomUUID(), + chatId: otherChatId, + text: 'Other chat', + })), + ], + }); + const expected = [...rows] + .sort( + (a, b) => + a.createdAt - b.createdAt || (a.id < b.id ? -1 : a.id > b.id ? 1 : 0), + ) + .map((row) => ({ + id: row.id, + chat_id: chatId, + sender_id: userId, + text: row.text, + created_at: row.createdAt.toISOString(), + })); + const request = (cursor, selectedChat = chatId) => + server.inject({ + method: 'GET', + url: `/api/v1/chats/${selectedChat}/messages?limit=7${cursor ? `&cursor=${encodeURIComponent(cursor)}` : ''}`, + headers: { authorization: `Bearer ${token}` }, + }); + const seen = []; + let cursor; + let firstCursor; + do { + const response = await request(cursor); + assert.equal(response.statusCode, 200); + const page = response.json(); + assert.ok(page.items.length <= 7); + seen.push(...page.items); + if (!firstCursor) firstCursor = page.next_cursor; + cursor = page.next_cursor; + assert.ok( + seen.length <= rows.length, + 'pagination must terminate without duplicates', + ); + } while (cursor); + assert.deepEqual(seen, expected); + const anchor = JSON.parse( + Buffer.from(firstCursor, 'base64url').toString('utf8'), + ); + await prisma.message.delete({ where: { id: anchor.id } }); + const afterDeletion = await request(firstCursor); + assert.equal(afterDeletion.statusCode, 200); + assert.deepEqual(afterDeletion.json().items, expected.slice(7, 14)); + assert.equal((await request(firstCursor, otherChatId)).statusCode, 400); + const pastEnd = Buffer.from( + JSON.stringify({ + scope: `messages:${chatId}`, + id: randomUUID(), + created_at: '2027-01-01T00:00:00.000Z', + }), + ).toString('base64url'); + const empty = await request(pastEnd); + assert.equal(empty.statusCode, 200); + assert.deepEqual(empty.json(), { items: [], next_cursor: null }); +}); diff --git a/test/nginx-readiness-parallel.sh b/test/nginx-readiness-parallel.sh new file mode 100755 index 00000000..8c3924db --- /dev/null +++ b/test/nginx-readiness-parallel.sh @@ -0,0 +1,35 @@ +#!/bin/sh +# A barrier makes sequential probes fail: all four requests must start together. +set -eu +sed '/^check_ready &/,$d' /source/start-nginx.sh > /tmp/readiness-under-test.sh +. /tmp/readiness-under-test.sh +mkdir -p /tmp/readiness-barrier +cycle=0 +getent() { + for ip in 1 2 3 4; do printf '192.0.2.%s STREAM api\n' "$ip"; done +} +wget() { + for arg do + case "$arg" in http://*) address=${arg#http://}; address=${address%%:*} ;; esac + done + touch "/tmp/readiness-barrier/$address" + attempt=0 + while [ "$attempt" -lt 50 ]; do + if [ "$(find /tmp/readiness-barrier -type f | wc -l)" -eq 4 ]; then return 0; fi + attempt=$((attempt + 1)) + command sleep 0.01 + done + return 1 +} +nginx() { return 0; } +sleep() { + if [ "$cycle" -eq 2 ]; then + count=$(grep -c 'server 192.0.2.' "$upstreams" || true) + [ "$count" -eq 4 ] || { printf 'FAIL: readiness probes did not start in parallel\n'; exit 1; } + printf 'PASS: four concurrent probes admitted after two successful rounds\n' + exit 0 + fi + rm -f /tmp/readiness-barrier/* + cycle=$((cycle + 1)) +} +check_ready diff --git a/test/nginx-readiness.sh b/test/nginx-readiness.sh new file mode 100755 index 00000000..5c334dac --- /dev/null +++ b/test/nginx-readiness.sh @@ -0,0 +1,42 @@ +#!/bin/sh +# Run in a disposable nginx container; never against a running load balancer. +set -eu + +sed '/^check_ready &/,$d' /source/start-nginx.sh > /tmp/readiness-under-test.sh +. /tmp/readiness-under-test.sh + +cycle=0 +reloads=0 +getent() { printf '192.0.2.1 STREAM api\n'; } +wget() { + case "$cycle" in + 1|2|4|7|8) return 0 ;; + *) return 1 ;; + esac +} +nginx() { + if [ "$1" = '-s' ]; then reloads=$((reloads + 1)); fi +} +sleep() { + # Check the previous cycle before advancing to the next probe. + if [ "$cycle" -gt 0 ]; then + case "$cycle" in + 2|3|4|5|8) expected=1 ;; + *) expected=0 ;; + esac + actual=0 + if grep -q 'server 192.0.2.1:8080 ' "$upstreams"; then actual=1; fi + if [ "$actual" -ne "$expected" ]; then + printf 'FAIL: cycle %s, expected readiness %s, got %s\n' "$cycle" "$expected" "$actual" >&2 + exit 1 + fi + fi + cycle=$((cycle + 1)) + if [ "$cycle" -eq 9 ]; then + [ "$reloads" -eq 3 ] || exit 1 + printf 'PASS: admission, isolated failure, recovery, removal and re-admission; 3 reloads\n' + exit 0 + fi +} + +check_ready diff --git a/test/no-epochs-experiment.cjs b/test/no-epochs-experiment.cjs new file mode 100644 index 00000000..8867ff1f --- /dev/null +++ b/test/no-epochs-experiment.cjs @@ -0,0 +1,268 @@ +const assert = require('node:assert/strict'); +const fs = require('node:fs'); +const os = require('node:os'); +const path = require('node:path'); +const { createHash } = require('node:crypto'); +const { spawn, execFileSync } = require('node:child_process'); +const ts = require('typescript'); + +const root = path.resolve(__dirname, '..'); +const resultPrefix = process.env.EXPERIMENT_PREFIX ?? 'cache-strategy'; +assert.match(resultPrefix, /^[a-z0-9-]+$/); +const directory = fs.mkdtempSync(path.join(os.tmpdir(), 'lab2-no-epochs-')); +const hashes = {}; +const volumes = []; +const replace = (source, from, to) => { + assert.ok(source.includes(from), `Missing replacement: ${from}`); + assert.equal( + source.indexOf(from), + source.lastIndexOf(from), + `Ambiguous replacement: ${from}`, + ); + return source.replace(from, to); +}; +const section = (source, from, to, replacement) => { + const start = source.indexOf(from); + const end = source.indexOf(to, start); + assert.ok(start !== -1 && end > start, `Missing section: ${from}`); + return source.slice(0, start) + replacement + source.slice(end); +}; +const digest = (value) => createHash('sha256').update(value).digest('hex'); + +const transforms = { + 'Chat/chat.service.ts': (source) => { + source = section( + source, + ' await tx.$executeRaw(', + ' return created;', + '', + ); + source = replace(source, ' epoch: string,\n', ''); + source = replace(source, ' epoch,\n', ''); + source = section( + source, + ' const [membership] =', + ' if (!membership)', + ' const [membership] = await this.prisma.$queryRaw<{ id: string }[]>(Prisma.sql`\n' + + ' SELECT cm.chat_id AS id FROM chat_members AS cm\n' + + ' WHERE cm.chat_id = ${id}::uuid AND cm.user_id = ${userId}::uuid\n' + + ' `);\n', + ); + source = section( + source, + ' const [message] =', + ' if (!message)', + ' const [message] = await this.prisma.$queryRaw(Prisma.sql`\n' + + ' INSERT INTO messages (id, chat_id, sender_id, text)\n' + + ' SELECT ${randomUUID()}::uuid, cm.chat_id, ${userId}::uuid, ${text}\n' + + ' FROM chat_members AS cm\n' + + ' WHERE cm.chat_id = ${id}::uuid AND cm.user_id = ${userId}::uuid\n' + + ' RETURNING id, chat_id AS "chatId", sender_id AS "senderId",\n' + + ' text, created_at AS "createdAt"\n' + + ' `);\n', + ); + return replace(source, ' chat.messagesEpoch.toString(),\n', ''); + }, + 'Auth/auth.service.ts': (source) => { + source = source.replace( + /COALESCE\(\(SELECT SUM\(e\.epoch\)[\s\S]*?0\)::bigint AS "messagesEpoch"/g, + '0::bigint AS "messagesEpoch"', + ); + return source + .replaceAll('u.chats_epoch', '0::bigint') + .replaceAll('c.messages_epoch', '0::bigint'); + }, + 'User/user.guard.ts': (source) => { + source = replace(source, ' currentChatsEpoch: string;\n', ''); + return replace( + source, + ' request.currentChatsEpoch = session.chatsEpoch;\n', + '', + ); + }, + 'Chat/chat.controller.ts': (source) => + replace(source, ' request.currentChatsEpoch,\n', ''), + 'cache/cache.service.ts': (source) => { + source = replace(source, ' epoch?: string,\n', ''); + return section( + source, + ' if (epoch !== undefined)', + ' const versionKey =', + '', + ); + }, + 'User/user.service.ts': (source) => { + source = replace( + source, + 'const user = await this.prisma.user.findUnique({ where: { id } });', + 'const user = await this.prisma.user.findUnique({ where: { id }, select: { id: true, username: true, displayName: true, createdAt: true } });', + ); + return source; + }, +}; + +try { + for (const [relative, transform] of Object.entries(transforms)) { + const original = fs.readFileSync(path.join(root, 'src', relative), 'utf8'); + const source = transform(original.replace(/\r\n/g, '\n')); + assert.ok( + !/messages_epoch|chats_epoch|chat_message_epochs/.test(source), + relative, + ); + const compiled = ts.transpileModule(source, { + compilerOptions: { + target: ts.ScriptTarget.ES2023, + module: ts.ModuleKind.CommonJS, + experimentalDecorators: true, + emitDecoratorMetadata: true, + }, + reportDiagnostics: true, + }); + assert.equal( + compiled.diagnostics.filter( + (item) => item.category === ts.DiagnosticCategory.Error, + ).length, + 0, + ); + const sourcePath = path.join(directory, relative); + const compiledPath = sourcePath.replace(/\.ts$/, '.js'); + fs.mkdirSync(path.dirname(sourcePath), { recursive: true }); + fs.writeFileSync(sourcePath, source); + fs.writeFileSync(compiledPath, compiled.outputText); + hashes[relative] = { + original_source: digest(original), + experiment_source: digest(source), + experiment_js: digest(compiled.outputText), + }; + volumes.push({ + type: 'bind', + source: compiledPath, + target: `/app/dist/${relative.replace(/\.ts$/, '.js')}`, + read_only: true, + }); + } + let benchmark = fs + .readFileSync(path.join(root, 'test/cache-benchmark.mjs'), 'utf8') + .replace(/\r\n/g, '\n'); + benchmark = replace( + benchmark, + 'process.env.CACHE_URL = proxy.url;', + 'delete process.env.CACHE_URL;', + ); + benchmark = section( + benchmark, + ' await prisma.chatMessageEpoch.createMany(', + ' const path =', + '', + ); + benchmark = section( + benchmark, + ' const second = await start();', + ' report.completed = true;', + ' assert.equal(first.app.get(CacheService).redis, undefined);\n' + + ' for (const chatId of chatIds) {\n' + + ' assert.equal(await messageEpoch(prisma, chatId), 0n);\n' + + ' }\n' + + ' assert.equal((await prisma.user.findUniqueOrThrow({ where: { id: userId } })).chatsEpoch, 0n);\n' + + ' for (const chatId of chatIds.slice(1)) {\n' + + ' const page = await request("GET", `/api/v1/chats/${chatId}/messages`);\n' + + ' assert.equal(page.items.length, 50);\n' + + ' assert.equal(new Set(page.items.map(message => message.id)).size, 50);\n' + + ' }\n' + + ' report.correctness = { no_redis_client: true, epochs_unchanged: true, read_after_write: true };\n' + + ' }\n', + ); + const benchmarkPath = path.join(directory, 'cache-benchmark.mjs'); + fs.writeFileSync(benchmarkPath, benchmark); + volumes.push({ + type: 'bind', + source: benchmarkPath, + target: '/experiment/cache-benchmark.mjs', + read_only: true, + }); + volumes.push({ + type: 'bind', + source: path.join(root, 'test/helpers'), + target: '/experiment/helpers', + read_only: true, + }); + const override = path.join(directory, 'compose.no-epochs.yaml'); + fs.writeFileSync( + override, + JSON.stringify({ services: { benchmark: { volumes } } }, null, 2), + ); + const args = [ + 'compose', + '-f', + 'compose.yaml', + '-f', + 'test/compose.benchmark.yaml', + '-f', + override, + 'run', + '--rm', + '--no-deps', + '--pull', + 'never', + 'benchmark', + 'node', + '/experiment/cache-benchmark.mjs', + 'after', + `/results/${resultPrefix}-no-redis-no-epochs.json`, + ...process.argv.slice(2), + ]; + const metadata = { + recorded_at: new Date().toISOString(), + image: execFileSync( + 'docker', + ['image', 'inspect', 'mtusi2026lab2-fork-backend', '--format', '{{.Id}}'], + { encoding: 'utf8' }, + ).trim(), + modified_sources: hashes, + command: ['docker', ...args], + implementation: + 'Separate temporary source copies compiled with TypeScript and mounted over six application modules. Workspace sources and running backend remain unchanged.', + schema: + 'Epoch storage remains in the database; experiment API paths do not update counters or read authoritative epoch values.', + redis: + 'Application starts without CACHE_URL. Observer/proxy are retained only for benchmark setup and cleanup.', + full_result: `${resultPrefix}-full.json`, + experiment_result: `${resultPrefix}-no-redis-no-epochs.json`, + }; + const child = spawn('docker', args, { + cwd: root, + stdio: 'inherit', + env: process.env, + }); + child.once('error', finish); + child.once('exit', (code, signal) => finish(null, code, signal)); + let finished = false; + function finish(error, code, signal) { + if (finished) return; + finished = true; + metadata.exit_code = error ? 1 : code; + metadata.signal = signal; + metadata.sources_unchanged = Object.entries(hashes).every( + ([relative, hash]) => + digest(fs.readFileSync(path.join(root, 'src', relative), 'utf8')) === + hash.original_source, + ); + fs.writeFileSync( + path.join(root, `evidence/${resultPrefix}-experiment.json`), + JSON.stringify(metadata, null, 2) + '\n', + ); + cleanup(); + if (error) console.error(error.message); + process.exitCode = error ? 1 : (code ?? 1); + } +} catch (error) { + cleanup(); + throw error; +} + +function cleanup() { + const resolved = path.resolve(directory); + assert.equal(path.dirname(resolved), path.resolve(os.tmpdir())); + assert.ok(path.basename(resolved).startsWith('lab2-no-epochs-')); + fs.rmSync(resolved, { recursive: true, force: true }); +} diff --git a/test/passwords.mjs b/test/passwords.mjs new file mode 100644 index 00000000..17c4eef0 --- /dev/null +++ b/test/passwords.mjs @@ -0,0 +1,63 @@ +import assert from 'node:assert/strict'; +import { argon2 } from 'node:crypto'; +import { createRequire } from 'node:module'; +import test from 'node:test'; + +const require = createRequire(import.meta.url); +const { PasswordService } = require('../dist/Auth/password.service'); +const password = '🔐'.repeat(40) + ':Синтетический пароль\0'; + +test('Argon2id only: PHC format, independent derivation, unique salts, Unicode and invalid hashes', async () => { + const service = new PasswordService(); + const first = await service.hash(password); + const second = await service.hash(password); + assert.notEqual( + first, + second, + 'same password must have independently salted hashes', + ); + assert.match( + first, + /^\$argon2id\$v=19\$m=19456,t=2,p=1\$[A-Za-z0-9+/]{22}\$[A-Za-z0-9+/]{43}$/, + ); + assert.ok(!first.includes(password)); + const parts = first.split('$'); + const independent = await new Promise((resolve, reject) => + argon2( + 'argon2id', + { + message: password, + nonce: Buffer.from(parts[4], 'base64'), + memory: 19456, + passes: 2, + parallelism: 1, + tagLength: 32, + }, + (error, key) => (error ? reject(error) : resolve(key)), + ), + ); + assert.deepEqual(Buffer.from(parts[5], 'base64'), independent); + assert.equal(await service.verify(password, first), true); + assert.equal( + await service.verify(password.replace('🔐', '🔑'), first), + false, + ); + assert.equal( + await service.verify(password.slice(0, -1), first), + false, + 'NUL must not be silently truncated', + ); + for (const invalid of [ + null, + '', + 'scrypt$131072$8$1$unsupported$unsupported', + '$argon2id$v=19$m=999999999,t=999999999,p=1$x$x', + first.replace('v=19', 'v=16'), + first.replace('argon2id', 'argon2i'), + first + '$extra', + first.replace(parts[5], 'a'), + first.replace(parts[4], parts[4] + '='), + ]) { + assert.equal(await service.verify(password, invalid), false); + } +}); diff --git a/test/persistence.mjs b/test/persistence.mjs new file mode 100644 index 00000000..63cb47e5 --- /dev/null +++ b/test/persistence.mjs @@ -0,0 +1,349 @@ +import 'dotenv/config'; +import assert from 'node:assert/strict'; +import { randomUUID } from 'node:crypto'; +import { createRequire } from 'node:module'; +import test from 'node:test'; + +const require = createRequire(import.meta.url); +const { NestFactory } = require('@nestjs/core'); +const { AppModule } = require('../dist/app.module'); +const { PrismaService } = require('../dist/prisma/prisma.service'); +const { + createFastifyAdapter, + exposeRequestIdHeader, +} = require('../dist/common/http/fastify-adapter'); + +async function start() { + const app = await NestFactory.create(AppModule, createFastifyAdapter(), { + logger: false, + abortOnError: false, + }); + try { + exposeRequestIdHeader(app); + await app.init(); + const server = app.getHttpAdapter().getInstance(); + await server.ready(); + return { app, server, prisma: app.get(PrismaService) }; + } catch (error) { + await app.close(); + throw error; + } +} + +test('PostgreSQL storage: constraints, pagination, access and application restart', async (t) => { + assert.ok( + process.env.DATABASE_URL, + 'Set DATABASE_URL and apply migrations before running this test', + ); + let context = await start(); + const userIds = []; + const chatIds = []; + t.after(async () => { + try { + await context.prisma.chat.deleteMany({ where: { id: { in: chatIds } } }); + await context.prisma.user.deleteMany({ where: { id: { in: userIds } } }); + } finally { + await context.app.close(); + } + }); + const suffix = randomUUID().replaceAll('-', '').slice(0, 16); + const password = '🔐'.repeat(40) + ':пароль с пробелами '; + const tokens = new Map(); + const request = (method, url, payload, userId) => + context.server.inject({ + method, + url, + ...(payload === undefined ? {} : { payload }), + headers: { + ...(userId ? { authorization: `Bearer ${tokens.get(userId)}` } : {}), + ...(method === 'POST' && /\/messages$/.test(url) + ? { 'idempotency-key': randomUUID() } + : {}), + }, + }); + + const registrations = await Promise.all( + Array.from({ length: 4 }, () => + request('POST', '/api/v1/users', { + username: `race_${suffix}`, + display_name: 'Race', + password, + }), + ), + ); + for (const response of registrations) { + if (response.statusCode === 201) userIds.push(response.json().id); + } + assert.deepEqual( + registrations.map((response) => response.statusCode).sort(), + [201, 409, 409, 409], + ); + const userId = userIds[0]; + const outsider = await request('POST', '/api/v1/users', { + username: `other_${suffix}`, + display_name: 'Other', + password, + }); + assert.equal(outsider.statusCode, 201); + userIds.push(outsider.json().id); + + const login = (username, secret = password, payload) => + context.server.inject({ + method: 'POST', + url: '/api/v1/auth/sessions', + headers: { + authorization: `Basic ${Buffer.from(`${username}:${secret}`, 'utf8').toString('base64')}`, + }, + ...(payload === undefined ? {} : { payload }), + }); + for (const user of [ + registrations.find((r) => r.statusCode === 201).json(), + outsider.json(), + ]) { + assert.deepEqual(Object.keys(user).sort(), [ + 'created_at', + 'display_name', + 'id', + 'username', + ]); + const response = await login(user.username); + assert.equal(response.statusCode, 201); + assert.equal(response.json().token_type, 'Bearer'); + assert.match(response.json().token, /^[A-Za-z0-9_-]{43}$/); + assert.deepEqual(response.json().user, user); + tokens.set(user.id, response.json().token); + const stored = await context.prisma.user.findUniqueOrThrow({ + where: { id: user.id }, + }); + assert.match(stored.passwordHash, /^\$argon2id\$v=19\$m=19456,t=2,p=1\$/); + assert.ok(!stored.passwordHash.includes(password)); + } + const sessions = await context.prisma.session.findMany({ where: { userId } }); + assert.equal(sessions.length, 1); + assert.match(sessions[0].tokenHash, /^[a-f0-9]{64}$/); + assert.notEqual(sessions[0].tokenHash, tokens.get(userId)); + const wrong = await login(`race_${suffix}`, 'wrong-password'); + const unknown = await login(`missing_${suffix}`, 'wrong-password'); + assert.equal(wrong.statusCode, 401); + assert.equal(unknown.statusCode, 401); + assert.equal(wrong.json().error.message, unknown.json().error.message); + assert.equal( + wrong.headers['www-authenticate'], + 'Basic realm="messenger", charset="UTF-8"', + ); + assert.equal((await login(`race_${suffix}`, password, {})).statusCode, 400); + for (const invalid of [ + undefined, + 'short', + ' '.repeat(12), + '🔐'.repeat(129), + ]) { + assert.equal( + ( + await request('POST', '/api/v1/users', { + username: `bad_${suffix}`, + display_name: 'Bad', + ...(invalid === undefined ? {} : { password: invalid }), + }) + ).statusCode, + 400, + ); + } + for (const authorization of [ + undefined, + 'Bearer unknown', + `Basic ${Buffer.from(`race_${suffix}:${password}`).toString('base64')}`, + ]) { + const response = await context.server.inject({ + method: 'GET', + url: '/api/v1/users/me', + headers: { + 'x-user-id': userId, + ...(authorization ? { authorization } : {}), + }, + }); + assert.equal(response.statusCode, 401); + assert.equal( + response.headers['www-authenticate'], + 'Bearer realm="messenger"', + ); + } + const identity = await context.server.inject({ + method: 'GET', + url: '/api/v1/users/me', + headers: { + authorization: `Bearer ${tokens.get(userId)}`, + 'x-user-id': outsider.json().id, + }, + }); + assert.equal(identity.json().id, userId); + + const ready = await request('GET', '/health/ready'); + assert.equal(ready.statusCode, 200); + + const invalidChat = await request( + 'POST', + '/api/v1/chats', + { + title: `invalid_${suffix}`, + member_ids: [userId, randomUUID()], + }, + userId, + ); + assert.equal(invalidChat.statusCode, 400); + assert.equal( + await context.prisma.chat.count({ where: { title: `invalid_${suffix}` } }), + 0, + ); + + const rolledBackId = randomUUID(); + chatIds.push(rolledBackId); + await assert.rejects( + context.prisma.$transaction(async (tx) => { + await tx.chat.create({ data: { id: rolledBackId, title: 'Rollback' } }); + await tx.chatMember.create({ + data: { chatId: rolledBackId, userId: randomUUID(), position: 0 }, + }); + }), + { code: 'P2003' }, + ); + assert.equal( + await context.prisma.chat.count({ where: { id: rolledBackId } }), + 0, + ); + + const createdChat = await request( + 'POST', + '/api/v1/chats', + { title: 'Persisted chat', member_ids: [userId] }, + userId, + ); + assert.equal(createdChat.statusCode, 201); + const chatId = createdChat.json().id; + chatIds.push(chatId); + const forbidden = await request( + 'GET', + `/api/v1/chats/${chatId}`, + undefined, + outsider.json().id, + ); + assert.equal(forbidden.statusCode, 404); + const unauthorized = await request('GET', `/api/v1/chats/${chatId}`); + assert.equal(unauthorized.statusCode, 401); + + const messageIds = []; + for (let i = 0; i < 5; i++) { + const message = await request( + 'POST', + `/api/v1/chats/${chatId}/messages`, + { text: `Message ${i}` }, + userId, + ); + assert.equal(message.statusCode, 201); + messageIds.push(message.json().id); + } + await context.prisma.message.updateMany({ + where: { chatId }, + data: { createdAt: new Date('2026-01-01T00:00:00.000Z') }, + }); + const first = await request( + 'GET', + `/api/v1/chats/${chatId}/messages?limit=2`, + undefined, + userId, + ); + assert.equal(first.statusCode, 200); + assert.equal(first.json().items.length, 2); + assert.ok(first.json().next_cursor); + + await context.app.close(); + context = await start(); + const me = await request('GET', '/api/v1/users/me', undefined, userId); + assert.equal(me.statusCode, 200); + const chat = await request( + 'GET', + `/api/v1/chats/${chatId}`, + undefined, + userId, + ); + assert.equal(chat.statusCode, 200); + assert.deepEqual(chat.json().member_ids, [userId]); + const listed = await request( + 'GET', + '/api/v1/chats?limit=1', + undefined, + userId, + ); + assert.deepEqual( + listed.json().items.map((item) => item.id), + [chatId], + ); + + const seen = first.json().items.map((message) => message.id); + let cursor = first.json().next_cursor; + while (cursor) { + const page = await request( + 'GET', + `/api/v1/chats/${chatId}/messages?limit=2&cursor=${cursor}`, + undefined, + userId, + ); + assert.equal(page.statusCode, 200); + assert.ok(page.json().items.length <= 2); + seen.push(...page.json().items.map((message) => message.id)); + cursor = page.json().next_cursor; + } + assert.deepEqual(seen, [...messageIds].sort()); + assert.equal(new Set(seen).size, 5); + + const logouts = await Promise.all( + Array.from({ length: 2 }, () => + request('DELETE', '/api/v1/auth/sessions/current', undefined, userId), + ), + ); + assert.deepEqual(logouts.map((r) => r.statusCode).sort(), [204, 401]); + assert.equal(logouts.find((r) => r.statusCode === 204).body, ''); + assert.equal( + (await request('GET', '/api/v1/users/me', undefined, userId)).statusCode, + 401, + ); + assert.equal( + ( + await request( + 'DELETE', + '/api/v1/auth/sessions/current', + undefined, + userId, + ) + ).statusCode, + 401, + ); + await context.app.close(); + const originalTtl = process.env.SESSION_TTL_SECONDS; + process.env.SESSION_TTL_SECONDS = '2'; + try { + context = await start(); + } finally { + if (originalTtl === undefined) delete process.env.SESSION_TTL_SECONDS; + else process.env.SESSION_TTL_SECONDS = originalTtl; + } + const short = await login(`race_${suffix}`); + assert.equal(short.statusCode, 201); + tokens.set(userId, short.json().token); + assert.equal( + (await request('GET', '/api/v1/users/me', undefined, userId)).statusCode, + 200, + ); + await context.app.close(); + context = await start(); + await new Promise((resolve) => + setTimeout( + resolve, + Math.max(0, Date.parse(short.json().expires_at) - Date.now()) + 100, + ), + ); + assert.equal( + (await request('GET', '/api/v1/users/me', undefined, userId)).statusCode, + 401, + ); +}); diff --git a/test/pool-diagnostics.mjs b/test/pool-diagnostics.mjs new file mode 100644 index 00000000..6365e4d7 --- /dev/null +++ b/test/pool-diagnostics.mjs @@ -0,0 +1,63 @@ +import assert from 'node:assert/strict'; +import { readFileSync } from 'node:fs'; +import vm from 'node:vm'; +import test from 'node:test'; + +test('pool observer preserves promise/callback results, errors and release', async () => { + let timer; + let now = 0; + const records = []; + const released = () => {}; + const client = { release: released }; + const failure = new Error('synthetic'); + class FakePool { + totalCount = 2; + idleCount = 1; + waitingCount = 3; + fail = false; + connect(callback) { + now += 5; + if (callback) { + callback(this.fail ? failure : undefined, this.fail ? undefined : client, released); + return undefined; + } + return this.fail ? Promise.reject(failure) : Promise.resolve(client); + } + } + const modules = { + pg: { Pool: FakePool }, + 'node:fs': { + writeFileSync() {}, + appendFileSync(path, value) { records.push(JSON.parse(value)); }, + readFileSync(path) { return path.endsWith('memory.current') ? '1024' : 'usage_usec 10\n'; }, + }, + 'node:perf_hooks': { + performance: { now: () => now }, + monitorEventLoopDelay: () => ({ enable() {}, reset() {}, mean: 1, percentile: () => 1 }), + }, + }; + vm.runInNewContext(readFileSync('scripts/diagnostics/pool.cjs', 'utf8'), { + require: (name) => modules[name], + process: { pid: 1, env: { INSTANCE_ID: 'test' }, + memoryUsage: () => ({ rss: 2048 }), cpuUsage: () => ({ user: 1, system: 2 }) }, + setInterval(callback) { timer = callback; return { unref() {} }; }, + Date, + }); + const pool = new FakePool(); + assert.equal(await pool.connect(), client); + assert.equal(pool.connect((error, value, release) => { + assert.equal(error, undefined); + assert.equal(value, client); + assert.equal(release, released); + }), undefined); + pool.fail = true; + await assert.rejects(pool.connect(), (error) => error === failure); + pool.connect((error) => assert.equal(error, failure)); + now = 2000; + timer(); + assert.equal(records[0].pools[0].acquisitions, 4); + assert.equal(records[0].pools[0].errors, 2); + assert.equal(records[0].pools[0].acquire_ms, 20); + assert.equal(records[0].pools[0].interval_max_waiting, 3); + assert.equal(records[0].pools[0].interval_max_busy, 1); +}); diff --git a/test/redis-comparison-summary.mjs b/test/redis-comparison-summary.mjs new file mode 100644 index 00000000..1e4be20d --- /dev/null +++ b/test/redis-comparison-summary.mjs @@ -0,0 +1,85 @@ +import assert from 'node:assert/strict'; +import { readFile, writeFile } from 'node:fs/promises'; + +const report = JSON.parse( + await readFile('evidence/redis-comparison.json', 'utf8'), +); +assert.ok(report.completed); +assert.ok(Object.values(report.correctness.read_after_write).every(Boolean)); +const lines = [ + '# Redis и работа без кэша приложения', + '', + `Дата UTC: ${report.recorded_at}. Node.js ${report.node}.`, + '', + 'Один прогон на одном образе: три повтора каждого режима с чередованием порядка. Второй экземпляр API запущен без CACHE_URL: отключены все кэши приложения, включая профиль пользователя. PostgreSQL-эпохи и запись одним CTE сохранены в обоих режимах. Контейнер Redis не останавливался; экземпляр без кэша не создаёт Redis-клиент.', + '', + 'RPS = суммарное число успешных запросов / суммарное время трёх повторов. Средняя задержка взвешена по числу успешных запросов. p95 — среднее трёх отдельных p95, не перцентиль объединённой выборки. SQL/HTTP = суммарные SQL-вызовы / все HTTP-запросы; команды транзакций исключены.', + '', + '| Сценарий | Режим | Средний RPS | Средняя задержка, мс | Среднее p95, мс | SQL/HTTP | CPU, % ядра | Ошибки |', + '| --- | --- | ---: | ---: | ---: | ---: | ---: | ---: |', +]; +const aggregates = []; +for (const [workload, label] of [ + ['cold-history-burst', 'Холодная волна истории'], + ['warm-history', 'Прогретая история'], + ['writes-single-chat', 'Запись в один чат'], +]) { + for (const mode of ['redis', 'no-redis']) { + const samples = report.samples.filter( + (sample) => sample.workload === `${workload}:${mode}`, + ); + assert.equal(samples.length, 3); + const sum = (select) => + samples.reduce((total, sample) => total + select(sample), 0); + const successes = sum((sample) => sample.successes); + const errors = sum((sample) => sample.errors); + const seconds = sum((sample) => sample.elapsed_seconds); + const aggregate = { + workload, + mode, + successes, + errors, + rps: successes / seconds, + mean_latency_ms: + sum((sample) => sample.latency_ms.mean * sample.successes) / successes, + mean_p95_ms: sum((sample) => sample.latency_ms.p95) / samples.length, + sql_per_request: + sum((sample) => sample.sql_queries) / (successes + errors), + cpu_percent_one_core: + sum( + (sample) => + sample.process_cpu_percent_one_core * sample.elapsed_seconds, + ) / seconds, + }; + aggregates.push(aggregate); + lines.push( + `| ${label} | ${mode === 'redis' ? 'Redis' : 'Без Redis'} | ${aggregate.rps.toFixed(3)} | ${aggregate.mean_latency_ms.toFixed(3)} | ${aggregate.mean_p95_ms.toFixed(3)} | ${aggregate.sql_per_request.toFixed(3)} | ${aggregate.cpu_percent_one_core.toFixed(2)} | ${errors} |`, + ); + } +} +lines.push( + '', + 'В этом прогоне кэш полезен для прогретого чтения истории: выше пропускная способность, ниже средняя задержка и меньше SQL-вызовов. Для холодной волны и записи преимущество по времени не показано. Первый повтор с Redis значительно медленнее остальных; средние включают его, поэтому вывод о стабильной скорости записи ограничен. Это сравнение режимов кэша на текущей реализации, а не отдельное измерение цены PostgreSQL-эпох.', + '', + 'Нагрузка: 10 000 сообщений, первая страница limit=50, конкурентность 16, 3 с прогрева и 10 с чтения на режим/повтор, холодная волна 32 запроса, 512 записей в новый чат на режим/повтор. Реальный HTTP по loopback; синтетические пользователи и сессии обходят хеширование паролей. Проверены 512 сообщений и эпоха 512 после каждого сценария записи, а также чтение истории после записи.', + '', + 'Оба API и генератор HTTP работают в одном Node-процессе. CPU включает генератор, API и инструментацию; RSS общий и не показывает разницу памяти между режимами. PostgreSQL и Redis разделяют Docker-host с другими сервисами. Это короткая нагрузка, не предел производительности; холодные SQL-данные не имитируются. Уменьшение SQL/HTTP показывает снижение числа запросов, но не доказывает пропорциональное снижение CPU PostgreSQL. Цена самих эпох отдельно не измеряется.', + '', + 'Команда повторения:', + '', + '```powershell', + 'docker compose -f compose.yaml -f test/compose.benchmark.yaml run --rm --no-deps --pull never benchmark node test/cache-benchmark.mjs after /results/redis-comparison.json --compare-redis', + 'node test/redis-comparison-summary.mjs', + '```', + '', + 'Сырые результаты и хеши измеренных модулей: [redis-comparison.json](redis-comparison.json).', +); +await writeFile( + 'evidence/redis-comparison-summary.md', + lines.join('\n') + '\n', +); +await writeFile( + 'evidence/redis-comparison-averages.json', + JSON.stringify(aggregates, null, 2) + '\n', +); +console.log(lines.slice(0, 16).join('\n')); diff --git a/test/resilience.mjs b/test/resilience.mjs new file mode 100644 index 00000000..35e043d0 --- /dev/null +++ b/test/resilience.mjs @@ -0,0 +1,444 @@ +import 'dotenv/config'; +import assert from 'node:assert/strict'; +import { randomBytes, randomUUID } from 'node:crypto'; +import { createRequire } from 'node:module'; +import { performance } from 'node:perf_hooks'; +import test from 'node:test'; +import { faultProxy } from './helpers/fault-proxy.mjs'; + +const require = createRequire(import.meta.url); +const Redis = require('ioredis').default; +const { NestFactory } = require('@nestjs/core'); +const { AppModule } = require('../dist/app.module'); +const { PrismaService } = require('../dist/prisma/prisma.service'); +const { + createFastifyAdapter, + exposeRequestIdHeader, +} = require('../dist/common/http/fastify-adapter'); +const pause = (milliseconds) => + new Promise((resolve) => setTimeout(resolve, milliseconds)); + +test( + 'Auth and dependency failures remain bounded and fail closed', + { timeout: 120000 }, + async (t) => { + assert.ok( + process.env.DATABASE_URL, + 'Set DATABASE_URL and apply migrations', + ); + assert.ok( + process.env.CACHE_URL, + 'Set CACHE_URL to a running Redis instance', + ); + const original = { + DATABASE_URL: process.env.DATABASE_URL, + CACHE_URL: process.env.CACHE_URL, + CACHE_PREFIX: process.env.CACHE_PREFIX, + SESSION_TTL_SECONDS: process.env.SESSION_TTL_SECONDS, + }; + const prefix = `test:resilience:${randomUUID()}`; + const db = await faultProxy(original.DATABASE_URL, 5432); + const redis = await faultProxy(original.CACHE_URL, 6379); + Object.assign(process.env, { + DATABASE_URL: db.url, + CACHE_URL: redis.url, + CACHE_PREFIX: prefix, + SESSION_TTL_SECONDS: '2', + }); + const observer = new Redis(original.CACHE_URL, { + connectTimeout: 1000, + commandTimeout: 1000, + maxRetriesPerRequest: 0, + }); + observer.on('error', () => {}); + let app; + let prisma; + let userId; + let chatId; + t.after(async () => { + db.setMode('online'); + redis.setMode('online'); + try { + if (prisma) { + if (chatId) await prisma.chat.deleteMany({ where: { id: chatId } }); + if (userId) await prisma.user.deleteMany({ where: { id: userId } }); + } + let cursor = '0'; + do { + const [next, keys] = await observer.scan( + cursor, + 'MATCH', + `${prefix}:*`, + 'COUNT', + 100, + ); + cursor = next; + if (keys.length) await observer.del(...keys); + } while (cursor !== '0'); + } finally { + observer.disconnect(); + if (app) await app.close(); + await db.close(); + await redis.close(); + for (const [key, value] of Object.entries(original)) { + if (value === undefined) delete process.env[key]; + else process.env[key] = value; + } + } + }); + await observer.ping(); + app = await NestFactory.create(AppModule, createFastifyAdapter(), { + logger: false, + abortOnError: false, + }); + exposeRequestIdHeader(app); + await app.init(); + const server = app.getHttpAdapter().getInstance(); + await server.ready(); + prisma = app.get(PrismaService); + let token; + const request = async ( + method, + url, + { + payload, + authorization = token ? `Bearer ${token}` : undefined, + headers = {}, + budget = 8000, + } = {}, + ) => { + const start = performance.now(); + let timer; + try { + const response = await Promise.race([ + server.inject({ + method, + url, + headers: { + ...headers, + ...(method === 'POST' && /\/messages$/.test(url) + ? { 'idempotency-key': randomUUID() } + : {}), + ...(authorization ? { authorization } : {}), + }, + ...(payload === undefined ? {} : { payload }), + }), + new Promise((_, reject) => { + timer = setTimeout( + () => reject(new Error(`${method} ${url} exceeded ${budget}ms`)), + budget, + ); + }), + ]); + assert.ok( + performance.now() - start < budget, + 'request exceeded its deadline', + ); + return response; + } finally { + clearTimeout(timer); + } + }; + const errorResponse = (response, status, code, challenge) => { + assert.equal( + response.statusCode, + status, + `${response.statusCode}: ${response.body}`, + ); + const body = response.json(); + assert.deepEqual(Object.keys(body), ['error']); + assert.deepEqual(Object.keys(body.error).sort(), [ + 'code', + 'message', + 'request_id', + ]); + assert.equal(body.error.code, code); + assert.equal(body.error.request_id, response.headers['x-request-id']); + assert.ok(body.error.request_id); + assert.ok(body.error.message.length <= 200); + for (const secret of [ + original.DATABASE_URL, + original.CACHE_URL, + token, + ].filter(Boolean)) + assert.ok(!response.body.includes(secret)); + assert.ok( + !/Prisma|SELECT |INSERT |stack|ECONN|postgresql:\/\//i.test( + response.body, + ), + 'error leaks implementation details', + ); + if (challenge) + assert.equal(response.headers['www-authenticate'], challenge); + }; + const username = `fault_${randomUUID().replaceAll('-', '').slice(0, 20)}`; + const password = 'Synthetic-test-password:🔐123'; + const basic = (secret) => + `Basic ${Buffer.from(`${username}:${secret}`, 'utf8').toString('base64')}`; + const login = (secret = password) => + request('POST', '/api/v1/auth/sessions', { + authorization: basic(secret), + }); + const registered = await request('POST', '/api/v1/users', { + payload: { username, display_name: 'Fault test', password }, + budget: 15000, + }); + assert.equal(registered.statusCode, 201); + userId = registered.json().id; + + await t.test('incorrect password is 401 with Basic challenge', async () => { + const wrong = await login('wrong-password'); + errorResponse( + wrong, + 401, + 'unauthorized', + 'Basic realm="messenger", charset="UTF-8"', + ); + assert.equal(await prisma.session.count({ where: { userId } }), 0); + }); + await t.test( + 'SESSION_TTL_SECONDS=2 expires without renewing on reads', + async () => { + const response = await login(); + assert.equal(response.statusCode, 201); + token = response.json().token; + const stored = await prisma.session.findFirstOrThrow({ + where: { userId }, + }); + assert.ok( + Math.abs( + stored.expiresAt.getTime() - stored.createdAt.getTime() - 2000, + ) < 500, + ); + assert.equal( + (await request('GET', '/api/v1/users/me')).statusCode, + 200, + ); + await pause( + Math.max(0, Date.parse(response.json().expires_at) - Date.now()) + + 100, + ); + errorResponse( + await request('GET', '/api/v1/users/me'), + 401, + 'unauthorized', + 'Bearer realm="messenger"', + ); + errorResponse( + await request('DELETE', '/api/v1/auth/sessions/current'), + 401, + 'unauthorized', + 'Bearer realm="messenger"', + ); + }, + ); + await t.test( + 'logout revokes immediately, including with a cached profile', + async () => { + const response = await login(); + assert.equal(response.statusCode, 201); + token = response.json().token; + assert.equal( + (await request('GET', '/api/v1/users/me')).statusCode, + 200, + ); + const logout = await request('DELETE', '/api/v1/auth/sessions/current'); + assert.equal(logout.statusCode, 204); + assert.equal(logout.body, ''); + errorResponse( + await request('GET', '/api/v1/users/me'), + 401, + 'unauthorized', + 'Bearer realm="messenger"', + ); + errorResponse( + await request('DELETE', '/api/v1/auth/sessions/current'), + 401, + 'unauthorized', + 'Bearer realm="messenger"', + ); + }, + ); + token = randomBytes(32).toString('base64url'); + const { createHash } = await import('node:crypto'); + await prisma.session.create({ + data: { + userId, + tokenHash: createHash('sha256').update(token).digest('hex'), + expiresAt: new Date(Date.now() + 600000), + }, + }); + const chat = await request('POST', '/api/v1/chats', { + payload: { title: 'Fault isolation', member_ids: [userId] }, + }); + assert.equal(chat.statusCode, 201); + chatId = chat.json().id; + const history = `/api/v1/chats/${chatId}/messages`; + assert.equal( + (await request('POST', history, { payload: { text: 'Before fault' } })) + .statusCode, + 201, + ); + assert.equal((await request('GET', history)).json().items.length, 1); + + const anonymousChecks = async () => { + for (const authorization of ['', 'Bearer invalid', basic(password)]) { + const headers = { 'x-user-id': userId }; + errorResponse( + await request('GET', history, { authorization, headers }), + 401, + 'unauthorized', + 'Bearer realm="messenger"', + ); + errorResponse( + await request('POST', history, { + authorization, + headers, + payload: { text: 'Must not be stored' }, + }), + 401, + 'unauthorized', + 'Bearer realm="messenger"', + ); + } + }; + await t.test( + 'Redis disconnect: SQL fallback and anonymous callers remain unauthorized', + async () => { + redis.setMode('cut'); + await anonymousChecks(); + assert.equal( + (await request('GET', history, { budget: 3000 })).statusCode, + 200, + ); + assert.equal( + ( + await request('POST', history, { + payload: { text: 'Redis offline' }, + budget: 3000, + }) + ).statusCode, + 201, + ); + assert.equal( + (await request('GET', history, { budget: 3000 })).json().items.length, + 2, + ); + redis.setMode('online'); + await pause(1300); + }, + ); + await t.test('Redis hangs: command timeout bypasses cache', async () => { + redis.setMode('hang'); + try { + assert.equal( + (await request('GET', `${history}?limit=10`, { budget: 3000 })) + .statusCode, + 200, + ); + assert.equal( + ( + await request('POST', history, { + payload: { text: 'Redis blackhole' }, + budget: 3000, + }) + ).statusCode, + 201, + ); + await anonymousChecks(); + } finally { + redis.setMode('cut'); + redis.setMode('online'); + } + await pause(1300); + }); + await t.test( + 'PostgreSQL disconnect: bounded 503, no cached authorization bypass', + async () => { + db.setMode('cut'); + try { + await anonymousChecks(); + errorResponse( + await request('GET', '/api/v1/users/me'), + 503, + 'unavailable', + ); + errorResponse(await request('GET', history), 503, 'unavailable'); + errorResponse( + await request('POST', history, { payload: { text: 'DB offline' } }), + 503, + 'unavailable', + ); + errorResponse( + await request('DELETE', '/api/v1/auth/sessions/current'), + 503, + 'unavailable', + ); + errorResponse(await login(), 503, 'unavailable'); + errorResponse( + await request('GET', '/health/ready'), + 503, + 'unavailable', + ); + assert.equal((await request('GET', '/health/live')).statusCode, 200); + } finally { + db.setMode('online'); + } + assert.equal( + (await request('GET', '/api/v1/users/me')).statusCode, + 200, + ); + }, + ); + await t.test( + 'PostgreSQL hangs on an established connection: client query timeout', + async () => { + assert.equal( + (await request('GET', '/api/v1/users/me')).statusCode, + 200, + ); + db.setMode('hang'); + try { + await anonymousChecks(); + errorResponse(await request('GET', history), 503, 'unavailable'); + } finally { + db.setMode('cut'); + db.setMode('online'); + } + assert.equal( + (await request('GET', '/api/v1/users/me')).statusCode, + 200, + ); + }, + ); + await t.test( + 'both services unavailable: fail closed and recover confirmed data', + async () => { + db.setMode('cut'); + redis.setMode('cut'); + try { + await anonymousChecks(); + errorResponse(await request('GET', history), 503, 'unavailable'); + errorResponse( + await request('GET', history, { + authorization: `Bearer ${randomBytes(32).toString('base64url')}`, + }), + 503, + 'unavailable', + ); + } finally { + db.setMode('online'); + redis.setMode('online'); + } + const recovered = await request('GET', `${history}?limit=100`); + assert.equal(recovered.statusCode, 200); + assert.deepEqual( + recovered.json().items.map((message) => message.text), + ['Before fault', 'Redis offline', 'Redis blackhole'], + ); + assert.equal(await prisma.message.count({ where: { chatId } }), 3); + assert.equal((await request('GET', '/health/ready')).statusCode, 200); + }, + ); + }, +); diff --git a/test/saturation-summary.py b/test/saturation-summary.py new file mode 100644 index 00000000..d61acfd1 --- /dev/null +++ b/test/saturation-summary.py @@ -0,0 +1,29 @@ +import importlib.util +from pathlib import Path +import unittest + +spec = importlib.util.spec_from_file_location('saturation', Path(__file__).resolve().parents[1]/'scripts/run-saturation.py') +module = importlib.util.module_from_spec(spec) +spec.loader.exec_module(module) + + +class ClassificationTest(unittest.TestCase): + def classify(self, attempted=1000, dropped=0, errors=0, p95=500): + return module.classify({'measurement': {'scheduled_slots': 1000, + 'client_dropped_slots': dropped, 'all': {'attempted': attempted, 'errors': errors}}, + 'all_latency_ms': {'p95': p95}})['classification'] + + def test_delivered_healthy_workload_passes(self): + self.assertEqual(self.classify(), 'pass') + + def test_latency_or_errors_break_service_criterion(self): + self.assertEqual(self.classify(p95=1500), 'slo_fail') + self.assertEqual(self.classify(errors=20), 'slo_fail') + + def test_underfed_workload_is_not_a_server_capacity_measurement(self): + self.assertEqual(self.classify(attempted=800, dropped=200), 'generator_limited') + self.assertEqual(self.classify(attempted=800, dropped=200, p95=3000), 'generator_limited') + + +if __name__ == '__main__': + unittest.main() diff --git a/tsconfig.build.json b/tsconfig.build.json new file mode 100644 index 00000000..2eafee0e --- /dev/null +++ b/tsconfig.build.json @@ -0,0 +1,8 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "rootDir": "./src" + }, + "include": ["src"], + "exclude": ["node_modules", "test", "dist", "**/*spec.ts"] +} diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 00000000..f15de1db --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "nodenext", + "moduleResolution": "nodenext", + "resolvePackageJsonExports": true, + "esModuleInterop": true, + "isolatedModules": true, + "declaration": true, + "removeComments": true, + "emitDecoratorMetadata": true, + "experimentalDecorators": true, + "allowSyntheticDefaultImports": true, + "target": "ES2023", + "types": ["node", "jest"], + "sourceMap": true, + "outDir": "./dist", + "rootDir": ".", + "incremental": true, + "skipLibCheck": true, + "strict": true, + "strictPropertyInitialization": false + } +}