There is no license information available for the latest version (dev-master) of this package.

PHP GrindKit for reading cachegrind compatible files.

dev-master 2013-03-25 14:53 UTC

This package is auto-updated.

Last update: 2024-04-29 02:59:16 UTC


PHP GrindKit for reading cachegrind compatible file.


$grind = new GrindKit\GrindKit;
$files = $grind->scanDir();  // scan xdebug profile output by default.

$files // we got GrindKit\GrindFile object array, which is inherited from SplFileInfo.
foreach( $files as $file ) {
    $meta = $file->getMeta();

    $meta->version;  # cache grind file version
    $meta->creator;  # creator, xdebug 2.1.1... or something

    $result = $file->parse();   // get parser result.

    $parser = new GrindKit\GrindParser( $file );
    $result = $parser->parse();

    $result->functions;  // function list
    $result->summary;    // summary table
    $result->headers;    // header list

    $tree = $result->getExecutionTree();

ParserResult Methods


will dump the execution tree

Required PHP Extensions

Related Tools

  • webgrind
  • ct_annotate
  • xdebugtoolkit
  • kcachegrind (KDE)
  • WinCacheGrind (windows)