SlideShare a Scribd company logo
1 of 33
Web performance:
Measuring user experience
Giorgos Bamparopoulos
About me
Senior software engineer – Bet365
www.meetup.com/manchester-node-workshop
@bamparopoulos
@bamparopoulos
www.bamparopoulos.com
What is performance?
Is it worth it?
o 53% of mobile site visits were abandoned if a page took longer than 3s to load [1]
o Sites loading within 5s had 70% longer sessions, 35% lower bounce rates, and 25%
higher ad viewability than sites taking nearly four times longer at 19s [1]
o Pinterest increased search engine traffic and sign-ups by 15% when they reduced
perceived wait times by 40% [2]
Impact calculator tool: https://www.thinkwithgoogle.com/feature/testmysite
MYTHBUSTERS – Dev edition
Performance myth #1
User performance can be measured with a single
number!
… but there are many metrics!
o Site speed is not as simple as having a single score
o We need to look at the entire picture: What are the metrics that make up you site’s
performance?
o It’s a distribution
* https://developers.google.com/web/fundamentals/performance/user-centric-performance-metrics
Performance and user experience can be captured with
a single user!
Performance myth #2
Different conditions!
User conditions vary depending on many factors:
o Network conditions
o Connection speed
o Device / hardware
o Browser
o Cache
* https://testsigma.com/blog/cloud-based-cross-browser-testing-tools-advantages
Performance myth #3
You only need to care about performance at load time!
It’s an entire experience!
o Users associate performance with their overall experience
o Bad user experiences can happen at any time
* https://www.sparksinteractive.co.nz/services/user-interface-design
 Clicks
 Toggling form controls
 Tabs
 Swipes
 Scrolls
 Animations
RAIL Model
Process events in
under 50ms
Produce a frame in
10ms
Maximize idle time Become interactive
in under 5 seconds
Developer testing vs real world
Debugging / Development
Same environment
Real world traffic
Benchmarking
Developer
Real-world user experience
Correlation to business KPIs
Debugging
Analysis
Real-world
Data capture
Data storage
Reporting
Analysis
Optimisation
Real user monitoring (RUM)
User experience
What users think?
How do they perceive performance?
o Is it happening?
o Is it useful?
o Is it usable?
o Is it delightful?
“ Google developers “
Performance metrics
o First Paint (FP) - The first elements of the web page are rendered
o First Contentful Paint (FCP) - More elements are rendered on the page
o First Meaningful Paint (FMP) - Most important element of a page are visible
o Time To Interactive (TTI) - When the user can interact with the page
o Long Tasks (LT) - Tasks that block the main thread (50 ms or more)
… More!
Loading…
* https://developers.google.com/web/fundamentals/performance/rail
Is it loading?
What is your most important element?
How to measure: Web APIs
o Performance Timeline
o User Timing API
o Navigation Timing API
o Resource Timing API
…browser support?
Performance entry
Single performance metric that is part of the performance timeline
o Navigation
o Resource (images, scripts, fonts, videos, iframes,…)
o Paint (“render”)
o Long task
o Application entry (mark / measure)
Properties: name, entryType, startTime, duration
Retrieves performance entry metrics:
o getEntries() - Gets all entries in the timeline
o getEntriesByType(type) - Gets all entries of the specified type (e.g. resource, mark)
o getEntriesByName(name, type) - Gets all entries with the specified name (e.g. name)
Performance timeline
Navigation entries
o Provides data that can be used to measure the performance of a web site
o Breaks down the events required to retrieve and display webpages and provides
timestamps
https://www.w3.org/TR/navigation-timing-2
Getting navigation entries
Navigation entry:
Resource entries
o Performance metrics about all the resources
o Uses concepts of navigation
o Includes transfer size, encoded body size, decoded body size
o Waterfall shows all resources fetched from the network in a timeline
Paint entries
When browser converts the render tree to pixels on the screen:
o First paint
o First contentful paint
o Measuring page load
o Send all timestamps to analytics
o Raise an event if any resource takes more than expected to download
o Track specific resources (e.g. third-party ads or analytics)
o Event listeners – How long did it take?
Use cases
Sending metrics to server
o Gather all user data from pages
o Send data to the server before unloading the document
o Beacon API
Analysing results
o Benchmarking
o Correlate with business metrics
o Histograms
o Distributions
o Web / mobile
o Browser
o Geographic locations
o Percentiles
Tools for performance testing
o Waterfall: https://github.com/andydavies/waterfall
o Perfmap: https://github.com/zeman/perfmap
o Performance bookmarklet: https://github.com/nurun/performance-bookmarklet
o Elastic APM RUM agent: https://github.com/elastic/apm-agent-rum-js
o Boomerang: https://github.com/akamai/boomerang
What’s next? Prevent regression!
The goal is to be faster!
o Testing both in lab and real world
o Get notifications if performance regresses
o Integrate performance tests in the CI
Any questions?
Thank you for your time!
1. https://developers.google.com/web/fundamentals/performance/why-performance-matters
2. https://medium.com/pinterest-engineering/driving-user-growth-with-performance-improvements-cfc50dafadd7
3. https://developer.mozilla.org/en-US/docs/Web/API
4. https://developers.google.com/web/fundamentals/performance/speed-tools
5. https://developers.google.com/web/fundamentals/performance/user-centric-performance-metrics
6. https://www.w3.org/TR/performance-timeline-2
7. https://www.w3.org/TR/navigation-timing-2
8. https://www.w3.org/TR/resource-timing-2
9. https://www.w3.org/TR/user-timing-2
10. https://nicj.net/resourcetiming-in-practice/#resourcetiming-in-practice-updates
11. https://developers.google.com/web/fundamentals/performance/rail
12. https://wicg.github.io/largest-contentful-paint/#dom-largestcontentfulpaint-rendertime
References

