2017 © Pedro Peláez
 

library xhprof-composer

composer library for xhprof

image

axios/xhprof-composer

composer library for xhprof

  • Friday, May 4, 2018
  • by AxiosCros
  • Repository
  • 1 Watchers
  • 0 Stars
  • 18 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 500 % Grown

The README.md

Latest Stable Version License, (*1)

xhprof-composer

composer library for xhprof, (*2)

Need install xhprof php extension

git clone https://github.com/longxinH/xhprof.git
cd xhprof/extension/
/usr/local/php7/bin/phpize
./configure --with-php-config=/usr/local/php7/bin/php-config
make
make install

vim /usr/local/php7/lib/php.ini
extension=xhprof.so;
service php-fpm restart

Install

composer require axios/xhprof-composer

Use

  • create record of xhprof_runs

namespace xhprof; require_once __DIR__.'/../vendor/autoload.php'; XHProf::start(); /*** begin ***/ dump('this is example for use xhprof-composer'); $a = pow(2, 10); dump($a); /*** end ***/ $report = XHProf::end('test'); dump($report); $run_id = XHProf::getRunId('test'); dump($run_id);
  • query
dump(XHProfRuns::query()->find($run_id));

$list = [
    '38cece5b1ce049e446b5f58fba0aba7c',
    '86cd5712d2a679efe80c743d1d2342e8',
    '773a5a2a3a50ebf16fa0dc5256cafd46'
];

$data = XHProfRuns::query()->select($list);
dump($data);

  • get report
$report = XHProf::report($run_id);

dump($report->getTotalCpuTime());
dump($report->getTotalMemory());
dump($report->getList());
dump($report->getTree());

The Versions

04/05 2018

dev-master

9999999-dev https://github.com/AxiosCros/xhprof-composer

composer library for xhprof

  Sources   Download

MIT

The Requires

  • php >=7.0

 

The Development Requires

by axios

04/05 2018

0.1.0

0.1.0.0 https://github.com/AxiosCros/xhprof-composer

composer library for xhprof

  Sources   Download

MIT

The Requires

  • php >=7.0

 

The Development Requires

by axios