Skip to content

Commit 7390717

Browse files
committed
Merge remote-tracking branch 'upsteam/master' into synced
Synced Redpanda's OMB with the upsteam OMB
2 parents 0da02cd + cca7698 commit 7390717

File tree

423 files changed

+39249
-8503
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

423 files changed

+39249
-8503
lines changed

.github/stale.yml

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
# Configuration for probot-stale - https://github.com/probot/stale
2+
3+
# Number of days of inactivity before an Issue or Pull Request becomes stale
4+
daysUntilStale: 60
5+
6+
# Number of days of inactivity before an Issue or Pull Request with the stale label is closed.
7+
# Set to false to disable. If disabled, issues still need to be closed manually, but will remain marked as stale.
8+
daysUntilClose: 5
9+
10+
# Only issues or pull requests with all of these labels are check if stale. Defaults to `[]` (disabled)
11+
onlyLabels: []
12+
13+
# Issues or Pull Requests with these labels will never be considered stale. Set to `[]` to disable
14+
exemptLabels:
15+
- enhancement
16+
17+
# Set to true to ignore issues in a project (defaults to false)
18+
exemptProjects: false
19+
20+
# Set to true to ignore issues in a milestone (defaults to false)
21+
exemptMilestones: false
22+
23+
# Set to true to ignore issues with an assignee (defaults to false)
24+
exemptAssignees: false
25+
26+
# Label to use when marking as stale
27+
staleLabel: stale
28+
29+
# Comment to post when marking as stale. Set to `false` to disable
30+
markComment: >
31+
This issue has been automatically marked as stale because it has not had
32+
recent activity. It will be closed after 5 days if no further activity
33+
occurs. Thank you for your contributions.
34+
35+
# Comment to post when removing the stale label.
36+
# unmarkComment: >
37+
# Your comment here.
38+
39+
# Comment to post when closing a stale Issue or Pull Request.
40+
# closeComment: >
41+
# Your comment here.
42+
43+
# Limit the number of actions per hour, from 1-30. Default is 30
44+
limitPerRun: 30
45+
46+
# Limit to only `issues` or `pulls`
47+
# only: issues
48+
49+
# Optionally, specify configuration settings that are specific to just 'issues' or 'pulls':
50+
# pulls:
51+
# daysUntilStale: 30
52+
# markComment: >
53+
# This pull request has been automatically marked as stale because it has not had
54+
# recent activity. It will be closed if no further activity occurs. Thank you
55+
# for your contributions.
56+
57+
# issues:
58+
# exemptLabels:
59+
# - confirmed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,13 @@ target
99
core/*.json
1010
*.retry
1111
*.pem
12+
*.hcl
1213
**/.terraform
1314
**/terraform.tfstate
1415
**/terraform.tfstate.backup
1516
**/*.lock.info
1617
.DS_Store
18+
.factorypath
1719

1820
# IntelliJ artifacts
1921
.idea/

.travis.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
dist: trusty
2+
3+
notifications:
4+
email:
5+
recipients:
6+
7+
on_success: change
8+
on_failure: always
9+
10+
language: java
11+
12+
jdk:
13+
- oraclejdk8
14+
- oraclejdk11
15+
16+
script:
17+
- mvn clean install

README.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,12 @@
1-
# The OpenMessaging Benchmark Framework
1+
# OpenMessaging Benchmark Framework
2+
[![Build Status](https://app.travis-ci.com/openmessaging/benchmark.svg?branch=master)](https://app.travis-ci.com/openmessaging/benchmark)
3+
[![Total alerts](https://img.shields.io/lgtm/alerts/g/openmessaging/benchmark.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/openmessaging/benchmark/alerts/)
4+
[![Language grade: Python](https://img.shields.io/lgtm/grade/python/g/openmessaging/benchmark.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/openmessaging/benchmark/context:python)
5+
[![Language grade: Java](https://img.shields.io/lgtm/grade/java/g/openmessaging/benchmark.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/openmessaging/benchmark/context:java)
6+
[![License](https://img.shields.io/badge/license-Apache%202-4EB1BA.svg)](https://www.apache.org/licenses/LICENSE-2.0.html)
7+
8+
9+
**Notice:** We do not consider or plan to release any unilateral test results based on this standard. For reference, you can purchase server tests on the cloud by yourself.
210

311
This repository houses user-friendly, cloud-ready benchmarking suites for the following messaging platforms:
412

@@ -7,5 +15,9 @@ This repository houses user-friendly, cloud-ready benchmarking suites for the fo
715
* [RabbitMQ](https://www.rabbitmq.com/)
816
* [Apache Pulsar](https://pulsar.apache.org)
917
* [NATS Streaming](https://nats.io/)
18+
* [Redis](https://redis.com/)
19+
* [Pravega](https://pravega.io/)
1020

1121
> More details could be found at the [official documentation](http://openmessaging.cloud/docs/benchmarks/).
22+
23+

benchmark-framework/pom.xml

Lines changed: 45 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,16 @@
11
<!--
2-
3-
Licensed to the Apache Software Foundation (ASF) under one
4-
or more contributor license agreements. See the NOTICE file
5-
distributed with this work for additional information
6-
regarding copyright ownership. The ASF licenses this file
7-
to you under the Apache License, Version 2.0 (the
8-
"License"); you may not use this file except in compliance
9-
with the License. You may obtain a copy of the License at
10-
11-
http://www.apache.org/licenses/LICENSE-2.0
12-
13-
Unless required by applicable law or agreed to in writing,
14-
software distributed under the License is distributed on an
15-
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16-
KIND, either express or implied. See the License for the
17-
specific language governing permissions and limitations
18-
under the License.
19-
20-
-->
2+
Licensed under the Apache License, Version 2.0 (the "License");
3+
you may not use this file except in compliance with the License.
4+
You may obtain a copy of the License at
5+
6+
http://www.apache.org/licenses/LICENSE-2.0
7+
8+
Unless required by applicable law or agreed to in writing, software
9+
distributed under the License is distributed on an "AS IS" BASIS,
10+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11+
See the License for the specific language governing permissions and
12+
limitations under the License.
13+
-->
2114
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
2215
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
2316
<modelVersion>4.0.0</modelVersion>
@@ -32,6 +25,7 @@
3225

3326
<properties>
3427
<log4j.version>2.17.1</log4j.version>
28+
<jackson.version>2.13.2</jackson.version>
3529
</properties>
3630

3731
<dependencies>
@@ -61,23 +55,23 @@
6155
<dependency>
6256
<groupId>com.fasterxml.jackson.jaxrs</groupId>
6357
<artifactId>jackson-jaxrs-base</artifactId>
64-
<version>2.9.3</version>
58+
<version>${jackson.version}</version>
6559
</dependency>
6660
<dependency>
6761
<groupId>com.fasterxml.jackson.jaxrs</groupId>
6862
<artifactId>jackson-jaxrs-json-provider</artifactId>
69-
<version>2.9.3</version>
63+
<version>${jackson.version}</version>
7064
</dependency>
7165
<dependency>
7266
<groupId>com.fasterxml.jackson.core</groupId>
7367
<artifactId>jackson-annotations</artifactId>
74-
<version>2.9.3</version>
68+
<version>${jackson.version}</version>
7569
</dependency>
7670

7771
<dependency>
7872
<groupId>com.fasterxml.jackson.dataformat</groupId>
7973
<artifactId>jackson-dataformat-yaml</artifactId>
80-
<version>2.9.3</version>
74+
<version>${jackson.version}</version>
8175
</dependency>
8276

8377
<dependency>
@@ -98,6 +92,12 @@
9892
<version>${project.version}</version>
9993
</dependency>
10094

95+
<dependency>
96+
<groupId>${project.groupId}</groupId>
97+
<artifactId>driver-jms</artifactId>
98+
<version>${project.version}</version>
99+
</dependency>
100+
101101
<dependency>
102102
<groupId>${project.groupId}</groupId>
103103
<artifactId>driver-kafka</artifactId>
@@ -110,6 +110,18 @@
110110
<version>${project.version}</version>
111111
</dependency>
112112

113+
<dependency>
114+
<groupId>${project.groupId}</groupId>
115+
<artifactId>driver-kop</artifactId>
116+
<version>${project.version}</version>
117+
</dependency>
118+
119+
<dependency>
120+
<groupId>${project.groupId}</groupId>
121+
<artifactId>driver-pravega</artifactId>
122+
<version>${project.version}</version>
123+
</dependency>
124+
113125
<dependency>
114126
<groupId>${project.groupId}</groupId>
115127
<artifactId>driver-rocketmq</artifactId>
@@ -153,6 +165,12 @@
153165
</dependency>
154166

155167
<dependency>
168+
<groupId>${project.groupId}</groupId>
169+
<artifactId>driver-redis</artifactId>
170+
<version>${project.version}</version>
171+
</dependency>
172+
173+
<dependency>
156174
<groupId>org.apache.bookkeeper.stats</groupId>
157175
<artifactId>bookkeeper-stats-api</artifactId>
158176
<version>${bookkeeper.version}</version>
@@ -180,21 +198,22 @@
180198
<dependency>
181199
<groupId>org.eclipse.jetty</groupId>
182200
<artifactId>jetty-server</artifactId>
183-
<version>9.4.8.v20171121</version>
201+
<version>9.4.42.v20210604</version>
184202
</dependency>
185203

186204
<dependency>
187205
<groupId>junit</groupId>
188206
<artifactId>junit</artifactId>
189-
<version>4.12</version>
207+
<version>4.13.1</version>
190208
<scope>test</scope>
191209
</dependency>
192210

193211
<dependency>
194212
<groupId>org.eclipse.jetty</groupId>
195213
<artifactId>jetty-util</artifactId>
196-
<version>9.4.8.v20171121</version>
214+
<version>9.4.42.v20210604</version>
197215
</dependency>
216+
198217
</dependencies>
199218

200219
<build>

benchmark-framework/src/main/java/io/openmessaging/benchmark/Benchmark.java

Lines changed: 35 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,15 @@
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
1+
/*
2+
* Licensed under the Apache License, Version 2.0 (the "License");
3+
* you may not use this file except in compliance with the License.
4+
* You may obtain a copy of the License at
95
*
10-
* http://www.apache.org/licenses/LICENSE-2.0
6+
* http://www.apache.org/licenses/LICENSE-2.0
117
*
12-
* Unless required by applicable law or agreed to in writing,
13-
* software distributed under the License is distributed on an
14-
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15-
* KIND, either express or implied. See the License for the
16-
* specific language governing permissions and limitations
17-
* under the License.
8+
* Unless required by applicable law or agreed to in writing, software
9+
* distributed under the License is distributed on an "AS IS" BASIS,
10+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11+
* See the License for the specific language governing permissions and
12+
* limitations under the License.
1813
*/
1914
package io.openmessaging.benchmark;
2015

