跳到主要内容

dsh-tps-mode

已验证

dsh-tps-mode · v0.1.3 · MIT · Web 界面

Switchable TPS display for DSH Web: decode-only, end-to-end (incl. TTFT), or both.

安装

dsh plugin add dsh-tps-mode

用 dsh --profile default --dump-config 确认 layer 已生效 —— 参见安装指南。

源码

发布到 npm 但没有公开仓库。安装前请检查包内容。

标签

作者

说明文档

dsh-tps-mode

Switchable TPS display for DSH Web: decode-only, end-to-end (incl. TTFT), or both.

  • 解码速度(原生默认): 输出 token ÷ 首 token 到结束的时长(不含 TTFT,硬件吞吐)。
  • 端到端速度:输出 token ÷ 请求开始到结束的时长(含 TTFT,体感速度)。
  • 两者都显示:同一行内显示解码与端到端两个数字。

decode 是默认选项,插件不接管状态行(DSH 原生状态行已显示解码速度);选择 endToEnd 或 both 时接管状态行以显示对应口径。

安装

在 DSH Web 的插件市场中启用,或通过包管理器安装:

pnpm add dsh-tps-mode

插件由 DSH 的 bundle patch 自动加载,安装后重启 DSH Web 即可在设置中找到「TPS 口径」。

开发

pnpm build   # 构建 lib/index.js 与 lib/client.js
pnpm test    # 运行共享速率计算单测

构建产物为 DSH ModuleLoader 兼容的 client bundle,host 端为标准 ESM。