ko/php-benchmark
Composer 安装命令:
composer create-project ko/php-benchmark
包简介
A simple class for testing how long code takes to run
README 文档
README
This module is for benchmarking PHP code to determine how long a particular procedure takes to run.
Install
composer require ko/php-benchmark
Usage
Class Object
Return the Benchmark class object of how long a procedure took to run.
$mark = new \KO\Benchmark\Benchmark(); sleep(3); // Some task that takes time to run echo $mark->calc();
Human Readable String
Return a human readable string of how long a procedure took to run.
$mark = new \KO\Benchmark\Benchmark(); sleep(3); // Some task that takes time to run echo $mark->calc()->toString();
Array
Return an Array of how long a procedure took to run.
$mark = new \KO\Benchmark\Benchmark(); sleep(3); // Some task that takes time to run var_dump( $mark->calc()->toArray() );
统计信息
- 总下载量: 77
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 4
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2018-04-25