Skip to content

Commit 3d02816

Browse files
committed
added all benchmarks option
1 parent 314a501 commit 3d02816

File tree

3 files changed

+17
-21
lines changed

3 files changed

+17
-21
lines changed

.github/workflows/benchmarks.yml

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,27 +3,15 @@ description: Runs minimal JMH benchmark
33

44
on:
55
schedule:
6-
# Build and publish nightly snapshot at 3:55pm every day
76
- cron: "55 15 * * *"
87
workflow_dispatch:
98
inputs:
109
pr:
1110
description: "Pull request#"
1211
required: false
13-
pull_request:
14-
types:
15-
- opened
16-
- synchronize
17-
- reopened
18-
paths-ignore:
19-
- "**.md"
20-
- "**/docs/**"
21-
- "**/LICENSE"
22-
- "**/NOTICE"
2312

2413
env:
2514
CHC_BRANCH: "main"
26-
CHC_VERSION: "0.8.2"
2715
CH_VERSION: "24.8"
2816
JAVA_VERSION: 17
2917

@@ -40,6 +28,8 @@ jobs:
4028
steps:
4129
- name: Check out Git repository
4230
uses: actions/checkout@v4
31+
with:
32+
ref: ${{ env.CHC_BRANCH }}
4333
- name: Check out PR
4434
run: |
4535
git fetch --no-tags --prune --progress --no-recurse-submodules --depth=1 \
@@ -56,13 +46,11 @@ jobs:
5646
- name: Prepare Dataset
5747
run: |
5848
cd ./performance &&
59-
ls -l &&
6049
mvn --batch-mode --no-transfer-progress clean compile exec:exec -Dexec.executable=java \
6150
-Dexec.args="-classpath %classpath com.clickhouse.benchmark.data.DataSetGenerator -input sample_dataset.sql -name default -rows 100000"
6251
- name: Run Benchmarks
6352
run: |
6453
cd ./performance &&
65-
ls -l &&
6654
mvn --batch-mode --no-transfer-progress clean compile exec:exec -Dexec.executable=java -Dexec.args="-classpath %classpath com.clickhouse.benchmark.BenchmarkRunner \
6755
-l 100000,10000 -m 3 -t 15 -b q,i -d file://default.csv"
6856
- name: Upload test results

performance/README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
#### Generating Dataset
1313

1414
```shell
15-
mvn compile exec:exec -Dexec.args="-classpath %classpath com.clickhouse.benchmark.data.DataSetGenerator \
15+
mvn compile exec:exec -Dexec.executable=java -Dexec.args="-classpath %classpath com.clickhouse.benchmark.data.DataSetGenerator \
1616
-input sample_dataset.sql -name default -rows 10"
1717
```
1818

@@ -25,7 +25,7 @@ mvn compile exec:exec
2525

2626
With custom measurement iterations:
2727
```shell
28-
mvn compile exec:exec -Dexec.args="-classpath %classpath com.clickhouse.benchmark.BenchmarkRunner -m 3"
28+
mvn compile exec:exec -Dexec.executable=java -Dexec.args="-classpath %classpath com.clickhouse.benchmark.BenchmarkRunner -m 3"
2929
```
3030

3131
Other options:
@@ -34,6 +34,7 @@ Other options:
3434
- "-m" - number of measurement iterations
3535
- "-t" - time in seconds per iteration
3636
- "-b" - benchmark mask coma separated. Ex.: `-b writer,reader,i`. Default : `-b i,q`
37+
- "all" - Run alpl benchmarks
3738
- "i" - InsertClient - insert operation benchmarks
3839
- "q" - QueryClient - query operation benchmarks
3940
- "ci" - ConcurrentInsertClient - concurrent version of insert benchmarks

performance/src/main/java/com/clickhouse/benchmark/BenchmarkRunner.java

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -64,11 +64,18 @@ public static void main(String[] args) throws Exception {
6464
String[] testMaskParts = testMask.split(",");
6565

6666
SortedSet<String> benchmarks = new TreeSet<>();
67-
for (String p : testMaskParts) {
68-
String benchmark = BENCHMARK_FLAGS.get(p);
69-
if (benchmark != null) {
70-
optBuilder.include(benchmark);
71-
benchmarks.add(benchmark);
67+
if (testMaskParts[0].equalsIgnoreCase("all")) {
68+
BENCHMARK_FLAGS.values().forEach((b) -> {
69+
optBuilder.include(b);
70+
benchmarks.add(b);
71+
});
72+
} else {
73+
for (String p : testMaskParts) {
74+
String benchmark = BENCHMARK_FLAGS.get(p);
75+
if (benchmark != null) {
76+
optBuilder.include(benchmark);
77+
benchmarks.add(benchmark);
78+
}
7279
}
7380
}
7481

0 commit comments

Comments
 (0)