File tree Expand file tree Collapse file tree 3 files changed +84
-19
lines changed
src/test/jmh/io/lettuce/core Expand file tree Collapse file tree 3 files changed +84
-19
lines changed Original file line number Diff line number Diff line change
1
+ name : Benchmarks
2
+ on :
3
+ schedule :
4
+ - cron : ' 0 1 * * *' # nightly build
5
+ workflow_dispatch :
6
+
7
+ jobs :
8
+
9
+ benchmark :
10
+ name : Build and Test
11
+ runs-on : ubuntu-latest
12
+ steps :
13
+ - name : Checkout project
14
+ uses : actions/checkout@v4
15
+ - name : Set Java up in the runner
16
+ uses : actions/setup-java@v4
17
+ with :
18
+ java-version : ' 8'
19
+ distribution : ' temurin'
20
+ cache : ' maven'
21
+ - name : Setup Maven
22
+
23
+ with :
24
+ java-version : 8
25
+ - name : Install missing dependencies to container
26
+ run : |
27
+ sudo apt update
28
+ sudo apt install -y stunnel make git gcc
29
+ - name : Maven offline
30
+ run : |
31
+ mvn -q dependency:go-offline
32
+ - name : Clean environment
33
+ run : |
34
+ make cleanup
35
+ env :
36
+ JVM_OPTS : -Xmx3200m
37
+ TERM : dumb
38
+ - name : Start servers
39
+ run : |
40
+ make start
41
+ - name : Run benchmarks
42
+ run : |
43
+ mvn -Pjmh clean test
44
+ env :
45
+ JVM_OPTS : -Xmx3200m
46
+ TERM : dumb
47
+ # Download previous benchmark result from cache (if exists)
48
+ - name : Download previous benchmark data
49
+ uses : actions/cache@v4
50
+ with :
51
+ path : ./cache
52
+ key : ${{ runner.os }}-benchmark
53
+ # Run `github-action-benchmark` action
54
+ - name : Store benchmark result
55
+ uses : benchmark-action/github-action-benchmark@v1
56
+ with :
57
+ # What benchmark tool the output.txt came from
58
+ tool : ' jmh'
59
+ # Where the output from the benchmark tool is stored
60
+ output-file-path : benchmark.log
61
+ # Where the previous data file is stored
62
+ external-data-json-path : ./cache/benchmark.log
63
+ # Workflow will fail when an alert happens
64
+ fail-on-alert : true
65
+ # Upload the updated cache file for the next job by actions/cache
Original file line number Diff line number Diff line change 557
557
<version >1.20.1</version >
558
558
<scope >test</scope >
559
559
</dependency >
560
-
561
- <!-- JMH -->
562
-
563
- <dependency >
564
- <groupId >org.openjdk.jmh</groupId >
565
- <artifactId >jmh-core</artifactId >
566
- <version >1.37</version >
567
- <scope >test</scope >
568
- </dependency >
569
- <dependency >
570
- <groupId >org.openjdk.jmh</groupId >
571
- <artifactId >jmh-generator-annprocess</artifactId >
572
- <version >1.37</version >
573
- <scope >test</scope >
574
- </dependency >
575
-
576
560
</dependencies >
577
561
578
562
<build >
1165
1149
1166
1150
<profile >
1167
1151
1168
- <id >jmh</id >
1152
+ <id >jmh</id > <!-- mvn -Pjmh clean test -->
1169
1153
1170
1154
<dependencies >
1171
1155
<dependency >
1177
1161
<dependency >
1178
1162
<groupId >org.openjdk.jmh</groupId >
1179
1163
<artifactId >jmh-generator-annprocess</artifactId >
1180
- <version >1.37 </version >
1164
+ <version >1.21 </version >
1181
1165
<scope >test</scope >
1182
1166
</dependency >
1183
1167
</dependencies >
1184
1168
1185
1169
<build >
1186
1170
<plugins >
1171
+ <plugin >
1172
+ <groupId >org.apache.maven.plugins</groupId >
1173
+ <artifactId >maven-compiler-plugin</artifactId >
1174
+ <version >3.13.0</version >
1175
+ <configuration >
1176
+ <source >8</source >
1177
+ <target >8 </target >
1178
+ <annotationProcessorPaths >
1179
+ <path >
1180
+ <groupId >org.openjdk.jmh</groupId >
1181
+ <artifactId >jmh-generator-annprocess</artifactId >
1182
+ <version >1.21</version >
1183
+ </path >
1184
+ </annotationProcessorPaths >
1185
+ </configuration >
1186
+ </plugin >
1187
1187
<plugin >
1188
1188
<artifactId >maven-surefire-plugin</artifactId >
1189
1189
<configuration >
Original file line number Diff line number Diff line change @@ -32,6 +32,6 @@ private static void runRedisClientBenchmark() throws RunnerException {
32
32
33
33
private static ChainedOptionsBuilder prepareOptions () {
34
34
return new OptionsBuilder ().forks (1 ).warmupIterations (5 ).threads (1 ).measurementIterations (5 )
35
- .timeout (TimeValue .seconds (2 ));
35
+ .timeout (TimeValue .seconds (2 )). output ( "benchmark.log" ) ;
36
36
}
37
37
}
You can’t perform that action at this time.
0 commit comments