Skip to content

Commit ddd0952

Browse files
Merge pull request #9489 from hexagontk/main
[Kotlin / Hexagon]: Update Hexagon version and dependencies
2 parents 91c59dc + 11621a4 commit ddd0952

File tree

8 files changed

+28
-29
lines changed

8 files changed

+28
-29
lines changed
Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
11

22
plugins {
3-
id "org.jetbrains.kotlin.jvm" version "2.0.20" apply false
4-
id "org.graalvm.buildtools.native" version "0.10.3" apply false
3+
id "org.jetbrains.kotlin.jvm" version "2.0.21" apply false
4+
id "org.graalvm.buildtools.native" version "0.10.4" apply false
55
}
66

77
version = "1.0.0"
88
description = "TFB benchmark"
99
group = "com.hexagonkt"
1010

1111
ext {
12-
hexagonVersion = "3.7.0"
13-
jettyVersion = "12.0.13"
14-
nettyVersion = "4.1.113.Final"
12+
hexagonVersion = "3.7.3"
13+
jettyVersion = "12.0.16"
14+
nettyVersion = "4.1.116.Final"
1515

16-
hikariVersion = "5.1.0"
16+
hikariVersion = "6.2.1"
1717
postgresqlVersion = "42.7.4"
18-
vertxVersion = "4.5.10"
18+
vertxVersion = "4.5.11"
1919
cache2kVersion = "2.6.1.Final"
2020

2121
applicationClass = "com.hexagonkt.BenchmarkKt"
@@ -30,5 +30,5 @@ subprojects {
3030
}
3131

3232
tasks.wrapper {
33-
gradleVersion = "8.10"
33+
gradleVersion = "8.10.2"
3434
}
Binary file not shown.

frameworks/Kotlin/hexagon/gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip
44
networkTimeout=10000
55
validateDistributionUrl=true
66
zipStoreBase=GRADLE_USER_HOME

frameworks/Kotlin/hexagon/hexagon-helidon-pgclient.dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#
22
# BUILD
33
#
4-
FROM docker.io/bellsoft/liberica-runtime-container:jdk-all-22-cds-musl AS build
4+
FROM docker.io/bellsoft/liberica-runtime-container:jdk-all-23-cds-musl AS build
55
USER root
66
WORKDIR /hexagon
77

@@ -12,7 +12,7 @@ RUN ./gradlew --quiet -x test installDist
1212
#
1313
# RUNTIME
1414
#
15-
FROM docker.io/bellsoft/liberica-runtime-container:jre-22-musl
15+
FROM docker.io/bellsoft/liberica-runtime-container:jre-23-musl
1616
ARG PROJECT=hexagon_helidon_pgclient
1717

1818
ENV POSTGRESQL_DB_HOST tfb-database

frameworks/Kotlin/hexagon/hexagon-helidon.dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#
22
# BUILD
33
#
4-
FROM docker.io/bellsoft/liberica-runtime-container:jdk-all-22-cds-musl AS build
4+
FROM docker.io/bellsoft/liberica-runtime-container:jdk-all-23-cds-musl AS build
55
USER root
66
WORKDIR /hexagon
77

@@ -12,7 +12,7 @@ RUN ./gradlew --quiet -x test installDist
1212
#
1313
# RUNTIME
1414
#
15-
FROM docker.io/bellsoft/liberica-runtime-container:jre-22-musl
15+
FROM docker.io/bellsoft/liberica-runtime-container:jre-23-musl
1616
ARG PROJECT=hexagon_helidon_postgresql
1717

1818
ENV POSTGRESQL_DB_HOST tfb-database

frameworks/Kotlin/hexagon/hexagon-tomcat.dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ RUN ./gradlew --quiet -x test war
1212
#
1313
# RUNTIME
1414
#
15-
FROM docker.io/tomcat:11.0.0-jre21-temurin-noble
15+
FROM docker.io/tomcat:11-jre21-temurin-noble
1616
ARG MODULE=/hexagon/hexagon_tomcat_postgresql
1717

1818
ENV POSTGRESQL_DB_HOST tfb-database

frameworks/Kotlin/hexagon/store_pgclient/src/main/kotlin/BenchmarkPgClientStore.kt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,10 @@ class BenchmarkPgClientStore(
1919
) : BenchmarkStore(settings) {
2020

2121
companion object {
22-
private const val SELECT_WORLD: String = "select * from world where id = $1"
22+
private const val LOAD_WORLDS: String = "select id, randomNumber from world"
23+
private const val SELECT_WORLD: String = "select id, randomNumber from world where id = $1"
2324
private const val UPDATE_WORLD: String = "update world set randomNumber = $1 where id = $2"
24-
private const val SELECT_ALL_FORTUNES: String = "select * from fortune"
25+
private const val SELECT_ALL_FORTUNES: String = "select id, message from fortune"
2526
}
2627

2728
private val connectOptions: PgConnectOptions by lazy {
@@ -81,13 +82,12 @@ class BenchmarkPgClientStore(
8182
.toCompletionStage()
8283
.toCompletableFuture()
8384
.get()
84-
8585
}
8686
}
8787

8888
override fun initWorldsCache(cache: Cache<Int, CachedWorld>) {
8989
dataSource
90-
.preparedQuery("select * from world")
90+
.preparedQuery(LOAD_WORLDS)
9191
.execute()
9292
.map { rowSet ->
9393
rowSet.map { row ->

frameworks/Kotlin/hexagon/store_sql/src/main/kotlin/BenchmarkSqlStore.kt

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,10 @@ class BenchmarkSqlStore(
1616
) : BenchmarkStore(settings) {
1717

1818
companion object {
19-
private const val SELECT_WORLD: String = "select * from world where id = ?"
19+
private const val LOAD_WORLDS: String = "select id, randomNumber from world"
20+
private const val SELECT_WORLD: String = "select id, randomNumber from world where id = ?"
2021
private const val UPDATE_WORLD: String = "update world set randomNumber = ? where id = ?"
21-
private const val SELECT_ALL_FORTUNES: String = "select * from fortune"
22+
private const val SELECT_ALL_FORTUNES: String = "select id, message from fortune"
2223
}
2324

2425
private val dataSource: HikariDataSource by lazy {
@@ -63,27 +64,25 @@ class BenchmarkSqlStore(
6364
override fun replaceWorlds(worlds: List<World>) {
6465
dataSource.connection.use { con: Connection ->
6566
val stmtSelect = con.prepareStatement(SELECT_WORLD)
66-
val stmtUpdate = con.prepareStatement(UPDATE_WORLD)
67-
6867
worlds.forEach {
69-
val worldId = it.id
70-
val newRandomNumber = it.randomNumber
71-
72-
stmtSelect.setInt(1, worldId)
68+
stmtSelect.setInt(1, it.id)
7369
val rs = stmtSelect.executeQuery()
7470
rs.next()
7571
rs.getInt(2) // Read 'randomNumber' to comply with Test type 5, point 6
72+
}
7673

77-
stmtUpdate.setInt(1, newRandomNumber)
78-
stmtUpdate.setInt(2, worldId)
74+
val stmtUpdate = con.prepareStatement(UPDATE_WORLD)
75+
worlds.forEach {
76+
stmtUpdate.setInt(1, it.randomNumber)
77+
stmtUpdate.setInt(2, it.id)
7978
stmtUpdate.executeUpdate()
8079
}
8180
}
8281
}
8382

8483
override fun initWorldsCache(cache: Cache<Int, CachedWorld>) {
8584
dataSource.connection.use { con: Connection ->
86-
val stmtSelect = con.prepareStatement("select * from world")
85+
val stmtSelect = con.prepareStatement(LOAD_WORLDS)
8786
val rs = stmtSelect.executeQuery()
8887

8988
while (rs.next()) {

0 commit comments

Comments
 (0)