Logo: Run Benchmark

Run Benchmark

Communautéit
onevcat
run-benchmark

Féiert dem Prowl seng Performance-Benchmark-Layer fir den aktuelle Branch oder e Release aus, vergläicht d'Resultater mat gespäicherte Baselines a schreift e persistente lokale Rapport. Benotzt dëst nëmmen, wann de Benotzer explizitt run-benchmark opruft oder explizitt freet, Performance-Benchmarks auszeféieren / d'Auswierkunge op d'Performance ze iwwerpréiwen. Net automatesch no Implementatiounsaarbechten opruffen. Klasséiert fir d'éischt d'Absicht vum Benotzer (Ännerung um Hot Path, nei Optimiséierung oder Release-weiten Duerchlaf), confirméiert se mam Benotzer a féiert dann déi passend Layer aus.

Add to TypingMind

Iwwersiicht

Editeuronevcat
RepositoryProwl
Skill-Nummrun-benchmark
Stären
647
Forks
66
Matgeliwwert Dateien
Nëmmen Instruktiounen
Linken
  • Instruktiounen am Markdown-Format

    Eng SKILL.md-Datei, déi de Modell bei Bedarf luet, soudatt nëmmen Token ufalen, wann eng Ufro tatsächlech dozou passt.

  • Funktionéiert mat all LLM

    KI-Skills si reng Markdown, keen ubidderspezifesche Code. Dofir funktionéiert dëse Skill mat GPT, Claude, Gemini, Grok oder engem lokale Modell.

  • Alles an den Instruktiounen

    Alles, wat de Modell brauch, steet an den Instruktiounen — keng zousätzlech Dateien ze synchroniséieren.

  • Open Source

    onevcat huet de Skill op GitHub verëffentlecht. Liest de Quelltext, ier Dir de Skill installéiert.

Installatioun

Installéiert de KI-Skill Run Benchmark an TypingMind, fir e mat all LLM ze benotzen, oder setzt en an en anere KI-Agent an, deen SKILL.md liest.

1

An TypingMind installéieren

TypingMind installéiert e Skill direkt aus sengem GitHub-Dossier — dobäi gëtt SKILL.md gelies, d'Ressourcedateie gi gebëndelt an d'Resultat gëtt lokal gespäichert.

  1. Maacht d'App op a gitt op Plugins → Skills.
  2. Wielt „Vu GitHub installéieren“.
  3. Pecht d'URL vum Skill-Dossier, déi hei drënner steet, an a bestätegt d'Installatioun.
    https://github.com/onevcat/Prowl/tree/main/.claude/skills/run-benchmark
  4. Aktivéiert de Skill an all Chat, an deem Dir e benotze wëllt.
Plugins → Skills → Skill derbäisetzen → Iwwer eng GitHub-URL. Pecht dann d'URL vum Dossier an a klickt op Weider.
2

An engem anere KI-Agent installéieren

All KI-Agent, deen d'Format Agent Skills liest, kann dëse Skill benotzen — kopéiert den Dossier an d'Skill-Verzeechnes vun deem KI-Agent.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/onevcat/Prowl.git /tmp/Prowl
mkdir -p .claude/skills
cp -r /tmp/Prowl/.claude/skills/run-benchmark .claude/skills/run-benchmark
Start Claude Code nom Kopéieren nei, fir datt den neie Skill erkannt gëtt.

An TypingMind benotzen

Aktivéiert Run Benchmark an engem Chat vun TypingMind, an de Modell iwwerhëlt de Rescht. Den Numm an d'Beschreiwung stinn am System-Prompt. Soubal eng Ufro dozou passt, luet de Modell déi komplett Instruktioune selwer — Dir musst de Skill ni manuell opruffen, an et fale keng Token un, bis en tatsächlech benotzt gëtt.

De Modell luet Run Benchmark automatesch, soubal eng Ufro dozou passt.

Funktionéiert mat all KI-Modell

KI-Skills si reng Markdown-Instruktiounen amplaz vun ubidderspezifeschem Code. Dofir ass Run Benchmark net un de Modell gebonnen, fir deen de Skill geschriwwe gouf. Installéiert en eemol an TypingMind a benotzt e mat GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama oder engem lokale Modell, deen Dir selwer bedreift — alles mat Ären eegenen API-Schlësselen.

  • Gëtt nëmme gelueden, wann et néideg ass

    De System-Prompt enthält nëmmen den Numm an d'Beschreiwung. D'Instruktioune gi bei der éischter passender Ufro gelueden, soudatt en onbenotzte Skill näischt kascht.

  • De Modell am lafende Chat wiesselen

    Well de Skill aus Instruktiounen amplaz vu Code besteet, funktionéiert en och no engem Modellwiessel — den nächste Modell liest déi selwecht SKILL.md-Datei.

