SlideShare ist ein Scribd-Unternehmen logo
1 von 29
Downloaden Sie, um offline zu lesen
Emir Beganović • April 19th 2018
Profiling and inspection

with Blackfire
Agenda
• Introduction
• Performance as a feature
• Profiling and analysis
• Metrics
• Continuous Integration
• Q&A
Profiling and inspection
About me
Profiling and inspection
• Backend Developer @ Shpock
• Zend Certified PHP Engineer
• 7+ years of development career
• open source contributor
GitHub: @emirb
emir@php.net
Disclaimer
Profiling and inspection
40% of users
abandon a website
that takes more than
3 seconds toload
Solvingissuesinproductioncostsalot
morethansolvingthemindevelopment
Performance as a feature
Profiling and inspection
Backend Developer @ Shpock
Zend Certified PHP Engineer
7+ years of development career
open source contributor
GitHub: @emirb
emir@php.net
Performance as a feature
Profiling and inspection
Backend Developer @ Shpock
Zend Certified PHP Engineer
7+ years of development career
open source contributor
GitHub: @emirb
emir@php.net
Old-school don'ts
Profiling and inspection
- microtime()
- memory_get_usage()
- memory_get_peak_usage()
In-depth analysis with Blackfire
Walltime I/O CPU Memory Network SQL
Profiling and inspection
History
Profiling and inspection
- built by SensioLabs, people behind Symfony
- available since spring 2015
- supports all platforms
- concentrated on PHP
Installation
Profiling and inspection
- consists of agent and extension
- optionally (recommended): Chrome
extension
- platform support:
-
Profiling possibilities
Profiling and inspection
- Extension: browser requests within Chrome
- CLI with curl
- manually inside the code (PHP SDK)
- daemons using signals
- profiling in production: yes
Production?
Profiling and inspection
Let's profile!
Profiling and inspection
Analysis
Profiling and inspection
Let's optimise & verify
Profiling and inspection
References
Profiling and inspection
Metrics
Profiling and inspection
- hundreds of built-in metrics:
- Symfony
- Laravel
- Drupal
- Doctrine
- Memcache
- Redis
- internal calls
Custom metrics
Profiling and inspection
metrics:
cache.write: # metric name
label: "Cache::write() calls"
matching_calls:
php:
- callee:
selector: '=Cache::write'
Testing custom metrics
Profiling and inspection
tests:
"Ensure that Cache::write() calls do not
consume too much memory":
path: "/.*"
assertions:
- "metrics.cache.write.peak_memory
< 10mb"
Assertions
Profiling and inspection
Privacy
Profiling and inspection
- anonymisation of:
- function arguments
- SQL queries
- HTTP queries
- file locations
- calls verifiable through Blackfire proxy (SDK)
- on-premise version for large clients
blackfire.io
ContinuousPerformance
Testing
Profiling and inspection
Continuous Integration
Profiling and inspection
- Travis, Jenkins, anywhere - simple webhook
curl -X POST https://blackfire.io/api/v1/build/
env/ENV-UUID/webhook 
--user "userid" 
-d "endpoint=http://myapp.com/" 
-d "title=Deployed c589252"
Pricing
Profiling and inspection
Special20%discount for
ViennaPHPmembers
ViennaPHP2018
Questions?
Profiling and inspection
Thanks.

Weitere ähnliche Inhalte

Ähnlich wie Profiling and inspection with Blackfire.io

Froyo to kit kat two years developing & maintaining deliradio
Froyo to kit kat   two years developing & maintaining deliradioFroyo to kit kat   two years developing & maintaining deliradio
Froyo to kit kat two years developing & maintaining deliradio
Droidcon Berlin
 
Yahoo! BOSS API external 20091001
Yahoo! BOSS API external 20091001Yahoo! BOSS API external 20091001
Yahoo! BOSS API external 20091001
Fred Meng
 

Ähnlich wie Profiling and inspection with Blackfire.io (20)

