class ThriftOnTcpSimulation extends Simulation { val config = new PerfServerConfigFactory("perf_server.conf").getPerfServerConfig() val HOST = config.getHost() val PORT = config.getPort() // Number of concurrent users val NUM_USERS = config.getUsers() // Number of Requests per user. val ITERATIONS = config.getIterations() // Time to load all the users. val PICK_UP_DUR_IN_SEC = config.getRampDurationInSec() val SCENARIO = "Thrift on TCP Scenario" //true incase of http , false for tcp //val delegate = new ThriftClient(HOST,PORT,false) val mine = new ActionBuilder { println("Called mine action builder") //val delegate = new ThriftClient(HOST,PORT,false) def build(next: ActorRef , protocols: Protocols) = system.actorOf(Props(new MyAction(next,new ThriftClient(HOST,PORT,false), SCENARIO))) } val scn = scenario(SCENARIO) .repeat(ITERATIONS) { exec(mine) } setUp(scn.inject(rampUsers(NUM_USERS) over (PICK_UP_DUR_IN_SEC))) }