dsh-profiler: Adding runtime profiling and change rollback capabilities to DeepSeek Harness
DSH officially provides compaction and session projection, but lacks an operational perspective for startup time attribution, tool call P95 latency, session token distribution, and file change rollback. dsh-profiler (maintainer Yuncan050115, MIT, v2.0.0, Node >= 20) fills this gap exactly: it infers cold/hot starts and startup waterfalls through process uptime and apply timing, and uses tool/call and tool/result pairs to calculate statistics for avg/p50/p95/p99 and success rates. It performs token categorization and aggregation along with cache hit rates from projcache, automatically snapshots before file-writing tool calls, and supports reversible rollback. Additionally, it includes scanning of profile lists and findings generated by threshold rules. Commands provide /profiler, /profiler rewind, and /profiler restore; the Agent can trigger profiler_report; on the HTTP side, the /dsh-profiler dashboard auto-refreshes every 5 seconds, and there are report.json, rewind.json, and restore endpoints. The plugin has zero external dependencies, uses manually constructed contracts, runs with the current DSH process permissions, and source code should be read before installation.
Read More