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

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

kanel/benchmark
===============

Benchmark your code by tracking duration and memory usage of your code

1.0.0(9y ago)020PHP

Since Apr 2Pushed 8y agoCompare

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

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

[![build](https://camo.githubusercontent.com/527f339acb527f026d39383d726e81c7d7bbb9a1b6183b224a7eb053681c273c/68747470733a2f2f7472617669732d63692e6f72672f656c6b6161646b612f42656e63686d61726b2e7376673f6272616e63683d6d6173746572)](https://camo.githubusercontent.com/527f339acb527f026d39383d726e81c7d7bbb9a1b6183b224a7eb053681c273c/68747470733a2f2f7472617669732d63692e6f72672f656c6b6161646b612f42656e63686d61726b2e7376673f6272616e63683d6d6173746572)

A simple tool to benchmark time execution and memory usage

\#How it works :

- Start the benchmarkg

    ```
        Benchmark::start();

    ```
- Mark a place as a lap (the benchmark will continue)

    ```
        $usage = Benchmark::lap();

    ```

    where $usage is an array :

    ```
     [
         'time'   => ...,
         'memory' => ...,
     ]

    ```
- If you want the benchmark between the two last laps, send the following parameter:

    ```
        $usage = Benchmark::lap(Benchmark::FROM_LAST_LAP);

    ```
- To stop the Benchmark and get the time/memory from the beginning (the start)

    ```
        $usage = Benchmark::stop();

    ```
- To stop the Benchmark tracking and get the memory used and duration from the last lap

    ```
        $usage = Benchmark::stop(Benchmark::FROM_LAST_LAP);

    ```
- To get the Benchmark history

    ```
        $usage = Benchmark::getHistory();

    ```

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity63

Established project with proven stability

 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

3329d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/3215e882ee8ae39a8b904d0958420f68bf23b2cf0e22175d5a61513f98e6ef64?d=identicon)[elkaadka](/maintainers/elkaadka)

---

Top Contributors

[![elkaadka](https://avatars.githubusercontent.com/u/24205608?v=4)](https://github.com/elkaadka "elkaadka (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

PHPackages © 2026

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