 request          = require('request')
 lodash           = require('lodash')
 debug            = require('debug')
+async            = require('async')
 
 benchmarkConfig = require('./benchmark_config')
 routes = require('../../src/server/application_manager/routes')

        # id is a unique client identifier in all client processes
        {@eventDescriptors, @createBrowser,
        @appAddress, @cbhost, @socketioUrl, @stats,
        @id, @serverLogging} = options
        @stopped = false
        @eventContext = new benchmarkConfig.EventContext({clientId:@id})
        @eventQueue = new benchmarkConfig.EventQueue({

            })

    addChild : (child) ->
        if @optimizeConnection
            @once('browserconfig', (browserConfig)->
                child.browserConfig = browserConfig
            )
            return
        

        @once('browserconfig', (browserConfig)->
            logger("#{child.id} starting")
            child.browserConfig = browserConfig
