oziks / xhprof-service-provider
XHProf service provider for Silex.
Installs: 173 387
Dependents: 0
Suggesters: 0
Security: 0
Stars: 8
Watchers: 2
Forks: 2
Open Issues: 2
Requires
- silex/web-profiler: ~1.0@dev
- symfony/finder: ~2.3
This package is not auto-updated.
Last update: 2024-11-17 04:14:38 UTC
README
Adding XHProf report in the web profiler (Silex).
Parameters
-
xhprof.location : The path in which XHProf will be found.
-
xhprof.host : The xhprof host website.
Registering
To enable it, add this dependency to your composer.json
file:
"oziks/xhprof-service-provider": "dev-master"
And enable it in your application:
<?php $app['xhprof.location'] = '/var/www/utils/xhprof'; $app['xhprof.host'] = 'http://localhost/xhprof/'; $app->register(new \Oziks\Provider\XHProfServiceProvider());
Usage
<?php $app['xhprof']->start(); for ($i = 0; $i <= 1000; $i++) { $a = $i * $i; } $app['xhprof']->end();