NoiseByNorthwest / php-spx

A simple & straight-to-the-point PHP profiling extension with its built-in web UI
GNU General Public License v3.0
1.99k stars 75 forks source link

Roadrunner compatible #192

Open cidious opened 2 years ago

cidious commented 2 years ago

Is it compatible with roadrunner?

cannot get the SPX UI with ?SPX_KEY=dev&SPX_UI_URI=/ query applied

note it differs from php-fpm env.

CLI: SPX_ENABLED=1 SPX_KEY=dev SPX_FP_LIVE=1 composer works OK (Global stats. Flat profile etc)

versions: PHP 8.1.7 roadrunner 2.10.5 SPX 0.4.12 running in docker env.

NoiseByNorthwest commented 2 years ago

No your use case is currently not supported. The web UI is served through the interception a PHP script's execution via a web SAPI (e.g. fastcgi).

The next step could be making the web UI standalone, it will brings lots of flexibility like serving it from any context.

vladdnepr commented 1 year ago

Hi. I have same issue. Would be appreciated, if you add support of RoadRunner

vladdnepr commented 1 year ago

Maybe you do some internal function like spx_profiler_start? Then I can put it in desired place in my project

NoiseByNorthwest commented 1 year ago

Here is an easy way to set up a local server (using PHP's builtin server) serving the web UI https://github.com/NoiseByNorthwest/php-spx/issues/201#issuecomment-1279780817

joanhey commented 1 year ago

Not only for Roadrunner, it'll be useful for Workerman, Reactphp, Amp, .... And perhaps will be good to send the info live, via a websocket for example. As they are persistent running apps.

Rastusik commented 1 year ago

this could be also usable for swoole and openswoole