Skip to content

Commit

Permalink
Update dependencies and change settings
Browse files Browse the repository at this point in the history
  • Loading branch information
jaguililla committed Sep 18, 2024
1 parent c6dcb56 commit 30c9830
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 10 deletions.
14 changes: 7 additions & 7 deletions frameworks/Kotlin/hexagon/build.gradle
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@

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"
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"
Expand Down
Original file line number Diff line number Diff line change
@@ -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()
}

0 comments on commit 30c9830

Please sign in to comment.