Skip to content

docs: add API benchmark example - #2138

Open
zcxGGmu wants to merge 2 commits into
kvcache-ai:mainfrom
zcxGGmu:docs/evalscope-benchmark-entry
Open

docs: add API benchmark example#2138
zcxGGmu wants to merge 2 commits into
kvcache-ai:mainfrom
zcxGGmu:docs/evalscope-benchmark-entry

Conversation

@zcxGGmu

@zcxGGmu zcxGGmu commented Aug 5, 2026

Copy link
Copy Markdown

Summary

  • Add an online API benchmarking example to doc/en/benchmark.md.
  • Show a small EvalScope evalscope perf command against /v1/chat/completions.
  • Recommend validating the server with direct curl requests first, then increasing benchmark parallelism gradually.

Refs #853
Refs #1269

Test Plan

  • python documentation guard check for the new EvalScope benchmark guidance
  • git diff --check HEAD~1..HEAD

@greptile-apps

greptile-apps Bot commented Aug 5, 2026

Copy link
Copy Markdown

Greptile Summary

This PR adds an "Online API Benchmarking" section to doc/en/benchmark.md, giving users a practical walk-through for load-testing the KTransformers /v1/chat/completions endpoint with EvalScope.

  • Introduces a two-step workflow: first validate the server with a direct curl request, then run evalscope perf starting at low concurrency and scale up.
  • Includes an inline pip install evalscope hint and moves the optional --tokenizer-path flag outside the code block with a clear explanation, addressing feedback from prior review rounds.
  • Adds guidance on using a single curl request to reproduce and isolate issues when a benchmark run causes a crash.

Confidence Score: 5/5

Pure documentation addition with no code changes; safe to merge.

The change is a single documentation section with no logic, configuration, or dependency changes. The curl and evalscope commands are well-formed, the optional tokenizer-path is clearly documented outside the runnable block, and the inline install hint is present. Prior reviewer concerns have been addressed in this revision.

Files Needing Attention: No files require special attention.

Important Files Changed

Filename Overview
doc/en/benchmark.md Adds a new "Online API Benchmarking" section with a curl verification step, an EvalScope perf command, and inline install guidance; previously flagged issues (optional tokenizer-path, missing install note) are addressed in this revision.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[KTransformers server running] --> B[Verify with direct curl request]
    B --> C{Server responds OK?}
    C -- No --> D[Debug server-side issue]
    C -- Yes --> E[Run evalscope perf --parallel 1 --number 4]
    E --> F{Benchmark stable?}
    F -- No --> G[Reproduce failing prompt with plain curl]
    G --> D
    F -- Yes --> H[Increase --parallel and --number gradually]
    H --> I[Collect throughput / latency metrics]
Loading

Reviews (2): Last reviewed commit: "[docs]: refine EvalScope benchmark examp..." | Re-trigger Greptile

Comment thread doc/en/benchmark.md Outdated
Comment thread doc/en/benchmark.md
@zcxGGmu

zcxGGmu commented Aug 5, 2026

Copy link
Copy Markdown
Author

Thanks for the review — I pushed b556223e6c58 addressing the EvalScope benchmark feedback.

Changes made:

  • Added an inline EvalScope install note before the benchmark command.
  • Removed the required --tokenizer-path placeholder from the openqa example and documented when to add it optionally.

Validation:

  • python content guard — passed, confirmed the install note, valid default command, and optional tokenizer guidance.
  • git diff --check — passed.

@greptile-apps

greptile-apps Bot commented Aug 5, 2026

Copy link
Copy Markdown

Want your agent to iterate on Greptile's feedback? Try greploops.

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.

2 participants