performance challenges along the continuous delivery pipeline - javaone 2014

51
1 PERFORMANCE CHALLENGES ALONG THE CONTINUOUS DELIVERY PIPELINE Wolfgang Gottesheim Compuware APM Dynatrace

Upload: wolfgang-gottesheim

Post on 22-Apr-2015

138 views

Category:

Software


0 download

DESCRIPTION

Do you care about performance in your production deployment? You should caring about performance in your CI!

TRANSCRIPT

Page 1: Performance Challenges along the Continuous Delivery Pipeline - JavaOne 2014

11

PERFORMANCE CHALLENGES ALONG THE CONTINUOUS DELIVERY PIPELINE

Wolfgang Gottesheim

Compuware APM Dynatrace

Page 2: Performance Challenges along the Continuous Delivery Pipeline - JavaOne 2014

22

Page 3: Performance Challenges along the Continuous Delivery Pipeline - JavaOne 2014

3 COMPANY CONFIDENTIAL – DO NOT DISTRIBUTE

Is 10PM a good time to find out

about performance

problems?

Page 4: Performance Challenges along the Continuous Delivery Pipeline - JavaOne 2014

44

When do YOU find performance problems?

Page 5: Performance Challenges along the Continuous Delivery Pipeline - JavaOne 2014

5 COMPANY CONFIDENTIAL – DO NOT DISTRIBUTE

? ? ?Unit/Integration

TestsAcceptance

TestsCapacity

TestsReleaseDevelopers

Page 6: Performance Challenges along the Continuous Delivery Pipeline - JavaOne 2014

66

Page 7: Performance Challenges along the Continuous Delivery Pipeline - JavaOne 2014

77

When can we find them? When can we find them?

Requirements /Specification /

Design

(Load) Test / QA /

Acceptance

Deployment / Production / Maintenance

Development

(Load)Test/ QA /

Acceptance

Dev

TestDevelopment

Dev

Test

Deployment / Production / Maintenance

Dev

Test

Dep

Dev

Test

Dep

Dev

Test

Dep

Dev

Test

Dep

Dev

Test

Dep

Dev

Test

Dep

Dev

Test

Dep

Dev

Test

Dep

Page 8: Performance Challenges along the Continuous Delivery Pipeline - JavaOne 2014

88

The ChallengeThe Challenge

"I couldn't help but notice your pain."

"My pain?"

"It runs deep. Share it with me!"

(Star Trek V)

» Performance pain runs deep» Architecture has enormous influence! You have to continuously ensure your

performance requirements are met!

Page 9: Performance Challenges along the Continuous Delivery Pipeline - JavaOne 2014

9 COMPANY CONFIDENTIAL – DO NOT DISTRIBUTE

“But we have tests”

Page 10: Performance Challenges along the Continuous Delivery Pipeline - JavaOne 2014

1010

What are we learning from our tests?What are we learning from our tests?

Software testing tells us that our system

»meets the requirements that guided its design and development,

»responds correctly to all kinds of inputs,

»performs its functions within an acceptable time,

»is sufficiently usable,

»can be installed and run in its intended environments, and

»achieves the general result its stakeholders desire.

Source: Wikipedia

Page 11: Performance Challenges along the Continuous Delivery Pipeline - JavaOne 2014

1111

Let’s look at the tests we runLet’s look at the tests we run

Unit TestsIntegration

TestsAcceptance

TestsLoad Tests

Meets requirements

Responds correctly to input

Performs in acceptable time

Usability Deployment Achieves Correct Result

Tests looking at non-functional aspects, but- High effort (have to be created and maintained)

- Only possible at a rather late development phase

Very focused on FUNCTIONAL aspects

Page 12: Performance Challenges along the Continuous Delivery Pipeline - JavaOne 2014

1212

Page 13: Performance Challenges along the Continuous Delivery Pipeline - JavaOne 2014

1313

Focus on automatically analyzing performanceFocus on automatically analyzing performance

Unit Tests Integration Tests

Acceptance Tests

Load Tests

Meets requirements

Responds correctly to input

Performs in acceptable time

Usability Deployment Achieves Correct Result

