burdz/squille

PHP交互式性能分析工具集

dev-master 2015-10-15 13:24 UTC

This package is auto-updated.

Last update: 2024-08-29 03:42:05 UTC


README

PHP交互式性能分析工具集。

描述

这个工具的目的显然不是为了在生产服务器上定期分析你的应用程序(是的,我的意思是像Blackfire.io或Tideways这样的工具)。
这个工具的目标是帮助你以最少努力访问运行信息,正确地开发PHP应用程序。模块化允许你添加自己的收集器或选择最方便的输出在你的开发栈中。但你可以让魔法自动添加,只需在你的代码中添加一行即可使用Chrome扩展程序。

如何使用

基本上你可以这样使用分析器

use Burdz\Squille\Profiler;
use Burdz\Squille\Profiler\Output\FileOutput;
use Burdz\Squille\Profiler\Output\Formater\JsonFormater;
use Burdz\Squille\Profiler\Collector\UprofilerCollector;

$output = new FileOutput('.squille', __DIR__);
$output->setFormater(new JsonFormater());

$profiler = new Profiler($output);
$profiler->pushCollector(new UprofilerCollector());

$profiler->start();

// Do something who burn a lot of CPU resources here

$profiler->stop();
$profiler->dump();

// Look at .squille file in your current folder

许可证

DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE 阅读LICENCE.md文件中的条款