Hello.
If I try to make request for 150 users:
def authenticationRandomStringRequest2: ChainBuilder = {
builder
.exec(http(“authentication random string 2”)
.post(“authentication/randomString”)
.header(
“x-header”,"""{“appCertificateFingerprint”:“AE:FF:1E:19:73:8E:A3:0B:75:99:8B:24:71:46:A4:A6:66:D0:59:BC:1C:00:16:ED:FD:11:FF:87:2E:CD:92:BB”,“deviceFingerprint”:“loadtest”,“deviceId”:“loadtest”"}"""
)
.check(jsonPath("$").saveAs(“randomStringResponse”))
)
}
And get result where response time for this request is less then 0.1 s (see attach simulation-20210810100107750 without check.png )
but if I make this requests and add check
def authenticationRandomStringRequest2: ChainBuilder = {
builder
.exec(http(“authentication random string 2”)
.post(“authentication/randomString”)
.header(
“x-header”, “”"{“appCertificateFingerprint”:“AE:FF:1E:19:73:8E:A3:0B:75:99:8B:24:71:46:A4:A6:66:D0:59:BC:1C:00:16:ED:FD:11:FF:87:2E:CD:92:BB”,“deviceFingerprint”:“loadtest”,“deviceId”:“loadtest”"}"""
)
.check(jsonPath("$").saveAs(“randomStringResponse”))
.check(
jsonPath("$")
.transformWithSession((string, session) => {
var valueToSign = “”
for (
parent ←
defaultJsonParsers
.parse(string)
.findParents(“randomString”)
.toArray
) {
if (
!defaultJsonParsers.parse(parent.toString).has(“attachmentId”)
) {
valueToSign = defaultJsonParsers
.parse(parent.toString)
.findValue(“randomString”)
.asText()
}
}
IitUtils
.getInstance()
.signData(
Base64.getDecoder.decode(session(“key”).as[String]),
password,
valueToSign
)
})
.saveAs(“signedDataParameter”)
)
)
}
Then response time in report becomes much bigger (see simulation-20210810100834711 with check.png)
In both cases I use fiddler to capture traffic, and in both cases I see, that response time is about 0.1 s.
Gatling documentations says that "The response time is the elapsed time between the instant a request is sent and the instant the complete response is received:
The beginning of the request’s sending is the instant when the connection to the target host has been established or grabbed from the pool.
The end of the response’s receiving is the instant when the whole response (status, headers and body) has been received by Gatling"
But in this case I think, that Gatling adds time of check calculation to response time.
May be you can tell me, what I do wrong, and how can I resolve this issue?
Thank you in advance.
Ilya Dikun