factory = BroadcastClientFactory(wsuri, debug) connectWS(factory) else: raise Exception("logic error") elif mode == 'wsperfcontrol': wsuri = str(o.opts['wsuri']) spec = str(o.opts['spec']) spec = json.loads(open(spec).read()) factory = WsPerfControlFactory(wsuri) factory.spec = spec factory.debugWsPerf = spec['options']['debug'] connectWS(factory) elif mode == 'wsperfmaster': ## WAMP Server for wsperf slaves ## wsperf = WsPerfMasterFactory("ws://localhost:9090") wsperf.debugWsPerf = False listenWS(wsperf) ## Web Server for UI static files ## webdir = File(pkg_resources.resource_filename("autobahntestsuite", "web/wsperfmaster")) web = Site(webdir)
factory = BroadcastClientFactory(wsuri, debug) connectWS(factory) else: raise Exception("logic error") elif mode == "wsperfcontrol": wsuri = str(o.opts["wsuri"]) spec = str(o.opts["spec"]) spec = json.loads(open(spec).read()) factory = WsPerfControlFactory(wsuri) factory.spec = spec factory.debugWsPerf = spec["options"]["debug"] factory.outfile = spec["options"]["outfile"] factory.sep = spec["options"]["sep"] factory.digits = spec["options"]["digits"] connectWS(factory) elif mode == "wsperfmaster": ## WAMP Server for wsperf slaves ## wsperf = WsPerfMasterFactory("ws://localhost:9090") wsperf.debugWsPerf = False listenWS(wsperf) ## Web Server for UI static files