partest-load
Time-based load harness of the partest family: load profiles measured in seconds, not request counts, saturation and degradation metrics, and an HTML dashboard that is assembled entirely offline.
pip install 'partest-load[report]'
Python 3.10+. Without the report extra a run still executes and its results are still
saved — only the HTML dashboard is missing. The extra carries numpy, pandas, plotly and
Jinja2, which weigh more than everything else together.
Duration, not a request count
A run of "10 000 requests" finishes sooner the slower the system is: a degrading service receives less load per second and therefore looks calmer. A request count measures our patience, not the system's endurance.
Duration fixes the experiment on the load side and leaves the system's behaviour observable. Two runs of the same duration are comparable; two runs of the same request count are not.
| Profile | What it does | What it answers |
|---|---|---|
linear |
constant load | does the system hold the given level |
ramp |
gradual rise to a plateau, then a decline | where degradation starts |
stress |
stepwise rise of both tempo and concurrency until failure | saturation point and degradation slope |
batch |
a finite list (variants × repeat_count) at one level |
does the system get through the list |
Metrics: RPS, latency percentiles (nearest rank — the family-wide definition), mean and
maximum latency, success and error share, response sizes. A request still in flight when the
phase and its drain are over is recorded as a failed cancelled measurement whose duration is
a lower bound; it counts in the error share and in every latency figure; for stress also the saturation
point and the degradation slope. Mean latency is recorded and plotted, but nothing is
concluded from it: saturation and degradation are judged on percentiles, because an average
over a long-tailed distribution hides exactly what a load run is made for.
linear, ramp and batch stop early on stop_on_error_rate (and ramp also on
stop_on_p95_latency_ms) when the profile sets them. The run's events end with what the
engine decided: stopped (a threshold cut the run short), breached (a threshold was reached
when there was nothing left to cut) and, for batch, batch_list (planned vs. answered and
why the list was not finished); the summary prints each of them. --dry-run prints the plan: phases, levels and tempo. Path {placeholders} are filled from path_params — on the
endpoint or per payload variant; a placeholder without a value is refused before any load.
One command
partest-load \
--endpoints my/endpoints.yaml --endpoint orders_create \
--profile my/profiles/ramp.yaml \
--results-root out/load --save-raw \
--report out/load/dashboard.html
--dry-run parses and prints the configuration and the plan — phases, levels, tempo and,
for stress, the hold after a breach — without sending a single request.
--report-only rebuilds the dashboard from runs already on disk.
--save-raw writes request bodies in full, up to 500 characters of the response body for
every failed request and each request URL with its path_params values into the run file,
unmasked — cancelled measurements included, with their variant's body. They may hold credentials and
personal data; the command warns when the flag is on. Do not publish or hand over such a run
file, or the dashboard built from it, as is.
Load is sent only on an explicit command — no warm-up on import, no background requests. A tool that can hit a stand by accident does not get installed.
A run is identified by its operation
The identity of a run is the operation, written as METHOD /path
(GET /v1/items/{id}), and it is derived from the endpoint description — there is no
separate argument for it, so it cannot disagree with what was actually loaded.
<root>/<operation key>/<profile>/<time>__<operation key>__<profile>__<hex>.json
<root>/_latest/<operation key>__<profile>.json pointer to the latest run
The operation key is a filesystem-safe name (a readable remainder plus eight hex characters).
The conversion is one-way, so the operation itself is stored inside the run file in its
original form, path {placeholders} included: that is what lets a measurement be matched with
outside data about the same endpoint, without decoding a directory name.
--endpoint stays a caption — the name you gave the endpoint yourself. It is written into
the run and shown in the report, but identifies nothing: rename it and the run history stays
where it is.
Your values stay yours
Endpoint descriptions and profiles are your files. The package ships schemas and engines; concrete endpoints, stand addresses and credentials never enter it, not even as examples. All paths are passed explicitly — nothing is discovered relative to the current directory.
The dashboard is built offline
No CDN, no external fonts, no libraries fetched from the network: plotly.js is embedded into
the file, taken from the installed plotly package or from a file you point at with
--plotly-js. If there is nowhere to take it from, the dashboard is built with tables and
says on the page why there are no charts.
Early days
The 0.x line: a breaking change bumps the minor number and is listed under "Сломано" in the
changelog. Not yet implemented, and not to be relied upon: the load.profile artifact export
(artifacts.py does not exist — the run result is read by the dashboard only), reuse of
partest for authentication, headers, the endpoint list and secret redaction (so
--save-raw output is not masked), environment variables in the YAML files, and switching
TLS verification off.
The run record format is 2.0.
Links
Source and issues: https://github.com/Dec01/partest-load
License
MIT.
Metadata
Release files for partest-load 0.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| partest_load-0.3.0.tar.gz | 91.9 kB | Without provenance | Details for partest_load-0.3.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| partest_load-0.3.0-py3-none-any.whl | Python 3 | none | any | Details for partest_load-0.3.0-py3-none-any.whl |
Total release size: 177.3 kB
Release files / partest_load-0.3.0.tar.gz
| Download URL | partest_load-0.3.0.tar.gz |
|---|---|
| Size | 91.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a8ad3754a81bc6b2199ca587c736c067de90efe6eea86358ff1f068a28705a77
|
|
BLAKE2b-256 checksum How to use checksums |
68d41be964e7fff65d907a5f0865a4d386e1e0d2b9995e54815ab66482aa8dfc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.10.11
|
Release files / partest_load-0.3.0-py3-none-any.whl
| Download URL | partest_load-0.3.0-py3-none-any.whl |
|---|---|
| Size | 85.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0a1652eb450713943bef5e2ebd91e4bf86cb0c39d3126e20d4e8073d37907fd5
|
|
BLAKE2b-256 checksum How to use checksums |
58554992fa1415f48c422c29685af819643275be3dd2f133c76ab895268b8274
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.10.11
|
Security for partest-load 0.3.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.