diff options
author | José Rivero <jorive@microsoft.com> | 2017-05-31 03:14:05 +0300 |
---|---|---|
committer | José Rivero <jorive@microsoft.com> | 2017-06-01 20:33:10 +0300 |
commit | abfe04b6fd168b547c1ef8846f1a815351e85d74 (patch) | |
tree | 0039fc91d2670ece7005cd4b6de22935fd1eef1f /perf.groovy | |
parent | 3bc879503708488ce4365a312a3667e1653a4c41 (diff) |
Initial work to enable CoreFx perf rolling runs on Linux.
Diffstat (limited to 'perf.groovy')
-rw-r--r-- | perf.groovy | 78 |
1 files changed, 56 insertions, 22 deletions
diff --git a/perf.groovy b/perf.groovy index 11655d0b2f..5fbd0a27de 100644 --- a/perf.groovy +++ b/perf.groovy @@ -49,13 +49,18 @@ def osShortName = ['Windows 10': 'win10', // ************************** [true, false].each { isPR -> ['Release'].each { configurationGroup -> - ['Windows_NT'].each { os -> + ['Windows_NT', 'Ubuntu14.04'].each { os -> def osGroup = osGroupMap[os] def newJobName = "perf_${os.toLowerCase()}_${configurationGroup.toLowerCase()}" def newJob = job(Utilities.getFullJobName(project, newJobName, isPR)) { - - label('windows_clr_perf') + if (os == 'Windows_NT') { + label('windows_clr_perf') + } + else { + label('linux_clr_perf') + } + wrappers { credentialsBinding { string('BV_UPLOAD_SAS_TOKEN', 'CoreFX Perf BenchView Sas') @@ -69,32 +74,61 @@ def osShortName = ['Windows 10': 'win10', 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') } } - parameters - { - stringParam('XUNIT_PERFORMANCE_MAX_ITERATION', '100', 'Set the maximum number of iterations that a test can execute') + + parameters { + 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') + 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') } + def configuration = 'Release' def runType = isPR ? 'private' : 'rolling' - def benchViewName = isPR ? 'corefx private %BenchviewCommitName%' : 'corefx rolling %GIT_BRANCH_WITHOUT_ORIGIN% %GIT_COMMIT%' - - steps { - //We need to specify the max cpu count to be one as we do not want to be executing performance tests in parallel - batchFile("call \"C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\vcvarsall.bat\" x86 && build.cmd -release") - batchFile("C:\\Tools\\nuget.exe install Microsoft.BenchView.JSONFormat -Source http://benchviewtestfeed.azurewebsites.net/nuget -OutputDirectory \"%WORKSPACE%\\Tools\" -Prerelease -ExcludeVersion") - //Do this here to remove the origin but at the front of the branch name as this is a problem for BenchView - //we have to do it all as one statement because cmd is called each time and we lose the set environment variable - batchFile("if [%GIT_BRANCH:~0,7%] == [origin/] (set GIT_BRANCH_WITHOUT_ORIGIN=%GIT_BRANCH:origin/=%) else (set GIT_BRANCH_WITHOUT_ORIGIN=%GIT_BRANCH%)\n" + - "py \"%WORKSPACE%\\Tools\\Microsoft.BenchView.JSONFormat\\tools\\submission-metadata.py\" --name " + "\"" + benchViewName + "\"" + " --user " + "\"dotnet-bot@microsoft.com\"\n" + - "py \"%WORKSPACE%\\Tools\\Microsoft.BenchView.JSONFormat\\tools\\build.py\" git --branch %GIT_BRANCH_WITHOUT_ORIGIN% --type " + runType) - batchFile("py \"%WORKSPACE%\\Tools\\Microsoft.BenchView.JSONFormat\\tools\\machinedata.py\"") - batchFile("call \"C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\vcvarsall.bat\" x86 && build-managed.cmd -release -tests -- /p:Performance=true /p:TargetOS=Windows_NT /m:1 /p:LogToBenchview=true /p:BenchviewRunType=${runType}") + + if (os == 'Windows_NT') { + def benchViewName = isPR ? 'corefx private %BenchviewCommitName%' : 'corefx rolling %GIT_BRANCH_WITHOUT_ORIGIN% %GIT_COMMIT%' + steps { + //We need to specify the max cpu count to be one as we do not want to be executing performance tests in parallel + batchFile("call \"C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\vcvarsall.bat\" x86 && build.cmd -release") + batchFile("C:\\Tools\\nuget.exe install Microsoft.BenchView.JSONFormat -Source http://benchviewtestfeed.azurewebsites.net/nuget -OutputDirectory \"%WORKSPACE%\\Tools\" -Prerelease -ExcludeVersion") + //Do this here to remove the origin but at the front of the branch name as this is a problem for BenchView + //we have to do it all as one statement because cmd is called each time and we lose the set environment variable + batchFile("if [%GIT_BRANCH:~0,7%] == [origin/] (set GIT_BRANCH_WITHOUT_ORIGIN=%GIT_BRANCH:origin/=%) else (set GIT_BRANCH_WITHOUT_ORIGIN=%GIT_BRANCH%)\n" + + "py \"%WORKSPACE%\\Tools\\Microsoft.BenchView.JSONFormat\\tools\\submission-metadata.py\" --name " + "\"" + benchViewName + "\"" + " --user " + "\"dotnet-bot@microsoft.com\"\n" + + "py \"%WORKSPACE%\\Tools\\Microsoft.BenchView.JSONFormat\\tools\\build.py\" git --branch %GIT_BRANCH_WITHOUT_ORIGIN% --type " + runType) + batchFile("py \"%WORKSPACE%\\Tools\\Microsoft.BenchView.JSONFormat\\tools\\machinedata.py\"") + batchFile("call \"C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\vcvarsall.bat\" x86 && build-managed.cmd -release -tests -- /p:Performance=true /p:TargetOS=${osGroup} /m:1 /p:LogToBenchview=true /p:BenchviewRunType=${runType}") + } + } + else { + def benchViewName = isPR ? 'corefx private \$BenchviewCommitName' : 'corefx rolling \$GIT_BRANCH_WITHOUT_ORIGIN \$GIT_COMMIT' + steps { + //We need to specify the max cpu count to be one as we do not want to be executing performance tests in parallel + shell("./build.sh -release") + shell("curl \"http://benchviewtestfeed.azurewebsites.net/nuget/FindPackagesById()?id='Microsoft.BenchView.JSONFormat'\" | grep \"content type\" | sed \"$ s/.*src=\\\"\\([^\\\"]*\\)\\\".*/\\1/;tx;d;:x\" | xargs curl -o benchview.zip") + shell("unzip -q -o benchview.zip -d \"\${WORKSPACE}/Tools/Microsoft.BenchView.JSONFormat\"") + + //Do this here to remove the origin but at the front of the branch name as this is a problem for BenchView + //we have to do it all as one statement because cmd is called each time and we lose the set environment variable + shell("GIT_BRANCH_WITHOUT_ORIGIN=\$(echo \$GIT_BRANCH | sed \"s/[^/]*\\/\\(.*\\)/\\1 /\")\n" + + "python3.5 \"\${WORKSPACE}/Tools/Microsoft.BenchView.JSONFormat/tools/submission-metadata.py\" --name " + "\"" + benchViewName + "\"" + " --user " + "\"dotnet-bot@microsoft.com\"\n" + + "python3.5 \"\${WORKSPACE}/Tools/Microsoft.BenchView.JSONFormat/tools/build.py\" git --branch %GIT_BRANCH_WITHOUT_ORIGIN% --type " + runType) + shell("python3.5 \"\${WORKSPACE}/Tools/Microsoft.BenchView.JSONFormat/tools/machinedata.py\"") + shell("build-managed.sh -release -tests -- /p:Performance=true /p:TargetOS=${osGroup} /m:1 /p:LogToBenchview=true /p:BenchviewRunType=${runType}") + } } } // Set the label. - newJob.with { - label('windows_clr_perf') + if (os == 'Windows_NT') { + newJob.with { + label('windows_clr_perf') + } } + else { + newJob.with { + label('linux_clr_perf') + } + } + // Set up standard options. Utilities.standardJobSetup(newJob, project, isPR, "*/${branch}") //Set timeout to non-default @@ -108,7 +142,7 @@ def osShortName = ['Windows 10': 'win10', // Add the unit test results Utilities.addXUnitDotNETResults(newJob, 'bin/**/Perf-*.xml') def archiveContents = "msbuild.log" - + // Add archival for the built data. Utilities.addArchival(newJob, archiveContents) // Set up triggers |