Transcript
Page 1: Show Me the Numbers: Automated Browser
Page 2: Show Me the Numbers: Automated Browser

CHRIS MOUNTFORD • SENIOR DEVELOPER , J IRA • ATLASS IAN • @CHROMOSUNDRIFT

Show Me the NumbersAUTOMATED BROWSER PERFORMANCE TESTING

Page 3: Show Me the Numbers: Automated Browser

20053.4.17425

Page 4: Show Me the Numbers: Automated Browser

Inline Edit

Search

Detail View

Page 5: Show Me the Numbers: Automated Browser

Browser Performance Testing

Page 6: Show Me the Numbers: Automated Browser

Measuring the perceived

performance of specific interactions for a single user ”“

Page 7: Show Me the Numbers: Automated Browser

Measuring the perceived

performance of specific interactions for a single user ”“

Page 8: Show Me the Numbers: Automated Browser

JavaScript Timeline

Page 9: Show Me the Numbers: Automated Browser

Classical JavaScript

1995

Page 10: Show Me the Numbers: Automated Browser

Just text by itself, for impact.

Page 11: Show Me the Numbers: Automated Browser
Page 12: Show Me the Numbers: Automated Browser

“Why do we split everything into so many files?”

“Performance.”

Page 13: Show Me the Numbers: Automated Browser

“Why do we merge all the files into large batches?”

“Performance.”

Page 14: Show Me the Numbers: Automated Browser

“Why...”

“Performance!”

Page 15: Show Me the Numbers: Automated Browser

Show me the numbers!

NOT JACKY CHAN

”“

Page 16: Show Me the Numbers: Automated Browser

If we have data, let’s look at

data. If all we have are opinions, let’s go with mine.

J IM BARKSDALE

”“

Page 17: Show Me the Numbers: Automated Browser

Performance has many enemies

Page 18: Show Me the Numbers: Automated Browser

The Mobile Web

• network / radio power mode steps, sleep, etc.

• cpu / battery impact

• memory

• standards compliance

• tooling

E V E R Y T H I N G I S T H E S A M E B U T W O R S E

Page 19: Show Me the Numbers: Automated Browser

NETWORK TIME

Page 20: Show Me the Numbers: Automated Browser

PARSE T IME

Page 21: Show Me the Numbers: Automated Browser

• JS Engines

• native bind(), map() etc

• V8: hidden classes, arrays, gc

• DOM Manipulation

• events

• JQuery

• Sizzle selectors

• Memory leaks

JavaScript Execution

Page 22: Show Me the Numbers: Automated Browser

BLOCKING

<SCRIPT SRC=”WTF . JS”>

Page 23: Show Me the Numbers: Automated Browser

Tools

Chrome DevTools, Chrome WTFFirebug Lite dynaTrace

Page 24: Show Me the Numbers: Automated Browser

Reflow

Page 25: Show Me the Numbers: Automated Browser
Page 26: Show Me the Numbers: Automated Browser

Will It Reflow?inspired by @stoyanstefanov

Yes!

Page 27: Show Me the Numbers: Automated Browser

• CSS Transforms

• Hardware acceleration?

• Data weight

• Concurrent request count

• Inline Base64 Encoded resources

But wait, there’s more!

Page 28: Show Me the Numbers: Automated Browser

Designing the JIRA Browser Performance

Test Suite

Page 29: Show Me the Numbers: Automated Browser

Page Objects

Soke Framework Bamboo

Hacking

Koto Charts

Psycho Events

Baselines

OnDemandAnalytics

Vigilance

DBPlugin

Automated JIRA Browser Performance Tests

Page 30: Show Me the Numbers: Automated Browser

• Define Timed Sections

• Number of Repetitions

• Personas

Soke Interactions

Mad Props to

Atlassian PerfEng Team

Page 31: Show Me the Numbers: Automated Browser

Soke Interactions In Scala

Page 32: Show Me the Numbers: Automated Browser
Page 33: Show Me the Numbers: Automated Browser
Page 34: Show Me the Numbers: Automated Browser

• Batching

• Atlassian Plugins, No Worries

• Predictive Fetching

• Guided by Analytics

• Caching

• Watch for memory leaks

Optimization Techniques

Page 35: Show Me the Numbers: Automated Browser

I don’t know... it just feels slow.

A J IRA PRODUCT MANAGER

”“

Page 36: Show Me the Numbers: Automated Browser

Perception is Reality

Page 37: Show Me the Numbers: Automated Browser
Page 38: Show Me the Numbers: Automated Browser

• 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

• Optimization Example: Execution Reordering

Psycho Latency

Page 39: Show Me the Numbers: Automated Browser

Gotchas

Page 40: Show Me the Numbers: Automated Browser

click( )

Page 41: Show Me the Numbers: Automated Browser

• Chromedriver implemented by Chromium team

• mouse click on geometric centre of target

• W3C Webdriver wire protocol draft

• OK Browsers, follow the standard!

Selenium / Webdriver

Page 42: Show Me the Numbers: Automated Browser

• Windows and IE process control• Browser auto-upgrades• Changing what you measure

• Prefetch cache benefit in JIRA 6.0

Selenium / Webdriver

Page 43: Show Me the Numbers: Automated Browser

Takeaway tweets:

#atlassiansummit

• Performance has many enemies

• Be holistic, be quantitative, beware the micro-optimization trap

• Perception is Reality

• The price of performance is eternal vigilance

Page 44: Show Me the Numbers: Automated Browser

Thank you!

CHRIS MOUNTFORD • SENIOR DEVELOPER , J IRA • ATLASS IAN • @CHROMOSUNDRIFT

Page 45: Show Me the Numbers: Automated Browser

Text code below to 22333or visit http://bit.ly/197mpCa

Show Me the Numbers: Automated Browser

To join this session, send text 136888 to

AWESOME = 48

PRETTY GOOD = 47

NOT BAD = 46

MEH = 45

Rate this Talk


Recommended