performance quality metrics for mobile web and mobile native - agile testing days 2014

64
Performance Quality Metrics for Mobile Web and Mobile Native http:// bit.ly/atd2014challenge @grabnerandi

Upload: andreas-grabner

Post on 02-Jul-2015

331 views

Category:

Software


0 download

DESCRIPTION

5 Real Life Examples on why Mobile Web and Mobile Native Apps failed and Which Metrics would have shown the problem early on. Using these metrics along your delivery chain allows you go get closer to full automated deployment pipeline but also making sure performance criteria is met

TRANSCRIPT

Page 1: Performance Quality Metrics for Mobile Web and Mobile Native - Agile Testing Days 2014

Performance Quality Metrics for Mobile Web and Mobile Native

http://bit.ly/atd2014challenge

@grabnerandi

Page 2: Performance Quality Metrics for Mobile Web and Mobile Native - Agile Testing Days 2014

Why?

What?

Page 3: Performance Quality Metrics for Mobile Web and Mobile Native - Agile Testing Days 2014

It allows us to Evolve from …

Page 4: Performance Quality Metrics for Mobile Web and Mobile Native - Agile Testing Days 2014

Some Examples from Real Life

300 Deployments / Year

50-60 Deployments / Day

10+ Deployments / Day

Every 11.6 seconds

Page 5: Performance Quality Metrics for Mobile Web and Mobile Native - Agile Testing Days 2014

More details on Amazon

75% fewer outages since 2006

90% fewer outage minutes

~0.001% of deployments cause a problem

Instantaneous automatic rollback

Deploying every 11.6s

Page 6: Performance Quality Metrics for Mobile Web and Mobile Native - Agile Testing Days 2014

The “War Room” – back then

'Houston, we have a problem‘NASA Mission Control Center, Apollo 13, 1970

Page 7: Performance Quality Metrics for Mobile Web and Mobile Native - Agile Testing Days 2014

The “War Room” – NOW

Facebook – December 2012

Page 8: Performance Quality Metrics for Mobile Web and Mobile Native - Agile Testing Days 2014

5 Situations on

WHY this happens,

HOW to avoid it,

Metrics to look at

Page 9: Performance Quality Metrics for Mobile Web and Mobile Native - Agile Testing Days 2014
Page 10: Performance Quality Metrics for Mobile Web and Mobile Native - Agile Testing Days 2014

Don’t assume

You know the environment

Page 11: Performance Quality Metrics for Mobile Web and Mobile Native - Agile Testing Days 2014

1.3 Million iOS Apps

$ 10 billion iOS purchases

2013

1.4 million Android Apps

$ 5 billion Google Payout within 1 year

Page 12: Performance Quality Metrics for Mobile Web and Mobile Native - Agile Testing Days 2014

Distance Calculation Issues

480km biking in 1 hour!

Solution: Unit Test in Live App reports Geo

Calc Problems

Finding: Only happens on certain

Android versions

Page 13: Performance Quality Metrics for Mobile Web and Mobile Native - Agile Testing Days 2014

Bluetooth 4.0 Issue on AndroidOS Issue

crashing App

Page 14: Performance Quality Metrics for Mobile Web and Mobile Native - Agile Testing Days 2014

3rd Party Issues

Impact of bad 3rd party calls

Page 15: Performance Quality Metrics for Mobile Web and Mobile Native - Agile Testing Days 2014

Slow Network – Bad Latency

Impact of Latency and Bandwidth

Page 16: Performance Quality Metrics for Mobile Web and Mobile Native - Agile Testing Days 2014

Metrics: Crashes, Exceptions, # and Status of 3rd Party Calls, Payload of

Web Service Calls

Dev: Build for Mobile

Test: Test on Mobile and Diff. Carriers

Ops: Monitor Mobile

Page 17: Performance Quality Metrics for Mobile Web and Mobile Native - Agile Testing Days 2014
Page 18: Performance Quality Metrics for Mobile Web and Mobile Native - Agile Testing Days 2014

#Push without a Plan

Page 19: Performance Quality Metrics for Mobile Web and Mobile Native - Agile Testing Days 2014

434 Resources in total on that page:230 JPEGs, 75 PNGs, 50 GIFs, …

Total size of ~ 20MB

