Gatling reports incorrect performance results for Websocket app

Using Gatling 2.1.7 to test performance of our application.

  1. app send the query
  2. server starts responding with partial data every few seconds
  3. 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:

But when I do same thing in Gatling, I’m getting 198 seconds:

Here is part of the script:

  val completeString:String = """.*"completion":1\.0,"data":.*"""

  val httpConf = http

  val scn = scenario("WebSocket")
    .exec(ws("Connect WS").open(""))
    .exec(ws("Sending query")
           .sendText(session => optimizeQuery())
    .exec{ session =>
    .exec(ws("Close WS").close)

  //setUp(scn.inject(rampUsers(users) over (2 seconds)).protocols(httpConf))

Why results would be so wrong in Gatling?

The run above has WebSocket timeout.

So, I repeated steps with smaller query.
And got same results, but without timeout:
18 Seconds for manual tests:

But when I do same thing in Gatling, I’m getting 88 seconds:

No idea. Would need to be able to get my hands on a reproducer to be able to investigate.