dsh-profiler:给 DeepSeek Harness 加一层运行时剖析与变更回档
DSH 官方提供了 compaction 与 session projection,但没有启动耗时归因、工具调用 P95 延迟、会话 token 分布和文件变更回滚这一层运维视角。dsh-profiler(维护者 Yuncan050115,MIT,v2.0.0,Node >= 20)正好补上:通过进程 uptime 反推与 apply 计时给出冷/热启动和启动瀑布,用 tool/call 与 tool/result 配对统计 avg/p50/p95/p99 与成功率,从 projcache 做 token 分类汇总与缓存命中率,在写文件类工具调用前自动快照并支持可逆回档;另有 profiles 清单扫描和阈值规则生成的 findings。命令提供 /profiler、/profiler rewind、/profiler restore;Agent 可调 profiler_report;HTTP 侧 /dsh-profiler 看板 5 秒自刷新,另有 report.json、rewind.json 和 restore 接口。插件零外部依赖、手工构造契约,以当前 dsh 进程权限运行,安装前应阅读源码。
阅读全文