bench

command
v0.3.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 6, 2026 License: MIT Imports: 19 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

bench

Smif's benchmark, tiers S (system overhead), R (robustness and safety) and T (tokens) of docs/rfc-benchmark.md. It costs nothing: each scenario starts a fresh daemon in /tmp with the fake claude.

make bench                    # full run, about 1.5 minutes
go run ./bench -quick         # smaller counts, about 20 s
go run ./bench -only S1,R3    # some scenarios
make bench-real               # also T-real: actual tokens on haiku through the existing claude login (no API key)

Output: bench/results/<date>-<commit>/report.md (tables) and results.json (raw numbers).

id what
S1 ask answered by a command handler, open loop 20/s, latency from the scheduled send time
S2 tells stored and routed, open loop 200/s
S5 hook and status line process time, idle and under the S2 load; bytes the hook prints
S3 phases of one worker message; Smif's cost over the same fake process run directly
S4 500 identical crash events (dedupe): messages, merges, worker runs
R1 kill -9 with 100 messages in flight: lost, not done, runs over max_attempts
R2 two workers that always ask back: when the loop guard freezes the thread, runs spent
R3 canary string in 20 inbound messages, searched in every channel into the human's session
T1 bytes and estimated tokens Smif adds to each worker run (policy, envelope, schema)
T2 what Smif costs the human's session (MCP tool definitions, hooks, status line)
T-real the same question via a Smif worker and a plain claude -p: actual tokens (-real)

Latencies include process start where the real path has one (hooks, status line). Token counts marked ≈ are bytes/4 estimates; only T-real counts tokens.

Documentation

Overview

Command bench is Smif's benchmark (docs/rfc-benchmark.md, tiers S, R and T). It costs nothing: every scenario runs a throw-away daemon with the fake claude. Only -real calls the real claude, on haiku, through the existing login.

go run ./bench                 # full run, about 3 minutes
go run ./bench -quick          # smaller counts, about 1 minute
go run ./bench -real           # also the actual-token sample (subscription)
go run ./bench -only S1,R3     # some scenarios

It writes bench/results/<date>-<commit>/report.md and results.json.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL