Skip to content

[enhancement] Only print performance variable reference values if defined #3517

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

jack-morrison
Copy link
Member

@jack-morrison jack-morrison commented Jul 14, 2025

Prior to change

A test without reference values prints (r:0, l:None, u:None) for each performance variable. This is #3175.

user@myhost:~/reframe-examples/tutorial$ reframe -c stream/stream_runonly.py -r
<snip>

[----------] start processing checks
[ RUN      ] stream_test /2e15a047 @generic:default+builtin
[       OK ] (1/1) stream_test /2e15a047 @generic:default+builtin
P: copy_bw: 136250.6 MB/s (r:0, l:None, u:None)
P: triad_bw: 127052.0 MB/s (r:0, l:None, u:None)
[----------] all spawned checks have finished

[  PASSED  ] Ran 1/1 test case(s) from 1 check(s) (0 failure(s), 0 expected failure(s), 0 skipped, 0 aborted)
[==========] Finished on Mon Jul 14 19:19:13 2025+0000
Log file(s) saved in '/tmp/rfm-wkcpor0o.log'

After change

A test without reference values does not print the reference tuple. Only the captured performance metric is printed.

user@myhost:~/reframe-examples/tutorial$ reframe -c stream/stream_runonly.py -r
<snip>

[----------] start processing checks
[ RUN      ] stream_test /2e15a047 @generic:default+builtin
[       OK ] (1/1) stream_test /2e15a047 @generic:default+builtin
P: copy_bw: 124658.9 MB/s
P: triad_bw: 99002.0 MB/s
[----------] all spawned checks have finished

[  PASSED  ] Ran 1/1 test case(s) from 1 check(s) (0 failure(s), 0 expected failure(s), 0 skipped, 0 aborted)
[==========] Finished on Mon Jul 14 19:13:53 2025+0000
Log file(s) saved in '/tmp/rfm-_jygclgm.log'

A test with reference values behaves as before. The captured performance metric and its references are both printed.

user@myhost:~/reframe-examples/tutorial$ reframe -c stream/stream_runonly.py -r
<snip>

[----------] start processing checks
[ RUN      ] stream_test /2e15a047 @generic:default+builtin
[       OK ] (1/1) stream_test /2e15a047 @generic:default+builtin
P: copy_bw: 133880.3 MB/s (r:137659, l:-0.1, u:0.3)
P: triad_bw: 129926.7 MB/s (r:137659, l:-0.55, u:0.5)
[----------] all spawned checks have finished

[  PASSED  ] Ran 1/1 test case(s) from 1 check(s) (0 failure(s), 0 expected failure(s), 0 skipped, 0 aborted)
[==========] Finished on Mon Jul 14 19:14:31 2025+0000
Log file(s) saved in '/tmp/rfm-2md5inu3.log'

Closes #3175

…re all defined

Signed-off-by: Jack Morrison <jack.morrison@cornelisnetworks.com>
@jack-morrison jack-morrison self-assigned this Jul 14, 2025
Copy link

codecov bot commented Jul 14, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.38%. Comparing base (b57f957) to head (ba9a711).
Report is 36 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #3517      +/-   ##
===========================================
+ Coverage    91.16%   91.38%   +0.22%     
===========================================
  Files           62       62              
  Lines        13253    13360     +107     
===========================================
+ Hits         12082    12209     +127     
+ Misses        1171     1151      -20     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@jack-morrison jack-morrison changed the title [feat] Only print performance variable reference values if defined Only print performance variable reference values if defined Jul 14, 2025
@jack-morrison jack-morrison marked this pull request as ready for review July 16, 2025 14:35
@jack-morrison jack-morrison requested a review from vkarak July 16, 2025 17:06
@vkarak vkarak changed the title Only print performance variable reference values if defined [enhancement] Only print performance variable reference values if defined Jul 17, 2025
@vkarak vkarak modified the milestones: ReFrame 4.8.3, ReFrame 4.9 Jul 17, 2025
msg = f'P: {name}: {val} {unit} (r:{ref}, l:{lower}, u:{upper})'

# Build reference info string only if all three reference value components are defined
if ref is not None and lower is not None and upper is not None:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would change the check here to

Suggested change
if ref is not None and lower is not None and upper is not None:
if ref is not None:

Because otherwise it will masquerade cases where the reference is set, but not the thresholds. Also are you sure that checking the reference against None is correct. I think when it's missing we are setting it to 0:

ref = (0, None, None)

@github-project-automation github-project-automation bot moved this from Todo to In Progress in ReFrame Backlog Jul 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: In Progress
Development

Successfully merging this pull request may close these issues.

Only show reference values if they're defined in a test
2 participants