def onok(res): if not options.skipanalyze: analyze.printResults(resultfiles) reactor.stop()
parser.add_argument('--resultfile', dest = 'resultfile', type = str, default = r'result_%d.json', help = 'Result file pattern.') parser.add_argument('--wsperf', dest = 'wsperf', type = str, default = default_wsperf, help = 'Full path to wsperf executable.') parser.add_argument('--skiprun', dest = 'skiprun', action = "store_true", default = False, help = 'Skip test run.') parser.add_argument('--skipanalyze', dest = 'skipanalyze', action = "store_true", default = False, help = 'Skip analyze results.') options = parser.parse_args() resultfiles = [(options.resultfile % i) for i in xrange(options.workers)] if options.skiprun: ## here we don't start a reactor. if not options.skipanalyze: analyze.printResults(resultfiles) else: df = [] for i in range(options.workers): args = [options.wsuri, str(options.threads), str(options.conns), str(options.lowmark), str(options.highmark), options.resultfile % i] ## run wsperf executable d = getProcessOutput(options.wsperf, args, os.environ)
help='Skip test run.') parser.add_argument('--skipanalyze', dest='skipanalyze', action="store_true", default=False, help='Skip analyze results.') options = parser.parse_args() resultfiles = [(options.resultfile % i) for i in xrange(options.workers)] if options.skiprun: ## here we don't start a reactor. if not options.skipanalyze: analyze.printResults(resultfiles) else: df = [] for i in range(options.workers): args = [ options.wsuri, str(options.threads), str(options.conns), str(options.lowmark), str(options.highmark), options.resultfile % i ] ## run wsperf executable d = getProcessOutput(options.wsperf, args, os.environ)