-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added groovy script for running benchmark tests #205
Added groovy script for running benchmark tests #205
Conversation
Codecov Report
@@ Coverage Diff @@
## main #205 +/- ##
============================================
+ Coverage 85.42% 86.56% +1.14%
- Complexity 25 27 +2
============================================
Files 74 76 +2
Lines 199 201 +2
Branches 11 11
============================================
+ Hits 170 174 +4
+ Misses 21 19 -2
Partials 8 8
|
vars/runBenchmarkTestScript.groovy
Outdated
* @param args.insecure <required> - Force the security of the cluster to be disabled, default is false. | ||
* @param args.workload <required> - Name of the workload that OpenSearch Benchmark should run, default is nyc_taxis. | ||
* @param args.singleNode <required> - Create single node OS cluster, default is true. | ||
* @param args.minDistribution <required> - Use min distribution of OpenSearch for cluster, default is false. | ||
* @param args.useFiftyPercentHeap <required> - Use 50 percent of physical memory as heap, default is false. | ||
* @param args.captureNodeStat <required> - Make opensearch-benchmark to capture node stats during run, default is false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All these values have defaults so they cannot be required. I believe they should be ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense, will make them optional.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
workload is a required field in the context of the groovy script, made others optional.
vars/runBenchmarkTestScript.groovy
Outdated
lib = library(identifier: 'jenkins@main', retriever: legacySCM(scm)) | ||
def buildManifest = lib.jenkins.BuildManifest.new(readYaml(file: args.bundleManifest)) | ||
|
||
config_name = isNullOrEmpty(args.config) ? "config.yml" : args.config |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I dont see config
in args above. Was that missed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added.
vars/runBenchmarkTestScript.groovy
Outdated
} | ||
|
||
String getMetadataTags(tags, buildManifest) { | ||
def metadataTags = "jenkins-build-id:${buildManifest.getArtifactBuildId()},arch:${buildManifest.getArtifactArchitecture()}," + |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
jenkins-build-id
indicates the build number of the jenkins workflow where this will be run. Usually it means that.
How about distribution-build-id
or dist-build-id
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
makes sense, updated.
Signed-off-by: Rishabh Singh <[email protected]>
Signed-off-by: Rishabh Singh <[email protected]> (cherry picked from commit 762ba18) Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Signed-off-by: Rishabh Singh <[email protected]> (cherry picked from commit 762ba18) Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Description
This PR adds groovy script to run benchmark tests using opensearch-benchmark.
Issues Resolved
opensearch-project/opensearch-build#3496
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.