blast your app with gatling! by stephane landelle
TRANSCRIPT
Load testing made easy
Stéphane Landelle @ eBusiness Information @slandelle
Load Testing"Gatling"Demo
Load Testing"Gatling"Demo
Load Testing"Gatling"Demo
Load testing?
About performance About server side In “real” conditions
Performance What for?"
It’s all ‘bout the money!"Conversion rates"Platform costs
Performance What for?"
(from business POV)
""Results/page : 10 => 30
è +500 ms "è -20% pages seen
è -1 % sales"è Estimated loss: $160M/y
+100 ms
Performance"What for?"
(from dev POV) Fun!"
(happens to be useful too)"Anticipate"Reproduce"
Train
How?"""
How?""
Define goals"
èRequirements
How?""
Analyze"
èData"èMonitor
How?""
Simulate"
èBehaviors"èInjector
How?""
Iterate!!!"
Jmeter, The Grinder, LoadUI, Tsung, Locust, Load Runner, Rational, NeoLoad…
Issue #1
High Performance
1 user = "1 thread
50 threads on a JVM
With 2000 threads
Blocking I/O
Threads ?"Waiting…
… and sleeping
JMeter 2.8 perf test, expecting 300 tr/sec
Can you trust your results ?
JMeter reference test with Gatling, expecting 300 tr/sec
Usability Issue #2
Listen, it's not that complicated...
Graphical User Interface
Maintainability Issue #3
What is this change about ?
Gatling can change all that !
Synchronous""
1user=1thread""
Blocking I/O
- Asynchronous - Actor model - Non blocking I/O
Actors
NIO
Reach new limits
From the Play2 Computer-Database sample. (cf: https://github.com/gatling/computer-database)
Scenario "Scala code"DSL
"= =
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
… or write your own "Scala code…
… or use the Recorder
• Maven Plugin • Maven archetype (run in IDE) • Jenkins plugin • Graphite live reporting
Coming soon…
• Websockets, JDBC… • Clustering
Demo
http://gatling-tool.orghttp://github.com/excilys/gatling@GatlingTool