dsh-speed-gauge: View Generation Speed (tok/s) in the DSH Title Bar

Preface

When running long responses or tool chains in DSH, you often have to rely on a subjective feel to judge if the model is “fast enough”: the task bar lacks a unified tok/s metric, and usage data is only aggregated post-hoc. To compare different models or prompts, or to troubleshoot the impact of main thread lag on output, there was a lack of an observability surface that stays right beside the conversation.

Below is an introduction to the community plugin dsh-speed-gauge (maintainer MoreanP2003): it is installed in the title bar; click it to expand a half-circle gauge and a 30-second trend curve, allowing you to view the generation speed of the current session on a per-second window, and it can be collapsed at any time.

What is this

dsh-speed-gauge is a client-side plugin for DeepSeek Harness (DSH) (spanning both the host and Web UI surfaces): it listens to llm/stream, samples at a frequency of approximately 50 times per second to estimate tok/s, and displays this in a floating layer at the top of the session content column without occupying a separate window.

The plugin is not yet available on the plugin marketplace; installation requires manually adding it via methods like Releases or npm as described in the README.

Core Features

The capabilities explicitly listed in the materials are as follows.

Real-time & Trends

  • 0–500 tok/s half-circle gauge with a smoothly following pointer.
  • 30-second flowing trend curve that shifts continuously to the left, making it easy to see fluctuations.
  • Average speed and peak are based on the most recent 30-second window; the peak automatically falls back once it slides out of the window.

Statistical Criteria

  • Total output prioritizes accumulating outputTokens from the official usage.
  • Real-time speed: Calculates the character rate of llm/stream increments (body, thinking body, tool call parameters), then divides by characters per token; the ratio coefficient is calibrated online using official usage.outputTokens; streams without usage are estimated based on character count.

Session Integration

  • Isolated by session: When switching sessions or sub-agents, the panel data switches accordingly.
  • Panel width follows the content column; the “Speed Gauge” button in the title bar can be expanded/collapsed at any time, and the state is remembered.
  • Color scheme follows the host (dark mode with light text, light mode with dark text).

Implementation Details (Compatibility Related)

  • The panel is drawn within a Worker + OffscreenCanvas; if the page CSP does not allow Blob Workers, it falls back to a one-line text display.
  • DOM class names start with dsg-, and it only manipulates its own nodes, facilitating coexistence with other plugins.

Installation & Activation

Please be aware before installing: The plugin runs with the permissions of the current DSH process. Before installation, you should review the source code and the MIT license yourself to confirm you accept its behavior of monitoring streaming output and providing a web interface.

Environment Requirements (from README / package.json)

  • DSH >= 0.2.1 (Developed and verified on 0.2.1-rc.2), requires the host to provide webServer and llm/stream hooks.
  • Node.js >= 20.
  • React 18 is provided by the host; the plugin does not bundle it redundantly.

Go to Releases to download the release package (the README example filename is dsh-speed-gauge-1.0.0.tgz), and execute the following in the directory containing the package:

dsh plugin --profile desktop add ./dsh-speed-gauge-1.0.0.tgz

Method 2: npm (One Command)

Execute the following separately for the desktop and web versions:

dsh plugin --profile desktop add dsh-speed-gauge
dsh plugin --profile web add dsh-speed-gauge

Package page: https://www.npmjs.com/package/dsh-speed-gauge.

Desktop CLI Path

The desktop application requires using the CLI bundled with the application; the dsh in a standard shell may not be able to manage the desktop profile. Windows example:

"<installation_directory>\resources\runtime\cli\bin\dsh.cmd" plugin --profile desktop add <package_or_directory>

After installation, reload once within the application or restart it; the “Speed Gauge” button should appear in the title bar.

Update & Uninstall

dsh plugin --profile desktop add <package_or_directory>
dsh plugin --profile desktop remove dsh-speed-gauge

Typical Usage

  1. After installation and reloading, click the “Speed Gauge” in the title bar to expand the panel, and click again to collapse it.
  2. Observe the current tok/s on the half-circle gauge and the 30-second curve, average/peak on the right.
  3. To clear the current session’s cumulative count and peak, use the “Reset” (归零) button on the right side of the panel.

Web Version or Reverse Proxy

Custom routes only accept loopback addresses by default. If accessing via the web version or a reverse proxy, set the following in the environment where DSH is started:

DSH_SPEED_GAUGE_ALLOW_REMOTE=1

Debug Sampling (Optional)

By default, no sampling logs are written. If needed, set DSH_SPEED_GAUGE_LOG=1 in the environment, and logs will be written to the system temporary directory.

Use Cases & Notes

Who is it for

  • DSH users who need to intuitively compare generation speed and observe speed fluctuations within the same session.
  • Debugging streaming output, calibrating tok/s metrics, or verifying if main thread lag affects sampling (the README claims per-chunk counting ensures no frame drops even if the main thread lags).

Usage Notes

  • The plugin is not yet on the marketplace; the version depends on the Release or npm package you install. The current version in package.json is 1.0.4, which may differ from the 1.0.0 .tgz filename in the README installation example; refer to the actual filename on the Releases page.
  • Remote access requires explicitly enabling DSH_SPEED_GAUGE_ALLOW_REMOTE=1 to avoid exposing the observability interface on unintended networks.
  • Metadata such as community catalogs and GitHub stars may change; at the time of writing, GitHub showed approximately 1 star, which should not be used as a basis for functional evaluation.

Conclusion

dsh-speed-gauge transforms generation speed from “checking usage post-hoc” to “viewing a real-time gauge and curve beside the conversation.” The sampling frequency and 30-second window are detailed specifically in the README, making it a suitable starting point for DSH observability plugins.

羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye