-
-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
41 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# PHP SPX Profiling | ||
|
||
PHP SPX is a simple, free and open source profiler. It covers both FPM and CLI requests, and provides a built-in UI to visualise the generated reports. Of which a [demo can be seen here](https://noisebynorthwest.github.io/php-spx/demo/report.html?key=spx-full-20191229_175636-06d2fe5ee423-3795-233665123). | ||
|
||
For more information, please see the [PHP SPX Github Repository](https://github.com/NoiseByNorthwest/php-spx). | ||
|
||
|
||
## Configuration | ||
|
||
|
||
To enable PHP SPX in your project environment, add to your `.env` file: | ||
``` | ||
WARDEN_PHP_SPX=1 | ||
``` | ||
|
||
## Usage | ||
|
||
### CLI | ||
|
||
Running the `warden shell` command, will place you within a PHP-SPX instrumented terminal. After running PHP CLI commands, you should see a SPX report printed after the command finishes. | ||
|
||
|
||
![Example CLI Report generated with PHP SPX](screenshots/phpspx-cli-report.png) | ||
|
||
|
||
### Web | ||
|
||
Once an environment is started with the `WARDEN_PHP_SPX=1` flag set, all web requests will be profiled. To override this, you can uncheck the `Automatic start` option within the control panel. | ||
|
||
![Example Web Report generated with PHP SPX](screenshots/phpspx-web-report.png) | ||
|
||
### Control Panel / Viewer | ||
|
||
To view the reports generated by PHP SPX, append `?SPX_UI_URI=/` to the end of your environment url (e.g `https://app.magento2.test/?SPX_UI_URI=/`). | ||
|
||
![Example PHP SPX Control Panel](screenshots/phpspx-control-panel.png) | ||
|
||
|
||
|
||
|
||
|
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.