Hi STephane,
I am using the latest Gatling release ie, snapshot release. I have two httpprotocols for a single simulation. one will be receiving the request from the other httpprotocol. I want to measure latency ie, time when request was sent to httpprotocol1 and time when request reached httpprotocol2. And I have used below lines:
val httpProtocol = http.baseURL(“http://xx.xx.xx.xx”).acceptHeader(“application/xml”)
.extraInfoExtractor((name,status:Status, session:Session, request:Request, response: Response) => {
List(t1=response.lastByteReceived
)
})
val httpProt = http.baseURL(“http://yy.yy.yy.yy”).acceptHeader(“application/xml”)
.extraInfoExtractor((name,status:Status, session:Session, request:Request, response: Response) => {
List(if(request.getUrl().contains(“GetNotifications”)){t2=response.lastByteReceived},
println("T1 : "+t1),
println("T2 : "+t2),
if(t1!=0){
logger.info(“Latency,{}”,t2-t1)
}
)
})
Could you validate this? Because at times, am not receiving proper times. I hope response.lastByteReceived will give the time when last byte of response was received by the server.