gatling - softshake 2013

55
Load testing made easy Pierre DAL-PRA @ eBusiness Information @pierre_dalpra

Upload: pierre-dal-pra

Post on 06-May-2015

986 views

Category:

Technology


0 download

DESCRIPTION

Slides of my talk about Performance Testing and Gatling @ SoftShake 2013

TRANSCRIPT

Page 1: Gatling - SoftShake 2013

Load testing made easy

Pierre DAL-PRA @ eBusiness Information

@pierre_dalpra

Page 2: Gatling - SoftShake 2013

Load Testing

Gatling

Page 3: Gatling - SoftShake 2013

Load Testing

Gatling

Page 4: Gatling - SoftShake 2013

Load testing?

Performance

Page 5: Gatling - SoftShake 2013

It’s all ‘bout the money! Conversion rates

Platform costs

Performance

Why care? (from business POV)

Page 6: Gatling - SoftShake 2013

Results/page : 10 => 30

+500 ms

-20% pages seen

Page 7: Gatling - SoftShake 2013

-1 % sales

Estimated loss: $160M/y

+100 ms

Page 8: Gatling - SoftShake 2013

Performance

Why care? (from dev POV)

Fun!

(happens to be useful too) Anticipate

Reproduce

Train

Page 9: Gatling - SoftShake 2013

Performance

WDYM?

Page 10: Gatling - SoftShake 2013

Performance

means

Fast?

Robust?

Cost effective?

Page 11: Gatling - SoftShake 2013

Performance

= Requirements

Page 12: Gatling - SoftShake 2013

Speed is

suggestive

contextualized

Page 13: Gatling - SoftShake 2013

Traffic & Behaviors

Analytics

Business people

Page 14: Gatling - SoftShake 2013

Methodology

(tentative)

Page 15: Gatling - SoftShake 2013

Prerequisite

Proper local perf testing!!!

client + network

app debugging

Page 16: Gatling - SoftShake 2013

Be scientists

Analyze!!!

Data

Monitor

Page 17: Gatling - SoftShake 2013

Tooling • Load injector: Gatling, JMeter,

Locust.io...

• JVM monitoring: JMXtrans, Yammer

Metrics...

• System monitoring: Nagios

• Network monitoring

• Database monitoring

• Dashboard: Graphite, Ganglia

• Webapp mock: H. Gomez's basic perf

webapp

Page 18: Gatling - SoftShake 2013

Simulate

Behaviors

Situations

Page 19: Gatling - SoftShake 2013

Capacity test

Page 20: Gatling - SoftShake 2013

Stress test

Page 21: Gatling - SoftShake 2013

Endurance test

Page 22: Gatling - SoftShake 2013

Metrics

min/max? mean?

The good, the bad

and the ugly

Page 23: Gatling - SoftShake 2013
Page 24: Gatling - SoftShake 2013

Metrics

Percentiles FTW!

Page 25: Gatling - SoftShake 2013

Iterate!!!

Test Analyze

Fix hotspot

Page 26: Gatling - SoftShake 2013
Page 27: Gatling - SoftShake 2013

Jmeter, The Grinder,

LoadUI, Tsung, Locust,

Load Runner, Rational,

NeoLoad…

Page 28: Gatling - SoftShake 2013

Issue #1

High Performance

Page 29: Gatling - SoftShake 2013

1 user =

1 thread

Page 30: Gatling - SoftShake 2013

50 threads on a JVM

Page 31: Gatling - SoftShake 2013

With 2000 threads

Page 32: Gatling - SoftShake 2013
Page 33: Gatling - SoftShake 2013

Blocking

I/O

Page 34: Gatling - SoftShake 2013

Threads ?

Waiting…

Page 35: Gatling - SoftShake 2013

… and sleeping

Page 36: Gatling - SoftShake 2013
Page 37: Gatling - SoftShake 2013

Usability Issue #2

Page 38: Gatling - SoftShake 2013

Listen, it's not

that

complicated...

Graphical User

Interface

Page 39: Gatling - SoftShake 2013

Maintainability Issue #3

Page 40: Gatling - SoftShake 2013

What is this change about ?

Page 41: Gatling - SoftShake 2013

Gatling can

change all that !

Page 42: Gatling - SoftShake 2013

Synchronous

1user=1thread

Blocking I/O

- Asynchronous

- Actor model

- Non blocking

I/O

Page 43: Gatling - SoftShake 2013

Actors

Page 44: Gatling - SoftShake 2013

NIO

Page 45: Gatling - SoftShake 2013

Reach new limits

Page 46: Gatling - SoftShake 2013

From the Play2 Computer-Database sample.

(cf: https://github.com/gatling/computer-database)

Page 47: Gatling - SoftShake 2013

Scenario

Scala

code

DSL

=

=

Page 48: Gatling - SoftShake 2013

Use the rich DSL …

Checks

regex / css / xpath / jsonPath find / findAll / count is / in / not / whatever Structures

doIf / repeat / during / asLongAs randomSwitch / roundRobinSwitch Error handling

tryMax / exitBlockOnFail Feeders

csv / tsv / jdbc

Page 49: Gatling - SoftShake 2013

… or write your own

Scala code…

Page 50: Gatling - SoftShake 2013

… or use the Recorder

Page 51: Gatling - SoftShake 2013

• Maven Plugin

• Maven archetype (run in IDE)

• Jenkins plugin

• Graphite live reporting

Page 52: Gatling - SoftShake 2013
Page 53: Gatling - SoftShake 2013

Coming soon…

• Websockets, JDBC…

• Clustering

Page 54: Gatling - SoftShake 2013
Page 55: Gatling - SoftShake 2013

http://gatling-tool.org

http://github.com/excilys/gatling

@GatlingTool