eventhorizon/profiler-bundle

EventHorizonProfilerBundle

该软件包的规范仓库似乎已消失,因此该软件包已被冻结。

v1.0.3 2015-03-10 19:21 UTC

This package is not auto-updated.

Last update: 2019-06-08 03:21:44 UTC


README

此包旨在改进性能分析。

安装

在您的 composer.json 中添加 EventHorizonProfilerBundle

{
    "require": {
        // ...
        "eventhorizon/profiler-bundle": "dev-master"
    }
}

现在运行以下命令,让 composer 下载此包

$ php composer.phar update eventhorizon/profiler-bundle

配置

在内核中启用该包

<?php
// app/AppKernel.php

public function registerBundles()
{
    if (in_array($this->getEnvironment(), array('dev', 'test'))) {
        // ...
        $bundles[] = new EventHorizon\ProfilerBundle\EventHorizonProfilerBundle();
    }
}
# app/config/config_dev.yml

services:
    data_collector.profiler:
        class: EventHorizon\ProfilerBundle\DataCollector\ProfilerCollector
        tags:
            - { name: data_collector, template: "EventHorizonProfilerBundle:Collector:profiler", id: "profiler" }