Study-Mate
Miaotofu01
你的AI学习搭档:定路线、讲知识、做项目,边学边做,学透一门科目
PROJECT TOPICS
INSTALL REFERENCE
dsh plugin --profile web add github:cccjj55/dsh-plugin-bench
该命令指向仓库当前默认分支;尚无绑定当前 commit 的完整验证结果。
PROJECT README
Benchmark with a fingerprint, not vibes.
One tool call runs your command a few times, drops the warmup, and gives you
best / median / p95 / worst plus two noise measures, a diff against the previous run,
and the machine it ran on. If the sample is too noisy it says so and refuses to call it a measurement.
Agents — and people — quote timings from a single run, on a machine whose state nobody recorded. Four consequences, all avoidable:
# 1) add the package (forwards to pnpm inside the profile directory)
dsh plugin --profile web add github:cccjj55/dsh-plugin-bench
# 2) enable the bundle: add the name to dsh.profile.bundles
# in $DSH_HOME/profiles/web/package.json
{
"dsh": {
"profile": {
"bundles": ["@deepseek-ai/dsh-base", "@deepseek-ai/dsh-web-app", "dsh-plugin-bench"]
}
}
}
Real output, second run in the same directory (so the delta row appears):
### demo
node -e "setTimeout(()=>{},30)"
| metric | value |
| --- | --- |
| runs | 5 |
| best | 75.23 ms |
| median | 77.16 ms |
| mean | 76.71 ms |
| p95 | 77.56 ms |
| worst | 77.59 ms |
| stdev | 0.9 ms |
| spread (median vs best) | 2.57% |
| cv (stdev vs mean) | 1.17% |
| vs previous run | +1.65% (75.91 ms → 77.16 ms) |
> spread 2.57% and cv 1.17% are both within limits — quotable.
> Within ±5% of the previous run: no detectable change.
Busy machine, same command — the verdict flips:
Not a measurement. spread 340% > 20%: one run was much faster than the rest. Re-run on an idle machine before quoting these numbers.
Artifacts:
bench-results/demo-2026-11-18T03-41-12Z.md
bench-results/demo-2026-11-18T03-41-12Z.json # raw samples + fingerprint + schema: 1
| gate | formula | catches |
|---|---|---|
spread |
(median − best) / best |
one lucky run inflating the headline |
cv |
stdev / mean |
everything jittery, no single outlier |
A sample is quotable only if both are under their thresholds (defaults 20% / 10%). One gate alone lies in a predictable way: a run with a single 10× outlier and a run where every sample wobbles by 10% are different problems, and they need different fixes.
Each run compares its median against the most recent artifact with the same label:
≤ −5% → "faster than the previous run (check the noise floor)"±5% → "no detectable change" ← the sentence that stops people from claiming noise as a win≥ +5% → "regression candidate, or the machine was busier"This is the feature that turns a one-off measurement into a workflow: run it before and after a change.
| parameter | type | required | meaning |
|---|---|---|---|
command |
string | yes | shell command to time (non-interactive; stdout is counted, not stored) |
description |
string | yes | 5–10 word description shown in the UI |
label |
string | no | artifact/table name; defaults to a slug of the command |
repeats |
number | no | timed runs (default 3) |
warmup |
number | no | untimed warmup runs (default 1) |
workdir |
string | no | working directory for the command and artifacts |
timeoutMs |
number | no | per-run kill timeout (default 300000); a timed-out run is recorded, not fatal |
envCommand |
string | no | extra probe stored in the fingerprint, e.g. nvidia-smi --query-gpu=name,memory.total --format=csv,noheader |
outDir |
string | no | artifacts directory, relative to workdir (default bench-results) |
Profile defaults:
# cordis.patch.yml
plugins:
bench:
repeats: 5
warmup: 2
spreadLimitPct: 15
cvLimitPct: 8
timedOut and keeps n honest.
A non-zero exit aborts the measurement — a failing command is not a slow command.defineTool (schema validation);
standalone it registers a plain definition, so the statistics remain testable with node demo.mjs.cmd /c; quote paths with spaces yourself (node "C:\my dir\x.js").node demo.mjs # writes bench-results/
node demo.mjs --command "python bench/accuracy.py" --repeats 5
node test/smoke.mjs --dry # statistics + rendering contract
::bench:phase markers for coarse phase attributionbench compare a.json b.json CLI for CI useMIT
CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: benchmark。