PHPackages                             fglueck/perf - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. fglueck/perf

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

fglueck/perf
============

simple PHP performance measuring class

0.1(5y ago)16PHPPHP &gt;=7.0

Since Apr 12Pushed 1y ago1 watchersCompare

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

READMEChangelog (1)DependenciesVersions (2)Used By (0)

perf
====

[](#perf)

PHP performance comparing measuring class.

To generate a benchmark report:

```
$p = new perf(100000);  # each test 100000 times

$p->test('strrpos()', function () {
   if(strrpos($string, ':'));
);

echo $p->report();  # output result

```

or step by step:

```
$p = new perf();
$p->start();
for($i=100000;$i;$i--) { -- checking performance of strrpos
    if(strrpos($string, ':'));
}
$p->stop('strrpos()');
$p->report();

```

-&gt;test('label', function(){})
--------------------------------

[](#-testlabel-function)

short for -&gt;start(), any code, -&gt;stop()

-&gt;start()
------------

[](#-start)

init a new time measuring

-&gt;stop('label')
------------------

[](#-stoplabel)

stop measuring and set label for it

-&gt;report()
-------------

[](#-report)

generates the output

Output sample:

```
100.0% 0.37274s str_contains()
104.6% 0.38981s strpos(+pos)
105.1% 0.39162s strrpos(+pos)
108.7% 0.40509s strrpos()
112.6% 0.41980s [x]===':'
120.4% 0.44880s strpos()
143.9% 0.53623s substr_compare()
247.6% 0.92283s preg_match

```

If the the results are too far apart and the runtime is very smal/fast, incrase itterations. The first entry (100%) is the benchmark, so each other test is measured to this.

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance32

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity37

Early-stage or recently created project

 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

1861d ago

### Community

Maintainers

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

---

Top Contributors

[![fglueck](https://avatars.githubusercontent.com/u/3225774?v=4)](https://github.com/fglueck "fglueck (21 commits)")

### Embed Badge

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

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

###  Alternatives

[event-engine/php-engine

CQRS / ES PHP SDK for event-engine.io

5436.1k2](/packages/event-engine-php-engine)

PHPackages © 2026

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