More Related Content

Similar to Measuring web performance with user-centric metrics

Capturing speed of user experience using user timing api
Capturing speed of user experience using user timing apiCapturing speed of user experience using user timing api
Capturing speed of user experience using user timing apiSergeyChernyshev
 
Website Parameters.pptx
Website Parameters.pptxWebsite Parameters.pptx
Website Parameters.pptxASHAVI2
 
Metrics, Metrics Everywhere (but where the heck do you start?)
Metrics, Metrics Everywhere (but where the heck do you start?)Metrics, Metrics Everywhere (but where the heck do you start?)
Metrics, Metrics Everywhere (but where the heck do you start?)SOASTA
 
Metrics, Metrics Everywhere (but where the heck do you start?)
Metrics, Metrics Everywhere (but where the heck do you start?)Metrics, Metrics Everywhere (but where the heck do you start?)
Metrics, Metrics Everywhere (but where the heck do you start?)SOASTA
 
Metrics, metrics everywhere (but where the heck do you start?)
Metrics, metrics everywhere (but where the heck do you start?)Metrics, metrics everywhere (but where the heck do you start?)
Metrics, metrics everywhere (but where the heck do you start?)Tammy Everts
 
Demystifying Web Vitals
Demystifying Web VitalsDemystifying Web Vitals
Demystifying Web VitalsSamar Panda
 
Yandex Metrica - SEO Meet-up Melbourne
Yandex Metrica - SEO Meet-up MelbourneYandex Metrica - SEO Meet-up Melbourne
Yandex Metrica - SEO Meet-up MelbourneAnton Surov
 
Using Automation to Meet Demands for Performance and Quality
Using Automation to Meet Demands for Performance and QualityUsing Automation to Meet Demands for Performance and Quality
Using Automation to Meet Demands for Performance and QualityNeotys
 
How to create a performance-first culture [2018 WebPerfDays Amsterdam]
How to create a performance-first culture [2018 WebPerfDays Amsterdam]How to create a performance-first culture [2018 WebPerfDays Amsterdam]
How to create a performance-first culture [2018 WebPerfDays Amsterdam]Tammy Everts
 
Page Experience: Google's New Search Algorithm Update
Page Experience: Google's New Search Algorithm UpdatePage Experience: Google's New Search Algorithm Update
Page Experience: Google's New Search Algorithm UpdateDBS Interactive
 
Improving frontend performance
Improving frontend performanceImproving frontend performance
Improving frontend performanceSagar Desarda
 
