SlideShare uma empresa Scribd logo
1 de 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

Mais conteúdo relacionado

Semelhante a 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
 

Semelhante a 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...
 

Último

Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)OPEN KNOWLEDGE GmbH
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️anilsa9823
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackVICTOR MAESTRE RAMIREZ
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...OnePlan Solutions
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataBradBedford3
 
Active Directory Penetration Testing, cionsystems.com.pdf
Active Directory Penetration Testing, cionsystems.com.pdfActive Directory Penetration Testing, cionsystems.com.pdf
Active Directory Penetration Testing, cionsystems.com.pdfCionsystems
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...soniya singh
 
Test Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and BackendTest Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and BackendArshad QA
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsAndolasoft Inc
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfkalichargn70th171
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantAxelRicardoTrocheRiq
 
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
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionSolGuruz
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...OnePlan Solutions
 
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
 
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
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxbodapatigopi8531
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about usDynamic Netsoft
 

Último (20)

Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStack
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...
 
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS LiveVip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
 
Active Directory Penetration Testing, cionsystems.com.pdf
Active Directory Penetration Testing, cionsystems.com.pdfActive Directory Penetration Testing, cionsystems.com.pdf
Active Directory Penetration Testing, cionsystems.com.pdf
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
 
Test Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and BackendTest Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and Backend
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.js
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service Consultant
 
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
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with Precision
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
 
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...
 
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
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptx
 
Exploring iOS App Development: Simplifying the Process
Exploring iOS App Development: Simplifying the ProcessExploring iOS App Development: Simplifying the Process
Exploring iOS App Development: Simplifying the Process
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about us
 

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

Notas do Editor

  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