Skip to content

fix: add units to result summary output#118

Open
hashwnath wants to merge 2 commits into
fw-ai:mainfrom
hashwnath:fix/5-add-units-to-summary
Open

fix: add units to result summary output#118
hashwnath wants to merge 2 commits into
fw-ai:mainfrom
hashwnath:fix/5-add-units-to-summary

Conversation

@hashwnath

@hashwnath hashwnath commented Jun 1, 2026

Copy link
Copy Markdown

Summary

  • Appends (ms) to all time-based metric labels in the summary output, so users can immediately tell what unit each value uses
  • Covers base metrics (Time To First Token, Latency Per Token, Overall Latency Per Token, Total Latency, Latency Per Embedding, Latency Per Char) and their percentile variants (P50, P90, P95, P99, P99.9)

Closes #5

Before

Time To First Token: 5.705300167132269
Latency Per Token  : 135.50119360148753
Total Latency      : 28838.560053018486

After

Time To First Token (ms): 5.705300167132269
Latency Per Token (ms)  : 135.50119360148753
Total Latency (ms)      : 28838.560053018486

Test plan

  • Run a load test with --stream and verify summary labels show (ms) for time-based metrics
  • Run with --embeddings and verify Latency Per Embedding (ms) appears
  • Confirm non-time metrics (e.g. Num Tokens, Qps, Prompt Tokens) do not get a unit suffix

🤖 Generated with Claude Code


Note

Low Risk
Display-only label formatting in the quit summary and optional CSV export; no change to measured values or request behavior.

Overview
Load test summary output (console and --summary-file CSV column headers) now appends (ms) to labels for time-based metrics.

The one-line pretty_name lambda is replaced with logic that maps known latency metrics (time_to_first_token, latency_per_token, overall_latency_per_token, total_latency, latency_per_embedding, latency_per_char) and their percentile variants (e.g. P50_total_latency) by stripping the P50_ / P90_ / etc. prefix before deciding whether to add the unit suffix. Count/rate fields like QPS and token counts are unchanged.

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

Appends "(ms)" to all time-based metric labels in the summary output
so users can immediately see the unit. This covers both the base
metrics (e.g. "Total Latency (ms)") and their percentile variants
(e.g. "P99 Total Latency (ms)").

Closes fw-ai#5

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

@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 bcbbce5. Configure here.

Comment thread llm_bench/load_test.py
P99.9_ metrics were matching the P99_ prefix first, causing the (ms)
suffix to be silently dropped for P99.9 percentile time metrics.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.

result unit

1 participant