Skill-Instruktiounen

Dëst ass den Inhalt vu SKILL.md, deen de Modell luet. Liest e virun der Installatioun — e Skill besteet aus Instruktiounen, déi Äre Modell befollegt.

Run Benchmark

Invocation contract

Run this skill only after an explicit user request. Implementing, fixing, or reviewing performance-adjacent code does not by itself authorize a benchmark run.

All timing in this workflow assumes one dedicated, quiet local machine accumulating a series over time. Numbers from CI runners, other machines, or a loaded host are not comparable and must not enter the baseline series. Never run other builds, tests, or heavy agents concurrently with a timed run.

Background and design decisions live in docs-ai/057-performance-benchmark-suite/; the measurement methodology (why workload context matters, why load kills comparability) in docs-ai/032-performance-hardening/004-agent-detection-steady-state.md.

Step 0 — Preflight

  1. git status --short — an A/B run switches the checkout to the baseline commit, so the tree must be clean and HEAD committed. If dirty, tell the user what is blocked and ask whether to commit/stash or fall back to a branch-only run.
  2. Quiet-host check: compare uptime load1 against sysctl -n hw.ncpu. Above roughly half the cores, warn that starvation inflates numbers unevenly and ask whether to wait or proceed; above one runnable process per core, refuse the timed run and say why.
  3. Note what is available for the live layer: is a Prowl instance running (prowl list --json), and are any agents working (animating titles)?

Step 1 — Classify intent, then always confirm

Gather evidence before guessing:

  • The user's own words in the invocation — these override everything below.
  • git branch --show-current; BASE=$(git merge-base HEAD origin/main); git diff --name-only $BASE and git log --oneline $BASE..HEAD.
  • Map changed files through the table in Reference to see which benchmark suites the branch can plausibly affect.

Classify into one of three modes:

ModeSignalWhat runs
hot-pathBranch touches files mapped to existing suites; user wants to know whether the change regressed themA/B make bench: merge-base baseline vs branch
new-optimizationBranch introduces a performance improvement no suite pins yetAdd a benchmark first (057 pattern), then the hot-path A/B
releasePre-release or "how is performance overall" with no specific change in questionmake test + make bench vs trailing series + live layer

Then confirm with the user before running anything, even when the evidence is clear: present the guessed mode with its one-line evidence and the alternatives (AskUserQuestion with the recommended option first). If the evidence is contradictory or absent, do not guess — ask. Benchmark runs take minutes and switch the checkout; a wrong mode wastes both.

Step 2 — Run the confirmed mode

Every make bench appends records to ~/Library/Logs/Prowl/measurements/bench/bench.jsonl keyed by git rev-parse --short HEAD. Record the exact SHA before each run so the comparison step can find its rows.

hot-path — A/B against the merge-base

  1. Check whether the baseline already exists on this machine: jq -c "select(.gitSHA == \"<base-short-sha>\")" bench.jsonl. Reuse it if present.
  2. If absent: git switch --detach $BASE → make bench → git switch -. The first optimized build after a switch takes minutes; later ones are incremental.
  3. make bench on the branch HEAD.
  4. Compare per Step 3.

new-optimization — pin the claim before measuring it

  1. Check the Reference inventory: does any suite already cover the optimized path?
  2. If not, the primary deliverable is a new benchmark following the 057 pattern, in the same PR as the optimization:
    • dig the replaced implementation out of git history and keep it verbatim as the reference;
    • assert output equivalence before timing;
    • assert a floor ratio 2–4x below the measured Release ratio;
    • gate Swift-vs-Swift ratios on optimized builds (BenchmarkMeasurement.isOptimizedBuild); C-call/filesystem ratios assert everywhere.
  3. Then run the hot-path A/B: the new suite quantifies the win, the existing suites catch collateral damage.
  4. The measured ratio goes into the report as the claim's durable evidence — this is exactly what the #644–#665 wave lacked.

