Skip to content

fix(llm-bench): count inference requests in failure checks - #136

Open
kiteretsu903 wants to merge 1 commit into
fw-ai:mainfrom
kiteretsu903:fix-request-failure-accounting
Open

kiteretsu903 wants to merge 1 commit into
fw-ai:mainfrom
kiteretsu903:fix-request-failure-accounting

Conversation

@kiteretsu903

@kiteretsu903 kiteretsu903 commented Sep 14, 2026

Copy link
Copy Markdown

I found that the failure check counts synthetic metric events as requests, which can make an unreliable endpoint pass. For example, I reproduced a run with 100 inference requests: 90 succeeded and 10 failed. The successful requests also produced 1,710 measurement events. The check divided the 10 failures by all 1,810 events, reporting 0.55% instead of 10% and passing the default 1% limit.

I changed the check to count inference POST requests. That run now correctly fails. I also added explicit success/failure counts, retained summaries for failed runs, prevented duplicate worker output, and preserved CSV percentile columns when the first run has no samples.


Note

Low Risk
Benchmark tooling only; changes exit-code semantics and CSV columns without affecting inference serving paths.

Overview
Fixes --max-fail-ratio so it reflects inference failures only, by summing Locust stats for POST requests instead of all recorded events (including synthetic METRIC latency samples). Runs with zero inference POSTs now fail explicitly; failed runs still emit the final summary and CSV row.

The printed summary and --summary-file CSV add Total/Successful/Failed Requests and Failure Ratio. Distributed workers skip the quit handler so only the master evaluates failure and writes output. CSV handling keeps percentile columns (blank when empty), preserves headers when appending (warns and drops unknown new columns), and documents the distinction between POST outcome counts vs existing Num Requests / Qps (completed latency samples).

Reviewed by Cursor Bugbot for commit e27d584. Bugbot is set up for automated code reviews on this repo. Configure here.

@cursor cursor 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.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

Reviewed by Cursor Bugbot for commit e27d584. Configure here.

Comment thread llm_bench/load_test.py
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