2017 © Pedro Peláez
 

library benchmark

A comparison benchmarking utility

image

dydro/benchmark

A comparison benchmarking utility

  • Wednesday, July 24, 2013
  • by troymccabe
  • Repository
  • 2 Watchers
  • 0 Stars
  • 11 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 1 Forks
  • 3 Open issues
  • 3 Versions
  • 0 % Grown

The README.md

PHP-Benchmark

A comparison benchmarking utility, (*1)

PHP-Benchmark is intented to be used to compare libraries, or do small testing in your application, (*2)

Latest Stable Version Build Status, (*3)

Installation

Installation should be handled through Composer:, (*4)

"require": {
    "dydro/benchmark": "dev-master"
}

Usage

Usage is very simple with Benchmark:, (*5)

$benchmark = new Benchmark('MyProduct');
$manager = new Manager();
$manager->addBenchmark($benchmark);

$benchmark->start();
...do stuff...
$benchmark->stop();

echo $manager->getResults('MyProduct test');

Output

Depending on the environment in which PHP is running (CLI or non-CLI) Benchmark will spit out different responses:, (*6)

CLI

+--------------------------------------------------------+
|                                                        |
|           BENCHMARK RESULTS -- 04.images.php           |
|                                                        |
+-------------------+----------------+-------------------+
|      PRODUCT      |    TIME (s)    |    MEMORY (kB)    |
+-------------------+----------------+-------------------+
|       FPDF        |    0.01311     |       599.8       |
+-------------------+----------------+-------------------+
|       TCPDF       |     0.4036     |     10946.85      |
+-------------------+----------------+-------------------+

HTML

<!doctype html>
<html>
    <head>
        <title>BENCHMARK RESULTS -- 04.images.php</title>
        <link href="//netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/css/bootstrap-combined.min.css" rel="stylesheet">
        <style>#dy-benchmark-results * {text-align: center;}</style>
    </head>
    <body>
        <div class="container">
            <div class="row">
                <div class="span12">
                    <table class="table table-striped table-hover table-bordered" id="dy-benchmark-results">
                        <thead>
                            <tr>
                                <th colspan="3">BENCHMARK RESULTS -- 04.images.php</th>
                            </tr>
                            <tr>
                                <th>PRODUCT</th>
                                <th>TIME (s)</th>
                                <th>MEMORY (kB)</th>
                            </tr>
                        </thead>
                        <tbody>
<tr><td>FPDF</td><td><span class="label label-success">0.01278</span></td><td><span class="label label-success">599.9</span></td></tr>
<tr><td>TCPDF</td><td><span class="label label-important">0.39344</span></td><td><span class="label label-important">10946.73</span></td></tr>
                        </tbody>
                    </table>
                </div>
            </div>
        </div>
    </body>
</html>

The Versions

24/07 2013

dev-master

9999999-dev

A comparison benchmarking utility

  Sources   Download

BSD-3-Clause

The Requires

  • php >=5.4.0

 

The Development Requires

by Troy McCabe

testing benchmark comparison

12/07 2013

v1.1.0

1.1.0.0

A comparison benchmarking utility

  Sources   Download

BSD-3-Clause

The Requires

  • php 5.4.*

 

The Development Requires

by Troy McCabe

testing benchmark comparison

07/07 2013

v1.0.0

1.0.0.0

A comparison benchmarking utility

  Sources   Download

BSD-3-Clause

The Requires

  • php 5.4.*

 

The Development Requires

by Troy McCabe

testing benchmark comparison