Skip to content

Commit 30dbe09

Browse files
author
Moritz Mack
authored
Add cron job to trigger Java JMH micro-benchmarks weekly (#23388)
* Add cron job to trigger Java JMH micro-benchmarks weekly (addresses #22238) * Update jobs inventory
1 parent 3c7a4e0 commit 30dbe09

4 files changed

Lines changed: 51 additions & 0 deletions

File tree

.test-infra/jenkins/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,7 @@ Beam Jenkins overview page: [link](https://ci-beam.apache.org/)
160160
| beam_PerformanceTests_WordCountIT_Py37 | [cron](https://ci-beam.apache.org/job/beam_PerformanceTests_WordCountIT_Py37/) | `Run Python37 WordCountIT Performance Test` | [![Build Status](https://ci-beam.apache.org/job/beam_PerformanceTests_WordCountIT_Py37/badge/icon)](https://ci-beam.apache.org/job/beam_PerformanceTests_WordCountIT_Py37) |
161161
| beam_PerformanceTests_XmlIOIT | [cron](https://ci-beam.apache.org/job/beam_PerformanceTests_XmlIOIT/), [hdfs_cron](https://ci-beam.apache.org/job/beam_PerformanceTests_XmlIOIT_HDFS/) | `Run Java XmlIO Performance Test` | [![Build Status](https://ci-beam.apache.org/job/beam_PerformanceTests_XmlIOIT/badge/icon)](https://ci-beam.apache.org/job/beam_PerformanceTests_XmlIOIT) [![Build Status](https://ci-beam.apache.org/job/beam_PerformanceTests_XmlIOIT_HDFS/badge/icon)](https://ci-beam.apache.org/job/beam_PerformanceTests_XmlIOIT_HDFS) |
162162
| beam_SQLBigQueryIO_Batch_Performance_Test_Java | [cron](https://ci-beam.apache.org/job/beam_SQLBigQueryIO_Batch_Performance_Test_Java/) | `Run SQLBigQueryIO Batch Performance Test Java` | [![Build Status](https://ci-beam.apache.org/job/beam_SQLBigQueryIO_Batch_Performance_Test_Java/badge/icon)](https://ci-beam.apache.org/job/beam_SQLBigQueryIO_Batch_Performance_Test_Java/) |
163+
| beam_Java_JMH | [cron](https://ci-beam.apache.org/job/beam_Java_JMH/) | | [![Build Status](https://ci-beam.apache.org/job/beam_Java_JMH/badge/icon)](https://ci-beam.apache.org/job/beam_Java_JMH/) |
163164

164165
### Load test Jobs
165166

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
/*
2+
* Licensed to the Apache Software Foundation (ASF) under one
3+
* or more contributor license agreements. See the NOTICE file
4+
* distributed with this work for additional information
5+
* regarding copyright ownership. The ASF licenses this file
6+
* to you under the Apache License, Version 2.0 (the
7+
* "License"); you may not use this file except in compliance
8+
* with the License. You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing, software
13+
* distributed under the License is distributed on an "AS IS" BASIS,
14+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
* See the License for the specific language governing permissions and
16+
* limitations under the License.
17+
*/
18+
19+
import CommonJobProperties as commonJobProperties
20+
import InfluxDBCredentialsHelper
21+
22+
// This cron job runs the Java JMH micro-benchmark suites (on Sundays).
23+
CronJobBuilder.cronJob('beam_Java_Jmh', 'H 0 * * 0', this) {
24+
description('Runs the Java JMH micro-benchmark suites.')
25+
26+
// Set common parameters, timeout is set to 12h (benchmarks are expected to run ~8.5h)
27+
commonJobProperties.setTopLevelMainJobProperties(delegate, 'master', 720, true, 'beam-perf')
28+
InfluxDBCredentialsHelper.useCredentials(delegate)
29+
30+
// Gradle goals for this job.
31+
steps {
32+
environmentVariables {
33+
env("INFLUXDB_HOST", InfluxDBCredentialsHelper.InfluxDBHostUrl)
34+
env("INFLUXDB_DATABASE", InfluxDBCredentialsHelper.InfluxDBDatabaseName)
35+
}
36+
37+
gradle {
38+
rootBuildScriptDir(commonJobProperties.checkoutDir)
39+
tasks(':javaJmh')
40+
commonJobProperties.setGradleSwitches(delegate)
41+
}
42+
}
43+
}

build.gradle.kts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -244,6 +244,11 @@ tasks.register("javaHadoopVersionsTest") {
244244
dependsOn(":runners:spark:3:hadoopVersionsTest")
245245
}
246246

247+
tasks.register("javaJmh"){
248+
dependsOn(":sdks:java:harness:jmh:jmh")
249+
dependsOn(":sdks:java:core:jmh:jmh")
250+
}
251+
247252
tasks.register("sqlPostCommit") {
248253
dependsOn(":sdks:java:extensions:sql:postCommit")
249254
dependsOn(":sdks:java:extensions:sql:jdbc:postCommit")

buildSrc/src/main/groovy/org/apache/beam/gradle/BeamModulePlugin.groovy

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1447,6 +1447,8 @@ class BeamModulePlugin implements Plugin<Project> {
14471447
// that ends up on the runtime classpath.
14481448
args 'org.apache.beam'
14491449
}
1450+
// Reduce forks to 3
1451+
args '-f=3'
14501452
args '-foe=true'
14511453
}
14521454

0 commit comments

Comments
 (0)