PHPackages                             sp-niemand/yii2-pinba - 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. [Logging &amp; Monitoring](/categories/logging)
4. /
5. sp-niemand/yii2-pinba

ActiveLibrary[Logging &amp; Monitoring](/categories/logging)

sp-niemand/yii2-pinba
=====================

Pinba for Yii2

1012.2k2PHP

Since Nov 9Pushed 10y ago5 watchersCompare

[ Source](https://github.com/sp-niemand/yii2-pinba)[ Packagist](https://packagist.org/packages/sp-niemand/yii2-pinba)[ RSS](/packages/sp-niemand-yii2-pinba/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

yii2-pinba
==========

[](#yii2-pinba)

Description
-----------

[](#description)

Integrates [pinba](http://pinba.org/ "Pinba site")with [Yii2](https://github.com/yiisoft/yii2 "Yii2 repository")

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

[](#installation)

Use composer to install:

`composer require sp-niemand/yii2-pinba`

Usage
-----

[](#usage)

### Standard

[](#standard)

Add the main component and the log target to the config.

```
    'bootstrap' => [/* ... */ 'pinba' /* ... */],

    'components' => [
        // ...
        'pinba' => [
            'class' => \yiiPinba\component\Pinba::className(),
        ],
        // ...
        'log' => [
            'targets' => [
                // ...
                [
                    'class' => \yiiPinba\log\Target::className(),
                ],
                // ...
            ]
        ]
        // ...
    ]
```

The target handles export of the profile logs to Pinba. Use standard Yii2 method for profiling:

```
\Yii::beginProfile($token, $category);

// ...

\Yii::endProfile($token, $category);
```

Bootstrapping is needed if you want to automatically time actions run.

### Low level

[](#low-level)

Of course, you can use methods from the component directly:

```
$p = \Yii::$app->get('pinba');
/** @var Pinba $p */
$p->startTimer('timer1');

// ...

$p->stopTimer('timer1');
```

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity31

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity41

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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/7a67a0bfb068f7929b2df38aaee96fa4e3f7e488752388da991745be05a38583?d=identicon)[sp-niemand](/maintainers/sp-niemand)

---

Top Contributors

[![sp-niemand](https://avatars.githubusercontent.com/u/3440208?v=4)](https://github.com/sp-niemand "sp-niemand (21 commits)")

### Embed Badge

![Health badge](/badges/sp-niemand-yii2-pinba/health.svg)

```
[![Health](https://phpackages.com/badges/sp-niemand-yii2-pinba/health.svg)](https://phpackages.com/packages/sp-niemand-yii2-pinba)
```

###  Alternatives

[psr/log

Common interface for logging libraries

10.4k1.2B9.2k](/packages/psr-log)[itsgoingd/clockwork

php dev tools in your browser

5.9k27.6M94](/packages/itsgoingd-clockwork)[graylog2/gelf-php

A php implementation to send log-messages to a GELF compatible backend like Graylog2.

41838.2M138](/packages/graylog2-gelf-php)[bugsnag/bugsnag-psr-logger

Official Bugsnag PHP PSR Logger.

32132.5M2](/packages/bugsnag-bugsnag-psr-logger)[consolidation/log

Improved Psr-3 / Psr\\Log logger based on Symfony Console components.

15462.2M7](/packages/consolidation-log)[datadog/php-datadogstatsd

An extremely simple PHP datadogstatsd client

19124.6M15](/packages/datadog-php-datadogstatsd)

PHPackages © 2026

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