2017 © Pedro Peláez
 

library php-benchmark

Micro library for PHP benchmark

image

sohelrana820/php-benchmark

Micro library for PHP benchmark

  • Wednesday, March 1, 2017
  • by sohelrana820
  • Repository
  • 1 Watchers
  • 1 Stars
  • 1 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

php-benchmark

php-benchmark is a micro library for PHP benchmark, (*1)

Installation

Manually

Download this library and then require src/Benchmark.php in your project., (*2)

Composer

composer require sohelrana820/php-benchmark, (*3)

Usage

<?php

require 'vendor/autoload.php';

$benchmark = new \SohelRana820\Benchmark\Benchmark();
$benchmark->start();
for ($counter = 0; $counter < 100000; $counter++) {
    // Write some code to execute
}
$benchmark->end();

echo $benchmark->getTime(); // 10ms
echo $benchmark->getTime(true); // 0.010242

echo $benchmark->getMemoryUsage(); // 2.00Mb
echo $benchmark->getMemoryUsage(true); // 2097152 bit
echo $benchmark->getMemoryUsage(false, '%.3f%s'); // 2.000Mb

echo $benchmark->getPeakMemory(); // 2.00Mb
echo $benchmark->getPeakMemory(true); // 2097152 b
echo $benchmark->getPeakMemory(false, '%.3f%s'); // 2.000Mb

License

php-benchmark is licensed under the MIT License, (*4)

The Versions

01/03 2017

dev-master

9999999-dev https://github.com/sohelrana820/php-benchmark

Micro library for PHP benchmark

  Sources   Download

MIT

The Requires

  • php >=5.5.0

 

The Development Requires

by Avatar sohelrana820

benchmark benchmark library php benchmark micro benchmark library

01/03 2017

v1.1

1.1.0.0 https://github.com/sohelrana820/php-benchmark

Micro library for PHP benchmark

  Sources   Download

MIT

The Requires

  • php >=5.5.0

 

The Development Requires

by Avatar sohelrana820

benchmark benchmark library php benchmark micro benchmark library