All Projects → c9s → GrindKit

c9s / GrindKit

Licence: other
PHP GrindKit for reading cachegrind compatible file.

Programming Languages

PHP
23972 projects - #3 most used programming language

GrindKit

PHP GrindKit for reading cachegrind compatible file.

Usage

$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
    $meta->cmd;
    $meta->part;
    $meta->positions;


    $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();
    $result->dumpExecutionTree();
}

ParserResult Methods

$result->dumpExecutionTree()

will dump the execution tree

Required PHP Extensions

Related Tools

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

Reference

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].