You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beam.apache.org by tg...@apache.org on 2017/03/20 15:45:00 UTC

[1/2] beam git commit: Add performance tests to Jenkins

Repository: beam
Updated Branches:
  refs/heads/master 6b8bfc75a -> c4339a04d


Add performance tests to Jenkins

Signed-off-by: Jason Kuster <ja...@google.com>


Project: http://git-wip-us.apache.org/repos/asf/beam/repo
Commit: http://git-wip-us.apache.org/repos/asf/beam/commit/d2d04823
Tree: http://git-wip-us.apache.org/repos/asf/beam/tree/d2d04823
Diff: http://git-wip-us.apache.org/repos/asf/beam/diff/d2d04823

Branch: refs/heads/master
Commit: d2d04823bb8089834433cac3563f0eb3c3c9c8f3
Parents: 6b8bfc7
Author: Jason Kuster <ja...@google.com>
Authored: Mon Jan 9 02:26:22 2017 -0800
Committer: Thomas Groh <tg...@google.com>
Committed: Mon Mar 20 08:44:20 2017 -0700

----------------------------------------------------------------------
 .jenkins/common_job_properties.groovy           | 36 +++++++++++++++++++
 .../job_beam_PerformanceTests_Dataflow.groovy   | 37 +++++++++++++++++++
 .jenkins/job_beam_PerformanceTests_Spark.groovy | 38 ++++++++++++++++++++
 3 files changed, 111 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/beam/blob/d2d04823/.jenkins/common_job_properties.groovy
----------------------------------------------------------------------
diff --git a/.jenkins/common_job_properties.groovy b/.jenkins/common_job_properties.groovy
index 4506636..bf717b6 100644
--- a/.jenkins/common_job_properties.groovy
+++ b/.jenkins/common_job_properties.groovy
@@ -220,4 +220,40 @@ class common_job_properties {
       mailer(notifyAddress, false, true)
     }
   }
+
+  // Configures the argument list for performance tests, adding the standard
+  // performance test job arguments.
+  private static def genPerformanceArgs(def argMap) {
+    def standard_args = [
+      project: 'apache-beam-testing',
+      dpb_log_level: 'INFO',
+      dpb_maven_binary: '/home/jenkins/tools/maven/latest/bin/mvn',
+      bigquery_table: 'beam_performance.pkb_results',
+      // Publishes results with official tag, for use in dashboards.
+      official: 'true'
+    ]
+    // Note: in case of key collision, keys present in ArgMap win.
+    def joined_args = standard_args.plus(argMap)
+    def argList = []
+    joined_args.each({
+        // FYI: Replacement only works with double quotes.
+        key, value -> argList.add("--$key=$value")
+    })
+    return argList.join(' ')
+  }
+
+  // Adds the standard performance test job steps.
+  static def buildPerformanceTest(def context, def argMap) {
+    def pkbArgs = genPerformanceArgs(argMap)
+    context.steps {
+        // Clean up environment.
+        shell('rm -rf PerfKitBenchmarker')
+        // Clone appropriate perfkit branch
+        shell('git clone -b beam-pkb --single-branch https://github.com/jasonkuster/PerfKitBenchmarker.git')
+        // Install job requirements.
+        shell('pip install --user -r PerfKitBenchmarker/requirements.txt')
+        // Launch performance test.
+        shell("python PerfKitBenchmarker/pkb.py $pkbArgs")
+    }
+  }
 }

http://git-wip-us.apache.org/repos/asf/beam/blob/d2d04823/.jenkins/job_beam_PerformanceTests_Dataflow.groovy
----------------------------------------------------------------------
diff --git a/.jenkins/job_beam_PerformanceTests_Dataflow.groovy b/.jenkins/job_beam_PerformanceTests_Dataflow.groovy
new file mode 100644
index 0000000..f79302a
--- /dev/null
+++ b/.jenkins/job_beam_PerformanceTests_Dataflow.groovy
@@ -0,0 +1,37 @@
+/*
+ * 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 common_job_properties
+
+// This job runs the Beam performance tests on PerfKit Benchmarker.
+job('beam_PerformanceTests_Dataflow'){
+    // Set default Beam job properties.
+    common_job_properties.setTopLevelMainJobProperties(delegate)
+
+    // Run job in postcommit every 6 hours and don't trigger every push.
+    common_job_properties.setPostCommit(delegate, '0 */6 * * *', false)
+
+    def argMap = [
+      benchmarks: 'dpb_wordcount_benchmark',
+      dpb_dataflow_staging_location: 'gs://temp-storage-for-perf-tests/staging',
+      dpb_wordcount_input: 'dataflow-samples/shakespeare/kinglear.txt',
+      config_override: 'dpb_wordcount_benchmark.dpb_service.service_type=dataflow'
+    ]
+
+    common_job_properties.buildPerformanceTest(delegate, argMap)
+}

http://git-wip-us.apache.org/repos/asf/beam/blob/d2d04823/.jenkins/job_beam_PerformanceTests_Spark.groovy
----------------------------------------------------------------------
diff --git a/.jenkins/job_beam_PerformanceTests_Spark.groovy b/.jenkins/job_beam_PerformanceTests_Spark.groovy
new file mode 100644
index 0000000..06a41fd
--- /dev/null
+++ b/.jenkins/job_beam_PerformanceTests_Spark.groovy
@@ -0,0 +1,38 @@
+/*
+ * 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 common_job_properties
+
+// This job runs the Beam performance tests on PerfKit Benchmarker.
+job('beam_PerformanceTests_Spark'){
+    // Set default Beam job properties.
+    common_job_properties.setTopLevelMainJobProperties(delegate)
+
+    // Run job in postcommit every 6 hours and don't trigger every push.
+    common_job_properties.setPostCommit(delegate, '0 */6 * * *', false)
+
+    def argMap = [
+      benchmarks: 'dpb_wordcount_benchmark',
+      // There are currently problems uploading to Dataproc, so we use a file
+      // already present on the machines as input.
+      dpb_wordcount_input: '/etc/hosts',
+      config_override: 'dpb_wordcount_benchmark.dpb_service.service_type=dataproc'
+    ]
+
+    common_job_properties.buildPerformanceTest(delegate, argMap)
+}


[2/2] beam git commit: This closes #1751

Posted by tg...@apache.org.
This closes #1751


Project: http://git-wip-us.apache.org/repos/asf/beam/repo
Commit: http://git-wip-us.apache.org/repos/asf/beam/commit/c4339a04
Tree: http://git-wip-us.apache.org/repos/asf/beam/tree/c4339a04
Diff: http://git-wip-us.apache.org/repos/asf/beam/diff/c4339a04

Branch: refs/heads/master
Commit: c4339a04d737c79376bae609a8149150cf7fe360
Parents: 6b8bfc7 d2d0482
Author: Thomas Groh <tg...@google.com>
Authored: Mon Mar 20 08:44:38 2017 -0700
Committer: Thomas Groh <tg...@google.com>
Committed: Mon Mar 20 08:44:38 2017 -0700

----------------------------------------------------------------------
 .jenkins/common_job_properties.groovy           | 36 +++++++++++++++++++
 .../job_beam_PerformanceTests_Dataflow.groovy   | 37 +++++++++++++++++++
 .jenkins/job_beam_PerformanceTests_Spark.groovy | 38 ++++++++++++++++++++
 3 files changed, 111 insertions(+)
----------------------------------------------------------------------