Class UniformDistribution
- java.lang.Object
-
- com.github.tomakehurst.wiremock.http.UniformDistribution
-
- All Implemented Interfaces:
DelayDistribution
public final class UniformDistribution extends java.lang.Object implements DelayDistribution
Distribution that returns values uniformally distributed across a range.That is, given a uniform distribution of 50 to 60 ms, there will be an equal spread of delays between 50 and 60. This would useful for representing an average delay of 55ms with a +/- 5ms jitter.
-
-
Constructor Summary
Constructors Constructor Description UniformDistribution(int lower, int upper)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description long
sampleMillis()
Samples a delay in milliseconds from the distribution.
-
-
-
Method Detail
-
sampleMillis
public long sampleMillis()
Description copied from interface:DelayDistribution
Samples a delay in milliseconds from the distribution.- Specified by:
sampleMillis
in interfaceDelayDistribution
- Returns:
- next delay in millis
-
-