crysalead/benchmark

dev-master 2016-02-19 17:29 UTC

This package is auto-updated.

Last update: 2024-08-29 03:29:54 UTC


README

Build Status

安装

composer require crysalead/benchmark

用法

use Lead\Benchmark\Benchmark;

$bench = new Benchmark();
$bench->repeat(10000);

$x = 'a param';
$bench->run('task1', function($x) { //Task1 }, $x);
$bench->run('task2', function($x) { //Task2 }, $x);
$bench->run('task3', function($x) { //Task3 }, $x);

echo $bench->report();

致谢