fix(llm-bench): count inference requests in failure checks - #136
Open
kiteretsu903 wants to merge 1 commit into
Open
kiteretsu903 wants to merge 1 commit into
kiteretsu903 wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Reviewed by Cursor Bugbot for commit e27d584. Configure here.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

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-ratioso it reflects inference failures only, by summing Locust stats for POST requests instead of all recorded events (including syntheticMETRIClatency samples). Runs with zero inference POSTs now fail explicitly; failed runs still emit the final summary and CSV row.The printed summary and
--summary-fileCSV 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.