@@ -11,7 +11,7 @@ if (params.SETUP_LABEL) {
1111 SETUP_LABEL = params. SETUP_LABEL
1212} else {
1313 if (PROCESS_METRICS && EXIT_EARLY ) {
14- SETUP_LABEL = " test-rhibmcloud-rhel9-x64-1"
14+ SETUP_LABEL = " test-rhibmcloud-rhel9-x64-1" // machine needs python
1515 } else {
1616 SETUP_LABEL = " ci.role.test&&hw.arch.x86&&sw.os.linux"
1717 }
@@ -62,7 +62,7 @@ node (SETUP_LABEL) {
6262 }
6363 }
6464
65- if (PROCESS_METRICS ) {
65+ if (PROCESS_METRICS ) { // convert BenchmarkMetric.js to a JSON file optimized for metric processing
6666 def owner = params. ADOPTOPENJDK_REPO . tokenize(' /' )[2 ]
6767 getPythonDependencies(owner, params. ADOPTOPENJDK_BRANCH )
6868 sh " curl -Os https://raw.githubusercontent.com/adoptium/aqa-test-tools/refs/heads/master/TestResultSummaryService/parsers/BenchmarkMetric.js"
@@ -71,7 +71,8 @@ node (SETUP_LABEL) {
7171 testList = params. TARGET . split(" =" )[1 ]. tokenize(" ," )
7272 metrics = readJSON file : aggrBase
7373 }
74- else {
74+
75+ if (! EXIT_EARLY ) {
7576 testParams << string(name : " TARGET" , value : params. TARGET )
7677 baselineParams << string(name : " TARGET" , value : params. TARGET )
7778 }
@@ -82,8 +83,8 @@ node (SETUP_LABEL) {
8283 // clone to avoid mutation
8384 def thisTestParams = testParams. collect()
8485 def thisBaselineParams = baselineParams. collect()
85- if (PROCESS_METRICS ) {
86- // set the target , testlist should change if some metrics regress while others do not
86+ if (EXIT_EARLY ) {
87+ // update TARGET , testlist should hold metrics that were not exited early
8788 testNames = testList. join(" ," )
8889 def TARGET = params. TARGET . replaceFirst(/ (?<=TESTLIST=)[^ ]+/ , testNames)
8990 thisTestParams << string(name : " TARGET" , value : TARGET )
@@ -108,15 +109,17 @@ node (SETUP_LABEL) {
108109 aggregateLogs(baseRun, testNames, testList, runBase, metrics, " baseline" )
109110 writeJSON file : " metrics.json" , json : metrics, pretty : 4
110111 archiveArtifacts artifacts : " metrics.json"
112+
113+ // if we are on the final iteration, or we have executed enough iterations to decide likelihood of regression and have permission to exit early
111114 if (i == PERF_ITERATIONS -1 || (EXIT_EARLY && i >= PERF_ITERATIONS * 0.8 )) {
112115 if (i == PERF_ITERATIONS -1 ) {
113116 echo " All iterations completed"
114117 } else {
115118 echo " Attempting early exit"
116119 }
117120 echo " checking for regressions"
118- checkRegressions(metrics, testList)
119- if (testList. size() == 0 ) break
121+ checkRegressions(metrics, testList) // compute relevant performance stats, check for regression
122+ if (testList. size() == 0 ) break // if all tests have been exited early we can end testing
120123 }
121124 }
122125 }
0 commit comments