MeasureWorks - Why your customers don't like to wait!
MeasureWorks - Why your customers don't like to wait!MeasureWorks - Why your customers don't like to wait!
MeasureWorks - Why your customers don't like to wait!MeasureWorks
 
How to prepare for Google's page experience update
How to prepare for Google's page experience updateHow to prepare for Google's page experience update
How to prepare for Google's page experience updateBuiltvisible
 
2020 Chrome Dev Summit: Web Performance 101
2020 Chrome Dev Summit: Web Performance 1012020 Chrome Dev Summit: Web Performance 101
2020 Chrome Dev Summit: Web Performance 101Tammy Everts
 
538210-rc220-rum
538210-rc220-rum538210-rc220-rum
538210-rc220-rumDan Boutin
 
Measure camp tools of the cro rabble
Measure camp   tools of the cro rabbleMeasure camp   tools of the cro rabble
Measure camp tools of the cro rabbleCraig Sullivan
 
Data Driven Design: Using Web Analytics to Improve Information Architectures
Data Driven Design: Using Web Analytics to Improve Information ArchitecturesData Driven Design: Using Web Analytics to Improve Information Architectures
Data Driven Design: Using Web Analytics to Improve Information ArchitecturesAndrea Wiggins
 
The Best of Both Worlds - Combining Performance and Functional Mobile App Tes...
The Best of Both Worlds - Combining Performance and Functional Mobile App Tes...The Best of Both Worlds - Combining Performance and Functional Mobile App Tes...
The Best of Both Worlds - Combining Performance and Functional Mobile App Tes...Bitbar
 

Similar to Measuring web performance with user-centric metrics (20)

Capturing speed of user experience using user timing api
Capturing speed of user experience using user timing apiCapturing speed of user experience using user timing api
Capturing speed of user experience using user timing api
 
Website Parameters.pptx
Website Parameters.pptxWebsite Parameters.pptx
Website Parameters.pptx
 
Metrics, Metrics Everywhere (but where the heck do you start?)
Metrics, Metrics Everywhere (but where the heck do you start?)Metrics, Metrics Everywhere (but where the heck do you start?)
Metrics, Metrics Everywhere (but where the heck do you start?)
 
Metrics, Metrics Everywhere (but where the heck do you start?)
Metrics, Metrics Everywhere (but where the heck do you start?)Metrics, Metrics Everywhere (but where the heck do you start?)
Metrics, Metrics Everywhere (but where the heck do you start?)
 
Metrics, metrics everywhere (but where the heck do you start?)
Metrics, metrics everywhere (but where the heck do you start?)Metrics, metrics everywhere (but where the heck do you start?)
Metrics, metrics everywhere (but where the heck do you start?)
 
Demystifying Web Vitals
Demystifying Web VitalsDemystifying Web Vitals
Demystifying Web Vitals
 
Yandex Metrica - SEO Meet-up Melbourne
Yandex Metrica - SEO Meet-up MelbourneYandex Metrica - SEO Meet-up Melbourne
Yandex Metrica - SEO Meet-up Melbourne
 
Using Automation to Meet Demands for Performance and Quality
Using Automation to Meet Demands for Performance and QualityUsing Automation to Meet Demands for Performance and Quality
Using Automation to Meet Demands for Performance and Quality
 
How to create a performance-first culture [2018 WebPerfDays Amsterdam]
How to create a performance-first culture [2018 WebPerfDays Amsterdam]How to create a performance-first culture [2018 WebPerfDays Amsterdam]
How to create a performance-first culture [2018 WebPerfDays Amsterdam]
 
Page Experience: Google's New Search Algorithm Update
Page Experience: Google's New Search Algorithm UpdatePage Experience: Google's New Search Algorithm Update
Page Experience: Google's New Search Algorithm Update
 
Improving frontend performance
Improving frontend performanceImproving frontend performance
Improving frontend performance
 
MeasureWorks - Why your customers don't like to wait!
MeasureWorks - Why your customers don't like to wait!MeasureWorks - Why your customers don't like to wait!
MeasureWorks - Why your customers don't like to wait!
 
How to prepare for Google's page experience update
How to prepare for Google's page experience updateHow to prepare for Google's page experience update
How to prepare for Google's page experience update
 
