Commit 4f3d228e authored by Martín Ferrari's avatar Martín Ferrari

merge

parents cae6df2a f1107ccf
......@@ -154,9 +154,24 @@ def main():
return
data = out.split(" ")
data = map(lambda s: s.partition(":")[2], data)
data = dict(map(lambda s: s.partition(":")[::2], data))
if sorted(data.keys()) != sorted(["brx", "prx", "pksz", "plsz", "err",
"mind", "avgd", "maxd", "jit", "time"]):
raise RuntimeError("Invalid output from udp-perf")
data["nodes"] = nr
data["bridge"] = int(not use_p2p)
data["cfg_dly"] = delay if delay else ""
data["cfg_bw"] = bandwidth if bandwidth else ""
data["cfg_jit"] = jitter if jitter else ""
res = []
for i in ["nodes", "bridge", "cfg_dly", "cfg_bw", "cfg_jit",
"brx", "prx", "pksz", "plsz", "err", "mind", "avgd",
"maxd", "jit", "time"]:
res.append(data[i])
writer = csv.writer(sys.stdout)
writer.writerow([" ".join(sys.argv[1:])] + data)
writer.writerow(res)
def ip2dec(ip):
match = re.search(r'^(\d+)\.(\d+)\.(\d+)\.(\d+)$', ip)
......
......@@ -279,8 +279,6 @@ static void run_server(int port, uint64_t max_time, uint64_t max_pkts,
printf("mind:%ld avgd:%ld maxd:%ld jit:%lf time:%ld ",
min_delay, tot_delay / preceived, max_delay, jitter,
now - start);
printf("bw:%ld\n",
(long)(1.0L * (breceived * 8000000) / (now - start)));
}
status = close(fd);
......
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