Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Commit 19e5dd7

Browse files
committed
Move JIT perf tests to new infrastructure
Moved over the running of the JIT perf tests to use the same logic as the perflab tests. Had to make a few changes to what we save and where since we reuse the sandbox folder.
1 parent dd0f452 commit 19e5dd7

File tree

2 files changed

+7
-41
lines changed

2 files changed

+7
-41
lines changed

perf.groovy

Lines changed: 3 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -52,12 +52,14 @@ def static getOSGroup(def os) {
5252
batchFile("set __TestIntermediateDir=int&&build.cmd release ${architecture}")
5353
batchFile("tests\\runtest.cmd release ${architecture} GenerateLayoutOnly")
5454
batchFile("tests\\scripts\\run-xunit-perf.cmd -arch ${architecture} -configuration ${configuration} -testBinLoc bin\\tests\\Windows_NT.${architecture}.Release\\performance\\perflab\\Perflab -library -uploadToBenchview C:\\Tools\\Microsoft.Benchview.JSONFormat\\tools -runtype " + runType)
55+
batchFile("tests\\scripts\\run-xunit-perf.cmd -arch ${architecture} -configuration ${configuration} -testBinLoc bin\\tests\\Windows_NT.${architecture}.Release\\Jit\\Performance\\CodeQuality -uploadToBenchview C:\\Tools\\Microsoft.Benchview.JSONFormat\\tools -runtype " + runType)
5556
}
5657
}
5758

5859
// Save machinedata.json to /artifact/bin/ Jenkins dir
5960
def archiveSettings = new ArchivalSettings()
60-
archiveSettings.addFiles('sandbox\\perf-*.xml')
61+
archiveSettings.addFiles('perf-*.xml')
62+
archiveSettings.addFiles('perf-*.etl')
6163
Utilities.addArchival(newJob, archiveSettings)
6264

6365
Utilities.standardJobSetup(newJob, project, isPR, "*/${branch}")
@@ -79,45 +81,6 @@ def static getOSGroup(def os) {
7981
}
8082
}
8183

82-
[true, false].each { isPR ->
83-
['Windows_NT'].each { os ->
84-
def newJob = job(Utilities.getFullJobName(project, "perf_${os}", isPR)) {
85-
86-
// Set the label.
87-
label('performance')
88-
steps {
89-
// Batch
90-
batchFile("C:\\Tools\\nuget.exe install Microsoft.BenchView.JSONFormat -Source http://benchviewtestfeed.azurewebsites.net/nuget -OutputDirectory C:\\tools -Prerelease -ExcludeVersion")
91-
batchFile("py C:\\tools\\Microsoft.BenchView.JSONFormat\\tools\\machinedata.py")
92-
batchFile("set __TestIntermediateDir=int&&build.cmd release ${architecture}")
93-
batchFile("tests\\runtest.cmd release ${architecture}")
94-
batchFile("tests\\scripts\\run-xunit-perf.cmd -arch ${architecture} -configuration ${configuration} -testBinLoc bin\\tests\\Windows_NT.x64.Release\\Jit\\Performance\\CodeQuality")
95-
}
96-
}
97-
98-
// Save machinedata.json to /artifact/bin/ Jenkins dir
99-
def archiveSettings = new ArchivalSettings()
100-
archiveSettings.addFiles('sandbox\\perf-*.xml')
101-
archiveSettings.addFiles('machinedata.json')
102-
Utilities.addArchival(newJob, archiveSettings)
103-
104-
Utilities.standardJobSetup(newJob, project, isPR, "*/${branch}")
105-
if (isPR) {
106-
TriggerBuilder builder = TriggerBuilder.triggerOnPullRequest()
107-
builder.setGithubContext("${os} Perf Tests")
108-
builder.triggerOnlyOnComment()
109-
builder.setCustomTriggerPhrase("(?i).*test\\W+${os}\\W+perf.*")
110-
builder.triggerForBranch(branch)
111-
builder.emitTrigger(newJob)
112-
}
113-
else {
114-
// Set a push trigger
115-
TriggerBuilder builder = TriggerBuilder.triggerOnCommit()
116-
builder.emitTrigger(newJob)
117-
}
118-
}
119-
}
120-
12184
// Create the Linux/OSX/CentOS coreclr test leg for debug and release and each scenario
12285
[true, false].each { isPR ->
12386
['Ubuntu'].each { os ->

tests/scripts/run-xunit-perf.cmd

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ xunit.performance.analysis.exe %PERFOUT%.xml -xml %XMLOUT% > %BENCHNAME%-analysi
6262

6363
@rem optionally upload results to benchview
6464
if not [%BENCHVIEW_PATH%] == [] (
65-
py %BENCHVIEW_PATH%\measurement.py xunit perf-Perflab.xml --better desc --drop-first-value
65+
py %BENCHVIEW_PATH%\measurement.py xunit perf-%BENCHNAME%.xml --better desc --drop-first-value
6666
py %BENCHVIEW_PATH%\submission.py measurement.json ^
6767
--build ..\build.json ^
6868
--machine-data ..\machinedata.json ^
@@ -75,6 +75,9 @@ if not [%BENCHVIEW_PATH%] == [] (
7575
--arch "%TEST_ARCH%" ^
7676
--machinepool "PerfSnake"
7777
py %BENCHVIEW_PATH%\upload.py submission.json --container coreclr
78+
REM Save off the results to the root directory for recovery later in Jenkins
79+
xcopy perf-%BENCHNAME%*.xml %CORECLR_REPO%\
80+
xcopy perf-%BENCHNAME%*.etl %CORECLR_REPO%\
7881
) else (
7982
type %XMLOUT% | findstr "test name"
8083
type %XMLOUT% | findstr Duration

0 commit comments

Comments
 (0)