PHPackages                             gamernetwork/yolk-profiler - 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. [Framework](/categories/framework)
4. /
5. gamernetwork/yolk-profiler

AbandonedArchivedLibrary[Framework](/categories/framework)

gamernetwork/yolk-profiler
==========================

Gamer Network's PHP profiling library

v1.0(10y ago)18.3k1[1 issues](https://github.com/gamernetwork/yolk-profiler/issues)MITPHPPHP &gt;=5.4.0

Since Jul 24Pushed 9y ago10 watchersCompare

[ Source](https://github.com/gamernetwork/yolk-profiler)[ Packagist](https://packagist.org/packages/gamernetwork/yolk-profiler)[ RSS](/packages/gamernetwork-yolk-profiler/feed)WikiDiscussions develop Synced 1mo ago

READMEChangelog (1)Dependencies (3)Versions (3)Used By (0)

Want to work for Gamer Network? [We are hiring!](http://www.gamesindustry.biz/jobs/gamer-network)

Yolk Profiler
=============

[](#yolk-profiler)

[![Scrutinizer Code Quality](https://camo.githubusercontent.com/f31ce9a481ad1be90ab7190eee797aa8e9c31e4e9f8bfe70629c994d83f51e81/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f67616d65726e6574776f726b2f796f6c6b2d70726f66696c65722f6261646765732f7175616c6974792d73636f72652e706e673f623d646576656c6f70)](https://scrutinizer-ci.com/g/gamernetwork/yolk-profiler/?branch=develop)

A simple profiling library for benchmarking code execution speed, memory usage and database queries.

Requirements
------------

[](#requirements)

This library requires only PHP 5.4 or later and the Yolk Contracts package (`gamernetwork/yolk-contracts`).

Installation
------------

[](#installation)

It is installable and autoloadable via Composer as `gamer-network/yolk-profiler`.

Alternatively, download a release or clone this repository, and add the `\yolk\profiler` namespace to an autoloader.

License
-------

[](#license)

Yolk Profiler is open-sourced software licensed under the MIT license.

Quick Start
-----------

[](#quick-start)

```
use yolk\profiler\GenericProfiler;

$profiler = new GenericProfiler();

$profiler->start('Op 1');
lengthyOperation1();
$profiler->stop('Op 1');

$profiler->start('Op 2');
lengthyOperation2();
$profiler->stop('Op 2');

// profile a query
$profiler->start('Query1');
doDatabaseQuery($sql, $params);
$profiler->stop('Query1');

$profiler->query($sql, $params, $profiler->getElapsed('Query1'));

// add some additional info
$profiler->meta('get', $_GET);
$profiler->meta('post', $_POST);

$profiler->stop();

// assign a configuration object to the profiler to be included in the report
$profiler->config(Config $config);

// get a report
print_r(
	$profiler->getData()
);
```

Timers
------

[](#timers)

`GenericProfiler` makes use of the `GenericTimer` class, which may also be used independently to record periods of time at microsecond resolution.

```
use yolk\profiler\GenericTimer;

$t = new GenericTimer();

$t->start();
$t->isRunning();	// returns true
$t->getElapsed();	// returns microseconds since last call to start()
$t->stop();
$t->isRunning();	// returns false
$t->getTotalElapsed();	// returns microseconds between all calls to start()/stop()
```

Debug Bar
---------

[](#debug-bar)

An HTML debug bar is provided that can be rendered to a web page and provide a pretty representation of the Profiler's data.

The relevant HTML can be obtained by calling the `getHTML()` method on the profiler and can then be inserted into a template, send to the client, etc.

The debug bar source is self-contained and is designed to be placed just before the closing `` tag.

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance0

Infrequent updates — may be unmaintained

Popularity21

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

3942d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/2658e540902cbc1f59ec171e1b74515fb9e7c3a1e194e37e9c37f27ae400e4b4?d=identicon)[gamer-network](/maintainers/gamer-network)

---

Top Contributors

[![simon-downes](https://avatars.githubusercontent.com/u/1052903?v=4)](https://github.com/simon-downes "simon-downes (3 commits)")

---

Tags

frameworkeurogamergamer network

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/gamernetwork-yolk-profiler/health.svg)

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

###  Alternatives

[hemp/presenter

Easy Model Presenters in Laravel

247592.6k1](/packages/hemp-presenter)[pestphp/pest-plugin-stressless

Stressless plugin for Pest

67792.6k16](/packages/pestphp-pest-plugin-stressless)[wpstarter/framework

The WpStarter Framework - Laravel Framework for WordPress

1810.1k4](/packages/wpstarter-framework)

PHPackages © 2026

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