run_benchmark.py fixes

This commit is contained in:
Arvid Norberg 2014-01-28 03:23:44 +00:00
parent 8e0b458464
commit 4f1a315d36
1 changed files with 6 additions and 4 deletions

View File

@ -21,9 +21,11 @@ if ret != 0:
sys.exit(1)
try: os.remove('.ses_state')
except: pass
try: shutils.rmtree('.resume')
except: pass
except Exception, e: print e
try: shutil.rmtree('.resume')
except Exception, e: print e
try: shutil.rmtree('cpu_benchmark')
except Exception, e: print e
if not os.path.exists('cpu_benchmark.torrent'):
ret = os.system('../examples/connection_tester gen-torrent -s 10000 -n 15 -t cpu_benchmark.torrent')
@ -47,7 +49,7 @@ def run_test(name, test_cmd, client_arg, num_peers):
except: pass
start = time.time();
client_cmd = '../examples/client_test -p %d cpu_benchmark.torrent -k -z -H -X -q 120 %s -h -c %d -T %d -C %d -f %s/events.log' \
client_cmd = '../examples/client_test -p %d cpu_benchmark.torrent -0 -k -z -H -X -q 120 %s -h -c %d -T %d -C %d -f %s/events.log' \
% (port, client_arg, num_peers*2, num_peers*2, cache_size * 16, output_dir)
test_cmd = '../examples/connection_tester %s -c %d -d 127.0.0.1 -p %d -t cpu_benchmark.torrent' % (test_cmd, num_peers, port)