SPX provides development teams with a tool to profile and debug performance issues.
Why use SPX?
As stated on the project's README.md:
How to use SPX
- Enable SPX
- Go to to: http://127.0.0.1:8080/?SPX_KEY=dev&SPX_UI_URI=/
- Select "Enabled" and "Automatic start"
- Gather profiling data
- Interact with the application and execute a scenario
- Check back at http://127.0.0.1:8080/?SPX_UI_URI=/
- Click on a profile at the bottom of the page
Execute any command prefixed with the following environment variables:
SPX_ENABLED=1 SPX_REPORT=full drush cr
I cannot see my profiling data
This is generally a permissions issue.
SPX does not provide any warnings/erorrs when it cannot write to the directory where the profiling data is stored.
This directory is (by default):
and should have the permissions:
- Inside the Skpr container:
- Outside of the Skpr container:
I cannot see my profiling command line profiling data in the Web UI
This is generally:
- Permissions issue (see previous debugging section)
- The profiling data directory is not mounted between the CLI container and the PHP/Web container.
Below is an example of the Docker Compose services php-fpm and php-cli where the profilng data is shared using a volume.