oziks/xhprof-service-provider

XHProf service provider for Silex.

dev-master 2014-05-02 14:01 UTC

This package is not auto-updated.

Last update: 2020-08-01 07:56:18 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();

Screenshots