Skip to content

Warmup times itself - #2

Merged
martin-k-m merged 1 commit into
mainfrom
feat/warmup-times-itself
Sep 4, 2026
Merged

martin-k-m merged 1 commit into
mainfrom
feat/warmup-times-itself

Conversation

@martin-k-m

Copy link
Copy Markdown
Collaborator

The file's own summary said the timing was yours to measure "because this file does not time itself", and noted twill has had mono_ns since 1.7 with nothing here calling it. docs/needs.md entry 3 said the same: delivered, not taken up.

Every pass is timed now, and the report gives the total plus the first pass against the median of the rest. That difference is the number warmup exists to produce — what it moved off the first request. The median rather than the mean, because one stall mid-warmup drags a mean far enough to hide the first pass, which is the thing being measured against it.

It claims nothing from fewer than three passes, and nothing when the first pass was no slower than the others: a model with no lazy work in it gets an honest silence rather than a saving made of noise.

tests/warmup_test.tw is new — the file had none. It asserts the refusals rather than the speed, because a timing assertion is a claim about the machine the tests run on, and a CI runner that stalls in the wrong place would turn it into a failure that says nothing.

One of its own assertions was wrong first: it checked that a failed warmup's report contains no "ms", which the word warms contains. It now asserts the whole report instead, which is what a "says only this and nothing appended" check should have been.

Also bumps the pin, README and CI to 1.9.0. Seven suites pass.

🤖 Generated with Claude Code

The file's own summary said the timing was yours to measure "because this
file does not time itself", and noted that twill has had mono_ns since 1.7
and nothing here called it. docs/needs.md entry 3 said the same thing more
plainly: delivered, not taken up.

Every pass is timed now, and the report gives the first pass against the
median of the rest. That difference is the number warmup exists to produce.
The median rather than the mean because one stall in the middle of a warmup
would drag a mean far enough to hide the first pass, which is the thing being
measured against it.

It claims nothing from fewer than three passes, and nothing when the first
pass was no slower than the others: a model with no lazy work in it gets an
honest silence rather than a saving made of noise.

tests/warmup_test.tw is new, and the file had none. It asserts the refusals
rather than the speed, because a timing assertion is a claim about the
machine the tests run on. One of its own assertions was wrong first: it
checked that a failed warmup's report contains no "ms", which the word
"warms" contains.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@martin-k-m
martin-k-m merged commit e3a68bd into main Sep 4, 2026
3 checks passed
@martin-k-m
martin-k-m deleted the feat/warmup-times-itself branch September 4, 2026 14:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant