exp:benchmark
Measure this installation: page timings over HTTP, A/B between servers, kernel probes, regression check.
Script bin/php/benchmark.php, code in kernel/private/classes/commands/benchmark.php. Run it from the installation root, as the user the web server runs as:
./console exp:benchmark --help
./console exp:bench --help
php bin/php/benchmark.php --helpOptions
| Option | Value | Help |
|---|---|---|
--base | required | Server to measure (default: https:// and the SiteURL of the siteaccess) |
--compare | required | Two or more servers, comma separated, measured back to back (A/B) |
--url | required | A URL or path to measure; repeat it for more |
--urls-file | required | A file with one URL or path per line (# starts a comment) |
--pages | required | How many pages of the menu the default list takes (default 3) |
--no-admin | Leave the admin login page out of the default list | |
--no-search | Leave the search page out of the default list | |
--search | required | The words the default search page searches for (default: the first word of the first menu page) |
--requests | required | Requests per URL and server (default 100) |
--runs | required | The same as --requests: measured runs per URL and server |
--concurrency | required | Requests at the same time (default 4) |
--warmup | required | Unmeasured runs first: requests per URL and server (default 5, at least one per connection), micro: iterations per probe (default 3) |
--rounds | required | Split the requests into rounds, alternating the server order (default 2) |
--micro | The same as the micro mode | |
--format | required | Output: table (default), json or csv |
--cold | A unique query string on every request, so no response cache answers | |
--cold-clear | Clear the content view cache once before the run (this installation only) | |
--insecure | Do not verify TLS certificates (self-signed servers) | |
--auth | required | HTTP basic auth, user:password (or the EXP_BENCHMARK_AUTH variable) |
--header | required | An extra request header, "Name: value"; repeat it for more |
--cookie | required | A Cookie header to send, e.g. to measure a signed-in page |
--resolve | required | host:port:address, as curl --resolve, to reach a host at another address |
--http | required | HTTP version: 1.1 or 2 (default: what curl negotiates) |
--encoding | required | The Accept-Encoding to send (default gzip; "none" for none) |
--timeout | required | Seconds per request (default 30) |
--no-keepalive | A new connection for every request | |
--tool | required | curl (default, built in), ab, wrk or oha when installed |
--duration | required | Seconds per URL for wrk (default 10) |
--repeat | required | kernel: runs of every probe (default 20); micro: measured iterations of every probe (default 30) |
--boot-repeat | required | kernel: new processes for boot and the cold render (default 5) |
--node | required | kernel: the node to render and fetch (default: the front page) |
--probe | required | kernel, micro: only these probes; repeat it for more |
--json | Print the run as JSON | |
--csv | Print the rows as CSV | |
--save | required | Write the run as JSON to this file |
--baseline | required | Compare with this saved run; exit 1 when a metric regressed |
--threshold | required | Percent a metric may get worse before it counts as a regression (default 15; micro: 40, after normalisation) |
--min-delta | required | Milliseconds a latency must grow by, too, to count (default 1) |
--all-checks | Show every comparison, not only the regressions | |
--force | Allow more than the polite limits against a host that is not loopback |
Read from the option definitions in the code (startup(), getOptions(), options() or ezcConsoleOption). Every script also takes the standard options of the script framework (--help, --siteaccess, --debug, --quiet, --allow-root-user ...).
Arguments: [MODE*].
Related
Generated by ./console exp:help:examples from bin/php/benchmark.php, kernel/private/classes/commands/benchmark.php. Do not edit this page: change the source and generate again (how). Free documentation: GFDL 1.3 or later.