GithubHelp home page GithubHelp logo

mutousay / xhprof Goto Github PK

View Code? Open in Web Editor NEW

This project forked from longxinh/xhprof

0.0 1.0 0.0 1.71 MB

PHP7 support

License: Apache License 2.0

M4 0.07% C 21.08% PHP 46.87% CSS 1.15% HTML 18.93% JavaScript 11.91%

xhprof's Introduction

xhprof for PHP7

XHProf is a function-level hierarchical profiler for PHP and has a simple HTML based navigational interface. The raw data collection component is implemented in C (as a PHP extension). The reporting/UI layer is all in PHP. It is capable of reporting function-level inclusive and exclusive wall times, memory usage, CPU times and number of calls for each function. Additionally, it supports ability to compare two runs (hierarchical DIFF reports), or aggregate results from multiple runs.

This version supports PHP7

#Installation

git clone https://github.com/longxinH/xhprof.git ./xhprof
cd xhprof
/path/to/php7/bin/phpize
./configure --with-php-config=/path/to/php7/bin/php-config
make && sudo make install

####configuration add to your php.ini

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

#新增 ####pdo占位符转换 pdo预处理占位符将会转换成实际的参数,更好的掌握mysql执行消耗(只用做xhprof记录,不改变程序执行过程)

$_sth = $db->prepare("SELECT * FROM user where userid = :id and username = :name");
$_sth->execute([':id' => '1', ':name' => 'admin']);
$data1 = $_sth->fetch();

$_sth = $db->prepare("SELECT * FROM user where userid = ?");
$_sth->execute([1]);
$data2 = $_sth->fetch();

#####xhprof记录数据

PDOStatement::execute#SELECT * FROM user where userid = 1 and username = admin

PDOStatement::execute#SELECT * FROM user where userid = 1

####curl地址记录

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "http://www.baidu.com");
$output = curl_exec($ch);
curl_close($ch);

#####xhprof记录数据

curl_exec#http://www.baidu.com

xhprof's People

Contributors

billf avatar longxinh avatar scottmac avatar rarst avatar davidsklar avatar erikwebb avatar martinsupiot avatar c9s avatar robocoder avatar joedevon avatar imageoptimiser avatar webdevel avatar remicollet avatar oliworx avatar enumag avatar jwpage avatar glennpratt avatar nousefreak avatar dshafik avatar danez avatar draco2003 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.