Skip to content

Commit 5d2457a

Browse files
jack-morrisonvkarak
authored andcommitted
Print performance variable references only if ref, lower, and upper are all defined
Signed-off-by: Jack Morrison <jack.morrison@cornelisnetworks.com>
1 parent d711e28 commit 5d2457a

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

reframe/frontend/executors/policies.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,13 @@ def _print_perf(task):
5050
for key, info in perfvars.items():
5151
val, ref, lower, upper, unit, result = info
5252
name = key.split(':')[-1]
53-
msg = f'P: {name}: {val} {unit} (r:{ref}, l:{lower}, u:{upper})'
53+
54+
# Build reference info string only if all three reference value components are defined
55+
if ref is not None and lower is not None and upper is not None:
56+
msg = f'P: {name}: {val} {unit} (r:{ref}, l:{lower}, u:{upper})'
57+
else:
58+
msg = f'P: {name}: {val} {unit}'
59+
5460
if result == 'xfail':
5561
msg = color.colorize(msg, color.MAGENTA)
5662
elif result == 'fail' or result == 'xpass':

0 commit comments

Comments
 (0)