Skip to content

Reading the results

What each column of a load-test CSV means, how one request's time splits into steps, and what the four plotting scripts draw.

You will learn / You need

You will learn: the column groups of merged_results.csv, how the timing columns relate, how to check a run quickly, and what each script in agent/plotting_results/ produces. You need: a finished run (Running a load test). The per-column reference is CSV schemas; this page explains how to read it.

The files of a run

A run directory PTB_CALL_<unix timestamp>/ holds merged_results.csv (one row per request) and run.json (parameters and achieved rate; fields in CSV schemas). Rows are grouped by agent, in agent order, not by time.

Column groups

merged_results.csv has 24 columns in seven groups. loadtest fills them from the backend's response (see HTTP endpoints) and from its own clock.

Group Columns Meaning
Identity request_number, agent_number Which agent sent the request, and its index among that agent's requests.
Client view http_latency_seconds, response_code, tx_count What loadtest saw: round-trip time of the whole POST (including a retry, if any), the HTTP status, and how many transactions the response held.
Outcome digest, status, success The transaction digest, Success or Failure: <error> (or the error text when the request failed), and True or False.
Gas computation_cost, computation_cost_burned, storage_cost, storage_rebate, non_refundable_storage_fee, net_fees Gas accounting from the effects. net_fees is computation plus storage minus rebate.
Backend timing network_type, off_chain_time, pre_submission_time, blockchain_processing_time, network_latency Seconds measured by the backend, split as in the diagram below.
Size transaction_size_bytes Size of the signed transaction.
Clock stamps backend_send_time_ms, client_receive_time_ms, client_blockchain_time, checkpoint_height Epoch milliseconds from the two processes, the seconds between them, and the node's checkpoint height when it answered.

A request that never reached a transaction (a timeout, a 500, an invalid response) still gets a row: tx_count is 0, status holds the error text (up to 300 characters), success is False, and digest and every column after success are empty.

Where one request's time goes

The backend stamps four moments while it handles one SendPTB request (execute_ptb_handler() in stealth_name_service/backend/testing_backend/src/main.rs, build_exec_response() in src/server.rs).

sequenceDiagram
    participant L as loadtest
    participant B as Backend
    participant N as IOTA node
    L->>B: POST /api/SendPTB
    Note over B: start of handler
    B->>B: parse and build the PTB
    Note over B: send_time_ms stamped<br/>off_chain_time ends
    B->>B: gas coin lookup and signing
    Note over B: pre_submission_time ends
    B->>N: execute transaction
    N-->>B: effects
    Note over B: blockchain_processing_time ends<br/>network_latency ends
    B-->>L: response
    Note over L: client_receive_time_ms stamped
Step Column Covers
Off-chain off_chain_time From the start of the handler to just before the gas lookup: parsing the payload, resolving objects, building the PTB.
Pre-submission pre_submission_time The gas coin reference lookup and the signature.
On-chain blockchain_processing_time The execute call alone, until the node returns the effects.
Network window network_latency Pre-submission plus on-chain: everything after the build until the node answered.

How the columns relate:

  • network_latency equals pre_submission_time plus blockchain_processing_time. The backend computes pre_submission_time as the network window minus the execute call.
  • backend_send_time_ms is stamped when the build finishes, before the coin lookup and the signature, not at the moment of submission.
  • client_blockchain_time is client_receive_time_ms - backend_send_time_ms, in seconds. It therefore covers pre-submission, on-chain time and the trip back to loadtest, and excludes the build. It is empty when backend_send_time_ms is missing.
  • http_latency_seconds is measured by loadtest around the whole POST, so it also includes the time the request spent travelling to the backend, waiting there and travelling back (and any retry). Expect it to be larger than off_chain_time plus network_latency; bench_analysis.py calls the difference http_queue.

The two clocks (backend_send_time_ms from the backend, client_receive_time_ms from loadtest) agree only as well as the machines' clocks do.

The bridge side

A bridged request, such as bridge_request.json, has a second life: the event handler relays it and writes one row to events_data/bridge_results.csv. Its columns repeat these timing names for the destination transaction, and add event, queue and acknowledgement timings. Join the two files on the source digest: the digest column here equals source_event_tx_digest there. All columns: CSV schemas. Track-level reading: Verifying and measuring.

Check a run in one minute

cd stealth_name_service/backend/testing_backend/output/PTB_CALL_<unix timestamp>
head -3 merged_results.csv
cat run.json
python3 - <<'EOF'
import pandas as pd
d = pd.read_csv("merged_results.csv")
print(len(d), "rows;", (d["success"] == True).mean(), "success rate")
print(d[["http_latency_seconds", "off_chain_time", "network_latency"]].describe())
EOF

This needs pandas: pip install -r ../agent/requirements.txt from testing_backend/ installs it with the other plotting dependencies. In the Docker stack the run directory is under stealth_name_service/backend/shared_data/. The run.json summary line to look at first is rate_achieved: when it is false, the offered load was not delivered, so latencies say little about the backend.

The printed Throughput line divides all requests by the active window; achieved_rate in run.json divides only successful requests by it.

Plotting scripts

The scripts live in stealth_name_service/backend/agent/plotting_results/ and need pandas, numpy and matplotlib (stealth_name_service/backend/agent/requirements.txt). They read bench_sweep output and relayer CSVs; none of them reads a single loadtest run on its own, except operations_figure.py, which takes one repetition directory.

Script Draws Command line
bench_analysis.py From a whole bench_sweep tree: t5_breakdown_phase<N>.png (share of transfers that reached each stage over time), t6_completion_latency.png (completion time against submission window), throughput_curve, completion_taxonomy and submission_rate (a PNG and a CSV each), plus phase_delta.csv and ack_signer_split.csv. --sweep-dir (required), --out (default ./output/bench_analysis), --rate-tolerance (default 0.9), --throughput-window-secs (default 120.0)
operations_figure.py The operation breakdown of one burst repetition: the share of transfers in each of six steps (request confirmation, event detection, relayer queue, execution build, execution confirmation, acknowledgement) against time since the first request. Also writes a PDF and a CSV of per-step timings next to the image. --rep-dir (required: one rep<NN> directory), --out (required: output PNG)
capacity_figure.py Relayer capacity: completed transfers per second against relayer concurrency, with the arrival rate as a dashed line and one dot per repetition. Also writes a PDF next to the image. --summary (required: a capacity_summary.csv), --out (required: output PNG)
report_figures.py Twelve report figures as PDF and PNG: five schematics (system map, protocol flow, authenticator, coin partition, benchmark pipeline) and seven measurement figures (rate methodology, submission funnel, latency breakdown, queue growth, failure stage, taxonomy, throughput). No arguments. It reads fixed paths under agent/output/ and writes under docs/figures/, so it needs the author's t1a sweep data.

Example, for the T5/T6 output described in Benchmarks:

python3 ../agent/plotting_results/bench_analysis.py \
  --sweep-dir ../agent/output/t6_phase2 --out ../agent/output/t6_phase2_analysis
python3 ../agent/plotting_results/operations_figure.py \
  --rep-dir ../agent/output/t5_phase3/phase3/window/01000.0/rep00 \
  --out ../agent/output/t5_phase3_analysis/operations_breakdown.png

The last step of the operation breakdown is the acknowledgement, so draw it from a phase 3 run.

bench_analysis.py counts a window-mode cell without gating on its rate, and gates rate-mode cells on its own steady-state measure with --rate-tolerance, not on rate_achieved from run.json. It prints how many cells it dropped.

Check it worked

  • run.json shows rate_achieved: true and successful_requests equal to total_requests.
  • network_latency is close to pre_submission_time plus blockchain_processing_time in any row.
  • After bench_analysis.py, the --out directory holds t5_breakdown_phase<N>.png and t6_completion_latency.png.

Next