Gatling - JUGL, 2012-09-13

33
How to stress test your application with Gatling ? Lausanne, September 13 th 2012

Transcript of Gatling - JUGL, 2012-09-13

Page 1: Gatling  - JUGL, 2012-09-13

How to stress test your application with Gatling ?

Lausanne, September 13th 2012

Page 2: Gatling  - JUGL, 2012-09-13

Why a new tool ?

Page 3: Gatling  - JUGL, 2012-09-13
Page 4: Gatling  - JUGL, 2012-09-13

Issue n°1:High performance

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

Page 5: Gatling  - JUGL, 2012-09-13

1 user = 1 thread

Page 6: Gatling  - JUGL, 2012-09-13

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

Page 7: Gatling  - JUGL, 2012-09-13

With 2000 threads on a JVM

Page 8: Gatling  - JUGL, 2012-09-13

Blocking IO

Page 9: Gatling  - JUGL, 2012-09-13

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

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

Page 10: Gatling  - JUGL, 2012-09-13

... and sleeping

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

Page 11: Gatling  - JUGL, 2012-09-13

Issue n°2:Usability

Page 12: Gatling  - JUGL, 2012-09-13

Graphical Interface

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

Listen, it's actually not complicated ...

Page 13: Gatling  - JUGL, 2012-09-13

Issue n°3:Maintenance

Page 14: Gatling  - JUGL, 2012-09-13

What was this change about ?

Page 15: Gatling  - JUGL, 2012-09-13

Listen to us, Gatling can change all that !

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

Page 16: Gatling  - JUGL, 2012-09-13

Say hello to my little friend ...

Page 17: Gatling  - JUGL, 2012-09-13

Be asynchronous, embrace the actors model

Page 18: Gatling  - JUGL, 2012-09-13

Don't use blocking IO

> Netty > Async-Http-Client

Page 19: Gatling  - JUGL, 2012-09-13

Scenario= Code= DSL

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

Page 20: Gatling  - JUGL, 2012-09-13

version 1.3.0

Expected by the end of September 2012

All examples will be based on this version

Page 21: Gatling  - JUGL, 2012-09-13

Easy

Page 22: Gatling  - JUGL, 2012-09-13

Démo !

http://frizzlesworld.files.wordpress.com/2011/02/computer-cat.jpg

Page 23: Gatling  - JUGL, 2012-09-13

Feeling lazy? Try the recorder.

Page 24: Gatling  - JUGL, 2012-09-13

Démo !

http://frizzlesworld.files.wordpress.com/2011/02/computer-cat.jpg

Page 25: Gatling  - JUGL, 2012-09-13

Powerful : write your own Scala code

Page 26: Gatling  - JUGL, 2012-09-13

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 27: Gatling  - JUGL, 2012-09-13

Polling

Page 28: Gatling  - JUGL, 2012-09-13

Markov chains

(Cycles are not supported so far...)

Page 29: Gatling  - JUGL, 2012-09-13

See also : .roundRobinSwitch()

Page 30: Gatling  - JUGL, 2012-09-13

Démo !

http://frizzlesworld.files.wordpress.com/2011/02/computer-cat.jpg

Page 31: Gatling  - JUGL, 2012-09-13

Coming soon : > Live reporting in Graphite

> Jenkins reports> Clustering

Page 32: Gatling  - JUGL, 2012-09-13

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

● 2000 downloads since the beginning● 500 downloads of Gatling 1.2.5

Page 33: Gatling  - JUGL, 2012-09-13

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

http://github.com/nirehttp://twitter.com/nremond