diff options
author | Tibor Frank <tifrank@cisco.com> | 2020-02-28 10:59:54 +0100 |
---|---|---|
committer | Tibor Frank <tifrank@cisco.com> | 2020-02-28 11:26:17 +0100 |
commit | e482650cf7335d9895b3af47d90e001c9c2c8560 (patch) | |
tree | 797f3579623c0c6eb32ae0be28841aa020da75ef /resources/tools/presentation/input_data_parser.py | |
parent | e1635554128cef4b0957e9b3932be8e23a34478a (diff) |
Report: Detailed test results
- Data alignment
Change-Id: I0b8c15c0c1553888c65cc77e8d954d1341847945
Signed-off-by: Tibor Frank <tifrank@cisco.com>
Diffstat (limited to 'resources/tools/presentation/input_data_parser.py')
-rw-r--r-- | resources/tools/presentation/input_data_parser.py | 20 |
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 |