2020 Chrome Dev Summit: Web Performance 101
2020 Chrome Dev Summit: Web Performance 1012020 Chrome Dev Summit: Web Performance 101
2020 Chrome Dev Summit: Web Performance 101
 
DZone-RUM
DZone-RUMDZone-RUM
DZone-RUM
 
538210-rc220-rum
538210-rc220-rum538210-rc220-rum
538210-rc220-rum
 
538210 rc220-rum
538210 rc220-rum538210 rc220-rum
538210 rc220-rum
 
Measure camp tools of the cro rabble
Measure camp   tools of the cro rabbleMeasure camp   tools of the cro rabble
Measure camp tools of the cro rabble
 
Data Driven Design: Using Web Analytics to Improve Information Architectures
Data Driven Design: Using Web Analytics to Improve Information ArchitecturesData Driven Design: Using Web Analytics to Improve Information Architectures
Data Driven Design: Using Web Analytics to Improve Information Architectures
 
The Best of Both Worlds - Combining Performance and Functional Mobile App Tes...
The Best of Both Worlds - Combining Performance and Functional Mobile App Tes...The Best of Both Worlds - Combining Performance and Functional Mobile App Tes...
The Best of Both Worlds - Combining Performance and Functional Mobile App Tes...
 

Recently uploaded

Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsAlberto González Trastoy
 
8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech studentsHimanshiGarg82
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...ICS
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Modelsaagamshah0812
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...Health
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...panagenda
 
%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrandmasabamasaba
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisamasabamasaba
 
Define the academic and professional writing..pdf
Define the academic and professional writing..pdfDefine the academic and professional writing..pdf
Define the academic and professional writing..pdfPearlKirahMaeRagusta1
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnAmarnathKambale
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️Delhi Call girls
 
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...kalichargn70th171
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Steffen Staab
 
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park %in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park masabamasaba
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsArshad QA
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfkalichargn70th171
 
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionIntroducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionOnePlan Solutions
 
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...SelfMade bd
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVshikhaohhpro
 

Recently uploaded (20)

Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
Define the academic and professional writing..pdf
Define the academic and professional writing..pdfDefine the academic and professional writing..pdf
Define the academic and professional writing..pdf
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learn
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park %in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionIntroducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
 
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 

