dsh-prefill-speed-stats: View Prefill Speed Directly in the DSH Status Bar

Introduction

When running long conversations in DeepSeek Harness (DSH), the prefill phase before model responses accounts for a noticeable portion of perceived latency, but the built-in UI may not prominently display “how many uncached prompt tokens are processed per second.” If you care about the actual compute after prefix cache hits, or want to compare input throughput under different prompt strategies, you typically have to dig through logs or calculate manually.

The dsh-prefill-speed-stats plugin introduced below is a community-maintained client plugin (maintainer stefanohe). It adds a cell to the left of the built-in “session stats” bar in the status bar, displaying the session-average prefill speed (tok/s). Clicking it expands two readings: session average and last N steps. The plugin targets deepseek-harness-v0.2.0-rc.2, with npm package version 0.2.0-rc.2, and is licensed under MIT.

What is this

dsh-prefill-speed-stats has a single purpose: Show prefill speed directly in the status bar.

It runs on the DSH browser side, integrating through the public sessionSpeed host projection and the conversation.composer.dock slot. It is an unofficial plugin. The directory site SkillHub plugin page and the GitHub repository stefanohe/dsh-prefill-speed-stats are independent community resources and are not officially affiliated with DeepSeek / High-Flyer.

Core features

The plugin adds a dock cell to the left of the built-in session stats bar, displaying the session average prefill speed by default, in units of tok/s. Clicking it pops up a two-line explanation:

Display item Meaning
Status bar cell Session-average input speed (tok/s)
Prefill speed (session average) Entire session: Σ uncached tokens ÷ Σ prefill windows
Prefill speed (last N steps) Same algorithm, but only counting the most recent up-to-10 measured steps; the title indicates how many steps were actually averaged

Terminology aligns with Harness logs:

  • Uncached tokens correspond to usage.inputTokens: the portion of the prompt that the provider must recompute; prefix cache hits are not counted.
  • Prefill window runs from step/start to the first visible token. If a step never produces a visible token, it has no window, and neither reading includes that step; the associated tokens are recorded in session.unmeasuredInputTokens.

Readings update as the session grows, with no configuration options needed. If the sibling plugin dsh-show-balance is also installed, its cell will appear further to the left of this plugin’s cell.

When interpreting readings, note the explanation in the README: a low value often means the step has almost nothing new to compute (e.g., the cache is hot), which is not equivalent to “the model is slow.” Fixed request overhead (queuing, round-trip, reading KV cache) still exists, and when uncached tokens are few, the per-step ratio is pushed toward zero; the session average smooths this out, while the last-N-steps window does not. All elapsed time within the window goes into the denominator, so this metric is a lower bound of true prefill throughput.

On the host side, index.js registers the projection, lib/projection.js handles collation and schema, lib/stream.js handles first-visible-token timing; on the browser side, client.js handles the cell and dialog. Unknown events or malformed log records are ignored rather than interrupting the session, and future changes to Harness event formats may only affect accuracy.

Installation and activation

DSH manages plugin bundles per profile; this plugin targets the desktop profile, located at <DSH home>/profiles/desktop (by default, ~/.dsh/profiles/desktop on Linux/macOS, %USERPROFILE%\.dsh\profiles\desktop on Windows).

pnpm 11.7.0 is recommended. If not already installed:

npm install -g pnpm@11.7.0

Method A: Install from npm

Run in the corresponding profile directory (or install via “Settings → Plugins” or the agent’s plugin_manager tool, with equivalent results):

pnpm add dsh-prefill-speed-stats

When DeepSeek Harness uses the default home directory, you can simply:

cd "$env:USERPROFILE\.dsh\profiles\desktop" ; pnpm add dsh-prefill-speed-stats     # Windows
cd ~/.dsh/profiles/desktop ; pnpm add dsh-prefill-speed-stats                      # macOS / Linux

After installation, confirm that the profile’s package.json dsh.profile.bundles includes the package name dsh-prefill-speed-stats (it will be written automatically when installed via the plugin manager).

Method B: Install from the repository script

For source code, offline, or versions not yet published on npm. Run in the repository root directory (the script will write dependencies and back up manifests, and prompt for next steps):

pwsh -File .\install.ps1               # Windows
sh ./install.sh                        # macOS / Linux
pwsh -File .\install.ps1 -From npm     # switch to installing the npm-published package

Activation (common to both methods)

  1. Fully restart the DSH application. The browser bundle is snapshotted at startup composition; simply refreshing the page is not enough.
  2. Open the left sidebar plugin panel and toggle dsh-prefill-speed-stats on.

Typical usage

Once installed and activated, just chat normally in DSH; a prefill speed cell will appear on the left side of the status bar.

  1. Observe the session-average tok/s on the dock as a coarse indicator of input-side throughput over the whole session.
  2. Click the cell to view the two rows “session average” and “last N steps”, comparing hot-cache steps with long-prompt steps.
  3. If a step’s reading is very low, combine it with whether there was a large prefix cache hit and the steps not counted in session.unmeasuredInputTokens to determine whether it’s “almost no new compute needed” or a window did not form.

The plugin provides no additional CLI or config files; projection tests can be run in the development repository with node --test test/projection.test.cjs (for maintainers, not a required step for end users).

Use cases and caveats

Suitable for: Developers who do daily agent debugging on DSH desktop, compare prompt lengths and cache strategies, and need a persistent prefill metric in the status bar without manually computing logs.

Notes:

  • The plugin runs with the current DSH process’s privileges. Before installing, read the source code and the MIT license, and assess the trust boundary yourself.
  • Only applies to the Harness version line specified in the README (v0.2.0-rc.2); after upgrading Harness, confirm the plugin remains compatible.
  • Readings are engineering lower bounds and should not be used alone as an SLA or the sole basis for model performance.

Conclusion

dsh-prefill-speed-stats moves prefill speed from logs into the status bar: one cell for the session average, one click to view the session and last-several-steps breakdown. The installation path is pnpm add dsh-prefill-speed-stats under the desktop profile; remember to fully restart and toggle it on in the plugin panel.

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

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

Xiaoye