Commit ae7732c5 authored by Deathcrow's avatar Deathcrow

code cleanup

parent 389fdd62
......@@ -225,9 +225,9 @@ parser.add_argument('-C', '--comment', default="", \
parser.add_argument('-P', '--cpunetlog' , default="", \
help="Path to cpunetlog folder")
parser.add_argument("--netperf-dataport", default=str(random.randint(15000,65000)), \
help="Port for the data conncections by netperf. Will be incremented per sender")
help="Port for the data conncections by netperf. Will be incremented per additional sender")
parser.add_argument('-D', '--tcpdump', default="0", \
help="Enable/Disable tcpdump (Default: disabled")
help="Enable/Disable tcpdump (Default: disabled)")
parser.add_argument('-S', '--samplerate', default="0.1", \
help="Samplerate for measurements: Defines amount of seconds between samples")
parser.add_argument('--legacy', action='store_true', \
......@@ -302,11 +302,6 @@ if args.legacy:
if args.tcpdump == "1":
tcpdump = subprocess.Popen(["tcpdump", "-iany", "-w"+args.tmp_folder+"/tcpdump_"+str(mypid), "-s100"])
#TODO? if congesion_algo == all check proc and do all
# Prapare command line for each sender
for key, i in enumerate(sender):
......@@ -327,16 +322,14 @@ for key, i in enumerate(sender):
i['utility_file'] = open(args.tmp_folder+"/"+args.utility+"_"+i['congestion']+"_"+str(key), 'w+')
# print(i['src']+":"+i['src_port']+" "+i['dst']+":"+i['port'])
#setup done, run tests in 5 seconds
start_time = time.perf_counter() + 5
#quick and simple ipv4 compatibility without adding additional comparisons in sampling loop
bracket_open = "["
bracket_close = "]"
if args.use_ipv4:
bracket_open = bracket_close = ""
#setup done, run tests in 5 seconds
start_time = time.perf_counter() + 5
## Start senders in different processes
......@@ -361,7 +354,7 @@ time.sleep(start_time - time.perf_counter())
## Find out which src_port belongs to which sender (not necessary for netperf) ##
# TODO: FIXME, SLEEP AS A WORKAROUND IS UNRELIABLE AND DIRTY.
# Disabled, we can use port for iperf because we have multiple servers anyway
# Disabled for now: we can use port for iperf because we have multiple servers anyway
if 0 and args.utility != "netperf":
time.sleep(0.1) # sacrifice first-born to satan
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment