Skip to content

Exponential CMS

Benchmarking

Measure an installation with exp:benchmark: pages over HTTP, kernel probes, micro benchmarks, baselines and regressions.

exp:benchmark (short name exp:bench) measures the speed of an Exponential installation. It answers three questions well: how long a visitor waits for a page, which of two servers answers it faster when measured the same minute, and whether a change made anything slower. It does not tell you how many visitors a machine can take; that needs a load test against a copy of the site.

The modes

  • HTTP mode (the default): requests the front page, three menu pages, the search page and the admin sign-in page, 100 times each after 5 warm-up requests, 4 at a time, and prints median, p90, p99, minimum, maximum and standard deviation per page.
  • exp:benchmark kernel: times the parts of a page in-process: boot, render, INI, database and cache operations.
  • exp:benchmark micro: times pure-PHP hot paths with no web server and no database, normalized against a calibration loop so runs on different machines compare.

Common runs

./console exp:benchmark
./console exp:benchmark --compare=https://www.example.com,https://www.example.com:8080
./console exp:benchmark --cold
./console exp:benchmark --save=run.json
./console exp:benchmark --baseline=run.json
  • --compare measures two servers back to back, for example Apache with PHP-FPM against Velocity.
  • --cold measures rendered pages instead of cache hits.
  • --save keeps a run; --baseline compares with it and exits 1 on a regression.
  • --format=json prints everything, including the environment the run was made in.

Safety rules

A first try never hurts a site. HTTP mode sends GET only, without cookies unless you pass --cookie. Against another host than this machine, more than 1000 requests per address, more than 16 at a time or more than 20,000 requests in all need --force. The default page list is only sent to hosts this installation serves. --cold-clear is the one option that clears something (the content view cache, once), and it is refused for any server the installation does not serve.

Exit codes

  • 0: the run finished; with --baseline, no regression.
  • 1: a metric regressed against the baseline.
  • 2: a usage error, an unreadable file or a run refused by the safety rules.

Reading the numbers honestly

One run on a busy machine proves little. Compare runs made back to back, with the same counts, the same pages and the same PHP setup. The command needs only PHP with the curl extension; as root it waits ten seconds before it starts.

Last updated 11/26/2026. Something missing or wrong? Write to info@se7enx.com.