oziks / xhprof-service-provider
Silex 的 XHProf 服务提供程序。
dev-master
2014-05-02 14:01 UTC
Requires
- silex/web-profiler: ~1.0@dev
- symfony/finder: ~2.3
This package is not auto-updated.
Last update: 2024-09-22 03:27:34 UTC
README
在 Web 分析器(Silex)中添加 XHProf 报告。
参数
-
xhprof.location : XHProf 将被找到的路径。
-
xhprof.host : xhprof 主机网站。
注册
要启用它,请将此依赖项添加到您的 composer.json
文件中
"oziks/xhprof-service-provider": "dev-master"
并在您的应用程序中启用它
<?php $app['xhprof.location'] = '/var/www/utils/xhprof'; $app['xhprof.host'] = 'http://localhost/xhprof/'; $app->register(new \Oziks\Provider\XHProfServiceProvider());
使用方法
<?php $app['xhprof']->start(); for ($i = 0; $i <= 1000; $i++) { $a = $i * $i; } $app['xhprof']->end();