承接 sp-niemand/yii2-pinba 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

sp-niemand/yii2-pinba

Composer 安装命令:

composer require sp-niemand/yii2-pinba

包简介

Pinba for Yii2

README 文档

README

Description

Integrates pinba with Yii2

Installation

Use composer to install:

composer require sp-niemand/yii2-pinba

Usage

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

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

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

// ...

$p->stopTimer('timer1');

统计信息

  • 总下载量: 12.05k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 10
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 10
  • Watchers: 5
  • Forks: 2
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-10-15