piotr-szuberski commented on a change in pull request #11274:
URL: https://github.com/apache/beam/pull/11274#discussion_r419390680



##########
File path: .test-infra/jenkins/job_PerformanceTests_PubsubIO_Python.groovy
##########
@@ -0,0 +1,106 @@
+/*
+ * 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
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * 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.
+ */
+
+import CommonJobProperties as commonJobProperties
+import LoadTestsBuilder as loadTestsBuilder
+import PhraseTriggeringPostCommitBuilder
+
+import static java.util.UUID.randomUUID
+
+def now = new Date().format("MMddHHmmss", TimeZone.getTimeZone('UTC'))
+def timeout = 60 * 60
+
+def pubsubId = randomUUID()
+def pubsubName = "pubsub_io_performance_${pubsubId}"
+
+def psio_write_test = [
+        title          : 'PubsubIO Write Performance Test Python 2GB',
+        test           : 'apache_beam.io.gcp.pubsub_write_perf_test',
+        runner         : CommonTestProperties.Runner.DATAFLOW,
+        pipelineOptions: [
+                job_name             : 
'performance-tests-psio-write-python-2gb' + now,
+                project              : 'apache-beam-testing',
+                temp_location        : 
'gs://temp-storage-for-perf-tests/loadtests',
+                publish_to_big_query : true,
+                metrics_dataset      : 'beam_performance',
+                metrics_table        : 'psio_write_2GB_msg_results',
+                input_options        : '\'{' +
+                        '"num_records": 2097152,' +
+                        '"key_size": 1,' +
+                        '"value_size": 1024}\'',
+                num_workers          : 5,
+                autoscaling_algorithm: 'NONE',  // Disable autoscale the 
worker pool.
+                pubsub_name          : pubsubName,
+                timeout              : timeout,
+        ]
+]
+
+def psio_read_test = [
+        title          : 'PubsubIO Read Performance Test Python 2GB',
+        test           : 'apache_beam.io.gcp.pubsub_read_perf_test',
+        runner         : CommonTestProperties.Runner.DATAFLOW,
+        pipelineOptions: [
+                job_name             : 
'performance-tests-psio-read-python-2gb' + now,
+                project              : 'apache-beam-testing',
+                temp_location        : 
'gs://temp-storage-for-perf-tests/loadtests',
+                publish_to_big_query : true,
+                metrics_dataset      : 'beam_performance',
+                metrics_table        : 'psio_read_2GB_msg_results',
+                input_options        : '\'{' +
+                        '"num_records": 2097152,' +
+                        '"key_size": 1,' +
+                        '"value_size": 1024}\'',
+                num_workers          : 5,
+                autoscaling_algorithm: 'NONE',  // Disable autoscale the 
worker pool.
+                pubsub_name          : pubsubName,
+                timeout              : timeout,
+        ]
+]
+
+def executeJob = { scope, testConfig ->
+    commonJobProperties.setTopLevelMainJobProperties(scope, 'master', 240)
+
+    loadTestsBuilder.loadTest(scope, testConfig.title, testConfig.runner,
+            CommonTestProperties.SDK.PYTHON_37, testConfig.pipelineOptions, 
testConfig.test)
+}
+
+PhraseTriggeringPostCommitBuilder.postCommitJob(

Review comment:
       I moved both tests to one file so now it'll be impossible to run them 
separately. They were so tightly bounded that it made no sense to run them 
individually




----------------------------------------------------------------
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]


Reply via email to