CQRS benchmark ops

Truncate CQRS tables, start PM2 benchmarks (ecosystem.config.js), and tail logs. API is protected — set CQRS_OPS_API_KEY on the server.

Authentication

Stored in session storage for this tab only. Use HTTPS or localhost.

Environment

Each target loads one file in the repo root: Development.env.dev, Staging.env.staging, Production.env.prod, Local.env. The server forces that choice onto truncate (PM2’s NODE_ENV cannot override it). If a dedicated file is missing, non‑production may fall back to .env with a warning; production will not fall back without .env.prod.

Truncate CQRS tables

Backfill SO / SOC departments

Updates null department_id / sub_department_id on so and soc from latest so_list_v1 / soc_list_v1 observer JSON and users (same SQL as the old migration 0042). Run after list data exists — e.g. after benchmark hydration — not during a clean truncate-only flow.

Checkpoint progress (database)

Live state from script_migration_checkpoints (same credentials as .env.* for the selected environment). Refreshes after truncate / start benchmarks, or use the controls below.

PM2 (ecosystem.config.js)

Start runs export-reference-data, then pm2 start (all apps or --only one). Stop stops all benchmark apps from the ecosystem file, or one app by name. cqrs-ops-ui is never stopped.

Server binds to 127.0.0.1 by default. For a VM, set CQRS_OPS_HOST=0.0.0.0 or use pm2 start ecosystem.cqrs-ops-ui.config.js --env production. Put TLS or VPN in front for remote access.