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 rls 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
8161a5a
..
f03a57f
100644
(file)
--- a/
resources/tools/presentation/generator_plots.py
+++ b/
resources/tools/presentation/generator_plots.py
@@
-610,12
+610,12
@@
def plot_perf_box_name(plot, input_data):
if u"TCP_CPS" in test[u"tags"]:
test_type = u"VSAP_CPS"
y_vals[test[u"parent"]].append(
if u"TCP_CPS" in test[u"tags"]:
test_type = u"VSAP_CPS"
y_vals[test[u"parent"]].append(
- test[u"result"][u"cps"]
/ 1e6
+ test[u"result"][u"cps"]
)
elif u"TCP_RPS" in test[u"tags"]:
test_type = u"VSAP_RPS"
y_vals[test[u"parent"]].append(
)
elif u"TCP_RPS" in test[u"tags"]:
test_type = u"VSAP_RPS"
y_vals[test[u"parent"]].append(
- test[u"result"][u"rps"]
/ 1e6
+ test[u"result"][u"rps"]
)
else:
continue
)
else:
continue
@@
-645,9
+645,13
@@
def plot_perf_box_name(plot, input_data):
tst_name = re.sub(REGEX_NIC, u"",
col.lower().replace(u'-ndrpdr', u'').
replace(u'2n1l-', u''))
tst_name = re.sub(REGEX_NIC, u"",
col.lower().replace(u'-ndrpdr', u'').
replace(u'2n1l-', u''))
+ if test_type in (u"VSAP_CPS", u"VSAP_RPS"):
+ data_y = [y if y else None for y in df_y[col]]
+ else:
+ data_y = [y / 1e6 if y else None for y in df_y[col]]
kwargs = dict(
x=[str(i + 1) + u'.'] * len(df_y[col]),
kwargs = dict(
x=[str(i + 1) + u'.'] * len(df_y[col]),
- y=
[y / 1e6 if y else None for y in df_y[col]]
,
+ y=
data_y
,
name=(
f"{i + 1}. "
f"({nr_of_samples[i]:02d} "
name=(
f"{i + 1}. "
f"({nr_of_samples[i]:02d} "
@@
-664,7
+668,7
@@
def plot_perf_box_name(plot, input_data):
try:
val_max = max(df_y[col])
if val_max:
try:
val_max = max(df_y[col])
if val_max:
- y_max.append(int(val_max / 1e6)
+ 2
)
+ y_max.append(int(val_max / 1e6))
except (ValueError, TypeError) as err:
logging.error(repr(err))
continue
except (ValueError, TypeError) as err:
logging.error(repr(err))
continue
@@
-677,14
+681,14
@@
def plot_perf_box_name(plot, input_data):
layout[u"title"] = f"<b>Bandwidth:</b> {layout[u'title']}"
elif test_type == u"VSAP_CPS":
layout[u"title"] = f"<b>CPS:</b> {layout[u'title']}"
layout[u"title"] = f"<b>Bandwidth:</b> {layout[u'title']}"
elif test_type == u"VSAP_CPS":
layout[u"title"] = f"<b>CPS:</b> {layout[u'title']}"
- layout[u"yaxis"][u"title"] = u"<b>Connection Rate [
M
cps]</b>"
+ layout[u"yaxis"][u"title"] = u"<b>Connection Rate [cps]</b>"
elif test_type == u"VSAP_RPS":
layout[u"title"] = f"<b>RPS:</b> {layout[u'title']}"
elif test_type == u"VSAP_RPS":
layout[u"title"] = f"<b>RPS:</b> {layout[u'title']}"
- layout[u"yaxis"][u"title"] = u"<b>Connection Rate [
M
rps]</b>"
+ layout[u"yaxis"][u"title"] = u"<b>Connection Rate [rps]</b>"
else:
else:
- layout[u"title"] = f"<b>T
hrough
put:</b> {layout[u'title']}"
- if y_max:
- layout[u"yaxis"][u"range"] = [0, max(y_max)]
+ layout[u"title"] = f"<b>Tput:</b> {layout[u'title']}"
+ if y_max
and max(y_max) > 1
:
+ layout[u"yaxis"][u"range"] = [0, max(y_max)
+ 2
]
plpl = plgo.Figure(data=traces, layout=layout)
# Export Plot
plpl = plgo.Figure(data=traces, layout=layout)
# Export Plot
@@
-796,7
+800,7
@@
def plot_ndrpdr_box_name(plot, input_data):
layout[u"title"] = f"<b>CPS:</b> {layout[u'title']}"
else:
layout[u"title"] = \
layout[u"title"] = f"<b>CPS:</b> {layout[u'title']}"
else:
layout[u"title"] = \
- f"<b>T
hrough
put:</b> {layout[u'title']}"
+ f"<b>Tput:</b> {layout[u'title']}"
if data_y_max:
layout[u"yaxis"][u"range"] = [0, max(data_y_max) / 1e6 + 1]
plpl = plgo.Figure(data=traces, layout=layout)
if data_y_max:
layout[u"yaxis"][u"range"] = [0, max(data_y_max) / 1e6 + 1]
plpl = plgo.Figure(data=traces, layout=layout)
@@
-891,7
+895,7
@@
def plot_mrr_box_name(plot, input_data):
layout = deepcopy(plot[u"layout"])
if layout.get(u"title", None):
layout[u"title"] = (
layout = deepcopy(plot[u"layout"])
if layout.get(u"title", None):
layout[u"title"] = (
- f"<b>T
hrough
put:</b> {layout[u'title'].format(core=core)}"
+ f"<b>Tput:</b> {layout[u'title'].format(core=core)}"
)
if data_y_max:
layout[u"yaxis"][u"range"] = [0, max(data_y_max) + 1]
)
if data_y_max:
layout[u"yaxis"][u"range"] = [0, max(data_y_max) + 1]