@@ -46,11 +41,14 @@ public class Benchmark {
4641

4742
static class Arguments {
4843

44+
@Parameter(names = {"-c", "--csv"}, description = "Print results from this directory to a csv file")
45+
String resultsDir;
46+
4947
@Parameter(names = { "-h", "--help" }, description = "Help message", help = true)
5048
boolean help;
5149

5250
@Parameter(names = { "-d",
53-
"--drivers" }, description = "Drivers list. eg.: pulsar/pulsar.yaml,kafka/kafka.yaml", required = true)
51+
"--drivers" }, description = "Drivers list. eg.: pulsar/pulsar.yaml,kafka/kafka.yaml")//, required = true)
5452
public List<String> drivers;
5553

5654
@Parameter(names = { "-w",
@@ -61,14 +59,17 @@ static class Arguments {
6159
"--workers-file" }, description = "Path to a YAML file containing the list of workers addresses")
6260
public File workersFile;
6361

64-
@Parameter(description = "Workloads", required = true)
62+
@Parameter(names = { "-x", "--extra" }, description = "Allocate extra consumer workers when your backlog builds.")
63+
boolean extraConsumers;
64+
65+
@Parameter(description = "Workloads")//, required = true)
6566
public List<String> workloads;
6667

6768
@Parameter(names = { "-o", "--output" }, description = "Output", required = false)
6869
public String output;
6970

70-
@Parameter(names = { "-v", "--service-version" }, description = "Optional version of the service being benchmarked, embedded in the final result", required = false)
71-
public String serviceVersion;
71+
@Parameter(names = { "-v", "--service-version" }, description = "Optional version of the service being benchmarked, embedded in the final result", required = false)
72+
public String serviceVersion;
7273
}
7374