Busy Developers Guide to AngularJS (Tiberiu Covaci)
Busy Developers Guide to AngularJS (Tiberiu Covaci)Busy Developers Guide to AngularJS (Tiberiu Covaci)
Busy Developers Guide to AngularJS (Tiberiu Covaci)
 
from ai.backend import python @ pycontw2018
from ai.backend import python @ pycontw2018from ai.backend import python @ pycontw2018
from ai.backend import python @ pycontw2018
 
Building RESTful APIs
Building RESTful APIsBuilding RESTful APIs
Building RESTful APIs
 
Testing Testing everywhere
Testing Testing everywhereTesting Testing everywhere
Testing Testing everywhere
 
Alfresco Development Framework Basic
Alfresco Development Framework BasicAlfresco Development Framework Basic
Alfresco Development Framework Basic
 
How do JavaScript frameworks impact the security of applications?
How do JavaScript frameworks impact the security of applications?How do JavaScript frameworks impact the security of applications?
How do JavaScript frameworks impact the security of applications?
 
Delivering High Performance Ecommerce with Magento Commerce Cloud
Delivering High Performance Ecommerce with Magento Commerce CloudDelivering High Performance Ecommerce with Magento Commerce Cloud
Delivering High Performance Ecommerce with Magento Commerce Cloud
 
Building APIs in an easy way using API Platform
Building APIs in an easy way using API PlatformBuilding APIs in an easy way using API Platform
Building APIs in an easy way using API Platform
 
Michal Brygidyn_CloudHackingScenarios.pdf
Michal Brygidyn_CloudHackingScenarios.pdfMichal Brygidyn_CloudHackingScenarios.pdf
Michal Brygidyn_CloudHackingScenarios.pdf
 
OWASP SF - Reviewing Modern JavaScript Applications
OWASP SF - Reviewing Modern JavaScript ApplicationsOWASP SF - Reviewing Modern JavaScript Applications
OWASP SF - Reviewing Modern JavaScript Applications
 
Codeigniter
CodeigniterCodeigniter
Codeigniter
 
Introduction to cypress in Angular (Chinese)
Introduction to cypress in Angular (Chinese)Introduction to cypress in Angular (Chinese)
Introduction to cypress in Angular (Chinese)
 
Froyo to kit kat two years developing & maintaining deliradio
Froyo to kit kat   two years developing & maintaining deliradioFroyo to kit kat   two years developing & maintaining deliradio
Froyo to kit kat two years developing & maintaining deliradio
 
Code review and security audit in private cloud - Arief Karfianto
Code review and security audit in private cloud - Arief KarfiantoCode review and security audit in private cloud - Arief Karfianto
Code review and security audit in private cloud - Arief Karfianto
 
SANS_PentestHackfest_2022-PurpleTeam_Cloud_Identity.pptx
SANS_PentestHackfest_2022-PurpleTeam_Cloud_Identity.pptxSANS_PentestHackfest_2022-PurpleTeam_Cloud_Identity.pptx
SANS_PentestHackfest_2022-PurpleTeam_Cloud_Identity.pptx
 
Useful practices of creation automatic tests by using cucumber jvm
Useful practices of creation automatic tests by using cucumber jvmUseful practices of creation automatic tests by using cucumber jvm
Useful practices of creation automatic tests by using cucumber jvm
 
Continuous Integration/ Continuous Delivery of web applications
Continuous Integration/ Continuous Delivery of web applicationsContinuous Integration/ Continuous Delivery of web applications
Continuous Integration/ Continuous Delivery of web applications
 
Continuous integration / continuous delivery
Continuous integration / continuous deliveryContinuous integration / continuous delivery
Continuous integration / continuous delivery
 
Yahoo! BOSS API external 20091001
Yahoo! BOSS API external 20091001Yahoo! BOSS API external 20091001
Yahoo! BOSS API external 20091001
 
Y Boss External 20091017
Y Boss External 20091017Y Boss External 20091017
Y Boss External 20091017
 

Kürzlich hochgeladen

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 

Kürzlich hochgeladen (20)

Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
A Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source MilvusA Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source Milvus
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 

Profiling and inspection with Blackfire.io