Skip to content
context Artifact [932fec447d]
Login

Artifact [932fec447d]

Artifact 932fec447d22ec98332eecf9dac98a6242f12147ee8b21c6c97f072b24e97752:


{
 "name": "speed",
 "title": "Hooks and commands on a real archive, machine heavily loaded",
 "section": "Speed",
 "order": 10,
 "date": "2026-11-11",
 "good_until": "2027-02-09",
 "commit": "3b1415efd3e0",
 "command": "bench/speed.py --runs 7",
 "conditions": {
  "archive": "1.3 GB, about 470,000 turns",
  "machine": "14 cores, load average 45 while measuring",
  "runs": "7 each; the median is reported"
 },
 "summary": "How long an agent session waits for ctx. Hooks run on every session start, compaction and subagent start, so they are held to a 3-second limit and should take a small fraction of it.",
 "metrics": [
  {
   "label": "Session start: rules and archive note",
   "value": "17 ms",
   "note": "slowest 41 ms"
  },
  {
   "label": "Session start: open tickets",
   "value": "16 ms",
   "note": "slowest 25 ms"
  },
  {
   "label": "After a compaction: the brief",
   "value": "48 ms",
   "note": "slowest 1234 ms"
  },
  {
   "label": "Subagent start: archive note",
   "value": "10 ms",
   "note": "slowest 12 ms"
  },
  {
   "label": "Prompt submitted: recall check",
   "value": "8 ms",
   "note": "slowest 9 ms"
  },
  {
   "label": "Status line",
   "value": "9 ms",
   "note": "slowest 21 ms"
  },
  {
   "label": "Search, two words",
   "value": "148 ms",
   "note": "slowest 491 ms"
  },
  {
   "label": "Read a turn with its neighbours",
   "value": "12 ms",
   "note": "slowest 22 ms"
  },
  {
   "label": "List decisions",
   "value": "443 ms",
   "note": "slowest 6318 ms"
  },
  {
   "label": "List published pages",
   "value": "552 ms",
   "note": "slowest 1631 ms"
  }
 ],
 "bar": "every hook's slowest run under 1,000 ms",
 "verdict": "fail",
 "baseline": "the 3-second limit Claude Code gives a hook, and the 1-second bar set here",
 "meaning": "At the median every hook takes under 50 ms even with the machine running at three times its capacity. The run failed its bar because the first compaction brief took 1.2 s. A second run on a quiet machine gave the same first-run figure, so that cost belongs to the brief and not to the load."
}