Skip to content

feat(bench): add latency-under-load benchmark axis - #53

Merged
simota merged 1 commit into
mainfrom
feat/bench-latency-under-load
Jul 30, 2026
Merged

feat(bench): add latency-under-load benchmark axis#53
simota merged 1 commit into
mainfrom
feat/bench-latency-under-load

Conversation

@simota

@simota simota commented Jul 30, 2026

Copy link
Copy Markdown
Owner

Summary

Adds Axis 8 (latency-under-load) to the terminal benchmark suite to evaluate DSR (Device Status Report) echo response latency while heavy write throughput is active on the same PTY.

  • Added bench/tools/bulk_produce.c to generate bounded-duration write load against the PTY.
  • Extended bench/wrapper.sh with the latload mode to measure control vs under-load latency with progress overlap verification.
  • Integrated latency-under-load into bench/run_all.sh harness and summary reporting.
  • Updated bench/METHODOLOGY.md with methodology and measurement specifications.

Test Plan

  • Verified build and execution of bench/tools/bulk_produce.c.
  • Executed bench/run_all.sh with latency-under-load enabled to verify sample capture, overlap verification, and summary output.

Add bulk_produce helper tool, latload wrapper mode, harness integration in run_all.sh, and methodology specification for evaluating terminal DSR response latency while under heavy write load.
@simota
simota merged commit 5478a10 into main Jul 30, 2026
1 check passed
@simota
simota deleted the feat/bench-latency-under-load branch July 30, 2026 01:17

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a40f3328bd

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread bench/run_all.sh
Comment on lines +1404 to +1406
case "$overlap" in
verified*) ;;
*) overlap_fail=$((overlap_fail + 1)) ;;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Exclude reps whose load overlap was not verified

When the producer exits before the probe finishes—for example because a slow DSR run outlasts the fixed 8/20-second bulk window—this branch merely increments overlap_fail; the rep has already incremented got, contributed its samples to the pools, and contributed throughput to the median. The resulting pooled “under load” distribution can therefore include samples collected after the load ended, despite the failed containment check. Reject unverified reps from all aggregates or mark the result unmeasured.

Useful? React with 👍 / 👎.

Comment thread bench/run_all.sh
plmed="${1:-0}"; plp95="${2:-0}"; plp99="${3:-0}"; plmax="${4:-0}"; plcnt="${5:-0}"
mibps_med="$(printf "$mibps_samples" | median_f)"
degradation="$(awk -v l="$plmed" -v c="$pcmed" 'BEGIN{ if(c>0) printf "%.2f", l/c; else print "n/a" }')"
emit "$term" latency_under_load control pooled pooled_median_ns "$pcmed" ns

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Add the new axis to the published aggregations

For --axes latency-under-load, these rows are written only to raw.tsv: aggregate.py constructs each supported axis explicitly and has no latency_under_load branch, and the visualization code likewise never consumes it. Consequently results.json omits the requested axis and table.md contains no latency-under-load section, even though run_all.sh advertises those as its machine- and human-readable outputs. Extend the aggregators when emitting this new axis.

Useful? React with 👍 / 👎.

Comment thread bench/run_all.sh
Comment on lines +1168 to +1169
cat "$samples_noload" >> "$ctrl_pooled" 2>/dev/null
cat "$samples_load" >> "$load_pooled" 2>/dev/null

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Append samples only after both probes are accepted

If one probe produces samples but the other returns zero replies, these unconditional appends retain the successful side even though the caller subsequently rejects the rep. Once any later rep succeeds, pooled_stats includes the rejected launch on only one side, so the reported control/load counts and degradation factor no longer represent paired launches. Delay both appends until both result counts and overlap have been validated.

Useful? React with 👍 / 👎.

@simota simota mentioned this pull request Jul 30, 2026
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