PHPackages                             windwalker/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. [Framework](/categories/framework)
4. /
5. windwalker/profiler

ActiveWindwalker-package[Framework](/categories/framework)

windwalker/profiler
===================

Windwalker Profiler package

3.5.23(6y ago)155LGPL-2.0-or-laterPHP &gt;=7.1.3

Since Oct 5Pushed 5y ago3 watchersCompare

[ Source](https://github.com/ventoviro/windwalker-profiler)[ Packagist](https://packagist.org/packages/windwalker/profiler)[ Docs](https://github.com/ventoviro/windwalker-profiler)[ RSS](/packages/windwalker-profiler/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (1)Versions (81)Used By (0)

Windwalker Profiler
===================

[](#windwalker-profiler)

Windwalker Profiler can help us profiler some process information for debug.

Installation via Composer
-------------------------

[](#installation-via-composer)

Add this to the require block in your `composer.json`.

```
{
    "require": {
        "windwalker/profiler": "~3.0"
    }
}
```

Create A Profiler And Mark A Point
----------------------------------

[](#create-a-profiler-and-mark-a-point)

```
use Windwalker\Profiler\Profiler;

$profiler = new Profiler;

$profiler->mark('StartRender');

// Execute some code...

$profiler->mark('AfterRender');

// Execute some code...

$profiler->mark('End');
```

Now your can get the elapsed time between two points:

```
$profiler->getTimeBetween('StartRender', 'AfterRender');
```

Or get memory amount between two points:

```
// Return memory bytes
$profiler->getMemoryBetween('StartRender', 'AfterRender');
```

Output Result
-------------

[](#output-result)

```
echo $profiler->render();
```

```
Notes 0.000 seconds (+0.000); 0.00 MB (+0.000) - StartRender
Notes 1.000 seconds (+1.000); 3.00 MB (+3.000) - AfterRender
Notes 1.813 seconds (+0.813); 6.24 MB (+3.240) - End
```

Benchmark
---------

[](#benchmark)

Benchmark is a convenience object to test two or more tasks executing time.

```
use Windwalker\Profiler\Banchmark;

$benchmark = new Benchmark;

$benchmark->addTask('task1', function()
{
    md5(uniqid());
})
->addTask('task2', function()
{
    sha1(uniqid());
});

$benchmark->execute(10000);

echo $benchmark->render();
```

The output

```
task1 => 0.204897 s
task2 => 0.205108 s

```

Use Other format

```
$benchmark->setTimeFormat(Benchmark::MILLI_SECOND)->execute(10000);

echo $benchmark->render();

/* Result
task1 => 187.489986 ms
task2 => 207.049847 ms
*/
```

```
$benchmark->setTimeFormat(Benchmark::MICRO_SECOND)->execute(10000);

echo $benchmark->render();

/* Result
task1 => 198050.9758 μs
task2 => 206343.173981 μs
*/
```

### Custom Render Handler

[](#custom-render-handler)

```
$benchmark->setRenderOneHandler(function($name, $result, $round, $format)
{
    return $name . ' : ' . round($result, $round);
});

$benchmark->render();
```

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity73

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

Every ~23 days

Recently: every ~0 days

Total

80

Last Release

2396d ago

Major Versions

2.1.8 → 3.0-beta2016-07-03

PHP version history (3 changes)2.0.0-alphaPHP &gt;=5.3.10

3.2PHP &gt;=5.5.9

3.5PHP &gt;=7.1.3

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1639206?v=4)[Simon Asika](/maintainers/asika32764)[@asika32764](https://github.com/asika32764)

---

Top Contributors

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

---

Tags

debugdebuggerprofilerframeworkprofilerwindwalker

### Embed Badge

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

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

###  Alternatives

[windwalker/renderer

Windwalker Renderer package

864.9M25](/packages/windwalker-renderer)[windwalker/crypt

Windwalker Crypt package

1392.2k6](/packages/windwalker-crypt)[mirekmarek/php-jet

PHP Jet is modern, powerful, real-life proven, really fast and secure, small and light-weight framework for PHP8 with great clean and flexible modular architecture containing awesome developing tools. No magic, just clean software engineering.

241.3k](/packages/mirekmarek-php-jet)

PHPackages © 2026

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