Skip to main content

benchscope

English | 简体中文

A single-process, pip-installable web UI for benchmarking vLLM / SGLang and any OpenAI-compatible inference service.

Introduction

benchscope is a performance-testing tool for LLM inference services. It connects to a vLLM / SGLang (or any OpenAI-compatible) API and runs throughput/latency benchmarks through a clean admin-console style web UI.

  • How it runs — the bench tool (vllm bench serve / sglang.bench_serving) executes as a subprocess on the machine where benchscope is installed. The inference server only needs to expose an OpenAI-compatible API — no server-side plugin required.
  • Live feedback — every concurrency result streams into the table and charts in real time.
  • Single processpip install + one command starts the web server and the built-in front end.

Quick Start

# Install from PyPI
pip install benchscope

# Start (default http://127.0.0.1:8080, opens browser automatically)
benchscope

# Options
benchscope --port 8080 --no-browser

Open the page and:

  1. Confirm the top nav shows Service (app) and Environment (inference) as online.
  2. Go to Settings (top-right) and set the inference service Base URL (any OpenAI-compatible endpoint).
  3. Open the vLLM / SGLang page, choose a model (from /v1/models), a dataset (Random / ShareGPT / Custom) and a concurrency list.
  4. Use Test Progress → Start Test. The Test Results panel updates live with a bilingual table and six curves.
  5. Logs are written under logs/<MMDD-HHMMSS>/ with a benchmark-*.xlsx summary (mean + P99 sheets).

Features

  • Dual framework — vLLM (vllm bench serve) and SGLang (sglang.bench_serving).
  • Datasets
    • random — multiple input/output length pairs (default 3K/1K, 1K/1K, 256/256, customisable).
    • sharegpt — auto-downloaded from ModelScope.
    • custom — upload a jsonl file or point to a local path (same behaviour as ShareGPT).
  • Configurable benchmark — editable concurrency list (default 1,4,8,16,32,40,64,128), --max-concurrency = --num-prompts, inf request rate, framework parameter forms plus a free-form flag editor, and command preview.
  • GPU auto-detect (nvidia-smi) with a manual fallback, plus an editable TPOT threshold used to highlight the best/nearest rows.
  • Live results — bilingual table + six curves (Output & Total throughput, TTFT/TPOT mean & P99) against concurrency.
  • Logs — per-run MMDD-HHMMSS directory with raw bench logs, mean/P99 summary CSV and benchmark-*.xlsx (mean + P99 sheets); preview & download in the UI.
  • Analysis — mean / P99 blocks with output/peakoutput/total/ttft/itl/tpot curves and best-concurrency highlight (closest to, and below, a TPOT threshold).
  • Admin-console UI — fixed top nav, fixed left nav (test workflow / test records), and a fixed sub-nav; the content area scrolls internally.
  • Status monitoring — Service & Environment online/offline indicators with live updates.

Roadmap / TODO

Version Status Scope
1.0.0 🚀 Released Text-model performance testing — dual framework, three datasets, realtime results, logs & xlsx summary, analysis, admin UI
2.0 🔜 Planned Multimodal model performance testing
3.0 Planned Full-modal (audio/video/…) model performance testing
4.0 Planned World-model performance testing
5.0 Planned Accuracy testing on common datasets
6.0 Planned ModelScope official-model comparison & conclusions

Project Structure

benchscope/
├── benchscope/
│   ├── cli.py            # `benchscope` command entry
│   ├── config.py         # config persistence (~/.benchscope/config.json)
│   ├── datasets.py       # ShareGPT download/convert, custom datasets
│   ├── gpu.py            # GPU auto-detect
│   ├── parser.py         # bench output parsing (mean + P99)
│   ├── summary.py        # CSV & xlsx summary generation
│   ├── benches/          # vllm/sglang command building & execution
│   └── server/           # FastAPI + WebSocket + test orchestration
├── web/                  # Vue 3 + Ant Design Vue front-end source
└── tests/                # mock OpenAI server & UI smoke tests

Development

# Backend
python -m benchscope.cli --port 8080 --no-browser

# Frontend (hot-reload, proxies /api and /ws to :8080)
cd web && npm install && npm run dev    # http://127.0.0.1:5173
  • Run the UI without a vLLM/SGLang install: BENCHSCOPE_FAKE_BENCH=1 python -m benchscope.
  • Mock an inference service locally: python tests/mock_openai_server.py (port 8001), then point Base URL to http://127.0.0.1:8001 in Settings.

Open Source

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

benchscope-1.0.2.tar.gz (902.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

benchscope-1.0.2-py3-none-any.whl (915.2 kB view details)

Uploaded Python 3

File details

Details for the file benchscope-1.0.2.tar.gz.

File metadata

  • Download URL: benchscope-1.0.2.tar.gz
  • Upload date:
  • Size: 902.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.12.12

File hashes

Hashes for benchscope-1.0.2.tar.gz
Algorithm Hash digest
SHA256 1b8a69f172407753fa967720ce9dd79c9229add976a19a0dc309978847a5c6e0
MD5 1dd1027fc75742c2380cbe2c243710ca
BLAKE2b-256 67a5028dce6d5175dde09e4cba121cc82165c53244ecfc67affee08ccc4cf59c

See more details on using hashes here.

File details

Details for the file benchscope-1.0.2-py3-none-any.whl.

File metadata

  • Download URL: benchscope-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 915.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.12.12

File hashes

Hashes for benchscope-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 2529aab6a27635923a3ec4f610bce503af6efb2e4a9f9355d6b5bc05775a3141
MD5 2cb71c3f1e26e05ddede92a612b4b1e2
BLAKE2b-256 5caf8bc3f26dc487642e3a73a8241bdca5bbf464a95046263a3a74f665ecbc4c

See more details on using hashes here.

Release history Release notifications | RSS feed

1.0.6

2 files

1.0.5

2 files

1.0.4

2 files

1.0.3

2 files

This release

1.0.2 This release

2 files

1.0.1

2 files

1.0.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page