excilys/gatling — pull request #529 by skuenzli (2012-05-27 20:53:32+00:00)
Title: Feature: pause based on an exponential distribution

Add a 'pauseExp' action to allow simulations to include pauses based on an exponential distribution of delays.

Example:
```
http("homepage")
.get("/sample-webapp/")
.headers(headers_standard)
.check(status.in(List(200, 503))))
.pauseExp(100, MILLISECONDS)
```

The implementation and testing of the exponential number generation relies on Apache Commons Math, v3 (http://commons.apache.org/math/). Testing of all NumberHelper.getRandom* functions is now done via commons-math.

In order to simplify implementation of pause actions, PauseAction.scala has been converted to a trait and is now extended by UniformPauseAction and ExpPauseAction for uniformly and exponentially distributed pauses, respectively. PauseAction provides the implementation of execute, and Uniform/ExpPauseAction only need to implement:
```scala
def generateDelayInMillis:Long
def next: ActorRef
```

Existing simulations should not be affected by this change, as PauseActionBuilder [still] creates UniformPauseActions, not ExpPauseActions.