PHPackages                             shiroi/xhprof-webman - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Debugging &amp; Profiling](/categories/debugging)
4. /
5. shiroi/xhprof-webman

ActiveLibrary[Debugging &amp; Profiling](/categories/debugging)

shiroi/xhprof-webman
====================

适用于webman的xhprof扩展

0.0.5(2y ago)071↓50%MITPHPPHP &gt;=7.2

Since Mar 25Pushed 2y ago1 watchersCompare

[ Source](https://github.com/hcr707305003/xhprof-webman)[ Packagist](https://packagist.org/packages/shiroi/xhprof-webman)[ RSS](/packages/shiroi-xhprof-webman/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (3)Versions (3)Used By (0)

简介
--

[](#简介)

shiroi/xhprof-webman是一款适配webman的代码性能分析插件。 主要对旧版且无法使用的xhprof做优化调整，用于适配webman，安装简单快捷。 开发者可以通过浏览器快速访问性能分析报告，排查代码性能问题。

作者博客
----

[](#作者博客)

原作者：[艾瑞可erik](https://erik.xyz)

安装
--

[](#安装)

php要安装xhprof扩展 在php.ini中增加配置

```
[xhprof]
extension=xhprof.so;
xhprof.output_dir=/tmp/xhprof;

```

Use [Composer](https://github.com/composer/composer):

```
composer require shiroi/xhprof-webman
```

配置
--

[](#配置)

1. config增加全局中间件

```
    '' => [
        Shiroi\Xhprof\Webman\XhprofMiddleware::class,
    ]

```

2. 创建控制器,复制下面代码

```
