AtlasCamp 2013: Show Me Number! Automated Browser Performance Testing
- 2. Show Me the Numbers
Automated Browser Performance Testing
Chris Mountford
Senior Software Developer, JIRA
Atlassian
@chromosundrift
2
- 15. Outline
• Intro
• Optimisation Techniques
• JavaScript Renaissance
Engineering
• Perception
• Performance Factors
• Gotchas
• Take Aways
• JIRA Perf Tests
8
- 16. Outline
• Intro
• Optimisation Techniques
• JavaScript Renaissance
Engineering
• Perception
• Performance Factors
• Gotchas
• Take Aways
• JIRA Perf Tests
8
- 28. “Why do we split everything
into so many files?”
13
- 29. “Why do we split everything
into so many files?”
“Performance.”
13
- 31. “Why do we merge all the files
into large batches?”
14
- 32. “Why do we merge all the files
into large batches?”
“Performance.”
14
- 38. “ If all we have are opinions, let’s go
with mine.
”
If we have data, let’s look at data.
Netscape
CEO
– Jim Barksdale
17
- 40. Mobile Web
• Everything is the same but worse
• network / radio power mode steps, sleep, etc.
• cpu / battery impact
• memory
• standards compliance
• tooling
19
- 43. JavaScript Execution
• JS Engines
• native bind(), map() etc
• DOM Manipulation
• events
• JQuery
• Sizzle selectors
• micro-optimisation ☠
• Memory leaks
22
- 53. But wait, there’s more!
• CSS Transforms
• Hardware acceleration?
• Data weight
• Concurrent request count
• Inline Base64 Encoded resources
28
- 54. But wait, there’s more!
• CSS Transforms
• Hardware acceleration?
• Data weight
• Concurrent request count
• Inline Base64 Encoded resources
28
- 63. JIRA Browser Perf Tests
Koto
Charts
Hacking
Page
Objects
Soke
Framework
Plugin
DB
Bamboo
30
- 64. JIRA Browser Perf Tests
Koto
Charts
Psycho
Events
Hacking
Page
Objects
Soke
Framework
Plugin
DB
Bamboo
30
- 65. JIRA Browser Perf Tests
Koto
Charts
Psycho
Events
OnDemand
Analytics
Hacking
Page
Objects
Soke
Framework
Plugin
DB
Bamboo
30
- 66. JIRA Browser Perf Tests
Baselines
Koto
Charts
Psycho
Events
OnDemand
Analytics
Hacking
Page
Objects
Soke
Framework
Plugin
DB
Bamboo
30
- 67. JIRA Browser Perf Tests
Baselines
Koto
Charts
Vigilance
Psycho
Events
OnDemand
Analytics
Hacking
Page
Objects
Soke
Framework
Plugin
DB
Bamboo
30
- 75. “
I don’t know... it just feels slow.
”
– a JIRA Product Manager
Show me the
numbers!
36
- 78. Psycho Latency
• Ready for Action
• When does the User believe the app is waiting for her?
• Manual “psycho” event placement
• and maintenance!
• Yardstick tuning against a real system
• Optimisation Example: Execution Reordering
39
- 83. Selenium / Webdriver
• Chromedriver implemented by Chromium team
• mouse click on geometric centre of target
42
- 84. Selenium / Webdriver
• Chromedriver implemented by Chromium team
• mouse click on geometric centre of target
• W3C Webdriver wire protocol draft
42
- 85. Selenium / Webdriver
• Chromedriver implemented by Chromium team
• mouse click on geometric centre of target
• W3C Webdriver wire protocol draft
• OK Browsers, follow the standard!
42
- 86. Selenium / Webdriver
• Chromedriver implemented by Chromium team
• mouse click on geometric centre of target
• W3C Webdriver wire protocol draft
• OK Browsers, follow the standard!
42
- 90. Selenium / Webdriver
• Windows and IE process control
• Browser auto-upgrades
• Changing what you measure
43
- 91. Selenium / Webdriver
• Windows and IE process control
• Browser auto-upgrades
• Changing what you measure
• Prefetch cache benefit in JIRA 6.0
43
- 92. Take Aways
• Lots of factors
• Measure perceived reality
• Be holistic, quantitative, beware micro-optimisation trap
• Monitor and Maintain your performance suite
• Use Chrome DevTools etc.
44