From 30c9830883dd35f8bad05d626638a4a81a2b80c9 Mon Sep 17 00:00:00 2001 From: jaguililla Date: Wed, 18 Sep 2024 22:32:02 +0200 Subject: [PATCH] Update dependencies and change settings --- frameworks/Kotlin/hexagon/build.gradle | 14 +++++++------- .../src/main/kotlin/Benchmark.kt | 18 +++++++++++++++--- 2 files changed, 22 insertions(+), 10 deletions(-) diff --git a/frameworks/Kotlin/hexagon/build.gradle b/frameworks/Kotlin/hexagon/build.gradle index 5f11a1c40a2..d1f77b2b178 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.10" apply false - id "org.graalvm.buildtools.native" version "0.10.2" apply false + id "org.jetbrains.kotlin.jvm" version "2.0.20" apply false + id "org.graalvm.buildtools.native" version "0.10.3" apply false } version = "1.0.0" @@ -9,13 +9,13 @@ description = "TFB benchmark" group = "com.hexagonkt" ext { - hexagonVersion = "3.6.2" - jettyVersion = "12.0.12" - nettyVersion = "4.1.112.Final" + hexagonVersion = "3.7.0" + jettyVersion = "12.0.13" + nettyVersion = "4.1.113.Final" hikariVersion = "5.1.0" - postgresqlVersion = "42.7.3" - vertxVersion = "4.5.9" + postgresqlVersion = "42.7.4" + vertxVersion = "4.5.10" cache2kVersion = "2.6.1.Final" applicationClass = "com.hexagonkt.BenchmarkKt" diff --git a/frameworks/Kotlin/hexagon/hexagon_helidon_pgclient/src/main/kotlin/Benchmark.kt b/frameworks/Kotlin/hexagon/hexagon_helidon_pgclient/src/main/kotlin/Benchmark.kt index d38d33281f8..a5778a2c353 100644 --- a/frameworks/Kotlin/hexagon/hexagon_helidon_pgclient/src/main/kotlin/Benchmark.kt +++ b/frameworks/Kotlin/hexagon/hexagon_helidon_pgclient/src/main/kotlin/Benchmark.kt @@ -1,18 +1,30 @@ package com.hexagonkt +import com.hexagonkt.core.Jvm.systemSettingOrNull import com.hexagonkt.core.media.TEXT_HTML import com.hexagonkt.core.urlOf import com.hexagonkt.http.server.helidon.HelidonServerAdapter import com.hexagonkt.store.BenchmarkPgClientStore import com.hexagonkt.templates.jte.JteAdapter +import java.time.Duration fun main() { - val settings = Settings() val store = BenchmarkPgClientStore("postgresql") val templateEngine = JteAdapter(TEXT_HTML, precompiled = true) val templateUrl = urlOf("classpath:fortunes.jte") - val engine = HelidonServerAdapter() + val engine = HelidonServerAdapter( + backlog = systemSettingOrNull("backlog") ?: (8 * 1024), + writeQueueLength = systemSettingOrNull("writeQueueLength") ?: (8 * 1024), + readTimeout = Duration.parse(systemSettingOrNull("readTimeout") ?: "PT0S"), + connectTimeout = Duration.parse(systemSettingOrNull("connectTimeout") ?: "PT0S"), + tcpNoDelay = systemSettingOrNull("tcpNoDelay") ?: true, + receiveLog = systemSettingOrNull("receiveLog") ?: false, + sendLog = systemSettingOrNull("sendLog") ?: false, + validatePath = systemSettingOrNull("validatePath") ?: false, + validateRequestHeaders = systemSettingOrNull("validateRequestHeaders") ?: false, + validateResponseHeaders = systemSettingOrNull("validateResponseHeaders") ?: false, + ) - val benchmark = Benchmark(engine, store, templateEngine, templateUrl, settings) + val benchmark = Benchmark(engine, store, templateEngine, templateUrl, Settings()) benchmark.server.start() }