Mobile Landing Page of Super Bowl Ad

Page 20: Performance Quality Metrics for Mobile Web and Mobile Native - Agile Testing Days 2014

m.store.com redirects to www.store.com

ALL CSS and JS files are

redirected to the www domain

This is a lot of time “wasted” especially on high latency mobile

connections

Page 21: Performance Quality Metrics for Mobile Web and Mobile Native - Agile Testing Days 2014

Metrics: Load Time, # Resources (Images, …),

# HTTP 3xx, 4xx, 5xx

Dev: Build for Mobile

Test: Test on Mobile

Ops: Monitor Mobile

Page 22: Performance Quality Metrics for Mobile Web and Mobile Native - Agile Testing Days 2014
Page 23: Performance Quality Metrics for Mobile Web and Mobile Native - Agile Testing Days 2014

Architectural Decisions gone

Bad

Page 24: Performance Quality Metrics for Mobile Web and Mobile Native - Agile Testing Days 2014

We wanted Web 2.0 and Mobile Ready!

Page 25: Performance Quality Metrics for Mobile Web and Mobile Native - Agile Testing Days 2014
Page 26: Performance Quality Metrics for Mobile Web and Mobile Native - Agile Testing Days 2014
Page 27: Performance Quality Metrics for Mobile Web and Mobile Native - Agile Testing Days 2014

Metrics: # Visitors# Requests / User

Dev: Follow Best Practices

Test: Find realistic scenarios

Page 28: Performance Quality Metrics for Mobile Web and Mobile Native - Agile Testing Days 2014
Page 29: Performance Quality Metrics for Mobile Web and Mobile Native - Agile Testing Days 2014

“Blindly” (Re)use Existing

Components

Page 30: Performance Quality Metrics for Mobile Web and Mobile Native - Agile Testing Days 2014

Requirement: We need a report

Page 31: Performance Quality Metrics for Mobile Web and Mobile Native - Agile Testing Days 2014

Using Hibernate results in 4k+ SQL Statements to display 3 items!

Hibernate Executes 4k+ Statements

Individual Execution VERY FAST

But Total SUM takes 6s

Page 32: Performance Quality Metrics for Mobile Web and Mobile Native - Agile Testing Days 2014

Requirement: We need a fancy UI

Page 33: Performance Quality Metrics for Mobile Web and Mobile Native - Agile Testing Days 2014

Using Telerik Controls Results in 9s for Data-Binding of UI Controls

#1: Slow Stored ProcedureDepending on Request execution

time of this SP varies between 1 and 7.5s

#2: 240! Similar SQL StatementsMost of these 240! Statements are not

prepared and just differ in things like Column Names

Page 34: Performance Quality Metrics for Mobile Web and Mobile Native - Agile Testing Days 2014

Metrics: # Total SQLs# SQLs / Web Request# Same SQLs / Request

Transferred Rows

Test: With realistic Data

Dev: “Learn” Frameworks

Page 35: Performance Quality Metrics for Mobile Web and Mobile Native - Agile Testing Days 2014
Page 36: Performance Quality Metrics for Mobile Web and Mobile Native - Agile Testing Days 2014

#No “Agile” Deployment

Page 37: Performance Quality Metrics for Mobile Web and Mobile Native - Agile Testing Days 2014

Load Spike resulted in UnavailabilityAd

on

air

Page 38: Performance Quality Metrics for Mobile Web and Mobile Native - Agile Testing Days 2014

Alternative: “GoDaddy goes DevOps”

1h before SuperBowl KickOff

1h after Game ended

Page 39: Performance Quality Metrics for Mobile Web and Mobile Native - Agile Testing Days 2014

Behind the Scenes

Page 40: Performance Quality Metrics for Mobile Web and Mobile Native - Agile Testing Days 2014

Metrics: AvailabilityPage Size, # Objects

# Hosts, # Connections

DevOps: “Feature” Switches

Page 41: Performance Quality Metrics for Mobile Web and Mobile Native - Agile Testing Days 2014
Page 42: Performance Quality Metrics for Mobile Web and Mobile Native - Agile Testing Days 2014

# of Requests / User

# of Log Messages

# of Crashes

# Objects Allocated

# Objects In Cache

Cache Hit Ratio

# of Images

# of SQLs

# SQLs per RequestAvailability

# HTTP 3xx, 4xx

Page Size

Page 43: Performance Quality Metrics for Mobile Web and Mobile Native - Agile Testing Days 2014

A final thought …

Page 44: Performance Quality Metrics for Mobile Web and Mobile Native - Agile Testing Days 2014
Page 45: Performance Quality Metrics for Mobile Web and Mobile Native - Agile Testing Days 2014

How about this idea?

12 0 120ms

3 1 68ms

Build 20 testPurchase OK

testSearch OK

Build 17 testPurchase OK

testSearch OK

Build 18 testPurchase FAILED

testSearch OK

Build 19 testPurchase OK

testSearch OK

Build # Test Case Status # SQL # Excep CPU

12 0 120ms

3 1 68ms

12 5 60ms

3 1 68ms

75 0 230ms

3 1 68ms

Test Framework Results Architectural Data

We identified a regresesion

Problem solved

Let’s look behind the scenes

Exceptions probably reason for

failed testsProblem fixed but now we have an

architectural regression

Problem fixed but now we have an

architectural regressionNow we have the functional and

architectural confidence

Page 46: Performance Quality Metrics for Mobile Web and Mobile Native - Agile Testing Days 2014

How? Performance Focus in Test AutomationAnalyzing All Unit / Performance Tests

Analyze PerfMetrics

Identify Regressions

Page 47: Performance Quality Metrics for Mobile Web and Mobile Native - Agile Testing Days 2014
Page 48: Performance Quality Metrics for Mobile Web and Mobile Native - Agile Testing Days 2014
Page 49: Performance Quality Metrics for Mobile Web and Mobile Native - Agile Testing Days 2014

If we do all that

Page 50: Performance Quality Metrics for Mobile Web and Mobile Native - Agile Testing Days 2014

Want MORE of these and more details?

http://blog.dynatrace.com

Page 51: Performance Quality Metrics for Mobile Web and Mobile Native - Agile Testing Days 2014

FREE Products & More Info

• Dynatrace Free Trial – http://bit.ly/dtrial– Full End-to-End Visibility in your Java, .NET, PHP Apps

– Sign up for a 30 Days (option for Lifetime) Free Trial on http://bit.ly/atd2014challenge

• Our Blog: http://blog.dynatrace.com

• My contact: @grabnerandi, [email protected]

Page 52: Performance Quality Metrics for Mobile Web and Mobile Native - Agile Testing Days 2014

Bonus Bite(s)

Page 53: Performance Quality Metrics for Mobile Web and Mobile Native - Agile Testing Days 2014
Page 54: Performance Quality Metrics for Mobile Web and Mobile Native - Agile Testing Days 2014

Don’t ruin your reputation

Page 55: Performance Quality Metrics for Mobile Web and Mobile Native - Agile Testing Days 2014
Page 56: Performance Quality Metrics for Mobile Web and Mobile Native - Agile Testing Days 2014
Page 57: Performance Quality Metrics for Mobile Web and Mobile Native - Agile Testing Days 2014

Outdated Library causing Issues

Page 58: Performance Quality Metrics for Mobile Web and Mobile Native - Agile Testing Days 2014
Page 59: Performance Quality Metrics for Mobile Web and Mobile Native - Agile Testing Days 2014

Implementation Flaws

Page 60: Performance Quality Metrics for Mobile Web and Mobile Native - Agile Testing Days 2014

Business Impact requires Action!

Page 61: Performance Quality Metrics for Mobile Web and Mobile Native - Agile Testing Days 2014

Solution: Cache to the RESCUE!!

Page 62: Performance Quality Metrics for Mobile Web and Mobile Native - Agile Testing Days 2014

Implementation and Rollout

Implemented InMemory Cache

Worked well in Load Testing

Page 63: Performance Quality Metrics for Mobile Web and Mobile Native - Agile Testing Days 2014

Result: Out of Memory Crashes!!

Still crashes

Problem fixed!Fixed Version Deployed

Page 64: Performance Quality Metrics for Mobile Web and Mobile Native - Agile Testing Days 2014

Metrics: Heap Size, # Objects Allocated,# Objects in Cache

Cache Hit Ratio

Test: With realistic Data