release — full sweep plus series

  1. make test — the behavioral + ratio layer (Debug).
  2. make bench — compare against the trailing series (last ~5 records per case across recent SHAs), not a single baseline.
  3. Live layer, best-effort, report each as run/inconclusive/skipped:
    • make measure-titles — needs a running app with at least one animating agent tab; exit 3 means nothing was animating (inconclusive, not a pass).
    • make measure-cpu — needs a running Prowl Debug instance; set PROWL_PID when several run. Records agent mix and load next to the attribution, so quote them together.
  4. make capture-spike is a standing watch for long-running instances, not a step here; mention it if the user is chasing an intermittent spike.

Step 3 — Compare and judge

Extract both sides:

bash
jq -r 'select(.gitSHA == "SHA") | [.suite, .name, .referenceMilliseconds, .shippedMilliseconds, .ratio] | @tsv' \
  ~/Library/Logs/Prowl/measurements/bench/bench.jsonl

Judgment rubric (single machine, warm cache, medians of 15):

  • A ratio below its asserted floor already failed the test — confirmed regression, no further interpretation needed.
  • shippedMilliseconds against baseline: within ±20% is noise; 1.2–1.5x growth is a watch — rerun make bench once to confirm before claiming anything; above 1.5x sustained is a regression; above 2x is major. Name suspect commits via the file→suite map.
  • Use referenceMilliseconds as the built-in host canary: the reference workload never changes, so if it moved by a similar factor the host moved, not the code; if shipped moved alone, the code moved.
  • Never average across load regimes. If load was elevated during a run, discard the run and redo it — do not "correct" the numbers.

Step 4 — Persistent report

Write a markdown report to ~/Library/Logs/Prowl/measurements/reports/$(date +%Y%m%d-%H%M)-<branch-or-tag>.md (mkdir -p the directory; it lives with the rest of the measurement home, survives reboots, and is never cleaned by the system). Reports are append-only history — never overwrite or delete earlier ones.

Required sections:

  • Intent — the mode the user confirmed, in one line.
  • Context — date, branch, baseline and branch SHAs, load average and core count at run time, app/agent state if the live layer ran.
  • Results — one table per layer: case, baseline shipped ms, branch shipped ms, delta, ratio vs floor.
  • Verdict — no-regression / watch / regression / major, with suspect commits for anything above noise, and the host-canary observation.
  • Not run — layers skipped or inconclusive, and why.
  • Raw refs — the bench.jsonl SHAs and any script run directories.

Reply to the user with the verdict and the report path. The report, not the chat, is the durable record.

Reference

Benchmark inventory (all under App/Tests/, suite root PerformanceBenchmarks):

Suite / checkPinsFloorAsserts in
LineCountScanBenchmarks sparse#644/#652 memchr scan vs Data.reduce3xall builds
LineCountScanBenchmarks all-newline#652 hybrid dense fallback2xoptimized only
FingerprintNormalizeBenchmarks#650/#657 escape-absence guard1.3xoptimized only
WorktreeDirectoryIndexBenchmarks#648/#655 index vs per-row scan2xall builds
SessionScoringBenchmarks#650/#657 warm fragment cache3xall builds
make measure-titles (live)#649/#656 title coalescing ≤ ~1/s1.25/srunning app

File → suite map for intent classification and suspect naming:

Changed pathAffected check
App/Sources/Clients/Git/GitClient.swift, UntrackedLineCountCache.swiftLineCountScan
App/Sources/Infrastructure/AgentDetection/AgentSessionResolver.swiftFingerprintNormalize, SessionScoring
App/Sources/Domain/WorktreeDirectoryIndex.swift, App/Sources/Support/PathPolicy.swiftWorktreeDirectoryIndex
App/Sources/Features/Terminal/Models/TerminalTabManager.swift, WorktreeTerminalState+AgentDetection.swiftmeasure-titles, coalescing/dedup unit tests
Sidebar / Active Agents views and reducerscounting tests only (no timing suite)

Caveats:

  • referenceMilliseconds values measured inside the Release test bundle are not comparable to standalone -O binaries (~10x apart for Data.reduce); ratios are unaffected. Compare bench.jsonl rows only with other bench.jsonl rows.
  • The suite is .serialized and make bench disables parallel testing and pins the destination arch deliberately — do not "speed it up" by removing either.
  • bench.jsonl is append-only; the same SHA can have several rows (reruns). Prefer the newest row per (suite, name, SHA) and note reruns in the report.

Heefeg gestallte Froen

