Skip to content

Commit

Permalink
Refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
Amar3tto committed Sep 26, 2023
1 parent ac3b7a2 commit da4e807
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 28 deletions.
26 changes: 12 additions & 14 deletions .github/workflows/beam_LoadTests_Go_SideInput_Dataflow_Batch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,31 +69,29 @@ jobs:
comment_phrase: ${{ matrix.job_phrase }}
github_token: ${{ secrets.GITHUB_TOKEN }}
github_job: ${{ matrix.job_name }} (${{ matrix.job_phrase }})
- name: Prepare configs
#Reads config files, excludes comments, appends current date to the job_name parameter
id: set_configs
shell: bash
run: |
CURDATE=$(date '+%m%d%H%M%S' --utc)
CURCONFIG=$(grep -v "^#.*" ./.github/workflows/load-tests-job-configs/config_SideInput_Go_Batch_Dataflow_First_Iterable.txt | tr '\n' ' ')
CURCONFIG=$(echo "${CURCONFIG/load-tests-go-dataflow-batch-sideinput-3-/load-tests-go-dataflow-batch-sideinput-3-$CURDATE}")
echo "prepared_config_1=$CURCONFIG" >> $GITHUB_OUTPUT
CURCONFIG=$(grep -v "^#.*" ./.github/workflows/load-tests-job-configs/config_SideInput_Go_Batch_Dataflow_Iterable.txt | tr '\n' ' ')
CURCONFIG=$(echo "${CURCONFIG/load-tests-go-dataflow-batch-sideinput-4-/load-tests-go-dataflow-batch-sideinput-4-$CURDATE}")
echo "prepared_config_2=$CURCONFIG" >> $GITHUB_OUTPUT
- name: Prepare test arguments
uses: ./.github/actions/test-arguments-action
with:
test-type: load
test-language: go
argument-file-paths: |
${{ github.workspace }}/.github/workflows/load-tests-job-configs/config_SideInput_Go_Batch_Dataflow_First_Iterable.txt
${{ github.workspace }}/.github/workflows/load-tests-job-configs/config_SideInput_Go_Batch_Dataflow_Iterable.txt
arguments: |
--job_name=load-tests-go-dataflow-batch-sideinput-$(date '+%m%d%H%M%S' --utc)
- name: run SideInput Dataflow Batch Go Load Test 1 (first iterable)
uses: ./.github/actions/gradle-command-self-hosted-action
with:
gradle-command: :sdks:go:test:load:run
arguments: |
-PloadTest.mainClass=sideinput \
-Prunner=DataflowRunner \
'-PloadTest.args=${{ steps.set_configs.outputs.prepared_config_1 }}' \
'-PloadTest.args=${{ env.beam_LoadTests_Go_SideInput_Dataflow_Batch_test_arguments_1 }}' \
- name: run SideInput Dataflow Batch Go Load Test 2 (iterable)
uses: ./.github/actions/gradle-command-self-hosted-action
with:
gradle-command: :sdks:go:test:load:run
arguments: |
-PloadTest.mainClass=sideinput \
-Prunner=DataflowRunner \
'-PloadTest.args=${{ steps.set_configs.outputs.prepared_config_2 }}'
'-PloadTest.args=${{ env.beam_LoadTests_Go_SideInput_Dataflow_Batch_test_arguments_2 }}'
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
###############################################################################
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
Expand All @@ -14,20 +13,16 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
###############################################################################
--job_name=load-tests-go-dataflow-batch-sideinput-3-
--project=apache-beam-testing

--region=us-central1
--temp_location=gs://temp-storage-for-perf-tests/loadtests
--staging_location=gs://temp-storage-for-perf-tests/loadtests
--influx_namespace=dataflow
--influx_measurement=go_batch_sideinput_3
--influx_measurement=go_batch_sideinput_1
--input_options=''{\"num_records\":10000000,\"key_size\":100,\"value_size\":900}''
--access_percentage=1
--num_workers=10
--autoscaling_algorithm=NONE
--environment_type=DOCKER
--environment_config=gcr.io/apache-beam-testing/beam-sdk/beam_go_sdk:latest
--influx_db_name=beam_test_metrics
--influx_hostname=http://10.128.0.96:8086
--runner=DataflowRunner
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
###############################################################################
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
Expand All @@ -14,19 +13,15 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
###############################################################################
--job_name=load-tests-go-dataflow-batch-sideinput-4-
--project=apache-beam-testing

--region=us-central1
--temp_location=gs://temp-storage-for-perf-tests/loadtests
--staging_location=gs://temp-storage-for-perf-tests/loadtests
--influx_namespace=dataflow
--influx_measurement=go_batch_sideinput_4
--influx_measurement=go_batch_sideinput_2
--input_options=''{\"num_records\":10000000,\"key_size\":100,\"value_size\":900}''
--num_workers=10
--autoscaling_algorithm=NONE
--environment_type=DOCKER
--environment_config=gcr.io/apache-beam-testing/beam-sdk/beam_go_sdk:latest
--influx_db_name=beam_test_metrics
--influx_hostname=http://10.128.0.96:8086
--runner=DataflowRunner

0 comments on commit da4e807

Please sign in to comment.