vesic/benchmark
Composer 安装命令:
composer require vesic/benchmark
包简介
Simple utility to measure your execution time.
README 文档
README
Benchmark your code
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
统计信息
- 总下载量: 8
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2017-05-17