Skip to content

Commit ba9a711

Browse files
committed
Print performance variable references only if ref, lower, and upper are all defined
Signed-off-by: Jack Morrison <jack.morrison@cornelisnetworks.com>
1 parent b57f957 commit ba9a711

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
@@ -49,7 +49,13 @@ def _print_perf(task):
4949
for key, info in perfvars.items():
5050
val, ref, lower, upper, unit, result = info
5151
name = key.split(':')[-1]
52-
msg = f'P: {name}: {val} {unit} (r:{ref}, l:{lower}, u:{upper})'
52+
53+
# Build reference info string only if all three reference value components are defined
54+
if ref is not None and lower is not None and upper is not None:
55+
msg = f'P: {name}: {val} {unit} (r:{ref}, l:{lower}, u:{upper})'
56+
else:
57+
msg = f'P: {name}: {val} {unit}'
58+
5359
if result == 'xfail':
5460
msg = color.colorize(msg, color.MAGENTA)
5561
elif result == 'fail' or result == 'xpass':

0 commit comments

Comments
 (0)