diff --git a/frameworks/Kotlin/hexagon/build.gradle b/frameworks/Kotlin/hexagon/build.gradle index d1f77b2b178..f739a6f3418 100644 --- a/frameworks/Kotlin/hexagon/build.gradle +++ b/frameworks/Kotlin/hexagon/build.gradle @@ -1,7 +1,7 @@ plugins { - id "org.jetbrains.kotlin.jvm" version "2.0.20" apply false - id "org.graalvm.buildtools.native" version "0.10.3" apply false + id "org.jetbrains.kotlin.jvm" version "2.0.21" apply false + id "org.graalvm.buildtools.native" version "0.10.4" apply false } version = "1.0.0" @@ -9,13 +9,13 @@ description = "TFB benchmark" group = "com.hexagonkt" ext { - hexagonVersion = "3.7.0" - jettyVersion = "12.0.13" - nettyVersion = "4.1.113.Final" + hexagonVersion = "3.7.3" + jettyVersion = "12.0.16" + nettyVersion = "4.1.116.Final" - hikariVersion = "5.1.0" + hikariVersion = "6.2.1" postgresqlVersion = "42.7.4" - vertxVersion = "4.5.10" + vertxVersion = "4.5.11" cache2kVersion = "2.6.1.Final" applicationClass = "com.hexagonkt.BenchmarkKt" @@ -30,5 +30,5 @@ subprojects { } tasks.wrapper { - gradleVersion = "8.10" + gradleVersion = "8.10.2" } diff --git a/frameworks/Kotlin/hexagon/gradle/wrapper/gradle-wrapper.jar b/frameworks/Kotlin/hexagon/gradle/wrapper/gradle-wrapper.jar index 2c3521197d7..a4b76b9530d 100644 Binary files a/frameworks/Kotlin/hexagon/gradle/wrapper/gradle-wrapper.jar and b/frameworks/Kotlin/hexagon/gradle/wrapper/gradle-wrapper.jar differ diff --git a/frameworks/Kotlin/hexagon/gradle/wrapper/gradle-wrapper.properties b/frameworks/Kotlin/hexagon/gradle/wrapper/gradle-wrapper.properties index 9355b415575..df97d72b8b9 100644 --- a/frameworks/Kotlin/hexagon/gradle/wrapper/gradle-wrapper.properties +++ b/frameworks/Kotlin/hexagon/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.10-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME diff --git a/frameworks/Kotlin/hexagon/hexagon-helidon-pgclient.dockerfile b/frameworks/Kotlin/hexagon/hexagon-helidon-pgclient.dockerfile index f11c4e7b2bd..2ad89ca5713 100644 --- a/frameworks/Kotlin/hexagon/hexagon-helidon-pgclient.dockerfile +++ b/frameworks/Kotlin/hexagon/hexagon-helidon-pgclient.dockerfile @@ -1,7 +1,7 @@ # # BUILD # -FROM docker.io/bellsoft/liberica-runtime-container:jdk-all-22-cds-musl AS build +FROM docker.io/bellsoft/liberica-runtime-container:jdk-all-23-cds-musl AS build USER root WORKDIR /hexagon @@ -12,7 +12,7 @@ RUN ./gradlew --quiet -x test installDist # # RUNTIME # -FROM docker.io/bellsoft/liberica-runtime-container:jre-22-musl +FROM docker.io/bellsoft/liberica-runtime-container:jre-23-musl ARG PROJECT=hexagon_helidon_pgclient ENV POSTGRESQL_DB_HOST tfb-database diff --git a/frameworks/Kotlin/hexagon/hexagon-helidon.dockerfile b/frameworks/Kotlin/hexagon/hexagon-helidon.dockerfile index 27177de5eb9..632cc8720b5 100644 --- a/frameworks/Kotlin/hexagon/hexagon-helidon.dockerfile +++ b/frameworks/Kotlin/hexagon/hexagon-helidon.dockerfile @@ -1,7 +1,7 @@ # # BUILD # -FROM docker.io/bellsoft/liberica-runtime-container:jdk-all-22-cds-musl AS build +FROM docker.io/bellsoft/liberica-runtime-container:jdk-all-23-cds-musl AS build USER root WORKDIR /hexagon @@ -12,7 +12,7 @@ RUN ./gradlew --quiet -x test installDist # # RUNTIME # -FROM docker.io/bellsoft/liberica-runtime-container:jre-22-musl +FROM docker.io/bellsoft/liberica-runtime-container:jre-23-musl ARG PROJECT=hexagon_helidon_postgresql ENV POSTGRESQL_DB_HOST tfb-database diff --git a/frameworks/Kotlin/hexagon/hexagon-tomcat.dockerfile b/frameworks/Kotlin/hexagon/hexagon-tomcat.dockerfile index 42f28071128..dfc6c521a1d 100644 --- a/frameworks/Kotlin/hexagon/hexagon-tomcat.dockerfile +++ b/frameworks/Kotlin/hexagon/hexagon-tomcat.dockerfile @@ -12,7 +12,7 @@ RUN ./gradlew --quiet -x test war # # RUNTIME # -FROM docker.io/tomcat:11.0.0-jre21-temurin-noble +FROM docker.io/tomcat:11-jre21-temurin-noble ARG MODULE=/hexagon/hexagon_tomcat_postgresql ENV POSTGRESQL_DB_HOST tfb-database diff --git a/frameworks/Kotlin/hexagon/store_pgclient/src/main/kotlin/BenchmarkPgClientStore.kt b/frameworks/Kotlin/hexagon/store_pgclient/src/main/kotlin/BenchmarkPgClientStore.kt index 510abda0295..2b09d73f6f5 100644 --- a/frameworks/Kotlin/hexagon/store_pgclient/src/main/kotlin/BenchmarkPgClientStore.kt +++ b/frameworks/Kotlin/hexagon/store_pgclient/src/main/kotlin/BenchmarkPgClientStore.kt @@ -19,9 +19,10 @@ class BenchmarkPgClientStore( ) : BenchmarkStore(settings) { companion object { - private const val SELECT_WORLD: String = "select * from world where id = $1" + private const val LOAD_WORLDS: String = "select id, randomNumber from world" + private const val SELECT_WORLD: String = "select id, randomNumber from world where id = $1" private const val UPDATE_WORLD: String = "update world set randomNumber = $1 where id = $2" - private const val SELECT_ALL_FORTUNES: String = "select * from fortune" + private const val SELECT_ALL_FORTUNES: String = "select id, message from fortune" } private val connectOptions: PgConnectOptions by lazy { @@ -81,13 +82,12 @@ class BenchmarkPgClientStore( .toCompletionStage() .toCompletableFuture() .get() - } } override fun initWorldsCache(cache: Cache) { dataSource - .preparedQuery("select * from world") + .preparedQuery(LOAD_WORLDS) .execute() .map { rowSet -> rowSet.map { row -> diff --git a/frameworks/Kotlin/hexagon/store_sql/src/main/kotlin/BenchmarkSqlStore.kt b/frameworks/Kotlin/hexagon/store_sql/src/main/kotlin/BenchmarkSqlStore.kt index 501a4d9ce34..14558b1a2bd 100644 --- a/frameworks/Kotlin/hexagon/store_sql/src/main/kotlin/BenchmarkSqlStore.kt +++ b/frameworks/Kotlin/hexagon/store_sql/src/main/kotlin/BenchmarkSqlStore.kt @@ -16,9 +16,10 @@ class BenchmarkSqlStore( ) : BenchmarkStore(settings) { companion object { - private const val SELECT_WORLD: String = "select * from world where id = ?" + private const val LOAD_WORLDS: String = "select id, randomNumber from world" + private const val SELECT_WORLD: String = "select id, randomNumber from world where id = ?" private const val UPDATE_WORLD: String = "update world set randomNumber = ? where id = ?" - private const val SELECT_ALL_FORTUNES: String = "select * from fortune" + private const val SELECT_ALL_FORTUNES: String = "select id, message from fortune" } private val dataSource: HikariDataSource by lazy { @@ -63,19 +64,17 @@ class BenchmarkSqlStore( override fun replaceWorlds(worlds: List) { dataSource.connection.use { con: Connection -> val stmtSelect = con.prepareStatement(SELECT_WORLD) - val stmtUpdate = con.prepareStatement(UPDATE_WORLD) - worlds.forEach { - val worldId = it.id - val newRandomNumber = it.randomNumber - - stmtSelect.setInt(1, worldId) + stmtSelect.setInt(1, it.id) val rs = stmtSelect.executeQuery() rs.next() rs.getInt(2) // Read 'randomNumber' to comply with Test type 5, point 6 + } - stmtUpdate.setInt(1, newRandomNumber) - stmtUpdate.setInt(2, worldId) + val stmtUpdate = con.prepareStatement(UPDATE_WORLD) + worlds.forEach { + stmtUpdate.setInt(1, it.randomNumber) + stmtUpdate.setInt(2, it.id) stmtUpdate.executeUpdate() } } @@ -83,7 +82,7 @@ class BenchmarkSqlStore( override fun initWorldsCache(cache: Cache) { dataSource.connection.use { con: Connection -> - val stmtSelect = con.prepareStatement("select * from world") + val stmtSelect = con.prepareStatement(LOAD_WORLDS) val rs = stmtSelect.executeQuery() while (rs.next()) {