English
Load-Test Tool: Overview
The Load-Test Tool is a performance test program shipped as a single Go binary with an embedded console. It answers two questions: how many orders this deployment can sustain, and whether list queries stay fast once data grows to millions of rows.
Two Tracks
| Track | Approach | Output |
|---|---|---|
| Open API throughput ceiling | Load /unipay/** per scenario; payment flows are absorbed by the Mock Channel (10400) | Stable ceiling, breaking point, recommended capacity, and attribution |
| Data-volume performance | Connect straight to PostgreSQL and use COPY to generate order data (100K / 1M / 5M), then run list-query benchmarks and ladders | Query latency and execution plans at each data volume |
Neither track modifies the main application: the tool does not start or stop services, change configuration, or switch databases.
Relationship with the Mock Channel
Payment results in capacity scenarios come from the Mock Channel. The tool only sends requests and collects metrics; it does not produce channel results itself. The two work together like this: point daxpay.channel.one.base-url at the Mock Channel, and on the mock side turn off automatic callbacks and raise the capacity (see Preparing the Load-Test Database).
That keeps merchant notifications out of the throughput numbers, and the tool needs nothing installed inside the application under test.
Red Lines
- Do not start or stop the main application, change its configuration, or switch databases: before a formal run, the operator points the main app at the dedicated load-test database and restarts it;
- All load tests, data generation, cleanup, and ladders are triggered manually; there are no scheduled jobs;
- Intranet targets only: if the target is not an intranet address, the doctor check fails outright; crossing networks requires an explicit exemption;
- Any database whose name contains
prodis rejected; writing to a development database requires an explicit--allow-dev-db; - Passwords, transport keys, and private keys are always masked in the API, reports, and logs.
The console has no authentication
The console can launch write operations such as load tests and data generation, so deploy it only on a trusted intranet. For remote access, put an authenticating reverse proxy in front; never expose it directly to the internet.
What It Does
- Doctor check gate: before a run, verify the database, connections, mock capacity, log level, and environment consistency; FAIL blocks, WARN items need item-by-item confirmation;
- Scenario pack: a dozen built-in scenarios including payment, refund, close order, split payment, pre-authorization, reconciliation, callback, soak, and ladder-to-peak;
- Live metrics: TPS, successes/failures, P50/P90/P95/P99/P999, error classification, and per-second time series;
- Reports: offline, self-contained HTML with step summaries, slowest-step curves, resource samples, and Top 2 attribution;
- Comparison: TPS / P99 / error rate / boundary comparison between two runs;
- Data generation and verification: COPY-based generation, cleanup by tag, and in-database consistency checks;
- Query benchmarks: list SQL timing + EXPLAIN +
pg_stat, with data-volume ladders.
How to Get It and What It Needs
The source ships with the Ecosystem Extension Pack as source code (source-code license included). Running it requires a Go toolchain (build the binary yourself), a reachable PostgreSQL load-test database, and an intranet machine that can reach both the main app and the mock service. No Docker is needed, and no frontend build environment either (the console is already embedded).
Continue Reading
- Design Architecture: load generator, system under test, data plane, and metric pipeline;
- Getting Started: from build to the first run;
- Scenarios and Reports: scenario list, metric definitions, and report artifacts.