PHPackages                             ko/php-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. ko/php-benchmark

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

ko/php-benchmark
================

A simple class for testing how long code takes to run

0.0.1(8y ago)077MITPHP

Since Apr 25Pushed 8y ago1 watchersCompare

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

READMEChangelogDependenciesVersions (2)Used By (0)

ko-php-benchmark
================

[](#ko-php-benchmark)

This module is for benchmarking PHP code to determine how long a particular procedure takes to run.

Install
-------

[](#install)

```
composer require ko/php-benchmark
```

Usage
-----

[](#usage)

### Class Object

[](#class-object)

Return the `Benchmark` class object of how long a procedure took to run.

```
  $mark = new \KO\Benchmark\Benchmark();

  sleep(3); // Some task that takes time to run

  echo $mark->calc();
```

### Human Readable String

[](#human-readable-string)

Return a human readable string of how long a procedure took to run.

```
  $mark = new \KO\Benchmark\Benchmark();

  sleep(3); // Some task that takes time to run

  echo $mark->calc()->toString();
```

### Array

[](#array)

Return an `Array` of how long a procedure took to run.

```
  $mark = new \KO\Benchmark\Benchmark();

  sleep(3); // Some task that takes time to run

  var_dump( $mark->calc()->toArray() );
```

###  Health Score

25

—

LowBetter than 35% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity53

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

2988d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1185267?v=4)[Deac Karns](/maintainers/peledies)[@peledies](https://github.com/peledies)

---

Top Contributors

[![sfp-deac](https://avatars.githubusercontent.com/u/38105740?v=4)](https://github.com/sfp-deac "sfp-deac (1 commits)")

### Embed Badge

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

```
[![Health](https://phpackages.com/badges/ko-php-benchmark/health.svg)](https://phpackages.com/packages/ko-php-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)
