PHPackages                             almadomundo/benchmark - 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. [Testing &amp; Quality](/categories/testing)
4. /
5. almadomundo/benchmark

ActiveLibrary[Testing &amp; Quality](/categories/testing)

almadomundo/benchmark
=====================

Relative memory &amp; time benchmarking in PHP for PHP

8211PHP

Since Apr 28Pushed 12y ago1 watchersCompare

[ Source](https://github.com/almadomundo/benchmark)[ Packagist](https://packagist.org/packages/almadomundo/benchmark)[ RSS](/packages/almadomundo-benchmark/feed)WikiDiscussions master Synced 2w ago

READMEChangelogDependenciesVersions (1)Used By (0)

benchmark
=========

[](#benchmark)

Benchmark is a very simple tool that allows to measure functions in PHP.

Currently, there are two standard measurements: memory space and time.

Important note: this tool is created for comparative measurements. That means - it is good only to compare memory/time usage of two or more functions. If you want to get exact memory/time measurements - using this tool is not a good idea because it's realization wraps many things inside class, calls internal methods e t.c. - i.e. it does many things that cause measurements overhead.

Memory
======

[](#memory)

To measure memory, it's enough to use \\Benchmark\\Measure::benchmarkMemory method

- it measures maximum memory space that was used during function execution

Time
====

[](#time)

To measure time, solid amount of iterations should be applied. Method is \\Benchmark\\Measure::benchmarkTime Also make sure that your script has enough time limitations, otherwise your script will fail because this measure tool does not affects any context and so you should adjust your maximum script execution time by yourself (using set\_time\_limit() for example).

Custom
======

[](#custom)

You may specify any measurement function and use it in \\Benchmark\\Measure::benchmarkCustom

- the only restriction is that value, returned by this measurement function must be numeric value.

###  Health Score

22

—

LowBetter than 21% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity41

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.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/5096484?v=4)[Eugene Belov](/maintainers/almadomundo)[@almadomundo](https://github.com/almadomundo)

---

Top Contributors

[![almadomundo](https://avatars.githubusercontent.com/u/5096484?v=4)](https://github.com/almadomundo "almadomundo (12 commits)")

### Embed Badge

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

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

###  Alternatives

[dms/phpunit-arraysubset-asserts

This package provides ArraySubset and related asserts once deprecated in PHPUnit 8

14228.7M341](/packages/dms-phpunit-arraysubset-asserts)[phpbenchmark/phpbenchmark

Easy to use benchmark toolkit for your PHP-application. This library contains classes for comparing algorithms as well as benchmarking application responses

8011.5k2](/packages/phpbenchmark-phpbenchmark)

PHPackages © 2026

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