Custom Protocol (thrift) testing... unable to simulate multiple users in repeated scenario.

Hi Gatling Users,

I am using 2.1.1 version of gatling.

I have written a custom Action/Actionbuilder for doing perf testing for our thrift server.

val mine = new ActionBuilder {
def build(next: ActorRef , protocols: Protocols) = system.actorOf(Props(new MyAction(next,new ThriftClient(HOST,PORT), SCENARIO)))
}

And i am using this action builder like this.
val scn = scenario(SCENARIO)
.repeat(ITERATIONS) {
exec(mine)
}
setUp(scn.inject(rampUsers(NUM_USERS) over (PICK_UP_DUR_IN_SEC)))

Now the problem is For all the users this test creates only one action which means only one connection to server and that means user simulation is wasted and there is no point of using multiple users if they use same socket/connection.

Now my question is what is it that i am doing wrong ? How can i make users create different actions so that each tries to talk to server on different connection.

Note: I have gone through the documentation here : http://gatling.io/docs/1.5.6/developing_gatling/implementing_your_own_protocol_support.html#the-action
which says actions can be shared by users , but what surprises me is no matter how many users i create it always create only one instance of Action and i know that gatling for http does create multiple connections to our http server.

Please help me if you have any pointer ?

P.S. http://gatling.io/docs/1.5.6/developing_gatling/implementing_your_own_protocol_support.html#the-action This is the only documentation i could find and this seems to be outdated ? Is there any other new doc ?

simulation.txt (990 Bytes)

action.txt (1.45 KB)

Create a ThriftClient instance per virtual user and store it in the session, just like it’s being done for WebSockets. Don’t forget to close them.

Hi Stephane,

Thanks for reply , can you please point me to the code of WebScoket which you are referring to. I am having a hard time figuring it out. ( I am new to scala / actors)