2017 © Pedro Peláez
 

library benchmarker

Benchmark snippets of code, gathering the mean and standard deviation for each snippet

image

spencer-mortensen/benchmarker

Benchmark snippets of code, gathering the mean and standard deviation for each snippet

  • Sunday, June 10, 2018
  • by spencermortensen
  • Repository
  • 1 Watchers
  • 0 Stars
  • 1 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 0 % Grown

The README.md

Benchmarker

Benchmark snippets of code, gathering the mean and standard deviation for each snippet, (*1)

Example

Here's an example test:, (*2)

use SpencerMortensen\Benchmarker\Test;

class ArrayTest implements Test
{
    public function run()
    {
        $t0 = microtime(true);

        array(
            'first' => 'Ann',
            'last' => 'Baker'
        );

        $t1 = microtime(true);

        return $t1 - $t0;
    }
}

And here's an example of the benchmarker:, (*3)

$benchmarker = new Benchmarker();

$tests = array(
    'array' => array(new ArrayTest(), 10000),
);

$results = $benchmarker->run($tests);

echo $results, "\n"; // array: 5.0E-7 +- 1.1E-6

See the "example" directory for a working example., (*4)

Installation

This project is available as a Composer package (spencer-mortensen/benchmarker):, (*5)

composer require spencer-mortensen/benchmarker

The Versions

10/06 2018

dev-master

9999999-dev https://github.com/spencer-mortensen/benchmarker

Benchmark snippets of code, gathering the mean and standard deviation for each snippet

  Sources   Download

GPL-3.0 GPL-3.0-or-later

The Requires

  • php >=5.3.0

 

php benchmark

16/05 2018

0.0.2

0.0.2.0 https://github.com/spencer-mortensen/benchmarker

Benchmark snippets of code, gathering the mean and standard deviation for each snippet

  Sources   Download

GPL-3.0-or-later

The Requires

  • php >=5.3.0

 

php benchmark

16/05 2018

0.0.1

0.0.1.0 https://github.com/spencer-mortensen/benchmarker

Benchmark snippets of code, gathering the mean and standard deviation for each snippet

  Sources   Download

GPL-3.0-or-later

The Requires

  • php >=5.3.0

 

php benchmark