Wat mécht de KI-Skill Run Benchmark?

Féiert dem Prowl seng Performance-Benchmark-Layer fir den aktuelle Branch oder e Release aus, vergläicht d'Resultater mat gespäicherte Baselines a schreift e persistente lokale Rapport. Benotzt dëst nëmmen, wann de Benotzer explizitt run-benchmark opruft oder explizitt freet, Performance-Benchmarks auszeféieren / d'Auswierkunge op d'Performance ze iwwerpréiwen. Net automatesch no Implementatiounsaarbechten opruffen. Klasséiert fir d'éischt d'Absicht vum Benotzer (Ännerung um Hot Path, nei Optimiséierung oder Release-weiten Duerchlaf), confirméiert se mam Benotzer a féiert dann déi passend L...

Firwat Run Benchmark op TypingMind benotzen?

Well Dir en eemol installéiert a mat all Modell benotze kënnt. Run Benchmark besteet aus einfachem Markdown amplaz vun ubidderspezifeschem Code. Dee selwechte Skill funktionéiert also mat GPT-5, Claude, Gemini, Grok oder engem lokale Modell – an Dir kënnt de Modell matzen am Chat wiesselen, ouni datt de Skill ophält ze funktionéieren. TypingMind benotzt Är eegen API-Schlësselen, sou datt Dir d'Ubidder direkt bezuelt, amplaz en Abonnement pro Benotzerplaz ze bezuelen. Är Skills a Chats bleiwen an Ärem eegene Späicher.

Wéi installéieren ech Run Benchmark an TypingMind?

Maacht an TypingMind Plugins → Skills → Vu GitHub installéieren op a setzt https://github.com/onevcat/Prowl/tree/main/.claude/skills/run-benchmark an. TypingMind liest d'Datei SKILL.md an installéiert de Skill, deen Dir pro Chat aktivéiere kënnt.

Wéi eng KI-Modeller kënnen Run Benchmark benotzen?

All Modell, deen Dir an TypingMind verbënnt. KI-Skills sinn einfach Markdown-Instruktiounen an net ubidderspezifesche Code. Dofir kënne GPT, Claude, Gemini, Grok a lokal Modeller dëse Skill lueden, wann eng Ufro dozou passt.

Wéi vill KI-Modeller kann ech mat Run Benchmark benotzen?

Esou vill wéi Dir wëllt. Soulaang e Modell Skills ënnerstëtzt, kënnt Dir Run Benchmark domat benotzen – zum Beispill mat GPT, Claude, Gemini, Grok, DeepSeek, Mistral oder Llama – alles op TypingMind mat Ären eegenen API-Schlësselen.

Ass de KI-Skill Run Benchmark gratis?

onevcat huet de Skill op GitHub publizéiert. Kuckt am Repository no de Lizenzbedéngungen. Dir bezuelt nëmmen Ären eegene KI-Ubidder fir d'Token, déi Dir benotzt.

Wat si KI-Skills?

E KI-Skill ass e weiderverwendbare Pak vun Instruktiounen, deen engem KI-Modell bäibréngt, wéi en eng bestëmmt Aufgab erfëllt. E follegt dem oppenen Agent Skills-Format: eng Datei SKILL.md mat engem Numm an enger Beschreiwung, plus all Scripten, Virlagen oder Referenzdateien, déi de Modell eventuell brauch. De Modell liest d'Instruktiounen eréischt, wann Är Ufro zum Skill passt. En installéierte Skill kascht also näischt, bis e benotzt gëtt.

Wéi ënnerscheede sech KI-Skills vu Plugins oder MCP-Serveren?

E Plugin oder MCP-Server gëtt engem Modell nei Tools, déi en opruffe kann – Code, deen iergendwou leeft an e Resultat zeréckgëtt. E KI-Skill gëtt dem Modell dogéint Wëssen an eng Virgoensweis: wéi en eng Aufgab ugeet, wéi eng Schrëtt e maache soll a wéi eng gutt Ausgab ausgesäit. Skills bestinn aus einfachem Markdown, brauche kee Server, keen API-Schlëssel a kee Lafzäitëmfeld a funktionéiere mat all Modell.

Alleguer weisen

Elo Ären eegene KI-Aarbechtsberäich ariichten

Abonnéiert Iech op eisen Newsletter, fir iwwer nei Funktiounen an zukünfteg Gewënnspiller informéiert ze ginn 👇