forked from TechEmpower/FrameworkBenchmarks
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update dependencies and change settings
- Loading branch information
1 parent
c6dcb56
commit 30c9830
Showing
2 changed files
with
22 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 15 additions & 3 deletions
18
frameworks/Kotlin/hexagon/hexagon_helidon_pgclient/src/main/kotlin/Benchmark.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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() | ||
} |