diff --git a/docs/tutorial.rst b/docs/tutorial.rst index e7b51f831..aa775883c 100644 --- a/docs/tutorial.rst +++ b/docs/tutorial.rst @@ -163,6 +163,13 @@ The :ref:`logging` section article describes how logging can be configured in mo Once a performance test finishes, its figures of merit are printed immediately using the ``P:`` prefix. This can be suppressed by increasing the level at which this information is logged using the :envvar:`RFM_PERF_INFO_LEVEL` environment variable. +.. note:: + + .. versionchanged:: 4.9 + + If the test sets no references, then the reference tuples are not printed in the ``P:`` line. + + .. _run-reports-and-performance-logging: Run reports and performance logging diff --git a/reframe/frontend/executors/policies.py b/reframe/frontend/executors/policies.py index a6084fec1..4d0434e5e 100644 --- a/reframe/frontend/executors/policies.py +++ b/reframe/frontend/executors/policies.py @@ -50,7 +50,13 @@ def _print_perf(task): for key, info in perfvars.items(): val, ref, lower, upper, unit, result = info name = key.split(':')[-1] - msg = f'P: {name}: {val} {unit} (r:{ref}, l:{lower}, u:{upper})' + + # Build reference info string only if reference is defined + if ref == 0 and lower is None and upper is None: + msg = f'P: {name}: {val} {unit}' + else: + msg = f'P: {name}: {val} {unit} (r:{ref}, l:{lower}, u:{upper})' + if result == 'xfail': msg = color.colorize(msg, color.MAGENTA) elif result == 'fail' or result == 'xpass':