Browse Source

Update dependencies and change settings

jaguililla 11 months ago
parent
commit
30c9830883

+ 7 - 7
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"

+ 15 - 3
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<Boolean>("tcpNoDelay") ?: true,
+        receiveLog = systemSettingOrNull<Boolean>("receiveLog") ?: false,
+        sendLog = systemSettingOrNull<Boolean>("sendLog") ?: false,
+        validatePath = systemSettingOrNull<Boolean>("validatePath") ?: false,
+        validateRequestHeaders = systemSettingOrNull<Boolean>("validateRequestHeaders") ?: false,
+        validateResponseHeaders = systemSettingOrNull<Boolean>("validateResponseHeaders") ?: false,
+    )
 
-    val benchmark = Benchmark(engine, store, templateEngine, templateUrl, settings)
+    val benchmark = Benchmark(engine, store, templateEngine, templateUrl, Settings())
     benchmark.server.start()
 }