PHPackages                             myaaghubi/debench - 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. [Logging &amp; Monitoring](/categories/logging)
4. /
5. myaaghubi/debench

ActiveLibrary[Logging &amp; Monitoring](/categories/logging)

myaaghubi/debench
=================

A small debug/benchmark helper for PHP

1.7(9mo ago)0877MITPHPCI passing

Since Apr 1Pushed 9mo ago1 watchersCompare

[ Source](https://github.com/myaaghubi/Debench)[ Packagist](https://packagist.org/packages/myaaghubi/debench)[ Docs](https://github.com/myaaghubi/Debench)[ RSS](/packages/myaaghubi-debench/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (8)Dependencies (2)Versions (9)Used By (0)

Debench
=======

[](#debench)

[![Test Debench](https://github.com/myaaghubi/Debench/actions/workflows/ci.yml/badge.svg)](https://github.com/myaaghubi/Debench/actions/workflows/ci.yml) [![Debench Coverage Status](https://camo.githubusercontent.com/478db7509e7842a3715b967e5bc64543d7af5752557dd40baecda8e8078c81b8/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f6d79616167687562692f446562656e63682f62616467652e7376673f6272616e63683d6d61696e)](https://coveralls.io/github/myaaghubi/Debench?branch=main) [![Debench release (latest by date)](https://camo.githubusercontent.com/665c4ae6bcad703ca583d1da05a71a01875f67d6be384441be1cda9ae90a0be0/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f762f72656c656173652f6d79616167687562692f446562656e6368)](https://camo.githubusercontent.com/665c4ae6bcad703ca583d1da05a71a01875f67d6be384441be1cda9ae90a0be0/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f762f72656c656173652f6d79616167687562692f446562656e6368) [![Debench License](https://camo.githubusercontent.com/90dcda580c04aaeb0b7de24dcccd136936859e401f072c818df45bef07166a35/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f6d79616167687562692f446562656e6368)](https://camo.githubusercontent.com/90dcda580c04aaeb0b7de24dcccd136936859e401f072c818df45bef07166a35/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f6d79616167687562692f446562656e6368)

A small and lightweight debug/benchmark helper for PHP.

[![myaaghubi/debench-debench-minimal](screenshot/screenshot-minimal.png)](screenshot/screenshot-minimal.png)[![myaaghubi/debench-debench-fullsize](screenshot/screenshot-fullsize.png)](screenshot/screenshot-fullsize.png)

How to use
==========

[](#how-to-use)

Use composer:

```
composer require myaaghubi/debench
```

Then have it like:

```
namespace DEBENCH;

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

// call it from your index.php after autoload
// then check the webpage with your browser
// $debench = new Debench(true, '../public', $base->get('ASSETS'));
Debench::getInstance(true, '../public', $base->get('ASSETS'));

// for enable() or minimalOnly() you can
// call them even before getInstance
Debench::enable(false);

// for dump(), info(), warning() and error() you can
// call them before getInstance too
Debench::info('let\'s use some memory');

// let's load some
$st = str_repeat("Debench!", 10000);
Debench::point('one');
Debench::dump($st);

// let's load some more
$st .= str_repeat("Debench!", 10000);
// $debench->newPoint("two");
Debench::point('two');
```

For `minimal` mode:

```
// it is safe and secure to use
// $debench->setMinimalOnly(true);
Debench::minimalOnly(true);
```

For `production` mode

```
// it's better to do it on initializing
//$debench = new Debench(false);
Debench::getInstance(false);
// or
Debench::enable(false);
```

For `comparison` mode

```
// Debench::compare($func1, $func2, $tag='', $iterations=1000);
Debench::compare(function () use ($mongo) {
    $mongo->find([])
}, function () use ($sql) {
    $sql->exec('select ...');
});
```

How to test
===========

[](#how-to-test)

Just run:

```
./vendor/bin/phpunit

```

License
-------

[](#license)

You are allowed to use this plugin under the terms of the MIT License.

Copyright (C) 2025 Mohammad Yaaghubi

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance58

Moderate activity, may be stable

Popularity14

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity46

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

Every ~71 days

Recently: every ~123 days

Total

8

Last Release

274d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/f0ef25a6f284465905f51c1fa6f286efa656c1d884b5c244e216c9664746af2e?d=identicon)[myaaghubi](/maintainers/myaaghubi)

---

Top Contributors

[![myaaghubi](https://avatars.githubusercontent.com/u/4276074?v=4)](https://github.com/myaaghubi "myaaghubi (194 commits)")

---

Tags

benchmarkdebenchdebugguilogloggingphptooldebugtoolbenchmarkdebench

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[friends-of-behat/mink-debug-extension

Debug extension for Behat

2075.3M286](/packages/friends-of-behat-mink-debug-extension)[analog/analog

Fast, flexible, easy PSR-3-compatible PHP logging package with dozens of handlers.

3451.5M24](/packages/analog-analog)[inpsyde/wonolog

Monolog-based logging package for WordPress.

183617.9k7](/packages/inpsyde-wonolog)[bazilio/yii2-newrelic

Newrelic integration for Yii2

23399.4k](/packages/bazilio-yii2-newrelic)[baibaratsky/yii2-rollbar

Rollbar for Yii2

35130.5k](/packages/baibaratsky-yii2-rollbar)[bdk/debug

Browser/javascript like console class for PHP

819.0k1](/packages/bdk-debug)

PHPackages © 2026

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