Home PC Games Linux Windows Database Network Programming Server Mobile  
           
  Home \ Linux \ php performance monitoring module XHProf     - Linux excellent text editor (Markdown, LaTeX, MathJax) (Linux)

- Defensive programming in PHP (Programming)

- Differences Shell scripting languages and compiled languages (Programming)

- CentOS7 boot systemd introduction and use of management (Linux)

- System Security: Build Linux with LIDS steel castle (Linux)

- Linux common network tools: batch scanning of hosting services netcat (Linux)

- Linux Hard Disk Partition and file system management (Linux)

- Linux tmux tcpdump summary (Linux)

- Experience PHP 7.0 on CentOS 7.x / Fedora 21 (Server)

- Service manager OpenBSD on rccl (Server)

- 10046 trace only open for a particular SQL statement (Database)

- How a lot of blocking malicious IP address in Linux (Linux)

- Ceph tuning --Journal and tcmalloc (Server)

- Tomcat installation under Linux (Server)

- Linux system security configuration Collection (Linux)

- Recent Consolidation Using Linux security module (Linux)

- Linux Fundamentals of the memory management mechanism (Linux)

- Apache Kafka: the next generation of distributed messaging system (Server)

- Ubuntu 14.04 / Linux Mint 17 How to install the MintMenu 5.5.2 menu (Linux)

- java.net.NoRouteToHostException of Hadoop problem: no route to host (Server)

 
         
  php performance monitoring module XHProf
     
  Add Date : 2016-04-17      
         
         
         
  First, what is XHProf

XHProf is a hierarchical PHP performance analysis tools. It reports the number of requests and function-level indicators, including the blocking time, CPU time and memory usage. The overhead of a function can be subdivided into the caller and callee overhead, XHProf data collection phase, which tracks and records the indicators arc inclusive of the number of calls in a program of dynamic callgraph. Reports its unique data computing / post-processing stage. When data collection, XHProfd by detecting loops to process recursive function calls, and by recursive calls to call each depth of a useful name to avoid an endless loop. XHProf analysis reports help to understand the structure of the code is executed, it has a simple HTML user interface (PHP written). Browser-based performance analysis user interface makes it easier to view, or share the results with colleagues. Also can draw the call graph.

Second, install expansion modules XHProf

1, the installation

wget http://pecl.php.net/get/xhprof-0.9.2.tgz
tar zxvf xhprof-0.9.2.tgz
cp ./xhprof-0.9.2.tgz./www // xhprof with its own version of a web page analysis, into my web server below
cd xhprof-0.9.2 / extension
/ Usr / local / php / bin / phpize
./configure --enable-xhprof --with-php-config = / usr / local / php / bin / php-config
make && make install
2, the configuration

[Xhprof]
extension = xhprof.so
xhprof.output_dir = / home / yicheng / xhprof // if not stored directory, the default is on the / tmp below
Three, XHProf test

Earlier we talked, XHProf with its own version of a web testing tools, there is also a small example. Look at this example, I did a little modification and comments


Here are the results section:

[Foo ==> bar] => Array
(
[Ct] => 5 // bar () This function is called five times
[Wt] => 63 // each run bar () the desired time, I do not know this is not an average
[Cpu] => 0 // each run bar (), cpu computing time
[Mu] => 2860 // changes each time you run bar (), php memory used
[Pmu] => 0 // changes each time you run bar (), php peak memory usage, the use of memory
)
Personally I feel that this tool is used to perverted people, who really tested, php code execution efficiency? I guess not, I do not write arbitrary code, the difference is not very big, spend time on it, might as well think about how to improve the handling capacity of the database. If you think others are doing well, doing in this regard it does not matter.
     
         
         
         
  More:      
 
- Python uses multi-process pool (Programming)
- Linux Monitoring Command (Linux)
- Why not use the ifconfig command under RedHat Linux 5 (Linux)
- Linux System Administrator Network Security Experience (Linux)
- Use ARChon runtime environment to run Android apps on Ubuntu (Linux)
- To convert into a binary search tree sorted doubly linked list (Programming)
- Linux system find command Detailed (Linux)
- Household use Linux Security (Linux)
- C # assembly calls across constants, variables and functions (Programming)
- Ubuntu 14.04 kernel after the restart boot black screen to solve (Linux)
- Python dictionary applications get built-in method (Programming)
- CentOS7 installation hardware monitoring for Zabbix enterprise applications (Server)
- Linux network security probing tools Hping2 (Linux)
- Several reasons MySQL garbled (Database)
- Ubuntu 14.04 install Nmap 6.46.1 (Linux)
- Oracle Client Easy Connection error ORA-12154, TNS-03505 (Database)
- Running the open-source Swift under Linux platform (Linux)
- Linux Security Raiders SSH tools SCP uses examples to explain in detail (Linux)
- Using C / C ++ extensions Python (Programming)
- RedHat Linux 5.5 installation process SVN Service Notes (Server)
     
           
     
  CopyRight 2002-2022 newfreesoft.com, All Rights Reserved.