7475
public static void main(String[] args) throws Exception {
@@ -89,6 +90,12 @@ public static void main(String[] args) throws Exception {
8990
System.exit(-1);
9091
}
9192

93+
if(arguments.resultsDir != null) {
94+
ResultsToCsv r = new ResultsToCsv();
95+
r.writeAllResultFiles(arguments.resultsDir);
96+
System.exit(0);
97+
}
98+
9299
if (arguments.workers != null && arguments.workersFile != null) {
93100
System.err.println("Only one between --workers and --workers-file can be specified");
94101
System.exit(-1);
@@ -123,7 +130,7 @@ public static void main(String[] args) throws Exception {
123130
Worker worker;
124131

125132
if (arguments.workers != null && !arguments.workers.isEmpty()) {
126-
worker = new DistributedWorkersEnsemble(arguments.workers);
133+
worker = new DistributedWorkersEnsemble(arguments.workers, arguments.extraConsumers);
127134
} else {
128135
// Use local worker implementation
129136
worker = new LocalWorker();
@@ -147,17 +154,14 @@ public static void main(String[] args) throws Exception {
147154
WorkloadGenerator generator = new WorkloadGenerator(driverConfiguration.name, workload, worker);
148155

149156
TestResult result = generator.run();
150-
result.beginTime = beginTime;
151-
result.endTime = dateFormat.format(new Date());
152-
result.version = arguments.serviceVersion;
153-
154-
String fileName;
155-
if (arguments.output != null && arguments.output.length() > 0) {
156-
fileName = arguments.output;
157-
} else {
158-
fileName = String.format("%s-%s-%s.json", workloadName, driverConfiguration.name,
159-
dateFormat.format(new Date()));
160-
}
157+
result.beginTime = beginTime;
158+
result.endTime = dateFormat.format(new Date());
159+
result.version = arguments.serviceVersion;
160+
161+
boolean useOutput = (arguments.output != null) && (arguments.output.length() > 0);
162+
163+
String fileName = useOutput? arguments.output: String.format("%s-%s-%s.json", workloadName,
164+
driverConfiguration.name, dateFormat.format(new Date()));
161165

162166
log.info("Writing test result into {}", fileName);
163167
writer.writeValue(new File(fileName), result);

0 commit comments

Comments
 (0)