Exemplo n.º 1
0
# get default config parameters
agents = config.AGENTS
duration = config.DURATION
rampup = config.RAMPUP
interval = config.INTERVAL
tc_xml_filename = config.TC_XML_FILENAME
output_dir = config.OUTPUT_DIR
test_name = config.TEST_NAME
log_msgs = config.LOG_MSGS
blocking = config.BLOCKING
gui = config.GUI


# parse command line arguments
opt, args = optionparse.parse(__doc__)


if not opt and not args:
    print 'version: %s' % VERSION
    optionparse.exit()
try:
    if opt.agents:
        agents = int(opt.agents)
    if opt.duration:
        duration = int(opt.duration)
    if opt.rampup:
        rampup = int(opt.rampup)
    if opt.interval:
        interval = int(opt.interval)
    if opt.xmlfile:
Exemplo n.º 2
0
# get default config parameters
agents = config.AGENTS
duration = config.DURATION
rampup = config.RAMPUP
interval = config.INTERVAL
tc_xml_filename = config.TC_XML_FILENAME
output_dir = config.OUTPUT_DIR
test_name = config.TEST_NAME
log_msgs = config.LOG_MSGS
blocking = config.BLOCKING
gui = config.GUI


# parse command line arguments
opt, args = optionparse.parse(__doc__)


try:
    if opt.agents:
        agents = int(opt.agents)
    if opt.duration:
        duration = int(opt.duration)
    if opt.rampup:
        rampup = int(opt.rampup)
    if opt.interval:
        interval = int(opt.interval)
    if opt.xmlfile:
        tc_xml_filename = opt.xmlfile
    if opt.log_msgs: 
        log_msgs = True