Page 14: Performance Challenges along the Continuous Delivery Pipeline - JavaOne 2014

1414

How can we measure performance of Unit and Integration tests?How can we measure performance of Unit and Integration tests?

What you usually get

[junit] Running com.dynatrace.sample.tests.FastUnitTest[junit] Tests run: 15, Failures: 0, Errors: 0, Time elapsed: 34 sec[junit] Running com.dynatrace.sample.tests.SlowUnitTest[junit] Tests run: 17, Failures: 0, Errors: 1, Time elapsed: 2,457 sec

Looking at overall timings does not make sense But what does?

Page 15: Performance Challenges along the Continuous Delivery Pipeline - JavaOne 2014

1515

Page 16: Performance Challenges along the Continuous Delivery Pipeline - JavaOne 2014

1616

Basic: Test durationBasic: Test duration

I don’t like endsWith – I like regex!

Page 17: Performance Challenges along the Continuous Delivery Pipeline - JavaOne 2014

1717

N+1 QueriesN+1 Queries

Metrics: • # SQL Executions / Request• # of “same” SQL Executions

Page 18: Performance Challenges along the Continuous Delivery Pipeline - JavaOne 2014

1818

Ignoring Architectural RulesIgnoring Architectural Rules

Metrics: • # SQL Executions /

Request per Tier

Page 19: Performance Challenges along the Continuous Delivery Pipeline - JavaOne 2014

1919

High Number of Requests to Backend SystemHigh Number of Requests to Backend System

Metrics: • # Calls to Web Service

Page 20: Performance Challenges along the Continuous Delivery Pipeline - JavaOne 2014

2020

Memory LeakMemory Leak

Still crashing…

Problem fixed!

Fixed Version Deployed

Metrics: • Heap Size• # Objects allocated

Page 21: Performance Challenges along the Continuous Delivery Pipeline - JavaOne 2014

2121

Too Many ExceptionsToo Many Exceptions

Metrics: • # Exceptions

Page 22: Performance Challenges along the Continuous Delivery Pipeline - JavaOne 2014

2222

Page 23: Performance Challenges along the Continuous Delivery Pipeline - JavaOne 2014

2323

What you currently measure

What you should measure

Performance Metrics in your CI

Page 24: Performance Challenges along the Continuous Delivery Pipeline - JavaOne 2014

2424

What you should measure

# Test FailuresOverall Duration

Execution Time per test# calls to API# executed SQL statements# Web Service Calls# JMS Messages# Objects Allocated# Exceptions# Log Messages…

What you currently measurePerformance Metrics in your CI

Page 25: Performance Challenges along the Continuous Delivery Pipeline - JavaOne 2014

2525

We should not forget about

ACCEPTANCE tests

Page 26: Performance Challenges along the Continuous Delivery Pipeline - JavaOne 2014

2626

Large Web SitesLarge Web Sites

17! JS Files – 1.7MB in Size

Useless Information!Even might be a security risk!

Page 27: Performance Challenges along the Continuous Delivery Pipeline - JavaOne 2014

2727

Missing Resources Cause DelaysMissing Resources Cause Delays

46! HTTP 403 Requests for images on the landing page

Lots of time “wasted” due to roundtrips that just result in

a 403

Metrics: HTTP 4xx & 5xxTotal Number of Resources

Page 28: Performance Challenges along the Continuous Delivery Pipeline - JavaOne 2014

2828

SLOW or Failing 3rd Party ContentSLOW or Failing 3rd Party Content

Page 29: Performance Challenges along the Continuous Delivery Pipeline - JavaOne 2014

2929

What you should measure

Performance Metrics in your CI # Test Failures

Overall Duration

Execution Time per test# calls to API# executed SQL statements# Web Service Calls# JMS Messages# Objects Allocated# Exceptions# Log Messages# HTTP 4xx/5xxRequest/Response SizePage Load/Rendering Time…

What you currently measure

Page 30: Performance Challenges along the Continuous Delivery Pipeline - JavaOne 2014

3030

Starting from…Starting from…

Production Environment

Developers CI Server TestingEnvironment

Release

Page 31: Performance Challenges along the Continuous Delivery Pipeline - JavaOne 2014

3131

…or maybe……or maybe…

Production Environment

Developers CI Server TestingEnvironment

Release

Page 32: Performance Challenges along the Continuous Delivery Pipeline - JavaOne 2014

3232

We get to…We get to…

Commit Stage

Automated Acceptance

Testing

Automated CapacityTesting

ReleaseDevelopers

Page 33: Performance Challenges along the Continuous Delivery Pipeline - JavaOne 2014

3333

Performance as a Quality Gate

Automated collection of performance metrics in

test runs

Comparison of performance

metrics across builds

Automated analysis of performance metrics to

identify outliers

Automated notifications on performance issues in

tests

Measurements accessible and shareable across teams

Actionable data through deep transactional insight

Integration with build automation tools and

practices

Page 34: Performance Challenges along the Continuous Delivery Pipeline - JavaOne 2014

3434

PERFORMANCE as part of our Continuous Delivery ProcessPERFORMANCE as part of our Continuous Delivery Process

Commit Stage

Automated Acceptance

Testing

Automated CapacityTesting

ReleaseDevelopers

Page 35: Performance Challenges along the Continuous Delivery Pipeline - JavaOne 2014

3535

Performance Scalability

Page 36: Performance Challenges along the Continuous Delivery Pipeline - JavaOne 2014

3636

Collaborate VerifyMeasure

Page 37: Performance Challenges along the Continuous Delivery Pipeline - JavaOne 2014

3737

When CAN we find

performance problems?

Page 38: Performance Challenges along the Continuous Delivery Pipeline - JavaOne 2014

3838

Unit/IntegrationTests

Acceptance Tests

CapacityTests

ReleaseDevelopers

Page 39: Performance Challenges along the Continuous Delivery Pipeline - JavaOne 2014

3939

Page 40: Performance Challenges along the Continuous Delivery Pipeline - JavaOne 2014

4040

Who Cares About Performance?Who Cares About Performance?

Developers?

Architects?

Testers?

Operators?

Business?

Page 41: Performance Challenges along the Continuous Delivery Pipeline - JavaOne 2014

4141

Everyone!Everyone!

Developers

Architects

Testers

Operators

Business

Page 42: Performance Challenges along the Continuous Delivery Pipeline - JavaOne 2014

4242

But remember:

Page 43: Performance Challenges along the Continuous Delivery Pipeline - JavaOne 2014

4343

Check out our trialhttp://bit.ly/dttrial

Get your demo and a T-Shirt at

Booth #5107!

Page 44: Performance Challenges along the Continuous Delivery Pipeline - JavaOne 2014

4444

Page 45: Performance Challenges along the Continuous Delivery Pipeline - JavaOne 2014

4545

How can this look in real life?

Page 46: Performance Challenges along the Continuous Delivery Pipeline - JavaOne 2014

4646

Performance Focus in Test AutomationPerformance Focus in Test Automation

Analyzing All Unit / Performance Tests

Analyzing Metrics such as DB Exec Count

Jump in DB Callsfrom one Build to the

next

Page 47: Performance Challenges along the Continuous Delivery Pipeline - JavaOne 2014

4747

Performance Focus in Test AutomationPerformance Focus in Test Automation

Cross Impact of KPIs

Page 48: Performance Challenges along the Continuous Delivery Pipeline - JavaOne 2014

4848

Performance Focus in Test AutomationPerformance Focus in Test Automation

Here is the difference!

Compare Build that shows BAD Behavior!

With Build that shows GOOD Behavior!

Page 49: Performance Challenges along the Continuous Delivery Pipeline - JavaOne 2014

4949

Performance Focus in Test AutomationPerformance Focus in Test Automation

Embed your Architectural Results in Jenkins

Page 50: Performance Challenges along the Continuous Delivery Pipeline - JavaOne 2014

5050

Performance Focus in Test AutomationPerformance Focus in Test Automation

CalculateUserStats is the new Plugin that

causes problems

Page 51: Performance Challenges along the Continuous Delivery Pipeline - JavaOne 2014

5151

Check out our trialhttp://bit.ly/dttrial

Get your demo and a T-Shirt at

Booth #5107!