PHPackages                             grindkit/grindkit - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Debugging &amp; Profiling](/categories/debugging)
4. /
5. grindkit/grindkit

ActiveLibrary[Debugging &amp; Profiling](/categories/debugging)

grindkit/grindkit
=================

PHP GrindKit for reading cachegrind compatible files.

15182PHP

Since Mar 25Pushed 13y ago1 watchersCompare

[ Source](https://github.com/c9s/GrindKit)[ Packagist](https://packagist.org/packages/grindkit/grindkit)[ RSS](/packages/grindkit-grindkit/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

GrindKit
========

[](#grindkit)

PHP GrindKit for reading cachegrind compatible file.

Usage
-----

[](#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
--------------------

[](#parserresult-methods)

#### $result-&gt;dumpExecutionTree()

[](#result-dumpexecutiontree)

will dump the execution tree

Required PHP Extensions
-----------------------

[](#required-php-extensions)

- xdebug

Related Tools
-------------

[](#related-tools)

- webgrind
- ct\_annotate
- xdebugtoolkit
- kcachegrind (KDE)
- WinCacheGrind (windows)

Reference
---------

[](#reference)

- Callgrind file format:

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 97% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/3cc34cde233b660869ff329ed8e20df611f75dfb61aab3e30889ac153d3e5e61?d=identicon)[c9s](/maintainers/c9s)

---

Top Contributors

[![c9s](https://avatars.githubusercontent.com/u/50894?v=4)](https://github.com/c9s "c9s (32 commits)")[![Seldaek](https://avatars.githubusercontent.com/u/183678?v=4)](https://github.com/Seldaek "Seldaek (1 commits)")

### Embed Badge

![Health badge](/badges/grindkit-grindkit/health.svg)

```
[![Health](https://phpackages.com/badges/grindkit-grindkit/health.svg)](https://phpackages.com/packages/grindkit-grindkit)
```

###  Alternatives

[symfony/stopwatch

Provides a way to profile code

2.8k387.2M918](/packages/symfony-stopwatch)[fruitcake/laravel-debugbar

PHP Debugbar integration for Laravel

19.1k662.9k29](/packages/fruitcake-laravel-debugbar)[spatie/ignition

A beautiful error page for PHP applications.

510147.6M69](/packages/spatie-ignition)[jokkedk/webgrind

Webgrind is a Xdebug profiling web frontend in PHP5. It implements a subset of the features of kcachegrind and installs in seconds and works on all platforms. For quick'n'dirty optimizations it does the job.

3.3k193.0k](/packages/jokkedk-webgrind)[koriym/printo

An object graph visualizer.

1421.8M2](/packages/koriym-printo)[soloterm/dumps

A Laravel command to intercept dumps from your Laravel application.

125285.7k3](/packages/soloterm-dumps)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
