定制 intaro/pinba-bundle 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

intaro/pinba-bundle

最新稳定版本:2.6.2

Composer 安装命令:

composer require intaro/pinba-bundle

包简介

Collects and sends execution time of Doctrine queries, Twig renders and Redis requests as pinba timers to pinba server

README 文档

README

CI

About

PinbaBundle is Symfony bundle for pinba.

Important! Include this bundle only in `prod` environment.

It collects and sends times of execution for Doctrine queries, Twig renders and Redis requests as pinba timers to pinba server. You can watch collected realtime metrics in Intaro Pinboard. Example of output:

Pinba timers in Intaro Pinboard

Also PinbaBundle changes pinba script_name variable to request_uri value otherwise pinba sends app.php in script_name for the requests.

Installation

PinbaBundle requires Symfony 4.4 or higher.

Require the bundle in your composer.json file:

{
    "require": {
        "intaro/pinba-bundle": "^2.0",
    }
}

Important! Register the bundle in prod environment:

// app/AppKernel.php

public function registerBundles()
{
    $bundles = [
        //...
    ];

    if ('prod' === $this->environment) {
        $bundles[] = new Intaro\PinbaBundle\IntaroPinbaBundle();
    }

    //...
}

Install the bundle:

$ composer update intaro/pinba-bundle

Usage

Configure script_name

PinbaBundle automatically configures script_name variable of pinba.

Collecting Twig metrics

PinbaBundle automatically collects metrics for Twig renders.

Collecting Doctrine metrics

Edit app/config/config_prod.yml and add this lines:

doctrine:
    dbal:
        logging: true

Don't worry. This config enables pinba logger which collects only queries execution time but not logs them.

Development

Run tests

Install vendors:

make vendor

Run php-cs-fixer, phpstan and phpunit:

make check

统计信息

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

GitHub 信息

  • Stars: 22
  • Watchers: 10
  • Forks: 15
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2014-05-04