library benchmark
Simple utility to measure your execution time.
vesic/benchmark
Simple utility to measure your execution time.
- Wednesday, May 17, 2017
- by dusan-vesic-devtech
- Repository
- 0 Watchers
- 0 Stars
- 0 Installations
- PHP
- 0 Dependents
- 0 Suggesters
- 0 Forks
- 0 Open issues
- 3 Versions
- 0 % Grown
benchmark
Benchmark your code, (*1)
Installation
composer require vesic/benchmark
Basic Usage
require __DIR__ . '/vendor/autoload.php';
use Vesic\Benchmark\Benchmark;
$benchmark = new Benchmark;
$bencmark->run(function() {
for ($i=0; $i<1e6; $i++) { }
});
function yourFunctionToMeasure() {
// expensive computing
}
$benchmark->run('yourFunctionToMeasure');
function functionWithParams($param) {
for ($i=0; $i<$param; $i++) { }
}
$benchmark->run('functionWithParams', 1e6);
Output
Your code performance:
Time - 0.017. Memory - 356.75 kb
dev-master
9999999-dev
Simple utility to measure your execution time.
Sources
Download
MIT
The Requires
by
vesic
0.0.1
0.0.1.0
Simple utility to measure your execution time.
Sources
Download
MIT
The Requires
by
vesic
dev-dev
dev-dev
Simple utility to measure your execution time.
Sources
Download
MIT
The Requires
by
vesic