PHPackages                             bnomei/kirby3-stopwatch - 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. bnomei/kirby3-stopwatch

AbandonedArchivedKirby-plugin[Debugging &amp; Profiling](/categories/debugging)

bnomei/kirby3-stopwatch
=======================

Profile your Kirby 3 CMS code with precision in milliseconds (or seconds).

1.0.7(3y ago)11495MITPHPPHP &gt;=8.0

Since Oct 5Pushed 1y ago1 watchersCompare

[ Source](https://github.com/bnomei/kirby3-stopwatch)[ Packagist](https://packagist.org/packages/bnomei/kirby3-stopwatch)[ RSS](/packages/bnomei-kirby3-stopwatch/feed)WikiDiscussions master Synced yesterday

READMEChangelog (8)Dependencies (5)Versions (9)Used By (0)

Kirby Stopwatch
===============

[](#kirby-stopwatch)

[![Release](https://camo.githubusercontent.com/4befe43bc380cf97e2b75f19000912098fe5b25499f5a8769905856200df4b5d/68747470733a2f2f666c61742e62616467656e2e6e65742f7061636b61676973742f762f626e6f6d65692f6b69726279332d73746f7077617463683f636f6c6f723d616538316666)](https://camo.githubusercontent.com/4befe43bc380cf97e2b75f19000912098fe5b25499f5a8769905856200df4b5d/68747470733a2f2f666c61742e62616467656e2e6e65742f7061636b61676973742f762f626e6f6d65692f6b69726279332d73746f7077617463683f636f6c6f723d616538316666)[![Downloads](https://camo.githubusercontent.com/8c8f7b2df882156583c4f8541c5cee763227f70b35c12551f5621efb70db50df/68747470733a2f2f666c61742e62616467656e2e6e65742f7061636b61676973742f64742f626e6f6d65692f6b69726279332d73746f7077617463683f636f6c6f723d323732383232)](https://camo.githubusercontent.com/8c8f7b2df882156583c4f8541c5cee763227f70b35c12551f5621efb70db50df/68747470733a2f2f666c61742e62616467656e2e6e65742f7061636b61676973742f64742f626e6f6d65692f6b69726279332d73746f7077617463683f636f6c6f723d323732383232)[![Build Status](https://camo.githubusercontent.com/5f4885e8df7348151567972149983ee4b2ee45d92f0949ce8f55c12ca3370979/68747470733a2f2f666c61742e62616467656e2e6e65742f7472617669732f626e6f6d65692f6b69726279332d73746f707761746368)](https://travis-ci.com/bnomei/kirby3-stopwatch)[![Coverage Status](https://camo.githubusercontent.com/b0e24bd02b6a14b40c3acfbe5dd1ab0ad49c8f8f771dd4f83f947d48f8cae033/68747470733a2f2f666c61742e62616467656e2e6e65742f636f766572616c6c732f632f6769746875622f626e6f6d65692f6b69726279332d73746f707761746368)](https://coveralls.io/github/bnomei/kirby3-stopwatch)[![Maintainability](https://camo.githubusercontent.com/e5c2ffa517fe567eb142dfca1f01a081c595aad575bca42c5c3d20be9ca05424/68747470733a2f2f666c61742e62616467656e2e6e65742f636f6465636c696d6174652f6d61696e7461696e6162696c6974792f626e6f6d65692f6b69726279332d73746f707761746368)](https://codeclimate.com/github/bnomei/kirby3-stopwatch)
[![Twitter](https://camo.githubusercontent.com/b90e4b58a887e8ad09ec267628b75199a48522a9e01e88b129e5d2d730dffe50/68747470733a2f2f666c61742e62616467656e2e6e65742f62616467652f747769747465722f626e6f6d65693f636f6c6f723d363664396566)](https://twitter.com/bnomei)

Profile your Kirby CMS code with precision in milliseconds (or seconds).

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

[](#installation)

- unzip [master.zip](https://github.com/bnomei/kirby3-stopwatch/archive/master.zip) as folder `site/plugins/kirby3-stopwatch` or
- `git submodule add https://github.com/bnomei/kirby3-stopwatch.git site/plugins/kirby3-stopwatch` or
- `composer require bnomei/kirby3-stopwatch`

Works well with
---------------

[](#works-well-with)

- [Janitor Plugin](https://github.com/bnomei/kirby3-janitor)
- [Monolog Plugin](https://github.com/bnomei/kirby3-monolog)

Usage Site Method
-----------------

[](#usage-site-method)

Please read the [Symfony Stopwatch Component Docs](https://symfony.com/doc/current/components/stopwatch.html) since this plugin is just a soft wrapper around it. Some Examples:

**Event Duration**

```
site()->stopwatch()->start('myevent');
sleep(1);
site()->stopwatch()->stop('myevent');
echo site()->stopwatch()->duration('myevent') . PHP_EOL; // float | int
```

**Event with Laps aka Periods**

```
$eventName = 'my event with laps';
$stopwatch = site()->stopwatch();
$stopwatch->start($eventName);
foreach ([random_int(100,500),random_int(100,500),random_int(100,500)] as $time) {
    usleep($time);
    $stopwatch->lap($eventName);
}
usleep(100);
$stopwatch->stop($eventName);
$totalDuration = $stopwatch->duration($eventName); // float | int
echo $totalDuration . PHP_EOL;
foreach ($stopwatch->getEvent($eventName)->getPeriods() as $period) {
    echo $period->getDuration() . PHP_EOL;  // float | int
}
```

Usage PHP Class
---------------

[](#usage-php-class)

You can use the provided php class in your own classes if you make sure the class is loaded before you call it. This can be done in installing this plugin using composer or in manually requiring it with [Kirby's class loader](https://getkirby.com/docs/reference/templates/helpers/load).

```
$stopwatch = \Bnomei\Stopwatch::singleton();
$stopwatch->start('my event with laps');
sleep(1);
$stopwatch->stop('my event with laps');
$duration = $stopwatch->duration('my event with laps'); // float | int
```

Settings
--------

[](#settings)

bnomei.stopwatch.DefaultDescriptionprecision`true`measure microseconds as float or int seconds.> NOTE: This plugin defaults to measuring in milliseconds but the symfony component does not.

Dependencies
------------

[](#dependencies)

- [symfony/stopwatch](https://github.com/symfony/stopwatch)

Disclaimer
----------

[](#disclaimer)

This plugin is provided "as is" with no guarantee. Use it at your own risk and always test it yourself before using it in a production environment. If you find any issues, please [create a new issue](https://github.com/bnomei/kirby3-stopwatch/issues/new).

License
-------

[](#license)

[MIT](https://opensource.org/licenses/MIT)

It is discouraged to use this plugin in any project that promotes racism, sexism, homophobia, animal abuse, violence or any other form of hate speech.

###  Health Score

36

↑

LowBetter than 82% of packages

Maintenance30

Infrequent updates — may be unmaintained

Popularity22

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity68

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

Recently: every ~279 days

Total

8

Last Release

1119d ago

PHP version history (3 changes)1.0.0PHP &gt;=7.2.0

1.0.5PHP &gt;=7.3.0

1.0.6PHP &gt;=8.0

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/3265642?v=4)[Bruno Meilick](/maintainers/bnomei)[@bnomei](https://github.com/bnomei)

---

Top Contributors

[![bnomei](https://avatars.githubusercontent.com/u/3265642?v=4)](https://github.com/bnomei "bnomei (26 commits)")

---

Tags

kirby-cmskirby-pluginmeasuremillisecondsprofilestopwatchusleepprofilestopwatchmeasurekirby3kirby3-pluginkirby3-cmsmillisecondsusleep

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/bnomei-kirby3-stopwatch/health.svg)

```
[![Health](https://phpackages.com/badges/bnomei-kirby3-stopwatch/health.svg)](https://phpackages.com/packages/bnomei-kirby3-stopwatch)
```

###  Alternatives

[fabianmichael/kirby-meta

Your all-in-one powerhouse for any SEO and metadata needs imaginable.

6910.7k1](/packages/fabianmichael-kirby-meta)[schnti/cachebuster

A plugin for Kirby 3 CMS to add modification timestamps to css and js files

108.3k1](/packages/schnti-cachebuster)[bnomei/kirby3-php-cachedriver

PHP based Cache-Driver

112.6k](/packages/bnomei-kirby3-php-cachedriver)

PHPackages © 2026

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