Using Gatling 2.1.7 to test performance of our application.
Scenario:
- app send the query
- server starts responding with partial data every few seconds
- after some time server sends complete dataset, which has “completion”:1.0,“data”
So, when I do these steps manually (In Chrome WebSocket app), I’m see, that query is completed in 28 seconds:
http://slavikca.myds.me/Files/forums/direct.txt
But when I do same thing in Gatling, I’m getting 198 seconds:
http://slavikca.myds.me/Files/forums/gatling.txt
Here is part of the script:
val completeString:String = """.*"completion":1\.0,"data":.*"""
val httpConf = http
.wsBaseURL(endpoint)
val scn = scenario("WebSocket")
.exec(ws("Connect WS").open(""))
.exec(ws("Sending query")
.sendText(session => optimizeQuery())
.check(wsAwait.within(300).until(1).regex(completeString).saveAs("SiftOutput"))
)
.exec{ session =>
session("SiftOutput").asOption[String].foreach(println)
session
}
.exec(ws("Close WS").close)
//setUp(scn.inject(rampUsers(users) over (2 seconds)).protocols(httpConf))
setUp(scn.inject(atOnceUsers(1)).protocols(httpConf))
}
Why results would be so wrong in Gatling?