                 setTimeout(fireNextEvent, waitDuration)
 
     _serverEventHandler : (eventName, args)->
+        logger("eventName #{eventName} #{JSON.stringify(args)}")
         @stats.addCounter('serverEvent')
+        return if @stopped
         # dosomething special for batch events....
         if eventName is 'batch'
             batchedEvents = args[0]

process.on('SIGTERM',()->
    if clientProcess and not benchmarkFinished
        reportStats(clientProcess.stats.report2())
        resultLogger "terminated"
        process.exit(1)
)
        clientProcess.start()
        clientProcess.once("started", next)
        intervalObj = setInterval(()->
            reportStats(clientProcess.stats.report2())
            return if benchmarkFinished
            benchmarkFinished = clientProcess.isStopped()
            if not benchmarkFinished
                clientProcess.timeOutCheck()
            else
                logger("benchmark finished, wait #{opts.timeout}ms to exit.")
                # receive all the server side events
                setTimeout(()->
                    clearInterval(intervalObj)
                    sysMon.stop()
                    resultLogger "stopped"
                    process.exit(1)
                , opts.timeout)
        , 3000
        )
    (next)->
