feat: add full-response ITL and output throughput - #36
Merged
Conversation
Signed-off-by: Cam Quilici <cjquilici@gmail.com>
Try out this PRQuick install: pip install --upgrade --force-reinstall git+https://github.com/ai-dynamo/aiperf.git@8128d08e7cfa31c36254f3c3d8c167488d51dde0Recommended with virtual environment (using uv): uv venv --python 3.12 && source .venv/bin/activate
uv pip install --upgrade --force-reinstall git+https://github.com/ai-dynamo/aiperf.git@8128d08e7cfa31c36254f3c3d8c167488d51dde0Last updated for commit: |
|
Fern Docs Preview: generation failed — see the Actions log for details. This does not block merge; ask a maintainer to retry if needed. |
cquil11
marked this pull request as ready for review
August 5, 2026 17:34
Signed-off-by: Cam Quilici <cjquilici@gmail.com>
cquil11
added a commit
that referenced
this pull request
Aug 6, 2026
Measure decode duration through HTTP response completion and expose aligned full-response inter-token latency and per-user output throughput metrics.
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.
Summary
full_decode_duration, measured from first parsed content through explicit HTTP response completionfull_response_inter_token_latency = full_decode_duration / (OSL - 1)full_response_output_token_throughput_per_user = 1 / full_response_inter_token_latencyWhy
A structured-output parser can stop emitting content before the engine finishes generation. With server token counting enabled, the existing ITL can then divide a parsed-content duration by the server raw-token count, mixing two different intervals.
The full-response pair keeps the client-observed duration aligned with the server-reported token count. In the motivating AgentX request, 26,571 completion tokens and a 145.861 second request lifecycle produce about 182.82 tokens per second instead of an impossible 326,009 tokens per second.
These are client-observed full-response metrics, not exact engine token timestamps. Aggregate latency and throughput percentiles also retain their normal reciprocal-distribution semantics:
1 / p75(ITL)describes the slow tail, whilep75(TPS)describes the fast side.Validation
uv run pre-commit run --all-files: passedFollow-up and merge order