[
https://issues.apache.org/jira/browse/BEAM-8941?focusedWorklogId=369067&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-369067
]
ASF GitHub Bot logged work on BEAM-8941:
----------------------------------------
Author: ASF GitHub Bot
Created on: 09/Jan/20 14:28
Start Date: 09/Jan/20 14:28
Worklog Time Spent: 10m
Work Description: pawelpasterz commented on pull request #10543:
[BEAM-8941] Implement simple DSL for load tests
URL: https://github.com/apache/beam/pull/10543
Implement simple DSL for load tests. Probably first iteration of this PR.
### Changes:
* `config` -- creates configuration map from given closure (example below)
* `templateConfig` -- create reusable `LoadTestConfig` instance (no need to
create whole map for every single test), specific settings can be changed for
every configuration map made from template (title, input options etc)
* `fromTemplate` -- creates configuration map from given template, specific
settings can be changed
* validation for every returned map is performed (ex `Flink` runner requires
`environmentConfig` to be set, test can not be launched without runner etc)
```
def loadTestConfigurations = { datasetName ->
final def template = templateConfig {
test
'apache_beam.testing.load_tests.group_by_key_test:GroupByKeyTest.testGroupByKey'
dataflow()
pipelineOptions {
python()
project 'apache-beam-testing'
tempLocation 'gs://temp-storage-for-perf-tests/loadtests'
publishToBigQuery true
metricsDataset datasetName
iterations 1
fanout 1
numWorkers 5
autoscalingAlgorithm "NONE"
}
}
[
fromTemplate(template) {
title 'GroupByKey Python Load test 2GB of 10B records'
pipelineOptions {
jobName 'load-tests-python-dataflow-batch-gbk-1-'
metricsTable 'python_dataflow_batch_gbk_1'
inputOptions {
numRecords 200000000
keySize 1
valueSize 9
}
}
},
fromTemplate(template) {
title 'GroupByKey Python Load test 2GB of 100kB records'
pipelineOptions {
jobName 'load-tests-python-dataflow-batch-gbk-3-'
metricsTable 'python_dataflow_batch_gbk_3'
inputOptions {
numRecords 2000
keySize 100000
valueSize 900000
}
}
},
fromTemplate(template) {
title 'GroupByKey Python Load test fanout 4 times with 2GB
10-byte records total'
pipelineOptions {
jobName 'load-tests-python-dataflow-batch-gbk-4-'
metricsTable 'python_dataflow_batch_gbk_4'
inputOptions {
numRecords 5000000
keySize 10
valueSize 90
}
fanout 4
}
}
]
}
//compatible with current, map based implementation
loadTestsBuilder.loadTests(delegate, CommonTestProperties.SDK.PYTHON,
loadTestConfigurations(datasetName), "GBK", "batch")
```
------------------------
Thank you for your contribution! Follow this checklist to help us
incorporate your contribution quickly and easily:
- [ ] [**Choose
reviewer(s)**](https://beam.apache.org/contribute/#make-your-change) and
mention them in a comment (`R: @username`).
- [ ] Format the pull request title like `[BEAM-XXX] Fixes bug in
ApproximateQuantiles`, where you replace `BEAM-XXX` with the appropriate JIRA
issue, if applicable. This will automatically link the pull request to the
issue.
- [ ] If this contribution is large, please file an Apache [Individual
Contributor License Agreement](https://www.apache.org/licenses/icla.pdf).
See the [Contributor Guide](https://beam.apache.org/contribute) for more
tips on [how to make review process
smoother](https://beam.apache.org/contribute/#make-reviewers-job-easier).
Post-Commit Tests Status (on master branch)
------------------------------------------------------------------------------------------------
Lang | SDK | Apex | Dataflow | Flink | Gearpump | Samza | Spark
--- | --- | --- | --- | --- | --- | --- | ---
Go | [](https://builds.apache.org/job/beam_PostCommit_Go/lastCompletedBuild/)
| --- | --- | [](https://builds.apache.org/job/beam_PostCommit_Go_VR_Flink/lastCompletedBuild/)
| --- | --- | [](https://builds.apache.org/job/beam_PostCommit_Go_VR_Spark/lastCompletedBuild/)
Java | [](https://builds.apache.org/job/beam_PostCommit_Java/lastCompletedBuild/)
| [](https://builds.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Apex/lastCompletedBuild/)
| [](https://builds.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Dataflow/lastCompletedBuild/)
| [](https://builds.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Flink/lastCompletedBuild/)<br>[](https://builds.apache.org/job/beam_PostCommit_Java_PVR_Flink_Batch/lastCompletedBuild/)<br>[](https://builds.apache.org/job/beam_PostCommit_Java_PVR_Flink_Streaming/lastCompletedBuild/)
| [](https://builds.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Gearpump/lastCompletedBuild/)
| [](https://builds.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Samza/lastCompletedBuild/)
| [](https://builds.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Spark/lastCompletedBuild/)<br>[](https://builds.apache.org/job/beam_PostCommit_Java_PVR_Spark_Batch/lastCompletedBuild/)<br>[](https://builds.apache.org/job/beam_PostCommit_Java_ValidatesRunner_SparkStructuredStreaming/lastCompletedBuild/)
Python | [](https://builds.apache.org/job/beam_PostCommit_Python2/lastCompletedBuild/)<br>[](https://builds.apache.org/job/beam_PostCommit_Python35/lastCompletedBuild/)<br>[](https://builds.apache.org/job/beam_PostCommit_Python36/lastCompletedBuild/)<br>[](https://builds.apache.org/job/beam_PostCommit_Python37/lastCompletedBuild/)
| --- | [](https://builds.apache.org/job/beam_PostCommit_Py_VR_Dataflow/lastCompletedBuild/)<br>[](https://builds.apache.org/job/beam_PostCommit_Py_ValCont/lastCompletedBuild/)
| [](https://builds.apache.org/job/beam_PreCommit_Python2_PVR_Flink_Cron/lastCompletedBuild/)<br>[](https://builds.apache.org/job/beam_PostCommit_Python35_VR_Flink/lastCompletedBuild/)
| --- | --- | [](https://builds.apache.org/job/beam_PostCommit_Python_VR_Spark/lastCompletedBuild/)
XLang | --- | --- | --- | [](https://builds.apache.org/job/beam_PostCommit_XVR_Flink/lastCompletedBuild/)
| --- | --- | ---
Pre-Commit Tests Status (on master branch)
------------------------------------------------------------------------------------------------
--- |Java | Python | Go | Website
--- | --- | --- | --- | ---
Non-portable | [](https://builds.apache.org/job/beam_PreCommit_Java_Cron/lastCompletedBuild/)
| [](https://builds.apache.org/job/beam_PreCommit_Python_Cron/lastCompletedBuild/)<br>[](https://builds.apache.org/job/beam_PreCommit_PythonLint_Cron/lastCompletedBuild/)
| [](https://builds.apache.org/job/beam_PreCommit_Go_Cron/lastCompletedBuild/)
| [](https://builds.apache.org/job/beam_PreCommit_Website_Cron/lastCompletedBuild/)
Portable | --- | [](https://builds.apache.org/job/beam_PreCommit_Portable_Python_Cron/lastCompletedBuild/)
| --- | ---
See
[.test-infra/jenkins/README](https://github.com/apache/beam/blob/master/.test-infra/jenkins/README.md)
for trigger phrase, status and link of all Jenkins jobs.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 369067)
Remaining Estimate: 0h
Time Spent: 10m
> Create a common place for Load Tests configuration
> --------------------------------------------------
>
> Key: BEAM-8941
> URL: https://issues.apache.org/jira/browse/BEAM-8941
> Project: Beam
> Issue Type: Sub-task
> Components: testing
> Reporter: Kamil Wasilewski
> Assignee: Pawel Pasterz
> Priority: Minor
> Fix For: Not applicable
>
> Time Spent: 10m
> Remaining Estimate: 0h
>
> The Apache Beam community maintains different versions of each Load Test. For
> example, right now, there are two versions of all Python Load Tests: the
> first one runs on Dataflow runner, and the second one runs on Flink. With the
> lack of a common place where configuration for the tests can be stored, the
> configuration is duplicated many times with minimal differences.
> The goal is to create a common place for the configuration, so that it could
> be passed to different files with tests (.test-infra/jenkins/*.groovy) and
> filtered according to needs.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)