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 rc1 data
[csit.git]
/
resources
/
tools
/
presentation
/
generator_tables.py
diff --git
a/resources/tools/presentation/generator_tables.py
b/resources/tools/presentation/generator_tables.py
index
1439c4a
..
d4f3c76
100644
(file)
--- a/
resources/tools/presentation/generator_tables.py
+++ b/
resources/tools/presentation/generator_tables.py
@@
-1,4
+1,4
@@
-# Copyright (c) 202
2
Cisco and/or its affiliates.
+# Copyright (c) 202
3
Cisco and/or its affiliates.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at:
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at:
@@
-915,8
+915,8
@@
def table_soak_vs_ndr(table, input_data):
else:
data_c_mean = mean(data_c)
data_c_stdev = stdev(data_c)
else:
data_c_mean = mean(data_c)
data_c_stdev = stdev(data_c)
- item.append(round(data_c_mean / 1e6,
1
))
- item.append(round(data_c_stdev / 1e6,
1
))
+ item.append(round(data_c_mean / 1e6,
2
))
+ item.append(round(data_c_stdev / 1e6,
2
))
else:
data_c_mean = None
data_c_stdev = None
else:
data_c_mean = None
data_c_stdev = None
@@
-925,11
+925,11
@@
def table_soak_vs_ndr(table, input_data):
delta, d_stdev = relative_change_stdev(
data_r_mean, data_c_mean, data_r_stdev, data_c_stdev)
try:
delta, d_stdev = relative_change_stdev(
data_r_mean, data_c_mean, data_r_stdev, data_c_stdev)
try:
- item.append(round(delta))
+ item.append(round(delta
, 2
))
except ValueError:
item.append(delta)
try:
except ValueError:
item.append(delta)
try:
- item.append(round(d_stdev))
+ item.append(round(d_stdev
, 2
))
except ValueError:
item.append(d_stdev)
tbl_lst.append(item)
except ValueError:
item.append(d_stdev)
tbl_lst.append(item)
@@
-1146,34
+1146,25
@@
def _generate_url(testbed, test_name):
frame_size = u""
if u"1t1c" in test_name or \
frame_size = u""
if u"1t1c" in test_name or \
- (u"-1c-" in test_name and
- testbed in (u"3n-hsw", u"3n-tsh", u"2n-dnv", u"3n-dnv", u"2n-tx2")):
+ (u"-1c-" in test_name and testbed in (u"3n-tsh", u"2n-tx2")):
cores = u"1t1c"
elif u"2t2c" in test_name or \
cores = u"1t1c"
elif u"2t2c" in test_name or \
- (u"-2c-" in test_name and
- testbed in (u"3n-hsw", u"3n-tsh", u"2n-dnv", u"3n-dnv", u"2n-tx2")):
+ (u"-2c-" in test_name and testbed in (u"3n-tsh", u"2n-tx2")):
cores = u"2t2c"
elif u"4t4c" in test_name or \
cores = u"2t2c"
elif u"4t4c" in test_name or \
- (u"-4c-" in test_name and
- testbed in (u"3n-hsw", u"3n-tsh", u"2n-dnv", u"3n-dnv", u"2n-tx2")):
+ (u"-4c-" in test_name and testbed in (u"3n-tsh", u"2n-tx2")):
cores = u"4t4c"
elif u"2t1c" in test_name or \
(u"-1c-" in test_name and
cores = u"4t4c"
elif u"2t1c" in test_name or \
(u"-1c-" in test_name and
- testbed in
- (u"2n-icx", u"3n-icx", u"2n-skx", u"3n-skx", u"2n-clx", u"2n-zn2",
- u"2n-aws", u"3n-aws")):
+ testbed in (u"2n-icx", u"3n-icx", u"2n-clx", u"2n-zn2", u"2n-aws")):
cores = u"2t1c"
elif u"4t2c" in test_name or \
(u"-2c-" in test_name and
cores = u"2t1c"
elif u"4t2c" in test_name or \
(u"-2c-" in test_name and
- testbed in
- (u"2n-icx", u"3n-icx", u"2n-skx", u"3n-skx", u"2n-clx", u"2n-zn2",
- u"2n-aws", u"3n-aws")):
+ testbed in (u"2n-icx", u"3n-icx", u"2n-clx", u"2n-zn2", u"2n-aws")):
cores = u"4t2c"
elif u"8t4c" in test_name or \
(u"-4c-" in test_name and
cores = u"4t2c"
elif u"8t4c" in test_name or \
(u"-4c-" in test_name and
- testbed in
- (u"2n-icx", u"3n-icx", u"2n-skx", u"3n-skx", u"2n-clx", u"2n-zn2",
- u"2n-aws", u"3n-aws")):
+ testbed in (u"2n-icx", u"3n-icx", u"2n-clx", u"2n-zn2", u"2n-aws")):
cores = u"8t4c"
else:
cores = u""
cores = u"8t4c"
else:
cores = u""
@@
-1188,7
+1179,7
@@
def _generate_url(testbed, test_name):
driver = u"af_xdp"
elif u"rdma" in test_name:
driver = u"rdma"
driver = u"af_xdp"
elif u"rdma" in test_name:
driver = u"rdma"
- elif u"
dnv" in testbed or u"
tsh" in testbed:
+ elif u"tsh" in testbed:
driver = u"ixgbe"
elif u"ena" in test_name:
driver = u"ena"
driver = u"ixgbe"
elif u"ena" in test_name:
driver = u"ena"
@@
-2176,9
+2167,10
@@
def table_weekly_comparison(table, in_data):
header[1].insert(
1, in_data.metadata(job_name, build_nr).get(u"generated", u"")
)
header[1].insert(
1, in_data.metadata(job_name, build_nr).get(u"generated", u"")
)
- logging.info(in_data.metadata(job_name, build_nr).get(u"version", u"ERROR"))
+ logging.info(
+ in_data.metadata(job_name, build_nr).get(u"version", u"ERROR"))
header[0].insert(
header[0].insert(
- 1, in_data.metadata(job_name, build_nr).get(
u"version", u""
)
+ 1, in_data.metadata(job_name, build_nr).get(
"version", build_nr
)
)
for tst_name, tst_data in build.items():
)
for tst_name, tst_data in build.items():
@@
-2280,13
+2272,15
@@
def table_weekly_comparison(table, in_data):
# Reorganize header in txt table
txt_table = list()
# Reorganize header in txt table
txt_table = list()
- with open(txt_file_name, u"rt", encoding='utf-8') as file_handler:
- for line in list(file_handler):
- txt_table.append(line)
try:
try:
+ with open(txt_file_name, u"rt", encoding='utf-8') as file_handler:
+ for line in list(file_handler):
+ txt_table.append(line)
txt_table.insert(5, txt_table.pop(2))
with open(txt_file_name, u"wt", encoding='utf-8') as file_handler:
file_handler.writelines(txt_table)
txt_table.insert(5, txt_table.pop(2))
with open(txt_file_name, u"wt", encoding='utf-8') as file_handler:
file_handler.writelines(txt_table)
+ except FileNotFoundError as err:
+ logging.error(repr(err))
except IndexError:
pass
except IndexError:
pass