SlideShare a Scribd company logo
Cachegrind 101 A quick introduction into profiling
A way  of profiling your code using the Xdebug profiler ,[object Object]
Amount of ms
Cumulative amount of ms
Nr of calls

More Related Content

Viewers also liked

Administrative portfolio
Administrative portfolioAdministrative portfolio
Administrative portfolio
eschrader
 
Cartões método start treinamento
Cartões método start   treinamentoCartões método start   treinamento
Cartões método start treinamento
CLAUDINEI FERREIRA DA SILVA
 
Cartões método start treinamento
Cartões método start   treinamentoCartões método start   treinamento
Cartões método start treinamento
CLAUDINEI FERREIRA DA SILVA
 
활용예시를 통한 Sql server 2012의 향상된 프로그래밍 기능 엿보기
활용예시를 통한 Sql server 2012의 향상된 프로그래밍 기능 엿보기활용예시를 통한 Sql server 2012의 향상된 프로그래밍 기능 엿보기
활용예시를 통한 Sql server 2012의 향상된 프로그래밍 기능 엿보기
cranbe95
 
Website cscope overview
Website cscope overviewWebsite cscope overview
Website cscope overview
eschrader
 
Guide4
Guide4Guide4
Guide4
rbenzrbenz
 
sql server 고가용성
sql server 고가용성sql server 고가용성
sql server 고가용성cranbe95
 
Sprint 2016 Confianza Creativa (3de4) Jobs-to-be-Done
Sprint 2016 Confianza Creativa (3de4) Jobs-to-be-DoneSprint 2016 Confianza Creativa (3de4) Jobs-to-be-Done
Sprint 2016 Confianza Creativa (3de4) Jobs-to-be-Done
P3 Ventures
 
Sprint 2016 Confianza Creativa (2de4) - Lean Startup
Sprint 2016 Confianza Creativa (2de4) - Lean Startup Sprint 2016 Confianza Creativa (2de4) - Lean Startup
Sprint 2016 Confianza Creativa (2de4) - Lean Startup
P3 Ventures
 
Los orígenes de los primeros reinos peninsulares
Los orígenes de los primeros reinos peninsularesLos orígenes de los primeros reinos peninsulares
Los orígenes de los primeros reinos peninsulares
palomaromero
 
Ndc2011 성능 향상을_위한_데이터베이스_아키텍쳐_구축_및_개발_가이드
Ndc2011 성능 향상을_위한_데이터베이스_아키텍쳐_구축_및_개발_가이드Ndc2011 성능 향상을_위한_데이터베이스_아키텍쳐_구축_및_개발_가이드
Ndc2011 성능 향상을_위한_데이터베이스_아키텍쳐_구축_및_개발_가이드
cranbe95
 
Sprint 2016 Confianza Creativa (4de4) Equipo
Sprint 2016 Confianza Creativa (4de4) EquipoSprint 2016 Confianza Creativa (4de4) Equipo
Sprint 2016 Confianza Creativa (4de4) Equipo
P3 Ventures
 
Congreso del Futuro España 2016
Congreso del Futuro España 2016Congreso del Futuro España 2016
Congreso del Futuro España 2016
P3 Ventures
 
Sprint 2016 Confianza Creativa 1de4
Sprint 2016 Confianza Creativa 1de4Sprint 2016 Confianza Creativa 1de4
Sprint 2016 Confianza Creativa 1de4
P3 Ventures
 

Viewers also liked (14)

Administrative portfolio
Administrative portfolioAdministrative portfolio
Administrative portfolio
 
Cartões método start treinamento
Cartões método start   treinamentoCartões método start   treinamento
Cartões método start treinamento
 
Cartões método start treinamento
Cartões método start   treinamentoCartões método start   treinamento
Cartões método start treinamento
 
활용예시를 통한 Sql server 2012의 향상된 프로그래밍 기능 엿보기
활용예시를 통한 Sql server 2012의 향상된 프로그래밍 기능 엿보기활용예시를 통한 Sql server 2012의 향상된 프로그래밍 기능 엿보기
활용예시를 통한 Sql server 2012의 향상된 프로그래밍 기능 엿보기
 
Website cscope overview
Website cscope overviewWebsite cscope overview
Website cscope overview
 
Guide4
Guide4Guide4
Guide4
 
sql server 고가용성
sql server 고가용성sql server 고가용성
sql server 고가용성
 
Sprint 2016 Confianza Creativa (3de4) Jobs-to-be-Done
Sprint 2016 Confianza Creativa (3de4) Jobs-to-be-DoneSprint 2016 Confianza Creativa (3de4) Jobs-to-be-Done
Sprint 2016 Confianza Creativa (3de4) Jobs-to-be-Done
 
Sprint 2016 Confianza Creativa (2de4) - Lean Startup
Sprint 2016 Confianza Creativa (2de4) - Lean Startup Sprint 2016 Confianza Creativa (2de4) - Lean Startup
Sprint 2016 Confianza Creativa (2de4) - Lean Startup
 
Los orígenes de los primeros reinos peninsulares
Los orígenes de los primeros reinos peninsularesLos orígenes de los primeros reinos peninsulares
Los orígenes de los primeros reinos peninsulares
 
Ndc2011 성능 향상을_위한_데이터베이스_아키텍쳐_구축_및_개발_가이드
Ndc2011 성능 향상을_위한_데이터베이스_아키텍쳐_구축_및_개발_가이드Ndc2011 성능 향상을_위한_데이터베이스_아키텍쳐_구축_및_개발_가이드
Ndc2011 성능 향상을_위한_데이터베이스_아키텍쳐_구축_및_개발_가이드
 
Sprint 2016 Confianza Creativa (4de4) Equipo
Sprint 2016 Confianza Creativa (4de4) EquipoSprint 2016 Confianza Creativa (4de4) Equipo
Sprint 2016 Confianza Creativa (4de4) Equipo
 
Congreso del Futuro España 2016
Congreso del Futuro España 2016Congreso del Futuro España 2016
Congreso del Futuro España 2016
 
Sprint 2016 Confianza Creativa 1de4
Sprint 2016 Confianza Creativa 1de4Sprint 2016 Confianza Creativa 1de4
Sprint 2016 Confianza Creativa 1de4
 

Similar to Cachegrind

Xdebug - Your first, last, and best option for troubleshooting PHP code
Xdebug - Your first, last, and best option for troubleshooting PHP codeXdebug - Your first, last, and best option for troubleshooting PHP code
Xdebug - Your first, last, and best option for troubleshooting PHP code
Adam Englander
 
Xdebug - Derick Rethans - Barcelona PHP Conference 2008
Xdebug - Derick Rethans - Barcelona PHP Conference 2008Xdebug - Derick Rethans - Barcelona PHP Conference 2008
Xdebug - Derick Rethans - Barcelona PHP Conference 2008
phpbarcelona
 
Xdebug
XdebugXdebug
Xdebug
Bryce Embry
 
Design Like a Pro: Scripting Best Practices
Design Like a Pro: Scripting Best PracticesDesign Like a Pro: Scripting Best Practices
Design Like a Pro: Scripting Best Practices
Inductive Automation
 
OSDC 2009 Rails Turtorial
OSDC 2009 Rails TurtorialOSDC 2009 Rails Turtorial
OSDC 2009 Rails Turtorial
Yi-Ting Cheng
 
Design Like a Pro: Scripting Best Practices
Design Like a Pro: Scripting Best PracticesDesign Like a Pro: Scripting Best Practices
Design Like a Pro: Scripting Best Practices
Inductive Automation
 
Building source code level profiler for C++.pdf
Building source code level profiler for C++.pdfBuilding source code level profiler for C++.pdf
Building source code level profiler for C++.pdf
ssuser28de9e
 
JS BASICS JAVA SCRIPT SCRIPTING
JS BASICS JAVA SCRIPT SCRIPTINGJS BASICS JAVA SCRIPT SCRIPTING
JS BASICS JAVA SCRIPT SCRIPTING
Arulkumar
 
XP Days 2019: First secret delivery for modern cloud-native applications
XP Days 2019: First secret delivery for modern cloud-native applicationsXP Days 2019: First secret delivery for modern cloud-native applications
XP Days 2019: First secret delivery for modern cloud-native applications
Vlad Fedosov
 
More about PHP
More about PHPMore about PHP
More about PHP
Jonathan Francis Roscoe
 
JavaScriptL18 [Autosaved].pptx
JavaScriptL18 [Autosaved].pptxJavaScriptL18 [Autosaved].pptx
JavaScriptL18 [Autosaved].pptx
VivekBaghel30
 
Practical C++ Generative Programming
Practical C++ Generative ProgrammingPractical C++ Generative Programming
Practical C++ Generative Programming
Schalk Cronjé
 
Why Browser Debugger is a Developer's Best Friend
Why Browser Debugger is a Developer's Best FriendWhy Browser Debugger is a Developer's Best Friend
Why Browser Debugger is a Developer's Best Friend
Odoo
 
How to secure your web applications with NGINX
How to secure your web applications with NGINXHow to secure your web applications with NGINX
How to secure your web applications with NGINX
Wallarm
 
PostgreSQL Performance Problems: Monitoring and Alerting
PostgreSQL Performance Problems: Monitoring and AlertingPostgreSQL Performance Problems: Monitoring and Alerting
PostgreSQL Performance Problems: Monitoring and Alerting
Grant Fritchey
 
Practical catalyst
Practical catalystPractical catalyst
Practical catalyst
dwm042
 
Apex code Benchmarking
Apex code BenchmarkingApex code Benchmarking
Apex code Benchmarking
Amit Chaudhary
 
