Skip to content

Commit d282ee3

Browse files
committed
Upgrading to Java 21
1 parent 9ce0854 commit d282ee3

File tree

19 files changed

+232
-62
lines changed

19 files changed

+232
-62
lines changed

.tool-versions

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
java openjdk-17
2-
maven 3.9.3
1+
java oracle-21
2+
maven 3.9.12
33
hugo 0.96.0

docs/content/docs/containers/setup.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@ You can view the generated images with `docker image ls | grep workshop`:
2626

2727
```bash
2828
$ docker image ls | grep workshop
29-
workshop-wiremock 1.1.0-SNAPSHOT 2cc43b2348c8 2 minutes ago 657MB
29+
workshop-wiremock 2.0-SNAPSHOT 2cc43b2348c8 2 minutes ago 657MB
3030
workshop-wiremock latest 2cc43b2348c8 2 minutes ago 657MB
31-
workshop-server 1.1.0-SNAPSHOT be7cfbd0735a 2 minutes ago 659MB
31+
workshop-server 2.0-SNAPSHOT be7cfbd0735a 2 minutes ago 659MB
3232
workshop-server latest be7cfbd0735a 2 minutes ago 659MB
3333
```
3434

docs/content/docs/intro/_index.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -109,15 +109,15 @@ The [Java Virtual Machine Process Status Tool](https://docs.oracle.com/javase/7/
109109
```bash
110110
$ jps
111111
7241 Jps
112-
6059 java-perf-workshop-server-1.1.0-SNAPSHOT.jar
112+
6059 java-perf-workshop-server-2.0-SNAPSHOT.jar
113113
6925 jar
114114
```
115115

116116
You can get more insight by using some of its flags:
117117

118118
```bash
119119
$ jps -lvm
120-
6059 java-perf-workshop-server/target/java-perf-workshop-server-1.1.0-SNAPSHOT.jar server server.yml
120+
6059 java-perf-workshop-server/target/java-perf-workshop-server-2.0-SNAPSHOT.jar server server.yml
121121
6925 wiremock-standalone.jar --port 9090 --root-dir java-perf-workshop-server/src/test/resources
122122
7582 sun.tools.jps.Jps -lvm -Dapplication.home=/Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home -Xms8m
123123
```
@@ -130,7 +130,7 @@ Running the `jcmd` command should display some of the same information that `jps
130130

131131
```
132132
$ jcmd
133-
6059 java-perf-workshop-server/target/java-perf-workshop-server-1.1.0-SNAPSHOT.jar server server.yml
133+
6059 java-perf-workshop-server/target/java-perf-workshop-server-2.0-SNAPSHOT.jar server server.yml
134134
6925 wiremock-standalone.jar --port 9090 --root-dir java-perf-workshop-server/src/test/resources
135135
7838 sun.tools.jcmd.JCmd
136136
```

docs/content/docs/jmc/intro-jmc9/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ Let's start profiling our service. Start the service up by enabling JFR:
4141
```bash
4242
# Note, if you are running this server from a different folder, consider changing the SERVER_HOME
4343
SERVER_HOME=java-perf-workshop-server/target
44-
java -XX:+UnlockDiagnosticVMOptions -XX:+DebugNonSafepoints -jar $SERVER_HOME/java-perf-workshop-server-1.1.0-SNAPSHOT.jar server server.yml
44+
java -XX:+UnlockDiagnosticVMOptions -XX:+DebugNonSafepoints -jar $SERVER_HOME/java-perf-workshop-server-2.0-SNAPSHOT.jar server server.yml
4545
```
4646

4747
## Start Flight Recording from JMC

docs/content/docs/memory/gc.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ With our service, let's go ahead and start it up with GC logging enabled:
181181
```bash
182182
# Navigate to the root directory of this project
183183
java -XX:+PrintGCDetails -XX:+PrintGCDateStamps -Xloggc:gc.log -XX:GCLogFileSize=5M -XX:NumberOfGCLogFiles=2 \
184-
-jar java-perf-workshop-server/target/java-perf-workshop-server-1.1.0-SNAPSHOT.jar server server.yml
184+
-jar java-perf-workshop-server/target/java-perf-workshop-server-2.0-SNAPSHOT.jar server server.yml
185185
```
186186

187187
### Enabling while JVM is running

docs/content/docs/prereqs/_index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ hide_readingtime: true
88

99
## Java Development Kit
1010

11-
Install a Java Development Kit (17+) from Oracle or OpenJDK
11+
Install a Java Development Kit (21+) from Oracle or OpenJDK
1212

13-
* [Oracle](https://www.oracle.com/java/technologies/javase/javase-jdk8-downloads.html)
13+
* [Oracle](https://www.oracle.com/java/technologies/downloads/)
1414
* [OpenJDK](https://openjdk.java.net/install/)
1515

1616
## Maven

docs/content/docs/setup/_index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ server assembly [here](https://github.com/cchesser/java-perf-workshop/wiki/java-
3737
Start the workshop service:
3838

3939
```bash
40-
java -jar java-perf-workshop-server/target/java-perf-workshop-server-1.1.0-SNAPSHOT.jar server server.yml
40+
java -jar java-perf-workshop-server/target/java-perf-workshop-server-2.0-SNAPSHOT.jar server server.yml
4141
```
4242

4343
#### Mocking Service Dependency

gatling-akka-defaults.conf

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
akka {
2+
loggers = ["akka.event.slf4j.Slf4jLogger"]
3+
logging-filter = "akka.event.slf4j.Slf4jLoggingFilter"
4+
log-dead-letters = off
5+
actor {
6+
default-dispatcher {
7+
throughput = 20
8+
}
9+
}
10+
}

gatling-defaults.conf

Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
#########################
2+
# Gatling Configuration #
3+
#########################
4+
5+
# This file contains all the settings configurable for Gatling with their default values
6+
7+
gatling {
8+
core {
9+
encoding = "utf-8" # Encoding to use throughout Gatling for file and string manipulation
10+
elFileBodiesCacheMaxCapacity = 200 # Cache size for request body EL templates, set to 0 to disable
11+
rawFileBodiesCacheMaxCapacity = 200 # Cache size for request body raw files, set to 0 to disable
12+
rawFileBodiesInMemoryMaxSize = 10240 # Max bite size of raw files to be cached in memory
13+
pebbleFileBodiesCacheMaxCapacity = 200 # Cache size for request body Pebble templates, set to 0 to disable
14+
feederAdaptiveLoadModeThreshold = 100 # File size threshold (in MB). Below load eagerly in memory, above use batch mode with default buffer size
15+
shutdownTimeout = 10000 # Milliseconds to wait for the engine to shutdown
16+
extract {
17+
regex {
18+
cacheMaxCapacity = 200 # Cache size for the compiled regexes, set to 0 to disable caching
19+
}
20+
xpath {
21+
cacheMaxCapacity = 200 # Cache size for the compiled XPath queries, set to 0 to disable caching
22+
}
23+
jsonPath {
24+
cacheMaxCapacity = 200 # Cache size for the compiled jsonPath queries, set to 0 to disable caching
25+
}
26+
css {
27+
cacheMaxCapacity = 200 # Cache size for the compiled CSS selectors queries, set to 0 to disable caching
28+
}
29+
}
30+
}
31+
socket {
32+
connectTimeout = 10000 # Timeout in millis for establishing a TCP socket
33+
tcpNoDelay = true
34+
soKeepAlive = false # if TCP keepalive configured at OS level should be used
35+
soReuseAddress = false
36+
}
37+
netty {
38+
useNativeTransport = true # if Netty Linux native transport should be used instead of Java NIO
39+
useIoUring = false # if io_uring should be used instead of epoll if available
40+
allocator = "pooled" # force the ByteBufAllocator, possible values are pooled, unpooled and adaptive
41+
maxThreadLocalCharBufferSize = 200000 # Netty's default is 16k
42+
}
43+
ssl {
44+
useOpenSsl = true # if OpenSSL should be used instead of JSSE (only the latter can be debugged with -Djavax.net.debug=ssl)
45+
useOpenSslFinalizers = false # if OpenSSL contexts should be freed with Finalizer or if using RefCounted is fine
46+
handshakeTimeout = 10000 # TLS handshake timeout in millis
47+
useInsecureTrustManager = true # Use an insecure TrustManager that trusts all server certificates
48+
enabledProtocols = [] # Array of enabled protocols for HTTPS, if empty use Netty's defaults
49+
enabledCipherSuites = [] # Array of enabled cipher suites for HTTPS, if empty enable all available ciphers
50+
sessionCacheSize = 0 # SSLSession cache size, set to 0 to use JDK's default
51+
sessionTimeout = 0 # SSLSession timeout in seconds, set to 0 to use JDK's default (24h)
52+
enableSni = true # When set to true, enable Server Name indication (SNI)
53+
keyStore {
54+
type = "" # Type of SSLContext's KeyManagers store, possible values are jks and p12
55+
file = "" # Location of SSLContext's KeyManagers store
56+
password = "" # Password for SSLContext's KeyManagers store
57+
algorithm = "" # Algorithm used SSLContext's KeyManagers store, typically RSA
58+
}
59+
trustStore {
60+
type = "" # Type of SSLContext's TrustManagers store, possible values are jks and p12
61+
file = "" # Location of SSLContext's TrustManagers store
62+
password = "" # Password for SSLContext's TrustManagers store
63+
algorithm = "" # Algorithm used by SSLContext's TrustManagers store, typically RSA
64+
}
65+
}
66+
charting {
67+
maxPlotPerSeries = 1000 # Number of points per chart in Gatling reports
68+
useGroupDurationMetric = false # Switch group timings from cumulated response time to group duration.
69+
indicators {
70+
lowerBound = 800 # Lower bound for the requests' response time to track in the reports and the console summary
71+
higherBound = 1200 # Higher bound for the requests' response time to track in the reports and the console summary
72+
percentile1 = 50 # Value for the 1st percentile to track in the reports and the console summary
73+
percentile2 = 75 # Value for the 2nd percentile to track in the reports and the console summary
74+
percentile3 = 95 # Value for the 3rd percentile to track in the reports and the console summary
75+
percentile4 = 99 # Value for the 4th percentile to track in the reports and the console summary
76+
}
77+
}
78+
http {
79+
fetchedCssCacheMaxCapacity = 200 # Cache size for CSS parsed content, set to 0 to disable
80+
fetchedHtmlCacheMaxCapacity = 200 # Cache size for HTML parsed content, set to 0 to disable
81+
perUserCacheMaxCapacity = 200 # Per virtual user cache size, set to 0 to disable
82+
warmUpUrl = "https://gatling.io" # The URL to use to warm-up the HTTP stack (blank means disabled)
83+
pooledConnectionIdleTimeout = 60000 # Timeout in millis for a connection to stay idle in the pool
84+
requestTimeout = 60000 # Timeout in millis for performing an HTTP request
85+
enableHostnameVerification = false # When set to true, enable hostname verification: SSLEngine#setEndpointIdentificationAlgorithm("HTTPS")
86+
dns {
87+
queryTimeout = 5000 # Timeout in millis of each DNS query in millis
88+
maxQueriesPerResolve = 6 # Maximum allowed number of DNS queries for a given name resolution
89+
}
90+
}
91+
jms {
92+
replyTimeoutScanPeriod = 1000 # scan period for timed out reply messages
93+
}
94+
data {
95+
writers = [console, file] # The list of DataWriters to which Gatling write simulation data (currently supported : console, file)
96+
utcDateTime = true # Print date-times with the UTC zone instead of the System's default
97+
console {
98+
light = false # When set to true, displays a light version without detailed request stats
99+
writePeriod = 5 # Write interval, in seconds
100+
}
101+
enableAnalytics = true # Anonymous Usage Analytics (no tracking), please support
102+
}
103+
}

java-perf-workshop-server/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<parent>
55
<groupId>cchesser.javaperf</groupId>
66
<artifactId>java-perf-workshop-parent</artifactId>
7-
<version>1.1.0-SNAPSHOT</version>
7+
<version>2.0-SNAPSHOT</version>
88
</parent>
99
<artifactId>java-perf-workshop-server</artifactId>
1010
<name>${project.artifactId}</name>
@@ -134,7 +134,7 @@
134134
<tag>latest</tag>
135135
<tag>${project.version}</tag>
136136
</tags>
137-
<from>openjdk:17</from>
137+
<from>openjdk:21</from>
138138
<assembly>
139139
<descriptor>server-assembly.xml</descriptor>
140140
</assembly>

0 commit comments

Comments
 (0)