dev-master
9999999-devStack middleware for Xhprof library
MIT
The Requires
- php >=5.4.0
- symfony/http-foundation ~2.1
- symfony/http-kernel ~2.1
- pimple/pimple ~1.0
- lox/xhprof dev-master
by Antonio Vilar
debug stack profiler xhprof
Wallogit.com
2017 © Pedro Peláez
Stack middleware for Xhprof library
This package contains a StackPHP middleware that activates XHProf profiling by leveraging the lox/xhprof library., (*1)
Just by sending xhprof=1 on the GET request, XhprofMiddleware will generate the profiling for the
requested URL and append a link to the results to the response., (*2)
xhprof extension must be loaded. Otherwise an exception will be thrown., (*3)
The XhprofMiddleware accepts an array of options:, (*4)
<?php
use Avs\Stack\XhprofMiddleware;
require_once __DIR__ . '../vendor/autoload.php';
$app = new Silex\Application();
$stack = (new Stack\Builder())
->push(XhprofMiddleware::class, '/secret/xhprof');
$app = $stack->resolve($app);
$request = Request::createFromGlobals();
$response = $app->handle($request)->send();
$app->terminate($request, $response);
The recommended way to install XhprofMiddleware is through Composer:, (*5)
``` json { "require": { "vilartoni/stackphp-xhprof": "dev-master" } }, (*6)
**Note:** as this package depends on `lox/xhprof` which is in `dev` stability, you may need to allow it explicitly in case you're not already using it. ```json { "require": { "vilartoni/stackphp-xhprof": "dev-master", "lox/xhprof": "@dev" } }
Stack middleware for Xhprof library
MIT
debug stack profiler xhprof