aboutsummaryrefslogtreecommitdiffstats
path: root/resources/tools/presentation/input_data_parser.py
diff options
context:
space:
mode:
authorTibor Frank <tifrank@cisco.com>2020-02-28 10:59:54 +0100
committerTibor Frank <tifrank@cisco.com>2020-02-28 10:31:00 +0000
commit8272f6b2ac2cc82c18a4e87ec2ef8854ee8d83db (patch)
treeb0615e2330aae49219ff93c5dcd048e3a99865ca /resources/tools/presentation/input_data_parser.py
parenta6eee93a4de499487edbec539768a618541a1614 (diff)
Report: Detailed test results
- Data alignment Change-Id: I0b8c15c0c1553888c65cc77e8d954d1341847945 Signed-off-by: Tibor Frank <tifrank@cisco.com> (cherry picked from commit e482650cf7335d9895b3af47d90e001c9c2c8560)
Diffstat (limited to 'resources/tools/presentation/input_data_parser.py')
-rw-r--r--resources/tools/presentation/input_data_parser.py20
1 files changed, 12 insertions, 8 deletions
diff --git a/resources/tools/presentation/input_data_parser.py b/resources/tools/presentation/input_data_parser.py
index d81a453905..bb802b3d83 100644
--- a/resources/tools/presentation/input_data_parser.py
+++ b/resources/tools/presentation/input_data_parser.py
@@ -459,9 +459,9 @@ class ExecutionChecker(ResultVisitor):
try:
out_msg = (
- f"1. {(data[u'ndr_low'] / 1e6):.2f} "
+ f"1. {(data[u'ndr_low'] / 1e6):5.2f} "
f"{data[u'ndr_low_b']:.2f}"
- f"\n2. {(data[u'pdr_low'] / 1e6):.2f} "
+ f"\n2. {(data[u'pdr_low'] / 1e6):5.2f} "
f"{data[u'pdr_low_b']:.2f}"
)
latency = (
@@ -471,16 +471,20 @@ class ExecutionChecker(ResultVisitor):
)
if all(latency):
max_len = len(str(max((max(item) for item in latency))))
+ max_len = 4 if max_len < 4 else max_len
for idx, lat in enumerate(latency):
if not idx:
out_msg += u"\n"
- out_msg += f"\n{idx + 3}. "
- for count, itm in enumerate(lat):
- if count == 3:
- out_msg += u" " * 6
- out_msg += u" " * (max_len - len(str(itm)) + 1)
- out_msg += str(itm)
+ out_msg += (
+ f"\n{idx + 3}. "
+ f"{lat[0]:{max_len}d} "
+ f"{lat[1]:{max_len}d} "
+ f"{lat[2]:{max_len}d} "
+ f"{lat[3]:{max_len}d} "
+ f"{lat[4]:{max_len}d} "
+ f"{lat[5]:{max_len}d} "
+ )
return out_msg