Understanding "resources" usage better

Gatling version: 3.11.5 (must be up to date)
Gatling flavor: [X ] java kotlin scala javascript typescript
Gatling build tool: maven gradle sbt bundle npm

Hello,
I have a few questions around using “resources” block:

If I have something like the following:

 http("main http request ": answer-update")
                            .post("/quote-api/v1/answers/answer-update")
                            .headers(headers_14)
                            .body(ElFileBody("requestBodies/rqrFloridaNewBusSTP/0014_request.json"))
                            // *** RESOURCES BLOCK ***
                            .resources(HTTP1, HTTP2, HTTP3)
                            .headers(headers_1)
                            .body(reqeust.json"))

My questions are:

  1. When the main http call starts, do the resource calls start at the same time or do the resources happen before the main call starts?
  2. If I have some http calls that can be run in parallel in a ChainBuilder, do I have to tie them to a main http call or is there a way to have just a set of http calls that run simultaneously. Ex…just a resource block
  3. If I have a ChainBuilder that has some sequential http calls, then some that could be run in parallel, and then another set of sequential http calls, and then more that can happen simultaneously, is there a simple way to accomplish this besides creating 2 separate ChainBuilders?

Thanks,
Timmer

Hello,

I’ve pushed some improvements to the resources documentation: Gatling HTTP protocol reference - request

Hope it helps.

Thank you Stephane,
That update is very helpful as I was not aware that the resources will happen AFTER the http request it is tied to is complete. To further clarify what the info on the resources block:

  • The “resources” block requests runs AFTER the request it is tied to.
  • A “resources” block CANNOT exist without being tied to a MAIN request.
  • The number of requests that run concurrently from the resources block is capped by the “maxConnectionsPerHost” value.
  • The ONLY way to run requests concurrently is through a resources block

Please let me know if I stated anything incorrectly.

Thank you,
Timmer

  • The number of requests that run concurrently from the resources block is capped by the “maxConnectionsPerHost” value.

Only when using HTTP/1.1.
Otherwise all correct.

There’s a feature request you might be interested in: Core: ability to launch a group of requests in parallel outside the resources scope · Issue #3783 · gatling/gatling · GitHub

Contributions and sponsoring welcome.

Thank you very much.

Hello Stephane, I can add to an existing or add a new post, but I believe there are plenty already.
Side question. Was a way to change the report date/time show local timezones, in my case PST ever implemented?

Thanks,
Timmer

One topic per post please.

I’m wondering if this is correct.
That depends what you have on your mind when think about “concurrently” because you can have simulation where you have multiple scenarios run concurrently → Concurrent Scenarios