Installation
Requirements
- Craft CMS 5.3+
- PHP 8.2+
- MySQL, MariaDB or Postgres
- No runtime dependencies
Install
composer require justinholtweb/craft-heat
php craft plugin/install heat
Heat adds a control-panel section with three screens — Overview, Runs and Settings — and two console controllers.
Your first answer
The overview works immediately. Until a pass has run, the per-request costs are documented estimates for a typical Craft site, and the page says so in as many words: the shape of the answer is right, the numbers are not yours yet.
# measure what a request costs here
php craft heat/measure
# then read what that means at scale
php craft heat/capacity
Run it on the machine you care about
This is the single most important thing to get right. A cost measured on a laptop and a projection configured for production are each individually reasonable and together meaningless. Run heat/measure over SSH on the production host and the answer is about production.
If you cannot, measure where you can and then override the machine numbers with what production actually runs. Heat treats a stated number as fact rather than inference, and the report tells you when the costs and the machine came from different places.
What a pass does to your site
Worth reading before you run one on anything you care about.
- A few dozen sequential requests to your own site — never to any other host. Targets are built from Craft’s own site URLs and checked against them.
- A throwaway user account, created, signed in through the ordinary login action, and hard-deleted afterwards. It is a plain user in no groups, with no permissions and no control-panel access, at an address on
.invalid. - On Pro, one entry duplicated and deleted. The copy is created disabled, kept out of any structure, and hard-deleted immediately. It exists so the save carries real content — a blank entry saves quickly and proves nothing.
- On Pro, one real search-index job run against an existing entry. Idempotent: it writes the same index rows Craft would have written anyway.
Anything left behind by a run that was killed halfway is cleared at the start of the next one.
Production is off by default
A pass on an environment named production, prod or live refuses to start until you turn it on in Settings. A pass is gentle, but “gentle” is a judgement the person responsible for the site is entitled to make for themselves.
Permissions
| Permission | Allows |
|---|---|
heat:view | See projections and past runs |
heat:run | Start a measurement pass, keep and delete runs |
heat:manage | Change scenarios and workloads |
Starting a pass is its own permission because it puts real requests through the site and creates records, however briefly.