Skip to content

stress-test: add HOP stress test scenarios#445

Open
x3c41a wants to merge 6 commits into
mainfrom
ndk/hop-stress-test-rust
Open

stress-test: add HOP stress test scenarios#445
x3c41a wants to merge 6 commits into
mainfrom
ndk/hop-stress-test-rust

Conversation

@x3c41a
Copy link
Copy Markdown
Contributor

@x3c41a x3c41a commented Apr 22, 2026

Rust HOP (Hand-off Protocol) stress test scenarios in stress-test/. Talks to collators directly over hop_submit / hop_claim / hop_poolStatus (no extrinsics). LatencyStats reports p50 / p90 / p99.

Results (local 2-collator zombienet, hop-stable, --items 200)

Scenario Payload Items ops/s MB/s p50 p90 p99 Errors
Submit 1 KB 200 3,078 3.0 1ms 2ms 3ms 0
Submit 10 KB 200 1,269 12.4 2ms 2ms 4ms 0
Submit 100 KB 200 140 13.7 11ms 26ms 32ms 0
Submit 128 KB 200 51 6.3 14ms 16ms 43ms 0
Submit 256 KB 200 53 13.2 28ms 70ms 85ms 0
Submit 512 KB 200 13 6.3 51ms 51ms 160ms 0
Submit 1 MB 200 13 13.3 103ms 289ms 310ms 0
Group x10 100 KB 100 326 31.7 10ms 10ms 13ms 0
Mixed 30s (write) 10 KB 19,177 639 6.2 <1ms <1ms <1ms 100
Mixed 30s (read) 10 KB 19,177 639 6.2 <1ms <1ms <1ms 0
Error tests 6 6/6 pass

HOP Stress Test Results

Full-cycle reports 100% errors against this zombienet build. The underlying hop_claim path is broken in the local hop-stable image, not in the test. Tracked separately.

Usage
# All scenarios
bulletin-stress-test --ws-url ws://127.0.0.1:10000,ws://127.0.0.1:12346 \
  hop all --items 200 \
  --output-file stress-test/results/hop-all.json

# Single payload (e.g. 256 KB)
bulletin-stress-test --ws-url ws://127.0.0.1:10000,ws://127.0.0.1:12346 \
  hop submit-only --items 200 --payload-size 262144 \
  --output-file stress-test/results/hop-submit-256KB.json

# Plot
python3 stress-test/plot-hop-results.py stress-test/results/hop-all.json \
  -o stress-test/hop-results.png

Scenarios: submit-only, full-cycle, group, pool-fill, mixed, errors, all.

Add Rust-based HOP (Hand-off Protocol) stress tests to the existing
stress-test framework. Pure RPC tests (no subxt/authorization needed).

Scenarios: submit-only, full-cycle, group, pool-fill, mixed, errors, all

Usage: bulletin-stress-test --ws-url ws://collator:port hop [SCENARIO]

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
x3c41a and others added 5 commits April 22, 2026 12:57
- Run nightly cargo fmt
- Show actual RPC error details instead of generic "hop_submit RPC"
- Add hop-results.png with throughput/latency/mixed charts

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
LatencyStats now records p90 alongside p50/p95/p99. The text report
prints all four. Existing JSON files without `p90` deserialize cleanly
because the field is `#[serde(default)]`.

Re-ran `hop all --items 200` against a local 2-collator zombienet on
hop-stable; updated hop-results.png with the new percentiles. A small
matplotlib helper (plot-hop-results.py) reads --output-file JSON and
produces the chart.

Submit throughput / inclusion latency:
  1 KB:   3,078 ops/s, 3.0 MB/s   p50=1ms p90=2ms p95=2ms p99=3ms
  10 KB:  1,269 ops/s, 12.4 MB/s  p50=2ms p90=2ms p95=2ms p99=4ms
  100 KB:   140 ops/s, 13.7 MB/s  p50=11ms p90=26ms p95=27ms p99=32ms
  1 MB:      13 ops/s, 13.3 MB/s  p50=103ms p90=289ms p95=302ms p99=310ms

Group ×10 100 KB: 326 ops/s, 31.7 MB/s, p50=10ms p99=13ms
Mixed 30s 10 KB: 639 reads & writes/s, 6.24 MB/s each
Two-panel layout: left = throughput (ops/s + MB/s), right = stacked
latency where each colour band shows the additional time at the next
percentile (p50 / p90 - p50 / p95 - p90 / p99 - p95). The stacked top
is annotated with the overall p99.
The text table and the plot now show p50 / p90 / p99 only, which is
the percentile set the reviewers want. p95 is removed from the struct
since no scenario in this crate read it.
Adds three submit-only data points between the original 100 KB and
1 MB so the saturation curve is visible. The plot now spans
1 / 10 / 100 / 128 / 256 / 512 KB / 1 MB.
@cla-bot-2021
Copy link
Copy Markdown

cla-bot-2021 Bot commented May 7, 2026

User @claude, please sign the CLA here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant