定制 vilartoni/stackphp-xhprof 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

vilartoni/stackphp-xhprof

Composer 安装命令:

composer require vilartoni/stackphp-xhprof

包简介

Stack middleware for Xhprof library

README 文档

README

This package contains a StackPHP middleware that activates XHProf profiling by leveraging the lox/xhprof library.

Just by sending xhprof=1 on the GET request, XhprofMiddleware will generate the profiling for the requested URL and append a link to the results to the response.

Requirements

xhprof extension must be loaded. Otherwise an exception will be thrown.

Options

The XhprofMiddleware accepts an array of options:

  • output_dir: the directory used to store XHProf runs.

Example

<?php

use Avs\Stack\XhprofMiddleware;

require_once __DIR__ . '../vendor/autoload.php';

$app = new Silex\Application();

$stack = (new Stack\Builder())
    ->push(XhprofMiddleware::class, '/secret/xhprof');

$app = $stack->resolve($app);

$request = Request::createFromGlobals();
$response = $app->handle($request)->send();

$app->terminate($request, $response);

Installation

The recommended way to install XhprofMiddleware is through Composer:

{
    "require": {
        "vilartoni/stackphp-xhprof": "dev-master"
    }
}

Note: as this package depends on lox/xhprof which is in dev stability, you may need to allow it explicitly in case you're not already using it.

{
    "require": {
        "vilartoni/stackphp-xhprof": "dev-master",
        "lox/xhprof": "@dev"
    }
}

统计信息

  • 总下载量: 305
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 2
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2016-02-23

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固