what does pause on chainBuilder do?

We have used Gatling for performance and load test for awhile. As we added more scenarios to our one hour capacity test, the distribution of the requests skews.

we set pause on chainBuilder as following:

def build: ChainBuilder = applyChain(chainBuilder, httpRequestBuilder).pause(10.milliseconds)

def checkAnswersPresent: ChainBuilder = {
httpRequestBuilder = httpRequestBuilder

this.build
}

It seems that if we set pause to a big number, 5 sec, distribution of requests seems better. What does this pause exactly do?Does that mean we always pause for 5 sec before sending next request using this chainBuilder? How to make distribution more evenly.

Appreciate your help,

Tony

What does this pause exactly do?

It introduces a pause in the workflow, so when a virtual user reaches this point, it does a pause before resuming to the next step.

Does that mean we always pause for 5 sec before sending next request using this chainBuilder?

I can’t say what you code does as there’s only a small piece of it.
Here virtual users do a pause of 10.milliseconds after whatever applyChain does

How to make distribution more evenly.

Fix your system under load. The non-uniformness is a consequence of the non-uniformness of the response times and possible degradation over time.
Gatling is the messenger here.

Really appreciate your prompt response. If I understood correctly, how Gatling sends requests depends on not only how we ask Gatling to do (through config) but also the response time of the server we test. Is that correct?

If you implement user journeys where each virtual user executes multiple requests, absolutely.