Skip to content

Commit 3df8246

Browse files
holly-cumminsclaude
andcommitted
Auto-add measure-rss to tests when --energy is explicitly set
If the user specifies --energy with a value other than none but measure-rss is not in the test list, add it automatically since energy measurement runs during the measure-rss phase. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 05644bb commit 3df8246

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

scripts/perf-lab/run-benchmarks.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -391,6 +391,7 @@ if [[ "${BASH_SOURCE[0]}" == "${0}" ]]; then
391391
;;
392392

393393
--energy)
394+
ENERGY_SET_BY_USER="true"
394395
ENERGY="$2"
395396
ENERGY_IDRAC="disabled"
396397
ENERGY_RAPL="disabled"
@@ -606,6 +607,13 @@ if [[ "${BASH_SOURCE[0]}" == "${0}" ]]; then
606607
esac
607608
done
608609

610+
# If user explicitly set --energy, ensure measure-rss is in the test list
611+
if [[ -n "${ENERGY_SET_BY_USER:-}" && "$ENERGY" != "none" ]]; then
612+
if [[ ! "${TESTS_TO_RUN[@]}" =~ "measure-rss" ]]; then
613+
TESTS_TO_RUN="$TESTS_TO_RUN measure-rss"
614+
fi
615+
fi
616+
609617
validate_values
610618
calculate_scenario
611619
print_values

0 commit comments

Comments
 (0)