Skip to content

Commit 3da2c9b

Browse files
committed
feat: php-spx documentation
1 parent d4f6d54 commit 3da2c9b

File tree

4 files changed

+41
-0
lines changed

4 files changed

+41
-0
lines changed

configuration/phpspx.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# PHP SPX Profiling
2+
3+
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).
4+
5+
For more information, please see the [PHP SPX Github Repository](https://github.com/NoiseByNorthwest/php-spx).
6+
7+
8+
## Configuration
9+
10+
11+
To enable PHP SPX in your project environment, add to your `.env` file:
12+
```
13+
WARDEN_PHP_SPX=1
14+
```
15+
16+
## Usage
17+
18+
### CLI
19+
20+
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.
21+
22+
23+
![Example CLI Report generated with PHP SPX](screenshots/phpspx-cli-report.png)
24+
25+
26+
### Web
27+
28+
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.
29+
30+
![Example Web Report generated with PHP SPX](screenshots/phpspx-web-report.png)
31+
32+
### Control Panel / Viewer
33+
34+
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=/`).
35+
36+
![Example PHP SPX Control Panel](screenshots/phpspx-control-panel.png)
37+
38+
39+
40+
41+
877 KB
Loading
695 KB
Loading
1.95 MB
Loading

0 commit comments

Comments
 (0)