Measuring web performance with user-centric metrics

  • 1. Web performance: Measuring user experience Giorgos Bamparopoulos
  • 2. About me Senior software engineer – Bet365 www.meetup.com/manchester-node-workshop @bamparopoulos @bamparopoulos www.bamparopoulos.com
  • 4. Is it worth it? o 53% of mobile site visits were abandoned if a page took longer than 3s to load [1] o Sites loading within 5s had 70% longer sessions, 35% lower bounce rates, and 25% higher ad viewability than sites taking nearly four times longer at 19s [1] o Pinterest increased search engine traffic and sign-ups by 15% when they reduced perceived wait times by 40% [2] Impact calculator tool: https://www.thinkwithgoogle.com/feature/testmysite
  • 6. Performance myth #1 User performance can be measured with a single number!
  • 7. … but there are many metrics! o Site speed is not as simple as having a single score o We need to look at the entire picture: What are the metrics that make up you site’s performance? o It’s a distribution * https://developers.google.com/web/fundamentals/performance/user-centric-performance-metrics
  • 8. Performance and user experience can be captured with a single user! Performance myth #2
  • 9. Different conditions! User conditions vary depending on many factors: o Network conditions o Connection speed o Device / hardware o Browser o Cache * https://testsigma.com/blog/cloud-based-cross-browser-testing-tools-advantages
  • 10. Performance myth #3 You only need to care about performance at load time!
  • 11. It’s an entire experience! o Users associate performance with their overall experience o Bad user experiences can happen at any time * https://www.sparksinteractive.co.nz/services/user-interface-design  Clicks  Toggling form controls  Tabs  Swipes  Scrolls  Animations
  • 12. RAIL Model Process events in under 50ms Produce a frame in 10ms Maximize idle time Become interactive in under 5 seconds
  • 13. Developer testing vs real world Debugging / Development Same environment Real world traffic Benchmarking Developer Real-world user experience Correlation to business KPIs Debugging Analysis Real-world
  • 15. User experience What users think? How do they perceive performance? o Is it happening? o Is it useful? o Is it usable? o Is it delightful? “ Google developers “
  • 16. Performance metrics o First Paint (FP) - The first elements of the web page are rendered o First Contentful Paint (FCP) - More elements are rendered on the page o First Meaningful Paint (FMP) - Most important element of a page are visible o Time To Interactive (TTI) - When the user can interact with the page o Long Tasks (LT) - Tasks that block the main thread (50 ms or more) … More!
  • 19. What is your most important element?
  • 20. How to measure: Web APIs o Performance Timeline o User Timing API o Navigation Timing API o Resource Timing API …browser support?
  • 21. Performance entry Single performance metric that is part of the performance timeline o Navigation o Resource (images, scripts, fonts, videos, iframes,…) o Paint (“render”) o Long task o Application entry (mark / measure) Properties: name, entryType, startTime, duration
  • 22. Retrieves performance entry metrics: o getEntries() - Gets all entries in the timeline o getEntriesByType(type) - Gets all entries of the specified type (e.g. resource, mark) o getEntriesByName(name, type) - Gets all entries with the specified name (e.g. name) Performance timeline
  • 23. Navigation entries o Provides data that can be used to measure the performance of a web site o Breaks down the events required to retrieve and display webpages and provides timestamps https://www.w3.org/TR/navigation-timing-2
  • 25. Resource entries o Performance metrics about all the resources o Uses concepts of navigation o Includes transfer size, encoded body size, decoded body size o Waterfall shows all resources fetched from the network in a timeline
  • 26. Paint entries When browser converts the render tree to pixels on the screen: o First paint o First contentful paint
  • 27. o Measuring page load o Send all timestamps to analytics o Raise an event if any resource takes more than expected to download o Track specific resources (e.g. third-party ads or analytics) o Event listeners – How long did it take? Use cases
  • 28. Sending metrics to server o Gather all user data from pages o Send data to the server before unloading the document o Beacon API
  • 29. Analysing results o Benchmarking o Correlate with business metrics o Histograms o Distributions o Web / mobile o Browser o Geographic locations o Percentiles
  • 30. Tools for performance testing o Waterfall: https://github.com/andydavies/waterfall o Perfmap: https://github.com/zeman/perfmap o Performance bookmarklet: https://github.com/nurun/performance-bookmarklet o Elastic APM RUM agent: https://github.com/elastic/apm-agent-rum-js o Boomerang: https://github.com/akamai/boomerang
  • 31. What’s next? Prevent regression! The goal is to be faster! o Testing both in lab and real world o Get notifications if performance regresses o Integrate performance tests in the CI
  • 32. Any questions? Thank you for your time!
  • 33. 1. https://developers.google.com/web/fundamentals/performance/why-performance-matters 2. https://medium.com/pinterest-engineering/driving-user-growth-with-performance-improvements-cfc50dafadd7 3. https://developer.mozilla.org/en-US/docs/Web/API 4. https://developers.google.com/web/fundamentals/performance/speed-tools 5. https://developers.google.com/web/fundamentals/performance/user-centric-performance-metrics 6. https://www.w3.org/TR/performance-timeline-2 7. https://www.w3.org/TR/navigation-timing-2 8. https://www.w3.org/TR/resource-timing-2 9. https://www.w3.org/TR/user-timing-2 10. https://nicj.net/resourcetiming-in-practice/#resourcetiming-in-practice-updates 11. https://developers.google.com/web/fundamentals/performance/rail 12. https://wicg.github.io/largest-contentful-paint/#dom-largestcontentfulpaint-rendertime References

Editor's Notes

  1. Performance model that breaks down the user’s experience into key actions
  2. Did the navigation started? Is there any indication? Useful: Has the most important content rendered yet? Usable: Can the use interact with the content? It delightful? Is it consistent? Is the overall experiences good?
  3. DomContentLoaded? load
  4. requestAnimationFrame etc? Web APIs: used by speed tools (google dev tools, lighthouse, webpage test)
  5. A single timestamp or a collection of timestamps
  6. Recommend to send plain metrics Maybe NoSQL (mongo)
  7. Google analytics Data visualization libraries
  8. lighthouse