Hands On, Duchess 10/17/2012

32
How to stress test your application with Gatling ? Paris, October 17 th 2012

description

 

Transcript of Hands On, Duchess 10/17/2012

Page 1: Hands On, Duchess 10/17/2012

How to stress test your application with Gatling ?

Paris, October 17th 2012

Page 2: Hands On, Duchess 10/17/2012

Why a new tool ?

Page 3: Hands On, Duchess 10/17/2012
Page 4: Hands On, Duchess 10/17/2012
Page 5: Hands On, Duchess 10/17/2012

Issue n°1:High performance

http://www.shopfbparts.com/catalog/nal-19201331_w.jpg

Page 6: Hands On, Duchess 10/17/2012

1 user = 1 thread

Page 7: Hands On, Duchess 10/17/2012

With 50 threads on a JVMhttp://www.ausmotive.com/F1/2010/British-GP-05.jpg

Page 8: Hands On, Duchess 10/17/2012

With 2000 threads on a JVM

Page 9: Hands On, Duchess 10/17/2012

Blocking IO

Page 10: Hands On, Duchess 10/17/2012

That's what your threads will do most of the time, waiting ...

http://www.flickr.com/photos/carlotancredi/3447589391

Page 11: Hands On, Duchess 10/17/2012

... and sleeping

http://www.flickr.com/photos/maciejdakowicz/4770794503

Page 12: Hands On, Duchess 10/17/2012

Is that a real problem?

Page 13: Hands On, Duchess 10/17/2012

Can you trust your results?

http://wiki.apache.org/jmeter/JMeterPerformance?action=AttachFile&do=get&target=Transactions-2.8.png

JMeter 2.8 perf test, expecting 300 tr/sec

Page 14: Hands On, Duchess 10/17/2012

Issue n°2:Usability

Page 15: Hands On, Duchess 10/17/2012

Graphical Interface

http://www.spacebio.uni-bonn.de/ahp/Parabel/Par_Images/240304-Cockpit_BIG.jpg

Listen, it's actually not complicated ...

Page 16: Hands On, Duchess 10/17/2012

Issue n°3:Maintenance

Page 17: Hands On, Duchess 10/17/2012

What was this change about ?

Page 18: Hands On, Duchess 10/17/2012

Listen to us, Gatling can change all that !

http://static.lexpress.fr/medias/15/mai-68_124.jpg, copyright by AFP

Page 19: Hands On, Duchess 10/17/2012

Say hello to my little friend ...

Page 20: Hands On, Duchess 10/17/2012

version 1.3.3

Released mid-October 2012

Page 21: Hands On, Duchess 10/17/2012

Be asynchronous, embrace the actors model

Page 22: Hands On, Duchess 10/17/2012

Don't use blocking IO

> Netty > Async-Http-Client

Page 23: Hands On, Duchess 10/17/2012

Scenario= Code= DSL

http://gringocentralsanramon.blogspot.ch/2012/02/getting-published-writing-seminar-wed.html

Page 24: Hands On, Duchess 10/17/2012

Easy

Page 25: Hands On, Duchess 10/17/2012

Feeling lazy? Try the recorder.

Page 26: Hands On, Duchess 10/17/2012

Powerful : write your own Scala code

Page 27: Hands On, Duchess 10/17/2012

But, many used case covered out-of-the-box by the DSL

● .regex() / .css() / .xpath() / jsonPath()● .find() / .findAll() / .count()● .is() / .in() / .not / .whatever

● .doIf() / .repeat() / .during() / .asLongAs()

● .tryMax() / .exitBlockOnFail()● .randomSwitch() / .roundRobinSwitch()

● .feeder() : csv() / tsv() / jdbc()

Page 28: Hands On, Duchess 10/17/2012

Integrations : > Maven plugin> Maven archetype / run in the IDE> Graphite live reporting

Page 29: Hands On, Duchess 10/17/2012

Coming soon : > Jenkins plugin> Requests grouping> Clustering

Page 30: Hands On, Duchess 10/17/2012

Fact sheet● First commit in june 2011● Created by S. Landelle and R. Sertelon● About 20k LOCs● 21 persons have contributed to the project

● 2500 downloads since the beginning● 650 downloads of Gatling 1.2.5

Page 31: Hands On, Duchess 10/17/2012

Really efficient?

JMeter perf test run with Gatling, expecting 300 tr/sec

Page 32: Hands On, Duchess 10/17/2012

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

http://github.com/slandellehttp://twitter.com/slandelle