Merge pull request #12200 from erozenfeld/FastTailCallLoweringFix
[platform/upstream/coreclr.git] / perf.groovy
1 // Import the utility functionality.
2
3 import jobs.generation.*;
4
5 def project = GithubProject
6 def branch = GithubBranchName
7 def projectName = Utilities.getFolderName(project)
8 def projectFolder = projectName + '/' + Utilities.getFolderName(branch)
9
10 def static getOSGroup(def os) {
11     def osGroupMap = ['Ubuntu14.04':'Linux',
12         'RHEL7.2': 'Linux',
13         'Ubuntu16.04': 'Linux',
14         'Debian8.4':'Linux',
15         'Fedora24':'Linux',
16         'OSX':'OSX',
17         'Windows_NT':'Windows_NT',
18         'FreeBSD':'FreeBSD',
19         'CentOS7.1': 'Linux',
20         'OpenSUSE13.2': 'Linux',
21         'OpenSUSE42.1': 'Linux',
22         'LinuxARMEmulator': 'Linux']
23     def osGroup = osGroupMap.get(os, null)
24     assert osGroup != null : "Could not find os group for ${os}"
25     return osGroupMap[os]
26 }
27
28 // Setup perflab tests runs
29 [true, false].each { isPR ->
30     ['Windows_NT'].each { os ->
31         ['x64', 'x86'].each { arch ->
32             [true, false].each { isSmoketest ->
33                 def architecture = arch
34                 def jobName = isSmoketest ? "perf_perflab_${os}_${arch}_smoketest" : "perf_perflab_${os}_${arch}"
35
36                 if (arch == 'x86jit32')
37                 {
38                     architecture = 'x86'
39                     testEnv = '-testEnv %WORKSPACE%\\tests\\x86\\compatjit_x86_testenv.cmd'
40                 }
41                 else if (arch == 'x86')
42                 {
43                     testEnv = '-testEnv %WORKSPACE%\\tests\\x86\\ryujit_x86_testenv.cmd'
44                 }
45
46                 def newJob = job(Utilities.getFullJobName(project, jobName, isPR)) {
47                     // Set the label.
48                     label('windows_clr_perf')
49                     wrappers {
50                         credentialsBinding {
51                             string('BV_UPLOAD_SAS_TOKEN', 'CoreCLR Perf BenchView Sas')
52                         }
53                     }
54
55                     if (isPR)
56                     {
57                         parameters
58                         {
59                             stringParam('BenchviewCommitName', '\${ghprbPullTitle}', 'The name that you will be used to build the full title of a run in Benchview.  The final name will be of the form <branch> private BenchviewCommitName')
60                         }
61                     }
62                     if (isSmoketest)
63                     {
64                         parameters
65                         {
66                             stringParam('XUNIT_PERFORMANCE_MAX_ITERATION', '2', 'Sets the number of iterations to two.  We want to do this so that we can run as fast as possible as this is just for smoke testing')
67                             stringParam('XUNIT_PERFORMANCE_MAX_ITERATION_INNER_SPECIFIED', '2', 'Sets the number of iterations to two.  We want to do this so that we can run as fast as possible as this is just for smoke testing')
68                         }
69                     }
70                     else
71                     {
72                         parameters
73                         {
74                             stringParam('XUNIT_PERFORMANCE_MAX_ITERATION', '21', 'Sets the number of iterations to twenty one.  We are doing this to limit the amount of data that we upload as 20 iterations is enought to get a good sample')
75                             stringParam('XUNIT_PERFORMANCE_MAX_ITERATION_INNER_SPECIFIED', '21', 'Sets the number of iterations to twenty one.  We are doing this to limit the amount of data that we upload as 20 iterations is enought to get a good sample')
76                         }
77                     }
78                     def configuration = 'Release'
79                     def runType = isPR ? 'private' : 'rolling'
80                     def benchViewName = isPR ? 'coreclr private %BenchviewCommitName%' : 'coreclr rolling %GIT_BRANCH_WITHOUT_ORIGIN% %GIT_COMMIT%'
81                     def uploadString = isSmoketest ? '' : '-uploadToBenchview'
82
83                     steps {
84                         // Batch
85
86                         batchFile("powershell wget https://dist.nuget.org/win-x86-commandline/latest/nuget.exe -OutFile \"%WORKSPACE%\\nuget.exe\"")
87                         batchFile("if exist \"%WORKSPACE%\\Microsoft.BenchView.JSONFormat\" rmdir /s /q \"%WORKSPACE%\\Microsoft.BenchView.JSONFormat\"")
88                         batchFile("\"%WORKSPACE%\\nuget.exe\" install Microsoft.BenchView.JSONFormat -Source http://benchviewtestfeed.azurewebsites.net/nuget -OutputDirectory \"%WORKSPACE%\" -Prerelease -ExcludeVersion")
89                         //Do this here to remove the origin but at the front of the branch name as this is a problem for BenchView
90                         //we have to do it all as one statement because cmd is called each time and we lose the set environment variable
91                         batchFile("if \"%GIT_BRANCH:~0,7%\" == \"origin/\" (set \"GIT_BRANCH_WITHOUT_ORIGIN=%GIT_BRANCH:origin/=%\") else (set \"GIT_BRANCH_WITHOUT_ORIGIN=%GIT_BRANCH%\")\n" +
92                         "set \"BENCHVIEWNAME=${benchViewName}\"\n" +
93                         "set \"BENCHVIEWNAME=%BENCHVIEWNAME:\"=%\"\n" +
94                         "py \"%WORKSPACE%\\Microsoft.BenchView.JSONFormat\\tools\\submission-metadata.py\" --name \"%BENCHVIEWNAME%\" --user \"dotnet-bot@microsoft.com\"\n" +
95                         "py \"%WORKSPACE%\\Microsoft.BenchView.JSONFormat\\tools\\build.py\" git --branch %GIT_BRANCH_WITHOUT_ORIGIN% --type ${runType}")
96                         batchFile("py \"%WORKSPACE%\\Microsoft.BenchView.JSONFormat\\tools\\machinedata.py\"")
97                         batchFile("set __TestIntermediateDir=int&&build.cmd ${configuration} ${architecture}")
98
99                         if (arch == 'x86jit32')
100                         {
101                             // Download package and copy compatjit into Core_Root
102                             batchFile("C:\\Tools\\nuget.exe install runtime.win7-${architecture}.Microsoft.NETCore.Jit -Source https://dotnet.myget.org/F/dotnet-core -OutputDirectory \"%WORKSPACE%\" -Prerelease -ExcludeVersion\n" +
103                             "xcopy \"%WORKSPACE%\\runtime.win7-x86.Microsoft.NETCore.Jit\\runtimes\\win7-x86\\native\\compatjit.dll\" \"%WORKSPACE%\\bin\\Product\\${os}.${architecture}.${configuration}\" /Y")
104                         }
105
106                         batchFile("tests\\runtest.cmd ${configuration} ${architecture} GenerateLayoutOnly")
107
108                         // Run with just stopwatch: Profile=Off
109                         batchFile("tests\\scripts\\run-xunit-perf.cmd -arch ${arch} -configuration ${configuration} -testBinLoc bin\\tests\\${os}.${architecture}.${configuration}\\performance\\perflab\\Perflab -library -generateBenchviewData \"%WORKSPACE%\\Microsoft.Benchview.JSONFormat\\tools\" ${uploadString} -runtype ${runType} -stabilityPrefix \"START \"CORECLR_PERF_RUN\" /B /WAIT /HIGH /AFFINITY 0x2\"")
110                         batchFile("tests\\scripts\\run-xunit-perf.cmd -arch ${arch} -configuration ${configuration} -testBinLoc bin\\tests\\${os}.${architecture}.${configuration}\\Jit\\Performance\\CodeQuality -generateBenchviewData \"%WORKSPACE%\\Microsoft.Benchview.JSONFormat\\tools\" ${uploadString} -runtype ${runType} -stabilityPrefix \"START \"CORECLR_PERF_RUN\" /B /WAIT /HIGH /AFFINITY 0x2\"")
111                         batchFile("tests\\scripts\\run-xunit-perf.cmd -arch ${arch} -configuration ${configuration} -testBinLoc bin\\tests\\${os}.${architecture}.${configuration}\\performance\\linkbench\\linkbench -generateBenchviewData \"%WORKSPACE%\\Microsoft.Benchview.JSONFormat\\tools\" ${uploadString} -nowarmup -runtype ${runType} -scenarioTest -group ILLink")
112
113                         // Run with the full set of counters enabled: Profile=On
114                         batchFile("tests\\scripts\\run-xunit-perf.cmd -arch ${arch} -configuration ${configuration} -testBinLoc bin\\tests\\${os}.${architecture}.${configuration}\\performance\\perflab\\Perflab -library -generateBenchviewData \"%WORKSPACE%\\Microsoft.Benchview.JSONFormat\\tools\" ${uploadString} -runtype ${runType} -collectionFlags default+BranchMispredictions+CacheMisses+InstructionRetired+gcapi -stabilityPrefix \"START \"CORECLR_PERF_RUN\" /B /WAIT /HIGH /AFFINITY 0x2\"")
115                         batchFile("tests\\scripts\\run-xunit-perf.cmd -arch ${arch} -configuration ${configuration} -testBinLoc bin\\tests\\${os}.${architecture}.${configuration}\\Jit\\Performance\\CodeQuality -generateBenchviewData \"%WORKSPACE%\\Microsoft.Benchview.JSONFormat\\tools\" ${uploadString} -runtype ${runType} -collectionFlags default+BranchMispredictions+CacheMisses+InstructionRetired+gcapi -stabilityPrefix \"START \"CORECLR_PERF_RUN\" /B /WAIT /HIGH /AFFINITY 0x2\"")
116                     }
117                 }
118
119                 if (isSmoketest)
120                 {
121                     Utilities.setMachineAffinity(newJob, "Windows_NT", '20170427-elevated')
122                 }
123                 // Save machinedata.json to /artifact/bin/ Jenkins dir
124                 def archiveSettings = new ArchivalSettings()
125                 archiveSettings.addFiles('Perf-*.xml')
126                 archiveSettings.addFiles('Perf-*.etl')
127                 archiveSettings.addFiles('Perf-*.log')
128                 archiveSettings.addFiles('machinedata.json')
129                 Utilities.addArchival(newJob, archiveSettings)
130
131                 Utilities.standardJobSetup(newJob, project, isPR, "*/${branch}")
132
133                 newJob.with {
134                     wrappers {
135                         timeout {
136                             absolute(240)
137                         }
138                     }
139                 }
140
141                 if (isPR) {
142                     TriggerBuilder builder = TriggerBuilder.triggerOnPullRequest()
143                     if (isSmoketest)
144                     {
145                         builder.setGithubContext("${os} ${arch} CoreCLR Perf Tests Correctness")
146                     }
147                     else
148                     {
149                         builder.setGithubContext("${os} ${arch} CoreCLR Perf Tests")
150                         builder.triggerOnlyOnComment()
151                         builder.setCustomTriggerPhrase("(?i).*test\\W+${os}\\W+${arch}\\W+perf.*")
152                     }
153                     builder.triggerForBranch(branch)
154                     builder.emitTrigger(newJob)
155                 }
156                 else {
157                     // Set a push trigger
158                     TriggerBuilder builder = TriggerBuilder.triggerOnCommit()
159                     builder.emitTrigger(newJob)
160                 }
161             }
162         }
163     }
164 }
165
166 // Setup throughput perflab tests runs
167 [true, false].each { isPR ->
168     ['Windows_NT'].each { os ->
169         ['x64', 'x86'].each { arch ->
170             def architecture = arch
171
172             def newJob = job(Utilities.getFullJobName(project, "perf_throughput_perflab_${os}_${arch}", isPR)) {
173                 // Set the label.
174                 label('windows_clr_perf')
175                 wrappers {
176                     credentialsBinding {
177                         string('BV_UPLOAD_SAS_TOKEN', 'CoreCLR Perf BenchView Sas')
178                     }
179                 }
180
181             if (isPR)
182             {
183                 parameters
184                 {
185                     stringParam('BenchviewCommitName', '\${ghprbPullTitle}', 'The name that you will be used to build the full title of a run in Benchview.  The final name will be of the form <branch> private BenchviewCommitName')
186                 }
187             }
188             def configuration = 'Release'
189             def runType = isPR ? 'private' : 'rolling'
190             def benchViewName = isPR ? 'coreclr-throughput private %BenchviewCommitName%' : 'coreclr-throughput rolling %GIT_BRANCH_WITHOUT_ORIGIN% %GIT_COMMIT%'
191
192                 steps {
193                     // Batch
194
195                     batchFile("if exist \"%WORKSPACE%\\Microsoft.BenchView.JSONFormat\" rmdir /s /q \"%WORKSPACE%\\Microsoft.BenchView.JSONFormat\"")
196                     batchFile("if exist \"%WORKSPACE%\\Microsoft.BenchView.ThroughputBenchmarks.${architecture}.${os}\" rmdir /s /q \"%WORKSPACE%\\Microsoft.BenchView.ThroughputBenchmarks.${architecture}.${os}\"")
197                     batchFile("C:\\Tools\\nuget.exe install Microsoft.BenchView.JSONFormat -Source http://benchviewtestfeed.azurewebsites.net/nuget -OutputDirectory \"%WORKSPACE%\" -Prerelease -ExcludeVersion")
198                     batchFile("C:\\Tools\\nuget.exe install Microsoft.BenchView.ThroughputBenchmarks.${architecture}.${os} -Source https://dotnet.myget.org/F/dotnet-core -OutputDirectory \"%WORKSPACE%\" -Prerelease -ExcludeVersion")
199                     //Do this here to remove the origin but at the front of the branch name as this is a problem for BenchView
200                     //we have to do it all as one statement because cmd is called each time and we lose the set environment variable
201                     batchFile("if \"%GIT_BRANCH:~0,7%\" == \"origin/\" (set \"GIT_BRANCH_WITHOUT_ORIGIN=%GIT_BRANCH:origin/=%\") else (set \"GIT_BRANCH_WITHOUT_ORIGIN=%GIT_BRANCH%\")\n" +
202                     "set \"BENCHVIEWNAME=${benchViewName}\"\n" +
203                     "set \"BENCHVIEWNAME=%BENCHVIEWNAME:\"=%\"\n" +
204                     "py \"%WORKSPACE%\\Microsoft.BenchView.JSONFormat\\tools\\submission-metadata.py\" --name \"${benchViewName}\" --user \"dotnet-bot@microsoft.com\"\n" +
205                     "py \"%WORKSPACE%\\Microsoft.BenchView.JSONFormat\\tools\\build.py\" git --branch %GIT_BRANCH_WITHOUT_ORIGIN% --type ${runType}")
206                     batchFile("py \"%WORKSPACE%\\Microsoft.BenchView.JSONFormat\\tools\\machinedata.py\"")
207                     batchFile("set __TestIntermediateDir=int&&build.cmd ${configuration} ${architecture} skiptests")
208                     batchFile("tests\\runtest.cmd ${configuration} ${architecture} GenerateLayoutOnly")
209                     batchFile("py -u tests\\scripts\\run-throughput-perf.py -arch ${arch} -os ${os} -configuration ${configuration} -clr_root \"%WORKSPACE%\" -assembly_root \"%WORKSPACE%\\Microsoft.BenchView.ThroughputBenchmarks.${architecture}.${os}\\lib\" -benchview_path \"%WORKSPACE%\\Microsoft.Benchview.JSONFormat\\tools\" -run_type ${runType}")
210                 }
211             }
212
213             // Save machinedata.json to /artifact/bin/ Jenkins dir
214             def archiveSettings = new ArchivalSettings()
215             archiveSettings.addFiles('throughput-*.csv')
216             Utilities.addArchival(newJob, archiveSettings)
217
218             Utilities.standardJobSetup(newJob, project, isPR, "*/${branch}")
219
220             if (isPR) {
221                 TriggerBuilder builder = TriggerBuilder.triggerOnPullRequest()
222                 builder.setGithubContext("${os} ${arch} CoreCLR Throughput Perf Tests")
223                 builder.triggerOnlyOnComment()
224                 builder.setCustomTriggerPhrase("(?i).*test\\W+${os}\\W+${arch}\\W+throughput.*")
225                 builder.triggerForBranch(branch)
226                 builder.emitTrigger(newJob)
227             }
228             else {
229                 // Set a push trigger
230                 TriggerBuilder builder = TriggerBuilder.triggerOnCommit()
231                 builder.emitTrigger(newJob)
232             }
233         }
234     }
235 }
236
237 // Create the Linux/OSX/CentOS coreclr test leg for debug and release and each scenario
238 [true, false].each { isPR ->
239     ['Ubuntu14.04'].each { os ->
240         def newJob = job(Utilities.getFullJobName(project, "perf_${os}", isPR)) {
241
242             label('linux_clr_perf')
243             wrappers {
244                 credentialsBinding {
245                     string('BV_UPLOAD_SAS_TOKEN', 'CoreCLR Perf BenchView Sas')
246                 }
247             }
248
249             if (isPR)
250             {
251                 parameters
252                 {
253                     stringParam('BenchviewCommitName', '\${ghprbPullTitle}', 'The name that you will be used to build the full title of a run in Benchview.  The final name will be of the form <branch> private BenchviewCommitName')
254                 }
255             }
256
257             // Cap the maximum number of iterations to 21.
258             parameters {
259                 stringParam('XUNIT_PERFORMANCE_MAX_ITERATION', '21', 'Sets the number of iterations to twenty one.  We are doing this to limit the amount of data that we upload as 20 iterations is enought to get a good sample')
260                 stringParam('XUNIT_PERFORMANCE_MAX_ITERATION_INNER_SPECIFIED', '21', 'Sets the number of iterations to twenty one.  We are doing this to limit the amount of data that we upload as 20 iterations is enought to get a good sample')
261             }
262
263             def osGroup = getOSGroup(os)
264             def architecture = 'x64'
265             def configuration = 'Release'
266             def runType = isPR ? 'private' : 'rolling'
267             def benchViewName = isPR ? 'coreclr private \$BenchviewCommitName' : 'coreclr rolling \$GIT_BRANCH_WITHOUT_ORIGIN \$GIT_COMMIT'
268
269             steps {
270                 shell("./tests/scripts/perf-prep.sh")
271                 shell("./init-tools.sh")
272                 shell("./build.sh ${architecture} ${configuration}")
273                 shell("GIT_BRANCH_WITHOUT_ORIGIN=\$(echo \$GIT_BRANCH | sed \"s/[^/]*\\/\\(.*\\)/\\1 /\")\n" +
274                 "python3.5 \"\${WORKSPACE}/tests/scripts/Microsoft.BenchView.JSONFormat/tools/submission-metadata.py\" --name \" ${benchViewName} \" --user \"dotnet-bot@microsoft.com\"\n" +
275                 "python3.5 \"\${WORKSPACE}/tests/scripts/Microsoft.BenchView.JSONFormat/tools/build.py\" git --branch \$GIT_BRANCH_WITHOUT_ORIGIN --type ${runType}")
276                 shell("""./tests/scripts/run-xunit-perf.sh \\
277                 --testRootDir=\"\${WORKSPACE}/bin/tests/Windows_NT.${architecture}.${configuration}\" \\
278                 --testNativeBinDir=\"\${WORKSPACE}/bin/obj/${osGroup}.${architecture}.${configuration}/tests\" \\
279                 --coreClrBinDir=\"\${WORKSPACE}/bin/Product/${osGroup}.${architecture}.${configuration}\" \\
280                 --mscorlibDir=\"\${WORKSPACE}/bin/Product/${osGroup}.${architecture}.${configuration}\" \\
281                 --coreFxBinDir=\"\${WORKSPACE}/corefx\" \\
282                 --runType=\"${runType}\" \\
283                 --benchViewOS=\"${os}\" \\
284                 --generatebenchviewdata=\"\${WORKSPACE}/tests/scripts/Microsoft.BenchView.JSONFormat/tools\" \\
285                 --stabilityPrefix=\"taskset 0x00000002 nice --adjustment=-10\" \\
286                 --uploadToBenchview""")
287             }
288         }
289
290         // Save machinedata.json to /artifact/bin/ Jenkins dir
291         def archiveSettings = new ArchivalSettings()
292         archiveSettings.addFiles('Perf-*.log')
293         archiveSettings.addFiles('Perf-*.xml')
294         archiveSettings.addFiles('machinedata.json')
295         Utilities.addArchival(newJob, archiveSettings)
296
297         Utilities.standardJobSetup(newJob, project, isPR, "*/${branch}")
298
299         // For perf, we need to keep the run results longer
300         newJob.with {
301             // Enable the log rotator
302             logRotator {
303                 artifactDaysToKeep(7)
304                 daysToKeep(300)
305                 artifactNumToKeep(25)
306                 numToKeep(1000)
307             }
308         }
309         if (isPR) {
310             TriggerBuilder builder = TriggerBuilder.triggerOnPullRequest()
311             builder.setGithubContext("${os} Perf Tests")
312             builder.triggerOnlyOnComment()
313             builder.setCustomTriggerPhrase("(?i).*test\\W+${os}\\W+perf.*")
314             builder.triggerForBranch(branch)
315             builder.emitTrigger(newJob)
316         }
317         else {
318             // Set a push trigger
319             TriggerBuilder builder = TriggerBuilder.triggerOnCommit()
320             builder.emitTrigger(newJob)
321         }
322     } // os
323 } // isPR
324
325 // Create the Linux/OSX/CentOS coreclr test leg for debug and release and each scenario
326 [true, false].each { isPR ->
327     ['Ubuntu14.04'].each { os ->
328         def newJob = job(Utilities.getFullJobName(project, "perf_throughput_${os}", isPR)) {
329
330             label('linux_clr_perf')
331                 wrappers {
332                     credentialsBinding {
333                         string('BV_UPLOAD_SAS_TOKEN', 'CoreCLR Perf BenchView Sas')
334                     }
335                 }
336
337             if (isPR)
338             {
339                 parameters
340                 {
341                     stringParam('BenchviewCommitName', '\${ghprbPullTitle}', 'The name that you will be used to build the full title of a run in Benchview.  The final name will be of the form <branch> private BenchviewCommitName')
342                 }
343             }
344             def osGroup = getOSGroup(os)
345             def architecture = 'x64'
346             def configuration = 'Release'
347             def runType = isPR ? 'private' : 'rolling'
348             def benchViewName = isPR ? 'coreclr private \$BenchviewCommitName' : 'coreclr rolling \$GIT_BRANCH_WITHOUT_ORIGIN \$GIT_COMMIT'
349
350             steps {
351                 shell("bash ./tests/scripts/perf-prep.sh --throughput")
352                 shell("./init-tools.sh")
353                 shell("./build.sh ${architecture} ${configuration}")
354                 shell("GIT_BRANCH_WITHOUT_ORIGIN=\$(echo \$GIT_BRANCH | sed \"s/[^/]*\\/\\(.*\\)/\\1 /\")\n" +
355                 "python3.5 \"\${WORKSPACE}/tests/scripts/Microsoft.BenchView.JSONFormat/tools/submission-metadata.py\" --name \" ${benchViewName} \" --user \"dotnet-bot@microsoft.com\"\n" +
356                 "python3.5 \"\${WORKSPACE}/tests/scripts/Microsoft.BenchView.JSONFormat/tools/build.py\" git --branch \$GIT_BRANCH_WITHOUT_ORIGIN --type ${runType}")
357                 shell("""sudo -E python3.5 ./tests/scripts/run-throughput-perf.py \\
358                 -arch \"${architecture}\" \\
359                 -os \"${os}\" \\
360                 -configuration \"${configuration}\" \\
361                 -clr_root \"\${WORKSPACE}\" \\
362                 -assembly_root \"\${WORKSPACE}/_/fx/bin/runtime/netcoreapp-${osGroup}-${configuration}-${architecture}\" \\
363                 -run_type \"${runType}\" \\
364                 -benchview_path \"\${WORKSPACE}/tests/scripts/Microsoft.BenchView.JSONFormat/tools\"""")
365             }
366         }
367
368         // Save machinedata.json to /artifact/bin/ Jenkins dir
369         def archiveSettings = new ArchivalSettings()
370         archiveSettings.addFiles('throughput-*.csv')
371         archiveSettings.addFiles('machinedata.json')
372         Utilities.addArchival(newJob, archiveSettings)
373
374         Utilities.standardJobSetup(newJob, project, isPR, "*/${branch}")
375
376         // For perf, we need to keep the run results longer
377         newJob.with {
378             // Enable the log rotator
379             logRotator {
380                 artifactDaysToKeep(7)
381                 daysToKeep(300)
382                 artifactNumToKeep(25)
383                 numToKeep(1000)
384             }
385         }
386         if (isPR) {
387             TriggerBuilder builder = TriggerBuilder.triggerOnPullRequest()
388             builder.setGithubContext("${os} Throughput Perf Tests")
389             builder.triggerOnlyOnComment()
390             builder.setCustomTriggerPhrase("(?i).*test\\W+${os}\\W+throughput.*")
391             builder.triggerForBranch(branch)
392             builder.emitTrigger(newJob)
393         }
394         else {
395             // Set a push trigger
396             TriggerBuilder builder = TriggerBuilder.triggerOnCommit()
397             builder.emitTrigger(newJob)
398         }
399     } // os
400 } // isPR