PHPackages                             ob-ivan/sd-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. ob-ivan/sd-profiler

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

ob-ivan/sd-profiler
===================

Tag your code with profiler frames and calculate durations for each tag.

v1.3(8y ago)01.0k1PHPCI failing

Since Jul 30Pushed 5y ago1 watchersCompare

[ Source](https://github.com/ob-ivan/sd-profiler)[ Packagist](https://packagist.org/packages/ob-ivan/sd-profiler)[ RSS](/packages/ob-ivan-sd-profiler/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (7)Dependencies (2)Versions (11)Used By (1)

Profiler
========

[](#profiler)

Allows you to tag your code with profiler frames. It will calculate inclusive and exclusive durations for each tag and output with selected strategies.

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

[](#installation)

```
composer require ob-ivan/sd-profiler
```

Init
----

[](#init)

To start profiling and select output strategies:

```
profiler()->init([
    'append' => true,
    // or:
    'firephp' => true,
);
register_shutdown_function(function () {
    profiler()->dispatch();
});
```

Example from WordPress functions.php:

```
if (isset($_COOKIE['secretcookie']) && $_COOKIE['secretcookie'] === 'secretvalue') {
    profiler()->init([
        'firephp' => true,
    ]);
    // Dispatch profiling result before WP forcefully closes all output buffers.
    add_action(
        'shutdown',
        function () {
            profiler()->dispatch();
        },
        0
    );
}
```

Usage
-----

[](#usage)

To put profiler frame tags:

```
profiler()->in('my_function', $vars);
my_function($vars);
profiler()->out('my_function');
```

You can add arbitrary debug info with log method:

```
function my_function($vars) {
    profiler()->log('my_function', $vars);
    // useful stuff here...
}
```

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity69

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

Recently: every ~50 days

Total

9

Last Release

3005d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/16bf08194a92f7509a08dfffd03540b37680b368041f74a5c4f82788cace2037?d=identicon)[ob-ivan](/maintainers/ob-ivan)

---

Top Contributors

[![ob-ivan](https://avatars.githubusercontent.com/u/1832804?v=4)](https://github.com/ob-ivan "ob-ivan (3 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/ob-ivan-sd-profiler/health.svg)

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

###  Alternatives

[symfony/stopwatch

Provides a way to profile code

2.8k387.2M910](/packages/symfony-stopwatch)[fruitcake/laravel-debugbar

PHP Debugbar integration for Laravel

19.1k662.9k28](/packages/fruitcake-laravel-debugbar)[spatie/ignition

A beautiful error page for PHP applications.

510147.6M69](/packages/spatie-ignition)[jokkedk/webgrind

Webgrind is a Xdebug profiling web frontend in PHP5. It implements a subset of the features of kcachegrind and installs in seconds and works on all platforms. For quick'n'dirty optimizations it does the job.

3.3k193.0k](/packages/jokkedk-webgrind)[koriym/printo

An object graph visualizer.

1421.8M2](/packages/koriym-printo)[soloterm/dumps

A Laravel command to intercept dumps from your Laravel application.

125285.7k3](/packages/soloterm-dumps)

PHPackages © 2026

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