Масштабируемый и эффективный фаззинг Google Chrome
Масштабируемый и эффективный фаззинг Google ChromeМасштабируемый и эффективный фаззинг Google Chrome
Масштабируемый и эффективный фаззинг Google Chrome
Positive Hack Days
 
Server side tempalate injection
Server side tempalate injectionServer side tempalate injection
Server side tempalate injection
Narendra Kumar
 
Server side tempalate injection
Server side tempalate injectionServer side tempalate injection
Server side tempalate injection
Narendra Kumar
 

Similar to Cachegrind (20)

Xdebug - Your first, last, and best option for troubleshooting PHP code
Xdebug - Your first, last, and best option for troubleshooting PHP codeXdebug - Your first, last, and best option for troubleshooting PHP code
Xdebug - Your first, last, and best option for troubleshooting PHP code
 
Xdebug - Derick Rethans - Barcelona PHP Conference 2008
Xdebug - Derick Rethans - Barcelona PHP Conference 2008Xdebug - Derick Rethans - Barcelona PHP Conference 2008
Xdebug - Derick Rethans - Barcelona PHP Conference 2008
 
Xdebug
XdebugXdebug
Xdebug
 
Design Like a Pro: Scripting Best Practices
Design Like a Pro: Scripting Best PracticesDesign Like a Pro: Scripting Best Practices
Design Like a Pro: Scripting Best Practices
 
OSDC 2009 Rails Turtorial
OSDC 2009 Rails TurtorialOSDC 2009 Rails Turtorial
OSDC 2009 Rails Turtorial
 
Design Like a Pro: Scripting Best Practices
Design Like a Pro: Scripting Best PracticesDesign Like a Pro: Scripting Best Practices
Design Like a Pro: Scripting Best Practices
 
Building source code level profiler for C++.pdf
Building source code level profiler for C++.pdfBuilding source code level profiler for C++.pdf
Building source code level profiler for C++.pdf
 
JS BASICS JAVA SCRIPT SCRIPTING
JS BASICS JAVA SCRIPT SCRIPTINGJS BASICS JAVA SCRIPT SCRIPTING
JS BASICS JAVA SCRIPT SCRIPTING
 
XP Days 2019: First secret delivery for modern cloud-native applications
XP Days 2019: First secret delivery for modern cloud-native applicationsXP Days 2019: First secret delivery for modern cloud-native applications
XP Days 2019: First secret delivery for modern cloud-native applications
 
More about PHP
More about PHPMore about PHP
More about PHP
 
JavaScriptL18 [Autosaved].pptx
JavaScriptL18 [Autosaved].pptxJavaScriptL18 [Autosaved].pptx
JavaScriptL18 [Autosaved].pptx
 
Practical C++ Generative Programming
Practical C++ Generative ProgrammingPractical C++ Generative Programming
Practical C++ Generative Programming
 
Why Browser Debugger is a Developer's Best Friend
Why Browser Debugger is a Developer's Best FriendWhy Browser Debugger is a Developer's Best Friend
Why Browser Debugger is a Developer's Best Friend
 
How to secure your web applications with NGINX
How to secure your web applications with NGINXHow to secure your web applications with NGINX
How to secure your web applications with NGINX
 
PostgreSQL Performance Problems: Monitoring and Alerting
PostgreSQL Performance Problems: Monitoring and AlertingPostgreSQL Performance Problems: Monitoring and Alerting
PostgreSQL Performance Problems: Monitoring and Alerting
 
Practical catalyst
Practical catalystPractical catalyst
Practical catalyst
 
Apex code Benchmarking
Apex code BenchmarkingApex code Benchmarking
Apex code Benchmarking
 
Масштабируемый и эффективный фаззинг Google Chrome
Масштабируемый и эффективный фаззинг Google ChromeМасштабируемый и эффективный фаззинг Google Chrome
Масштабируемый и эффективный фаззинг Google Chrome
 
Server side tempalate injection
Server side tempalate injectionServer side tempalate injection
Server side tempalate injection
 
Server side tempalate injection
Server side tempalate injectionServer side tempalate injection
Server side tempalate injection
 

Cachegrind

  • 1. Cachegrind 101 A quick introduction into profiling
  • 2.
  • 6. Evaluating your code flow2 What is Cachegrind?
  • 7. PHP config file: xdebug.profiler_enable=1 xdebug.profiler_output_dir="D:achegrindquot; xdebug.profiler_output_name="cachegrind.out.%t-%p-%s.txt" MastersPortal configuration: Enable template cache: <template> <template_cache>true</template_cache> </template> 3 Getting started
  • 8. Before looking at the Overall tab, use the regex expression ^[^T4T] Walk through your function, starting at its call and check if: Self times are in line with the amount of code in it Cumulative times do not show major peaks Functions are called according to expectations Getters, setters and other quick functions are not called ridiculously often Total time !== real execution time 4 Tips