Artifact 4aad2f80f6a26daddb12d4d4113d970a8a4f5463e24febddc60f6a36de573039:
- File docs/manual/benchmarks.md — part of check-in [cef29b55cb] at 2026-11-21 16:04:45 on branch docs-help — pic help [TOPIC] and /help TOPIC: the manual and reference compiled in (src/manual.inc, built, not committed); pic --help is a 27-line synopsis; help.sh tests both and checks the synopsis against docs/reference/cli.md; doc fixes: Alt+P picks a model, 36 RPC commands, more differences from Pi (user: dmestas, size: 1935) [annotate] [blame] [check-ins using] [more...]
Benchmarks
Three switches help compare runs of pic against each other:
- Lapse compaction.
--lapse on|off(PIC_LAPSE, settinglapseCompaction, default off) compacts before a request when the conversation has been idle longer than the prompt cache lives and its context is above a floor, since the cache is cold anyway. Idle time is the journal's clock less the end of the conversation's last reply. The lifetime defaults to the cache retention in effect: 300 s, 3600 s withcacheRetentionlong (86400 s for OpenAI's 24-hour retention), and never fornone; set it with--lapse-seconds(PIC_LAPSE_SECONDS,lapseSeconds). The floor is 20000 context tokens; set it with--lapse-floor(PIC_LAPSE_FLOOR,lapseFloorTokens). The compaction is journaled with reasonlapse, the idle seconds and the context's tokens, and its events are Pi'scompaction_startandcompaction_endwith"reason":"lapse". Forked conversations look idle, so leave it off for runs that replay them. - Trial labels.
--trial LABEL(PIC_TRIAL; 1 to 64 printable characters) is kept on every request the invocation admits.pic usage --by-trial [--json]sums each arm's requests, input, output, cache read and cache write tokens, and cost, summary requests included. Pi's session format has no place for it on a message, so the Pi export leaves it out. - A request cap.
--max-requests N(PIC_MAX_REQUESTS) stops a request cleanly before it would send its (N+1)th reply request. Retries of one request count once, summary requests not at all, and the count comes from the journal, so recovery after a crash keeps it. The request ends with statusstoppedandstop_reasonrequest_cap, andagent_endcarries"status":"stopped","stopReason":"request_cap".pic ask -ccontinues the conversation.
pic's own speed is measured by make bench-pic; see testing.