Console commands
Run these over SSH on the box you actually care about, and the answer is about that box — which is otherwise the largest single source of wrong capacity numbers.
Measuring
# measure what a request costs here, and store the costs
php craft heat/measure
# skip the confirmation prompt (for CI, or a deploy hook)
php craft heat/measure --force
# and keep the resulting projection as a run
php craft heat/measure --save
# go back to estimates
php craft heat/measure/forget
Measured costs replace the estimates automatically and everywhere. There is no switch to flip afterwards.
Projecting
# the default traffic mix
php craft heat/capacity
# the campaign lands and the cache is cold
php craft heat/capacity --mix=launch
# what would a bigger box actually buy?
php craft heat/capacity --workers=64 --cores=16 --memory=32768 --connections=500
# ask about specific loads
php craft heat/capacity --users=500,1000,2500
# a different assumption about how fast people click
php craft heat/capacity --think=4
# machine-readable
php craft heat/capacity --json
# keep it
php craft heat/capacity --save
Inspecting
# what Heat could read here, and what it had to guess
php craft heat/capacity/machine
# the available traffic mixes and their shapes
php craft heat/capacity/mixes
Options
| Option | Applies to | Does |
|---|---|---|
--mix | capacity | Traffic mix: browsing, launch, members, editorial |
--workers | capacity | Override the concurrent PHP request limit |
--cores | capacity | Override the core count |
--memory | capacity | Override the megabytes available to the pool |
--connections | capacity | Override the database connection limit |
--think | capacity | Seconds a visitor pauses between pages |
--users | capacity | Comma-separated user counts to project |
--json | capacity | Emit JSON instead of a table |
--save | both | Store the resulting projection as a run |
--force | measure | Skip the confirmation prompt |
In a deploy pipeline
--json gives the whole projection, including the ceiling, the ranked walls and every ladder row, so a pipeline can assert on it. A release that drops the ceiling by 30% is worth a failed build, and it is the kind of regression that no test suite catches and no error tracker reports.