[英]Ignore response body in Gatling
As part of a load test in Gatling, I download a huge file (about 4GB).作为 Gatling 负载测试的一部分,我下载了一个巨大的文件(大约 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.这样做时,我可以观察到 Gatling 的 memory 使用量逐渐增加,直到达到 2GB,然后停止下载直到超时。
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:
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))
)
Response body will not be consolidated and will be discarded unless:响应正文将不会合并,将被丢弃,除非:
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.