izquierdogalan / benchmark-bundle
Show benchmark functions, apis, controlers, etc
Installs: 30
Dependents: 0
Suggesters: 0
Security: 0
Stars: 2
Watchers: 2
Forks: 0
Open Issues: 0
Type:symfony-bundle
Requires
- php: >=5.3.2
- devster/ubench: 1.2
- jms/aop-bundle: ^1.0
- symfony/framework-bundle: >=2.2.0,<3.0
This package is not auto-updated.
Last update: 2024-12-21 19:41:47 UTC
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.
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'); }