dsh-tps-mode
Đã xác minhdsh-tps-mode · v0.1.3 · MIT · Giao diện web
Switchable TPS display for DSH Web: decode-only, end-to-end (incl. TTFT), or both.
Cài đặt
dsh plugin add dsh-tps-mode Xác nhận layer đã áp bằng dsh --profile default --dump-config — xem hướng dẫn cài plugin.
Mã nguồn
Phát hành lên npm mà không có repository công khai. Hãy kiểm tra nội dung package trước khi cài.
Thẻ
Tác giả
Readme
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。