Code Review
/
csit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Report: Add data
[csit.git]
/
resources
/
tools
/
presentation
/
generator_plots.py
diff --git
a/resources/tools/presentation/generator_plots.py
b/resources/tools/presentation/generator_plots.py
index
1f5a1a7
..
650a51c
100644
(file)
--- a/
resources/tools/presentation/generator_plots.py
+++ b/
resources/tools/presentation/generator_plots.py
@@
-62,7
+62,7
@@
COLORS = (
REGEX_NIC = re.compile(r'(\d*ge\dp\d\D*\d*[a-z]*)-')
# This value depends on latency stream rate (9001 pps) and duration (5s).
REGEX_NIC = re.compile(r'(\d*ge\dp\d\D*\d*[a-z]*)-')
# This value depends on latency stream rate (9001 pps) and duration (5s).
-PERCENTILE_MAX = 99.999
5
+PERCENTILE_MAX = 99.999
9
def generate_plots(spec, data):
def generate_plots(spec, data):
@@
-336,7
+336,6
@@
def plot_hdrh_lat_by_percentile_x_log(plot, input_data):
fig = plgo.Figure()
layout = deepcopy(plot[u"layout"])
fig = plgo.Figure()
layout = deepcopy(plot[u"layout"])
- xaxis_max = 0
for color, graph in enumerate(graphs):
for idx, direction in enumerate((u"direction1", u"direction2")):
for color, graph in enumerate(graphs):
for idx, direction in enumerate((u"direction1", u"direction2")):
@@
-357,7
+356,8
@@
def plot_hdrh_lat_by_percentile_x_log(plot, input_data):
for item in decoded.get_recorded_iterator():
# The real value is "percentile".
for item in decoded.get_recorded_iterator():
# The real value is "percentile".
- # For 100%, we cut that down to "x_perc" to avoid infinity.
+ # For 100%, we cut that down to "x_perc" to avoid
+ # infinity.
percentile = item.percentile_level_iterated_to
x_perc = min(percentile, PERCENTILE_MAX)
xaxis.append(previous_x)
percentile = item.percentile_level_iterated_to
x_perc = min(percentile, PERCENTILE_MAX)
xaxis.append(previous_x)
@@
-396,11
+396,11
@@
def plot_hdrh_lat_by_percentile_x_log(plot, input_data):
hoverinfo=u"text"
)
)
hoverinfo=u"text"
)
)
- xaxis_max = max(xaxis) if xaxis_max < max(
- xaxis) else xaxis_max
layout[u"title"][u"text"] = f"<b>Latency:</b> {name}"
layout[u"title"][u"text"] = f"<b>Latency:</b> {name}"
- layout[u"xaxis"][u"range"] = [0, int(log(xaxis_max, 10)) + 1]
+ layout[u"xaxis"][u"range"] = [
+ 0, round(log(100.0 / (100.0 - PERCENTILE_MAX), 10))
+ ]
fig.update_layout(layout)
# Create plot
fig.update_layout(layout)
# Create plot
@@
-488,14
+488,12
@@
def plot_nf_reconf_box_name(plot, input_data):
df_y = pd.DataFrame(y_vals)
df_y.head()
for i, col in enumerate(df_y.columns):
df_y = pd.DataFrame(y_vals)
df_y.head()
for i, col in enumerate(df_y.columns):
+
tst_name = re.sub(REGEX_NIC, u"",
tst_name = re.sub(REGEX_NIC, u"",
- col.lower().replace(u'-ndrpdr', u'').
- replace(u'2n1l-', u''))
+ col.lower().replace(u'-reconf', u'').
+ replace(u'2n1l-', u'').replace(u'2n-', u'').
+ replace(u'-testpmd', u''))
- if u"ipsec" in tst_name:
- show_name = u'-'.join(tst_name.split(u'-')[2:-1])
- else:
- show_name = u'-'.join(tst_name.split(u'-')[3:-2])
traces.append(plgo.Box(
x=[str(i + 1) + u'.'] * len(df_y[col]),
y=df_y[col],
traces.append(plgo.Box(
x=[str(i + 1) + u'.'] * len(df_y[col]),
y=df_y[col],
@@
-504,7
+502,7
@@
def plot_nf_reconf_box_name(plot, input_data):
f"({nr_of_samples[i]:02d} "
f"run{u's' if nr_of_samples[i] > 1 else u''}, "
f"packets lost average: {mean(loss[col]):.1f}) "
f"({nr_of_samples[i]:02d} "
f"run{u's' if nr_of_samples[i] > 1 else u''}, "
f"packets lost average: {mean(loss[col]):.1f}) "
- f"{
show_name
}"
+ f"{
u'-'.join(tst_name.split(u'-')[2:])
}"
),
hoverinfo=u"y+name"
))
),
hoverinfo=u"y+name"
))