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

OptionApplies toDoes
--mixcapacityTraffic mix: browsing, launch, members, editorial
--workerscapacityOverride the concurrent PHP request limit
--corescapacityOverride the core count
--memorycapacityOverride the megabytes available to the pool
--connectionscapacityOverride the database connection limit
--thinkcapacitySeconds a visitor pauses between pages
--userscapacityComma-separated user counts to project
--jsoncapacityEmit JSON instead of a table
--savebothStore the resulting projection as a run
--forcemeasureSkip 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.