@@ -160,14 +160,14 @@ def aggregateLogs(run, testNames, testList, templateName, aggregateMetrics, test
160160 aggregateMetrics[test]. each { metric ->
161161 def value = runMetrics[test][metric. key][" value" ]
162162 if (value != null ) metric. value[testType][" values" ] << value
163- else echo " ${ test } metric not found, may have failed or been disabled."
163+ else echo " ${ metric } metric for ${ test } not found, may have failed or been disabled."
164164 }
165165 }
166166}
167167
168168def checkRegressions (aggregateMetrics , testList ) {
169- testList. clone(). each { test ->
170- aggregateMetrics[test]. each { metric ->
169+ for test in testList. clone() {
170+ for metric in aggregateMetrics[test] {
171171 def testMetrics = metric. value[" test" ][" values" ]
172172 def baselineMetrics = metric. value[" baseline" ][" values" ]
173173 if (testMetrics. size() > 0 && baselineMetrics. size() > 0 ) {
@@ -184,19 +184,17 @@ def checkRegressions(aggregateMetrics, testList) {
184184
185185 if (score <= 98 ) {
186186 currentBuild. result = ' UNSTABLE'
187- echo " Possible ${ test} regression, set build result to UNSTABLE."
188- } else {
189- echo " Perf iteration for ${ test} completed."
190- echo " testList: ${ testList} "
191- echo " test: ${ test} "
192- testList. remove(test)
193- }
187+ echo " Possible ${ metric} regression for ${ test} , set build result to UNSTABLE."
188+ break
194189 }
195190 else {
196191 currentBuild. result = ' UNSTABLE'
197- echo " ${ test} metric not found across all iterations. Set build result to UNSTABLE."
192+ echo " ${ metric} metric for ${ test} not found across all iterations. Set build result to UNSTABLE."
193+ break
198194 }
199- }
195+ }
196+ echo " Perf iteration for ${ test} completed."
197+ testList. remove(test) // no metrics had regression or errors, we can EXIT_EARLY this test
200198 }
201199}
202200
0 commit comments