11.08., 9:00 - 11:00: Due to updates GitLab will be unavailable for some minutes between 09:00 and 11:00.

Commit 3358c27d authored by Juliane Aulbach's avatar Juliane Aulbach

Add plot bw_lo_hi and small fix for plot inflight_lo_hi

parent 2bcc45af
......@@ -519,9 +519,16 @@ def parse_bbr_and_cwnd_values(path):
for postion in bbr2:
if parameter in postion:
value = postion.replace(parameter,'')
#if parameter == 'bw_hi:' or parameter == 'bw_lo:':
if parameter == 'bw_hi:':
if parameter == 'bw_hi:' or parameter == 'bw_lo:':
value = parse_bw(value)
# (2^64-1)*8 = 1.4757395e+20
if value >= 147573952589676000000:
value = 0
if parameter == 'inflight_lo:' or parameter == 'inflight_hi:':
# 2^31-1 = 4294967295
value = float(value)
if value >= 4294967295:
value = 0
break
bbr2_values[i][index+1].append(value)
f.close()
......
......@@ -25,10 +25,10 @@ PLOT_TYPES = [
'rt_prop',
'window_gain',
'pacing_gain',
'bw_lo_hi',
'inflight_lo_hi',
]
COMPRESSION_METHODS = ['none', 'gzip', 'bzip2']
COMPRESSION_EXTENSIONS = {
'none': '',
......
......@@ -143,9 +143,14 @@ def plot_all(path, pcap_data, plot_only, hide_total=False, all_plots=False):
has_bbr2 = True
break
if 'bw_lo_hi' in plot_only and has_bbr2:
plots += [
Plot(bbr2_values, plot_bw_lo_hi, 'plot_bw_lo_hi.pdf', 'BBR2 BW Lo and Hi', 'bit', len(bbr2_values)),
]
if 'inflight_lo_hi' in plot_only and has_bbr2:
plots += [
Plot(bbr2_values, plot_inflight_lo_hi, 'plot_inflight_lo_hi.pdf', 'BBR2 Inflight Lo and Hi', 'bit', len(bbr2_values)),
Plot(bbr2_values, plot_inflight_lo_hi, 'plot_inflight_lo_hi.pdf', 'BBR2 Inflight Lo and Hi', 'MSS', len(bbr2_values)),
]
if all_plots:
......@@ -440,6 +445,19 @@ def plot_diff_inflight_bdp(data, p_plt):
p_plt.plot(ts, diff, label='{}'.format(c))
def plot_bw_lo_hi(bw_lo_hi, p_plt):
colors = plt.rcParams['axes.prop_cycle'].by_key()['color']
p_plt.plot([], [], label='bw_lo', color='black')
p_plt.plot([], [], ':', label='bw_hi', color='black')
p_plt.legend()
for i, c in enumerate(bw_lo_hi):
data = bw_lo_hi[c]
p_plt.plot(data[0], data[2], color=colors[i % len(colors)])
p_plt.plot(data[0], data[1], ':', color=colors[i % len(colors)])
def plot_inflight_lo_hi(inflight_lo_hi, p_plt):
colors = plt.rcParams['axes.prop_cycle'].by_key()['color']
......@@ -502,4 +520,4 @@ def shift_timestamps(data):
for c in data[v]:
data[v][c][0][:] = [x - t_min for x in data[v][c][0]]
return PcapData.from_dict(data)
return PcapData.from_dict(data)
\ No newline at end of file
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