beam-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Work logged] (BEAM-3942) Update performance testing framework to use Gradle.
Date Sat, 07 Apr 2018 02:16:00 GMT

     [ https://issues.apache.org/jira/browse/BEAM-3942?focusedWorklogId=88680&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-88680
]

ASF GitHub Bot logged work on BEAM-3942:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 07/Apr/18 02:15
            Start Date: 07/Apr/18 02:15
    Worklog Time Spent: 10m 
      Work Description: chamikaramj commented on a change in pull request #5003: [BEAM-3942]
Update performance testing framework to use Gradle
URL: https://github.com/apache/beam/pull/5003#discussion_r179905587
 
 

 ##########
 File path: build_rules.gradle
 ##########
 @@ -593,6 +593,118 @@ ext.applyJavaNature = {
   }
 }
 
+// Reads and contains all necessary performance test parameters
+class JavaPerformanceTestConfiguration {
+  String pkbLocation = System.getProperty('pkbLocation')
+
+  String logLevel = System.getProperty('logLevel', 'INFO')
+  String gradleBinary = System.getProperty('gradleBinary', './gradlew')
+  String isOfficial = System.getProperty('official', 'true')
+  String benchmarks = System.getProperty('benchmarks', 'beam_integration_benchmark')
+
+  String beamPrebuilt = System.getProperty('beamPrebuilt', 'true')
+  String beamSdk = System.getProperty('beamSdk', 'java')
+
+  String timeout = System.getProperty('itTimeout', '1200')
+
+  String kubeconfig = System.getProperty('kubeconfig', System.getProperty('user.home') +
'/.kube/config')
+  String kubectl = System.getProperty('kubectl', 'kubectl')
+
+  // PerfKit will have trouble reading 'null' path. It expects empty string if no scripts
are expected.
+  String kubernetesScripts = System.getProperty('kubernetesScripts', '')
+
+  String integrationTestPipelineOptions = System.getProperty('integrationTestPipelineOptions')
+
+  // PerfKit will have trouble reading 'null' path. It expects empty string if no config
file is expected.
+  String optionsConfigFile = System.getProperty('beamITOptions', '')
+
+  String integrationTest = System.getProperty('integrationTest')
+  String itModule = System.getProperty('itModule')
+
+  String runner = System.getProperty('integrationTestRunner', 'direct')
+
+  String extraProperties = System.getProperty('beamExtraProperties', '')
+}
+
+// Configures a project with a set of tasks needed for running performance tests
+ext.enableJavaPerformanceTesting = {
+  println "enableJavaPerformanceTesting with ${it ? "$it" : "default configuration"} for
project ${project.name}"
+
+  // Use the implicit it parameter of the closure to handle zero argument or one argument
map calls.
+  JavaPerformanceTestConfiguration configuration = it ? it as JavaPerformanceTestConfiguration
: new JavaPerformanceTestConfiguration()
+
+  // Add runners needed to run integration tests on
+  task packageIntegrationTests(type: Jar) {
+    if (gradle.startParameter.taskNames.contains('integrationTest')) {
+
+      def runner = configuration.runner
+      dependencies {
+        if (runner.contains('dataflow')) {
+          testCompile project(path: ":runners:google-cloud-dataflow-java", configuration:
'shadowTest')
+        } else {
+          testCompile project(path: ":runners:direct-java", configuration: 'shadowTest')
+        }
+      }
+    }
+  }
+
+  // Task for running integration tests
+  task integrationTest(type: Test) {
+    include "**/*IT.class"
+    systemProperties.beamTestPipelineOptions = configuration.integrationTestPipelineOptions
+  }
+}
+
+ext.createPerformanceTestHarness = {
+  println "createPerformanceTestHarness with ${it ? "$it" : "default configuration"} for
project ${project.name}"
+
+  // Use the implicit it parameter of the closure to handle zero argument or one argument
map calls.
+  JavaPerformanceTestConfiguration configuration = it ? it as JavaPerformanceTestConfiguration
: new JavaPerformanceTestConfiguration()
 
 Review comment:
   Ditto. Please explain what 'it' parameter is.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Issue Time Tracking
-------------------

    Worklog Id:     (was: 88680)
    Time Spent: 2h 50m  (was: 2h 40m)

> Update performance testing framework to use Gradle.
> ---------------------------------------------------
>
>                 Key: BEAM-3942
>                 URL: https://issues.apache.org/jira/browse/BEAM-3942
>             Project: Beam
>          Issue Type: Sub-task
>          Components: testing
>            Reporter: Chamikara Jayalath
>            Assignee: Ɓukasz Gajowy
>            Priority: Major
>          Time Spent: 2h 50m
>  Remaining Estimate: 0h
>
> This requires performing updates to PerfKitBenchmarker and Beam so that we can execute
performance tests using Gradle.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message