-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add performance configuration (#2932)
* Add new performance configuration - Ubuntu DS1 * Reduce performance test run loop from 100 to 10.
- Loading branch information
Showing
4 changed files
with
39 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,38 @@ | ||
pipeline { | ||
agent none | ||
triggers { pollSCM('H/3 * * * *') } | ||
stages { | ||
stage ('Build') { | ||
agent any | ||
steps { | ||
sh 'pip install -U virtualenv' | ||
sh 'python -m virtualenv --clear env' | ||
sh './scripts/jenkins_build.sh' | ||
sh './scripts/jenkins_archive.sh' | ||
} | ||
post { | ||
always { deleteDir() } | ||
} | ||
} | ||
stage ('Performance-Test') { | ||
agent { label 'perf-ubuntu-a0' } | ||
when { expression { return env.BRANCH_NAME == 'master' || env.BRANCH_NAME.startsWith('performance') } } | ||
steps { | ||
sh 'pip install -U virtualenv' | ||
sh 'python -m virtualenv --clear env' | ||
sh './scripts/jenkins_perf.sh' | ||
} | ||
post { | ||
always { deleteDir() } | ||
} | ||
} | ||
node { | ||
stage ('Build') { | ||
node ('linux-build') { | ||
checkout scm | ||
sh './scripts/jenkins_build.sh' | ||
sh './scripts/jenkins_archive.sh' | ||
deleteDir() | ||
} | ||
} | ||
stage ('Performance Test') { | ||
def platforms = ['perf-ubuntu-a0', 'perf-ubuntu-ds1'] | ||
def perftests = [:] | ||
|
||
for (int i = 0; i < platforms.size(); i++) { | ||
platform = platforms.get(i) | ||
perftests["Test ${platform}"] = perf_closure(platform) | ||
} | ||
perftests.failFast = false | ||
|
||
parallel perftests | ||
} | ||
} | ||
|
||
def perf_closure(platform) { | ||
return { | ||
node (platform) { | ||
if (env.BRANCH_NAME != null && (env.BRANCH_NAME == 'master' || env.BRANCH_NAME.startsWith('performance'))) { | ||
checkout scm | ||
echo "Running performance test on ${platform}." | ||
sh './scripts/jenkins_perf.sh' | ||
deleteDir() | ||
} | ||
else { | ||
echo "Skip performance test." | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters