/XHProfServiceProvider

Adding XHProf report in the web profiler (Silex)

Primary LanguagePHPMIT LicenseMIT

XHProfServiceProvider

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();

Screenshots