library xhprof-collector
Simple library that wraps Xhprof profile collection.
qafoolabs/xhprof-collector
Simple library that wraps Xhprof profile collection.
- Sunday, June 8, 2014
- by beberlei
- Repository
- 4 Watchers
- 10 Stars
- 910 Installations
- PHP
- 0 Dependents
- 0 Suggesters
- 0 Forks
- 0 Open issues
- 2 Versions
- 0 % Grown
Xhprof Collector
Wrapper around Xhprof API., (*1)
<?php
$profiler = new \Xhprof\ProfileCollector(
new \Xhprof\FacebookBackend('/tmp', 'myapp'),
new \Xhprof\StartDecisions\AlwaysStart()
);
$profiler->start();
// now all your application code here
$profiler->stop("name of operation that was performed");
Symfony Integration Example
<?php
use Symfony\Component\HttpFoundation\Request;
require_once __DIR__ . "/../vendor/autoload.php";
require_once __DIR__ . "/../app/AppKernel.php";
$profiler = new \Xhprof\ProfileCollector(
new \Xhprof\FacebookBackend('/tmp', 'myapp'),
new \Xhprof\StartDecisions\AlwaysStart()
);
$profiler->start();
$request = Request::createFromGlobals();
$kernel = AppKernel::createFromBuildProperties();
$response = $kernel->handle($request);
$response->send();
$kernel->terminate($request, $response);
$profiler->stop($request->attributes->get('_controller', 'notfound'));
dev-master
9999999-dev
Simple library that wraps Xhprof profile collection.
Sources
Download
MIT
The Development Requires
v0.1
0.1.0.0
Simple library that wraps Xhprof profile collection.
Sources
Download
MIT
The Development Requires