当前位置:网站首页>Performance tuning can't just depend on tapping the brain
Performance tuning can't just depend on tapping the brain
2022-06-13 07:08:00 【guangsu.】
qcachegrind
background
Quantifiable is the precondition of problem solving . Performance optimization cannot be limited to theoretical analysis , Quantitative indicators should be obtained with the help of performance analysis tools . So as to measure the optimization scheme more accurately .
Every mature language has its own performance monitoring tools . for example :
- golang : pprof
- php : xdebug , xhprof
These performance monitoring tools are time-consuming for the program by means of hook embedding , Memory usage , Call sequence and other key data to record . To generate a response monitoring report .
When these files are generated, they are recorded according to the unified reporting protocol , This makes it easy to use sophisticated analysis tools ( Or self-developed tools ) To parse the analysis report . At the same time, it is also convenient for
Develop common performance analysis tools to parse analysis reports generated in different languages .
The more popular single machine performance monitoring tools on the market are :
- qcachegrind -> platform:Win / MacOS
- kcachegrind -> platform:Linux
- webgrind -> platform: Linux / Win / MacOS This is great
kcachegrind And qcachegrind It's essentially the same thing , It's just that they use different graphics engines .kcachegrind be based on KDE. and qcachegrind be based on Qt.
xdebug Generate performance analysis file ,qcachegrind Format the file , Provide good readability .
brew install graphviz
brew install qcachegrind
MacOS: qcachegrind install
brew install graphvizExecute this command to install graphviz, be used for Call Graph functionbrew install qcachegrindinstall qcachegrind. ( If call graph The function cannot be used . pleasesudo ln -s /usr/local/bin/dot /usr/bin/dot)
function qcachegrind
#> nohup qcachegrind &
dashboard Interpretation of indicators
invocation counttotal inclusive cost=>inclshows the time consumed by the function including calleestotal self countshows the time consumed by the function not including callees cost
Word interpretation
- caller caller
- callees Callees
- invocation call
- invoke call , quoted
xdebug Configure the instance
[xdebug]
zend_extension=/usr/lib/php/extensions/no-debug-non-zts-20160303/xdebug.so
xdebug.remote_enable=on
xdebug.idekey='PHPSTORM'
xdebug.remote_host=127.0.0.1
xdebug.remote_port=9001
; Performance analysis section
xdebug.profiler_enable=Off
; Enable the performance analysis trigger mode Instead of triggering performance analysis for every request And xdebug.profiler_enable=0 When used in conjunction with :w
xdebug.profiler_enable_trigger=On
; url Contained in the XDEBUG_PROFILE Performance analysis will be triggered only when the parameters are aligned eg. http://local.web.vhall.com/index.php?XDEBUG_PROFILE=aaa
xdebug.profiler_enable_trigger_value='aaa'
xdebug.profiler_output_dir="/Users/sujianhui/PhpstormProjects/profiler_output"
xdebug.profiler_output_name=callgrind.out.%u
Reference material
qcachegrind Installation guide https://blog.csdn.net/weixin_33881753/article/details/88923382
QCacheGrind Introduction to the use of tools https://blog.csdn.net/raoxiaoya/article/details/111994696
xdebug Quick reference table https://blog.csdn.net/qq624202120/article/details/64124087
phpstorm in xdebug Configuration of https://www.cnblogs.com/yjken/p/8435018.html
Interpretation of instrument cluster parameters https://stackoverflow.com/questions/33094913/how-do-i-read-the-ui-of-qcachegrind
边栏推荐
- How to seize the bonus of social e-commerce through brand play to achieve growth and profit?
- Tidb execution plan -- II
- RT thread simulator lvgl control: button button event
- Quick sort
- 【ViveFocus使用WaveVR插件获取手柄操作事件】
- [weak transient signal detection] matlab simulation of SVM detection method for weak transient signal under chaotic background
- [vivefocus uses the wavevr plug-in to obtain handle operation events]
- 【腾讯阿里最全面试题集锦】(四面:3轮技术+1轮HR)
- 面试必刷算法TOP101之单调栈 TOP31
- Table access among Oracle database users
猜你喜欢

【RS-422与RS-485】RS-422与RS-485串行接口标准

Simple understanding of basic language of C language

SDN basic overview
![[Markov chain Monte Carlo] Markov chain Monte Carlo method sampling prior distribution](/img/8a/e6423168e110a168bc3cc6407628f6.png)
[Markov chain Monte Carlo] Markov chain Monte Carlo method sampling prior distribution

MySQL系列之分库分表学习笔记

RT-Thread 模拟器 simulator LVGL控件:switch 开关按钮控件
![[RS-422 and RS-485] RS-422 and RS-485 serial interface standard](/img/08/e50df07d387b2f2d57a518caedc795.jpg)
[RS-422 and RS-485] RS-422 and RS-485 serial interface standard

Recently, the popular social e-commerce marketing model, blind box e-commerce, how beautiful every second is accurately drained

What is the new business model of Taishan crowdfunding in 2022?

Uploading and retrieving stored images in localstorage
随机推荐
Through the function seaborn cubehelix_ Palette build order palette
快速排序
Tidb statistics
Learning notes of MySQL series by database and table
Is it safe to open an account online in Hangzhou?
TXT_ File encryption and compression
Test development programmers, are you still confused? You can't define yourself as a yard farmer
Tikv key performance parameters and optimization
2022 - 06 - 12: dans un échiquier carré n * N, il y a n * n pièces, donc chaque pièce peut avoir exactement une pièce. Mais maintenant quelques pièces sont rassemblées sur une grille, par exemple: 2 0
2022-06-12:在N*N的正方形棋盤中,有N*N個棋子,那麼每個格子正好可以擁有一個棋子。 但是現在有些棋子聚集到一個格子上了,比如: 2 0 3 0 1 0 3 0 0 如上的二維數組代錶,一
在产业互联网的概念刚刚出现时,人们仅仅只是将其看成是一个获取B端流量的方法
RT-Thread 模拟器 simulator LVGL控件:button 按钮样式
C # Advanced Programming - Feature Section
Xiaomi's one-sided interview questions (self sorting answers)
June 12, 2022: if there are n*n pieces in an n*n square chessboard, each grid can have exactly one piece. But now some pieces are gathered on a grid, such as 2030100300. The above two-dimensional arra
[weak transient signal detection] matlab simulation of SVM detection method for weak transient signal under chaotic background
Try to use renderdoc to view the shader code of UE
Monotone stack top31 of interview must brush algorithm top101
髋关节MR详细图谱(转载)
百货中心供应链管理系统