2017 © Pedro Peláez
 

library xhprof-grapher

A small library enabling graphing of xhprof traces

image

csa/xhprof-grapher

A small library enabling graphing of xhprof traces

  • Wednesday, May 21, 2014
  • by csarrazi
  • Repository
  • 1 Watchers
  • 1 Stars
  • 42 Installations
  • PHP
  • 0 Dependents
  • 3 Suggesters
  • 0 Forks
  • 0 Open issues
  • 7 Versions
  • 0 % Grown

The README.md

XhProf grapher

Latest Stable Version Latest Unstable Version SensioLabs Insight Scrutinizer Quality Score Code Coverage, (*1)

Installation

composer require csa/xhprof-grapher:dev-master

Usage

Create any type of PHP web or console application, then use the following in your code, (*2)

<?php

require_once __DIR__ . '/vendor/autoload.php';

use XhProf\Storage\FileStorage;
use XhProf\Graph\Loader\XhProfDataLoader as Loader;
use XhProf\Graph\Dumper\GraphvizDumper as Dumper;

$storage = new FileStorage();
$trace = $storage->fetch('1234567890abcdef');
$loader = new Loader();
$graph = $loader->load($trace);
$dumper = new Dumper();

if ('cli' !== php_sapi_name()) {
    header('Content-type: image/png');
}

echo $dumper->dump($graph);

You can either use this script in your browser or using the command line, (*3)

$ php ./script.php > output.png

Todo

  • Add support for loading exclusive metrics
  • Add support for aggregating metrics
  • Improve graphviz callgraph
  • Add support for other graphing outputs (graphdracula, arborjs, flare, js-graph-it, etc.)

License

This library is under the MIT license. For the full copyright and license information, please view the LICENSE file that was distributed with this source code., (*4)

Bitdeli Badge, (*5)

The Versions

21/05 2014

dev-master

9999999-dev

A small library enabling graphing of xhprof traces

  Sources   Download

MIT

The Requires

 

by Charles Sarrazin

21/05 2014

v0.5.0

0.5.0.0

A small library enabling graphing of xhprof traces

  Sources   Download

MIT

The Requires

 

by Charles Sarrazin

21/04 2014

v0.4.3

0.4.3.0

A small library enabling graphing of xhprof traces

  Sources   Download

MIT

The Requires

 

by Charles Sarrazin

20/01 2014

v0.4.2

0.4.2.0

A small library enabling graphing of xhprof traces

  Sources   Download

MIT

The Requires

 

by Charles Sarrazin

12/01 2014

v0.4.1

0.4.1.0

A small library enabling graphing of xhprof traces

  Sources   Download

MIT

The Requires

 

by Charles Sarrazin

12/01 2014

v0.4.0

0.4.0.0

A small library enabling graphing of xhprof traces

  Sources   Download

MIT

The Requires

 

by Charles Sarrazin

11/01 2014

v0.3.0

0.3.0.0

A small library enabling graphing of xhprof traces

  Sources   Download

MIT

The Requires

 

by Charles Sarrazin