blast your app with gatling! by stephane landelle

48
Load testing made easy Stéphane Landelle @ eBusiness Information @slandelle

Upload: zeroturnaround

Post on 06-May-2015

3.070 views

Category:

Technology


3 download

TRANSCRIPT

Page 1: Blast your app with Gatling! by Stephane Landelle

Load testing made easy

Stéphane Landelle @ eBusiness Information @slandelle

Page 2: Blast your app with Gatling! by Stephane Landelle

Load Testing"Gatling"Demo

Page 3: Blast your app with Gatling! by Stephane Landelle

Load Testing"Gatling"Demo

Page 4: Blast your app with Gatling! by Stephane Landelle

Load Testing"Gatling"Demo

Page 5: Blast your app with Gatling! by Stephane Landelle

Load testing?

About performance About server side In “real” conditions

Page 6: Blast your app with Gatling! by Stephane Landelle

Performance What for?"

Page 7: Blast your app with Gatling! by Stephane Landelle

It’s all ‘bout the money!"Conversion rates"Platform costs

Performance What for?"

(from business POV)

Page 8: Blast your app with Gatling! by Stephane Landelle

""Results/page : 10 => 30

è +500 ms "è -20% pages seen

Page 9: Blast your app with Gatling! by Stephane Landelle

è -1 % sales"è Estimated loss: $160M/y

+100 ms

Page 10: Blast your app with Gatling! by Stephane Landelle

Performance"What for?"

(from dev POV) Fun!"

(happens to be useful too)"Anticipate"Reproduce"

Train

Page 11: Blast your app with Gatling! by Stephane Landelle

How?"""

Page 12: Blast your app with Gatling! by Stephane Landelle

How?""

Define goals"

èRequirements

Page 13: Blast your app with Gatling! by Stephane Landelle

How?""

Analyze"

èData"èMonitor

Page 14: Blast your app with Gatling! by Stephane Landelle

How?""

Simulate"

èBehaviors"èInjector

Page 15: Blast your app with Gatling! by Stephane Landelle

How?""

Iterate!!!"

Page 16: Blast your app with Gatling! by Stephane Landelle
Page 17: Blast your app with Gatling! by Stephane Landelle

Jmeter, The Grinder, LoadUI, Tsung, Locust, Load Runner, Rational, NeoLoad…

Page 18: Blast your app with Gatling! by Stephane Landelle

Issue #1

High Performance

Page 19: Blast your app with Gatling! by Stephane Landelle

1 user = "1 thread

Page 20: Blast your app with Gatling! by Stephane Landelle

50 threads on a JVM

Page 21: Blast your app with Gatling! by Stephane Landelle

With 2000 threads

Page 22: Blast your app with Gatling! by Stephane Landelle
Page 23: Blast your app with Gatling! by Stephane Landelle

Blocking I/O

Page 24: Blast your app with Gatling! by Stephane Landelle

Threads ?"Waiting…

Page 25: Blast your app with Gatling! by Stephane Landelle

… and sleeping

Page 26: Blast your app with Gatling! by Stephane Landelle
Page 27: Blast your app with Gatling! by Stephane Landelle

JMeter 2.8 perf test, expecting 300 tr/sec

Can you trust your results ?

Page 28: Blast your app with Gatling! by Stephane Landelle

JMeter reference test with Gatling, expecting 300 tr/sec

Page 29: Blast your app with Gatling! by Stephane Landelle

Usability Issue #2

Page 30: Blast your app with Gatling! by Stephane Landelle

Listen, it's not that complicated...

Graphical User Interface

Page 31: Blast your app with Gatling! by Stephane Landelle

Maintainability Issue #3

Page 32: Blast your app with Gatling! by Stephane Landelle

What is this change about ?

Page 33: Blast your app with Gatling! by Stephane Landelle

Gatling can change all that !

Page 34: Blast your app with Gatling! by Stephane Landelle

Synchronous""

1user=1thread""

Blocking I/O

- Asynchronous - Actor model - Non blocking I/O

Page 35: Blast your app with Gatling! by Stephane Landelle

Actors

Page 36: Blast your app with Gatling! by Stephane Landelle

NIO

Page 37: Blast your app with Gatling! by Stephane Landelle

Reach new limits

Page 38: Blast your app with Gatling! by Stephane Landelle

From the Play2 Computer-Database sample. (cf: https://github.com/gatling/computer-database)

Page 39: Blast your app with Gatling! by Stephane Landelle

Scenario "Scala code"DSL

"= =

Page 40: Blast your app with Gatling! by Stephane Landelle

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 41: Blast your app with Gatling! by Stephane Landelle

… or write your own "Scala code…

Page 42: Blast your app with Gatling! by Stephane Landelle

… or use the Recorder

Page 43: Blast your app with Gatling! by Stephane Landelle

•  Maven Plugin •  Maven archetype (run in IDE) •  Jenkins plugin •  Graphite live reporting

Page 44: Blast your app with Gatling! by Stephane Landelle
Page 45: Blast your app with Gatling! by Stephane Landelle

Coming soon…

•  Websockets, JDBC… •  Clustering

Page 46: Blast your app with Gatling! by Stephane Landelle

Demo

Page 47: Blast your app with Gatling! by Stephane Landelle
Page 48: Blast your app with Gatling! by Stephane Landelle

http://gatling-tool.orghttp://github.com/excilys/gatling@GatlingTool