The Tideways Run Command

Profile a PHP Script

To profile a PHP script, say myscript.php, that is part of the Profiler organization and application myorg/myapp17, you call:

tideways run myorg/myapp17 php myscript.php

Profile a Web/REST API with cURL

To profile a Web/REST API with cURL for the organization and application  myorg/myapp17 you call:

tideways run myorg/myapp17 curl "http://myapp17.local/api/test"

With httpie the command becomes:

tideways run myorg/myapp17 http "http://myapp17.local/api/test"

The tideways command acts as a proxy and you can call any command with arbitrary options and arguments. The only thing that tideways does is add an environment variable TIDEWAYS_SESSION that PHP scripts with the Tideways PHP Extension react to.

These optional flags are available and can set be after the run command:


(optional) Print trace results as text or json. (default "text")

-o --output

(optional) Render stdout/stderr from command on screen.


(optional) Seconds (default 100)

Example with optional flags --sampling and --format

tideways run --sampling=80 --format="json" myorg/myapp17 php myscript.php
Still need help? Email [email protected]