MetaColon
MetaColon

Reputation: 2871

Ignore response body in Gatling

As part of a load test in Gatling, I download a huge file (about 4GB).

When doing so, I can observe the memory usage of Gatling gradually increase, until it hits 2GB, when it stops the download until it times out.

As I don't care about the response body (as long as it's being downloaded), I'd like to discard it.

How is this possible?

I'm not sure a code example is useful, but this is the calling exec:

exec(
  http("Get image data")
    .get("Url/To/Data")
    // Don't save the response body, as it's too large
    // .check(bodyString.saveAs("responseBody"))
    .check(status.is(200))
)

Upvotes: 3

Views: 388

Answers (1)

Stéphane LANDELLE
Stéphane LANDELLE

Reputation: 6608

Response body will not be consolidated and will be discarded unless:

  • you do use it, eg with a check
  • you enable debug logging that causes it to be displayed in the logs

Upvotes: 2

Related Questions