PHPackages                             hoathis/bench-bundle - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. hoathis/bench-bundle

AbandonedArchivedSymfony-bundle[Utility &amp; Helpers](/categories/utility)

hoathis/bench-bundle
====================

The Hoa\\Bench Symfony 2 bundle.

2891[3 issues](https://github.com/hoaproject/Contributions-Symfony-BenchBundle/issues)PHP

Since Sep 21Pushed 11y ago9 watchersCompare

[ Source](https://github.com/hoaproject/Contributions-Symfony-BenchBundle)[ Packagist](https://packagist.org/packages/hoathis/bench-bundle)[ RSS](/packages/hoathis-bench-bundle/feed)WikiDiscussions master Synced 1w ago

READMEChangelogDependenciesVersions (1)Used By (0)

[![Hoa](https://camo.githubusercontent.com/b6460899aaa9a8910aa9331b036ef417b11c8f783d7c4de02a218d221fcae46e/687474703a2f2f7374617469632e686f612d70726f6a6563742e6e65742f496d6167652f486f615f736d616c6c2e706e67)](https://camo.githubusercontent.com/b6460899aaa9a8910aa9331b036ef417b11c8f783d7c4de02a218d221fcae46e/687474703a2f2f7374617469632e686f612d70726f6a6563742e6e65742f496d6167652f486f615f736d616c6c2e706e67)

Hoa is a **modular**, **extensible** and **structured** set of PHP libraries. Moreover, Hoa aims at being a bridge between industrial and research worlds.

Hoathis\\BenchBundle [![Build Status](https://camo.githubusercontent.com/302411e1b11062fcc71c1ca50212cc8022267ba8775cc0e80e9aaf068ffb7878/68747470733a2f2f7472617669732d63692e6f72672f6a756269616e6368692f486f617468697342656e636842756e646c652e706e673f6272616e63683d6d6173746572)](https://travis-ci.org/jubianchi/HoathisBenchBundle)
========================================================================================================================================================================================================================================================================================================================================

[](#hoathisbenchbundle-)

- [Installation](#installation)
- [How to use](#how-to-use)
- [Bench service](#bench-service)
- [Twig helper](#twig-helper)
- [Console helper](#console-helper)

Installation
------------

[](#installation)

Add these lines to your `require-dev` section:

```
{
    "require-dev": {
        "hoa/core": "*@dev",
        "hoa/bench": "*@dev",
        "hoathis/bench-bundle": "dev-master"
    }
}
```

Then install dependencies:

```
$ composer update hoathis/bench-bundle
```

And add `BenchBundle` to your `AppKernel`:

```
//app/AppKernel.php

class AppKernel extends Kernel
{
    …

    public function registerBundles()
    {
        if (in_array($this->getEnvironment(), array('dev', 'test'))) {
            …
            $bundles[] = new \Hoathis\Bundle\BenchBundle\BenchBundle();
        }

        return $bundles;
    }
}
```

How to use
----------

[](#how-to-use)

### Bench service

[](#bench-service)

`BenchBundle` will automatically setup a `bench` service which you can use in your PHP code to benchmark parts of your application. Results will be aggregated and reported in the profile.

```
