zhudesheng/performance-analyze-forphp
Composer 安装命令:
composer require zhudesheng/performance-analyze-forphp
包简介
this is performance analyze tool for php 5.4 and higher
README 文档
README
performance analyze for your php script
How to use it
it's very simple just like this
$pa = PAFactory::getPA(__CLASS__,__METHOD__);
$pa->markStartTime();
$pa->markPoint('do sleep');
$pa->markEndTime();
eg .
php demo/Demo.php
it will output like this
~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
class = Demo method=Demo::calculate total consumed 5013.3940429688 milliseconds and total used 1.4765625 kb
between "marker_start" and "do loop"
used time 0.2021484375 milliseconds
used memory 0.6640625 kb
----------------------------------------------------------------------------------------------------
between "do loop" and "do sleep"
used time 5013.1108398438 milliseconds
used memory 0.359375 kb
----------------------------------------------------------------------------------------------------
between "do sleep" and "marker_end"
used time 0.0810546875 milliseconds
used memory 0.453125 kb
----------------------------------------------------------------------------------------------------
Contribution
If you find a bug or want to contribute to the code or documentation, you can help by submitting an issue or a pull request.
License
统计信息
- 总下载量: 15
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2018-06-11