定制 izquierdogalan/benchmark-bundle 二次开发

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

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

izquierdogalan/benchmark-bundle

最新稳定版本:1.0.0

Composer 安装命令:

composer require izquierdogalan/benchmark-bundle

包简介

Show benchmark functions, apis, controlers, etc

README 文档

README

This Bundle provides @Benchmark annotation for symfony 2 for show log with a duration time process a determinated function or controler. This bundle required JMSAopBundle.

Build Status

Installation and configuration:

Get the bundle

Add to your composer.json file :

composer require izquierdogalan/benchmark-bundle

Add BenchmarkBundle to your application kernel

<?php

    // app/AppKernel.php
    public function registerBundles()
    {
        return array(
            // ...
            new JMS\AopBundle\JMSAopBundle(),
            new Easys\BenchmarkBundle\EasysBenchmarkBundle(),
            // ...
        );
    }

Add in your config.yml

jms_aop:
    cache_dir: %kernel.cache_dir%/jms_aop

Usage examples:

You must use in controller or simple function allowed in methods:

<?php

/**
   * @Route("/{page}", name="home", defaults={"page": 1}, requirements={"page": "\d+" }, methods = { "GET" })
   * @Benchmark(description="Load index page.")
   */
  public function indexAction($page)
  {
    return $this->render('EasysVideoPortalBundle:Orbit:Pages/index.html.twig');
  }

统计信息

  • 总下载量: 33
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 3
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 2
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-06-13