Skip to content

Commit 8c999b7

Browse files
committed
handling PROCESS METRICS, EXIT EARLY, and SETUP LABEL via Jenkins job parameter
1 parent 8b99b62 commit 8c999b7

File tree

2 files changed

+7
-8
lines changed

2 files changed

+7
-8
lines changed

buildenv/jenkins/perfPipeline.groovy

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,13 @@ def testParams = []
44
def baselineParams = []
55
boolean RUN_BASELINE = (params.RUN_BASELINE != null) ? params.RUN_BASELINE.toBoolean() : true
66
int PERF_ITERATIONS = params.PERF_ITERATIONS.toInteger()
7+
boolean PROCESS_METRICS = (params.PROCESS_METRICS != null) ? params.PROCESS_METRICS.toBoolean() : false
8+
boolean EXIT_EARLY = (params.EXIT_EARLY != null) ? params.EXIT_EARLY.toBoolean() : false
79

810
if (params.SETUP_LABEL) {
911
SETUP_LABEL = params.SETUP_LABEL
1012
} else {
11-
if (params.PROCESS_METRICS && params.EXIT_EARLY) {
13+
if (PROCESS_METRICS && EXIT_EARLY) {
1214
SETUP_LABEL = "test-rhibmcloud-rhel9-x64-1"
1315
} else {
1416
SETUP_LABEL = "ci.role.test&&hw.arch.x86&&sw.os.linux"
@@ -60,7 +62,7 @@ node (SETUP_LABEL) {
6062
}
6163
}
6264

63-
if (params.PROCESS_METRICS) {
65+
if (PROCESS_METRICS) {
6466
def owner = params.ADOPTOPENJDK_REPO.tokenize('/')[2]
6567
getPythonDependencies(owner, params.ADOPTOPENJDK_BRANCH)
6668
sh "curl -Os https://raw.githubusercontent.com/adoptium/aqa-test-tools/refs/heads/master/TestResultSummaryService/parsers/BenchmarkMetric.js"
@@ -80,7 +82,7 @@ node (SETUP_LABEL) {
8082
//clone to avoid mutation
8183
def thisTestParams = testParams.collect()
8284
def thisBaselineParams = baselineParams.collect()
83-
if (params.PROCESS_METRICS) {
85+
if (PROCESS_METRICS) {
8486
//set the target, testlist should change if some metrics regress while others do not
8587
testNames = testList.join(",")
8688
def TARGET = params.TARGET.replaceFirst(/(?<=TESTLIST=)[^ ]+/, testNames)
@@ -101,12 +103,12 @@ node (SETUP_LABEL) {
101103
echo "Skipping baseline run since RUN_BASELINE is set to false"
102104
}
103105

104-
if (params.PROCESS_METRICS) {
106+
if (PROCESS_METRICS) {
105107
aggregateLogs(testRun, testNames, testList, runBase, metrics, "test")
106108
aggregateLogs(baseRun, testNames, testList, runBase, metrics, "baseline")
107109
writeJSON file: "metrics.json", json: metrics, pretty: 4
108110
archiveArtifacts artifacts: "metrics.json"
109-
if (i == PERF_ITERATIONS-1 || (params.EXIT_EARLY && i >= PERF_ITERATIONS * 0.8)) {
111+
if (i == PERF_ITERATIONS-1 || (EXIT_EARLY && i >= PERF_ITERATIONS * 0.8)) {
110112
if (i == PERF_ITERATIONS-1) {
111113
echo "All iterations completed"
112114
} else {

buildenv/jenkins/perfPipeline_root.groovy

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,6 @@ node("worker || (ci.role.test&&hw.arch.x86&&sw.os.linux)") {
6060
baseParams << string(name: "TARGET", value: item.TARGET)
6161
baseParams << string(name: "BUILD_LIST", value: item.BUILD_LIST)
6262
baseParams << string(name: "PERF_ITERATIONS", value: item.PERF_ITERATIONS ? item.PERF_ITERATIONS.toString() : "4")
63-
baseParams << string(name: "SETUP_LABEL", value: item.SETUP_LABEL)
64-
baseParams << string(name: "PROCESS_METRICS", value: item.PROCESS_METRICS ? item.PROCESS_METRICS.toString() : "false")
65-
baseParams << string(name: "EXIT_EARLY", value: item.EXIT_EARLY ? item.EXIT_EARLY.toString() : "false")
6663

6764
item.PLAT_MACHINE_MAP.each { kv ->
6865
kv.each {p, m ->

0 commit comments

Comments
 (0)