PHPackages                             sapiet/profiler - 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. [Debugging &amp; Profiling](/categories/debugging)
4. /
5. sapiet/profiler

ActiveLibrary[Debugging &amp; Profiling](/categories/debugging)

sapiet/profiler
===============

PHP duration &amp; memory usage profiler

1.0.2(6y ago)09MITPHPPHP &gt;=7.2

Since Sep 17Pushed 6y ago1 watchersCompare

[ Source](https://github.com/sapiet/profiler)[ Packagist](https://packagist.org/packages/sapiet/profiler)[ RSS](/packages/sapiet-profiler/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependenciesVersions (3)Used By (0)

Profiler
========

[](#profiler)

Installation
------------

[](#installation)

```
composer req sapiet/profiler
```

Usage
-----

[](#usage)

```
require_once __DIR__.'/vendor/autoload.php';

use Sapiet\Profiler\Profiler;

$number = 50000000;

// Starts a test named 'test-1'
Profiler::start('test-1');
foreach (range(1, $number) as $value) {
    // echo $value;
}
// Ends the test named 'test-1'
$test1 = Profiler::end('test-1');

// Starts a test named 'test-2'
Profiler::start('test-2');
function xrange($min, $max) {
    for ($i = $min; $i < $max; $i++) yield $i;
}

foreach (xrange(1, $number) as $value) {
    // echo $value;
}
// Ends the test named 'test-2'
$test2 = Profiler::end('test-2');

// Displaying test results
echo $test1->format();
echo PHP_EOL;
echo $test2->format();
```

Output:

```
1.276 sec / 376 oct
2.318 sec / 0 oct

```

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

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 ~0 days

Total

2

Last Release

2432d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/6910117?v=4)[Xavier QUIÈVRE](/maintainers/Sapiet)[@sapiet](https://github.com/sapiet)

---

Tags

phpprofilermemoryusageduration

### Embed Badge

![Health badge](/badges/sapiet-profiler/health.svg)

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

###  Alternatives

[laracraft-tech/laravel-xhprof

Easy XHProf setup to profile your laravel application!

235321.4k](/packages/laracraft-tech-laravel-xhprof)[bavix/laravel-xhprof

Quick profiling of your code for Laravel

22156.6k](/packages/bavix-laravel-xhprof)[h4cc/phpqatools

A meta composer package for PHP QA Tools.

6418.6k1](/packages/h4cc-phpqatools)[thehocinesaad/laravel-error-ai

This package adds Ask AI button to the error page.

2214.4k](/packages/thehocinesaad-laravel-error-ai)

PHPackages © 2026

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