# PHP Benchmark - The easy way This is designed to make benchmarking PHP easy. ### Installation ``` git clone git@github.com:jacobbednarz/php-bench.git ``` ### Usage To run the benchmark, you need to include the class into a file and instantiate the class. ```php report('foo', 'my_method'); $b->report('foo2', 'my_method2'); $b->bench(); ``` Expected output: ``` $ php benchmark.php IDENTIFIER EXECUTION TIME MEMORY USAGE foo 0.00003099ms 128b foo2 0.00000906ms 128b ``` ### Set the iterations If you need to perform more iterations than the default (10), you can use `setIterations()` to set the value. ```php setIterations(1000); $b->report('foo', 'my_method'); $b->report('foo2', 'my_method2'); $b->bench(); ```