Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ Kotlin / Hexagon ] Test next release #9563

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions frameworks/Kotlin/hexagon/build.gradle
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@

plugins {
id "org.jetbrains.kotlin.jvm" version "2.0.21" apply false
id "org.jetbrains.kotlin.jvm" version "2.1.0" apply false
id "org.graalvm.buildtools.native" version "0.10.4" apply false
}

version = "1.0.0"
description = "TFB benchmark"
group = "com.hexagonkt"
group = "com.hexagontk"

ext {
hexagonVersion = "3.7.3"
hexagonVersion = "4.0.0-B1"
jettyVersion = "12.0.16"
nettyVersion = "4.1.116.Final"
nettyVersion = "4.1.117.Final"

hikariVersion = "6.2.1"
postgresqlVersion = "42.7.4"
vertxVersion = "4.5.11"
postgresqlVersion = "42.7.5"
vertxVersion = "4.5.12"
cache2kVersion = "2.6.1.Final"

applicationClass = "com.hexagonkt.BenchmarkKt"
applicationClass = "com.hexagontk.BenchmarkKt"
modules = "java.naming,java.sql,java.management"
gradleScripts = "https://raw.githubusercontent.com/hexagonkt/hexagon/$hexagonVersion/gradle"
gradleScripts = "https://raw.githubusercontent.com/hexagontk/hexagon/$hexagonVersion/gradle"
}

subprojects {
Expand All @@ -30,5 +30,5 @@ subprojects {
}

tasks.wrapper {
gradleVersion = "8.10.2"
gradleVersion = "8.12"
}
10 changes: 5 additions & 5 deletions frameworks/Kotlin/hexagon/core/build.gradle
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@

plugins {
id("gg.jte.gradle") version("3.1.4")
id("gg.jte.gradle") version("3.1.13")
}

dependencies {
api(project(":model"))
api("com.hexagonkt:http_server:$hexagonVersion")
api("com.hexagonkt:templates_jte:$hexagonVersion")
api("com.hexagonkt:serialization_jackson_json:$hexagonVersion")
api("com.hexagontk.http:http_server:$hexagonVersion")
api("com.hexagontk.templates:templates_jte:$hexagonVersion")
api("com.hexagontk.serialization:serialization_jackson_json:$hexagonVersion")
api("org.cache2k:cache2k-core:$cache2kVersion")

jteGenerate("gg.jte:jte-native-resources:3.1.4")
jteGenerate("gg.jte:jte-native-resources:3.1.13")
}

tasks.register("minimizeTemplate") {
Expand Down
12 changes: 6 additions & 6 deletions frameworks/Kotlin/hexagon/core/src/main/kotlin/Benchmark.kt
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package com.hexagonkt
package com.hexagontk

import com.hexagonkt.http.server.HttpServer
import com.hexagonkt.http.server.HttpServerPort
import com.hexagonkt.http.server.HttpServerSettings
import com.hexagonkt.store.BenchmarkStore
import com.hexagonkt.templates.TemplatePort
import com.hexagontk.http.server.HttpServer
import com.hexagontk.http.server.HttpServerPort
import com.hexagontk.http.server.HttpServerSettings
import com.hexagontk.store.BenchmarkStore
import com.hexagontk.templates.TemplatePort
import java.net.InetAddress
import java.net.URL

Expand Down
40 changes: 20 additions & 20 deletions frameworks/Kotlin/hexagon/core/src/main/kotlin/Controller.kt
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
package com.hexagonkt

import com.hexagonkt.core.fieldsMapOf
import com.hexagonkt.core.media.APPLICATION_JSON
import com.hexagonkt.core.media.TEXT_HTML
import com.hexagonkt.core.media.TEXT_PLAIN
import com.hexagonkt.http.model.ContentType
import com.hexagonkt.http.model.Header
import com.hexagonkt.http.model.Headers
import com.hexagonkt.http.server.callbacks.DateCallback
import com.hexagonkt.http.handlers.HttpContext
import com.hexagonkt.http.handlers.PathHandler
import com.hexagonkt.http.handlers.path
import com.hexagonkt.model.*
import com.hexagonkt.serialization.jackson.json.Json
import com.hexagonkt.serialization.serialize
import com.hexagonkt.store.BenchmarkStore
import com.hexagonkt.templates.TemplatePort
package com.hexagontk

import com.hexagontk.core.fieldsMapOf
import com.hexagontk.core.media.APPLICATION_JSON
import com.hexagontk.core.media.TEXT_HTML
import com.hexagontk.core.media.TEXT_PLAIN
import com.hexagontk.http.model.ContentType
import com.hexagontk.http.model.Field
import com.hexagontk.http.model.Headers
import com.hexagontk.http.server.callbacks.DateCallback
import com.hexagontk.http.handlers.HttpContext
import com.hexagontk.http.handlers.PathHandler
import com.hexagontk.http.handlers.path
import com.hexagontk.model.*
import com.hexagontk.serialization.jackson.json.Json
import com.hexagontk.serialization.serialize
import com.hexagontk.store.BenchmarkStore
import com.hexagontk.templates.TemplatePort
import java.net.URL
import java.util.concurrent.ThreadLocalRandom
import kotlin.text.Charsets.UTF_8
Expand All @@ -35,7 +35,7 @@ class Controller(
private val json: ContentType = ContentType(APPLICATION_JSON)
private val html: ContentType = ContentType(TEXT_HTML, charset = UTF_8)

private val headers = Headers(Header("server", "Hexagon"))
private val headers = Headers(Field("server", "Hexagon"))

val path: PathHandler by lazy {
path {
Expand Down Expand Up @@ -105,7 +105,7 @@ class Controller(
ok(body.serialize(Json.raw), contentType = json)

private fun HttpContext.getWorldsCount(parameter: String): Int =
request.queryParameters[parameter]?.string()?.toIntOrNull().let {
request.queryParameters[parameter]?.text?.toIntOrNull().let {
when {
it == null -> 1
it < 1 -> 1
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package com.hexagonkt.store
package com.hexagontk.store

import com.hexagonkt.model.CachedWorld
import com.hexagonkt.model.Fortune
import com.hexagonkt.Settings
import com.hexagonkt.model.World
import com.hexagontk.model.CachedWorld
import com.hexagontk.model.Fortune
import com.hexagontk.Settings
import com.hexagontk.model.World
import org.cache2k.Cache
import org.cache2k.Cache2kBuilder

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,7 @@ Args= \
--static \
--libc=musl \
--gc=G1 \
--enable-sbom
--enable-sbom \
--initialize-at-build-time=org.slf4j.LoggerFactory \
--initialize-at-build-time=org.slf4j.helpers.Reporter \
--initialize-at-build-time=org.slf4j.LoggerFactoinitialize-at-build-timery
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
@import java.util.*
@import com.hexagonkt.model.Fortune
@import com.hexagontk.model.Fortune

@param List<Fortune> fortunes

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.12-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
3 changes: 1 addition & 2 deletions frameworks/Kotlin/hexagon/gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,7 @@ done
# shellcheck disable=SC2034
APP_BASE_NAME=${0##*/}
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s
' "$PWD" ) || exit
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s\n' "$PWD" ) || exit

# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ apply(from: "$gradleScripts/native.gradle")

dependencies {
api(project(":store_pgclient"))
api("com.hexagonkt:http_server_helidon:$hexagonVersion")
api("com.hexagontk.http:http_server_helidon:$hexagonVersion")
}
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
package com.hexagonkt
package com.hexagontk

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 com.hexagontk.core.Platform.systemSettingOrNull
import com.hexagontk.core.media.TEXT_HTML
import com.hexagontk.core.urlOf
import com.hexagontk.http.server.helidon.HelidonHttpServer
import com.hexagontk.store.BenchmarkPgClientStore
import com.hexagontk.templates.jte.Jte
import java.time.Duration

fun main() {
val store = BenchmarkPgClientStore("postgresql")
val templateEngine = JteAdapter(TEXT_HTML, precompiled = true)
val templateEngine = Jte(TEXT_HTML, precompiled = true)
val templateUrl = urlOf("classpath:fortunes.jte")
val engine = HelidonServerAdapter(
val engine = HelidonHttpServer(
backlog = systemSettingOrNull("backlog") ?: (8 * 1024),
writeQueueLength = systemSettingOrNull("writeQueueLength") ?: (8 * 1024),
readTimeout = Duration.parse(systemSettingOrNull("readTimeout") ?: "PT0S"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ apply(from: "$gradleScripts/application.gradle")

dependencies {
api(project(":store_sql"))
api("com.hexagonkt:http_server_helidon:$hexagonVersion")
api("com.hexagontk.http:http_server_helidon:$hexagonVersion")
}
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
package com.hexagonkt
package com.hexagontk

import com.hexagonkt.core.media.TEXT_HTML
import com.hexagonkt.core.urlOf
import com.hexagonkt.http.server.helidon.HelidonServerAdapter
import com.hexagonkt.store.BenchmarkSqlStore
import com.hexagonkt.templates.jte.JteAdapter
import com.hexagontk.core.media.TEXT_HTML
import com.hexagontk.core.urlOf
import com.hexagontk.http.server.helidon.HelidonHttpServer
import com.hexagontk.store.BenchmarkSqlStore
import com.hexagontk.templates.jte.Jte

fun main() {
val settings = Settings()
val store = BenchmarkSqlStore("postgresql")
val templateEngine = JteAdapter(TEXT_HTML, precompiled = true)
val templateEngine = Jte(TEXT_HTML, precompiled = true)
val templateUrl = urlOf("classpath:fortunes.jte")
val engine = HelidonServerAdapter()
val engine = HelidonHttpServer()

val benchmark = Benchmark(engine, store, templateEngine, templateUrl, settings)
benchmark.server.start()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ apply(from: "$gradleScripts/application.gradle")

dependencies {
api(project(":store_pgclient"))
api("com.hexagonkt:http_server_jetty:$hexagonVersion")
api("com.hexagontk.http:http_server_jetty:$hexagonVersion")
}
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
package com.hexagonkt
package com.hexagontk

import com.hexagonkt.core.Jvm.systemFlag
import com.hexagonkt.core.media.TEXT_HTML
import com.hexagonkt.core.urlOf
import com.hexagonkt.http.server.jetty.JettyServletAdapter
import com.hexagonkt.store.BenchmarkPgClientStore
import com.hexagonkt.templates.jte.JteAdapter
import com.hexagontk.core.Platform.systemFlag
import com.hexagontk.core.media.TEXT_HTML
import com.hexagontk.core.urlOf
import com.hexagontk.http.server.jetty.JettyServletHttpServer
import com.hexagontk.store.BenchmarkPgClientStore
import com.hexagontk.templates.jte.Jte

fun main() {
val settings = Settings()
val store = BenchmarkPgClientStore("postgresql")
val templateEngine = JteAdapter(TEXT_HTML, precompiled = true)
val templateEngine = Jte(TEXT_HTML, precompiled = true)
val templateUrl = urlOf("classpath:fortunes.jte")
val engine = JettyServletAdapter(
val engine = JettyServletHttpServer(
sendDateHeader = settings.sendDateHeader,
sendServerVersion = settings.sendServerVersion,
sendXPoweredBy = settings.sendXPoweredBy,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ apply(from: "$gradleScripts/native.gradle")

dependencies {
api(project(":store_sql"))
api("com.hexagonkt:http_server_jetty:$hexagonVersion")
api("com.hexagontk.http:http_server_jetty:$hexagonVersion")
}
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
package com.hexagonkt
package com.hexagontk

import com.hexagonkt.core.Jvm.systemFlag
import com.hexagonkt.core.media.TEXT_HTML
import com.hexagonkt.core.urlOf
import com.hexagonkt.http.server.jetty.JettyServletAdapter
import com.hexagonkt.store.BenchmarkSqlStore
import com.hexagonkt.templates.jte.JteAdapter
import com.hexagontk.core.Platform.systemFlag
import com.hexagontk.core.media.TEXT_HTML
import com.hexagontk.core.urlOf
import com.hexagontk.http.server.jetty.JettyServletHttpServer
import com.hexagontk.store.BenchmarkSqlStore
import com.hexagontk.templates.jte.Jte

fun main() {
val settings = Settings()
val store = BenchmarkSqlStore("postgresql")
val templateEngine = JteAdapter(TEXT_HTML, precompiled = true)
val templateEngine = Jte(TEXT_HTML, precompiled = true)
val templateUrl = urlOf("classpath:fortunes.jte")
val engine = JettyServletAdapter(
val engine = JettyServletHttpServer(
sendDateHeader = settings.sendDateHeader,
sendServerVersion = settings.sendServerVersion,
sendXPoweredBy = settings.sendXPoweredBy,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ apply(from: "$gradleScripts/application.gradle")

dependencies {
api(project(":store_pgclient"))
api("com.hexagonkt:http_server_netty_epoll:$hexagonVersion")
api("com.hexagontk.http:http_server_netty_epoll:$hexagonVersion")
api("io.netty:netty-transport-native-epoll:$nettyVersion:linux-x86_64")
}
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package com.hexagonkt
package com.hexagontk

import com.hexagonkt.core.media.TEXT_HTML
import com.hexagonkt.core.urlOf
import com.hexagonkt.http.server.netty.epoll.NettyEpollServerAdapter
import com.hexagonkt.store.BenchmarkPgClientStore
import com.hexagonkt.templates.jte.JteAdapter
import com.hexagontk.core.media.TEXT_HTML
import com.hexagontk.core.urlOf
import com.hexagontk.http.server.netty.epoll.NettyEpollHttpServer
import com.hexagontk.store.BenchmarkPgClientStore
import com.hexagontk.templates.jte.Jte
import io.netty.util.ResourceLeakDetector
import io.netty.util.ResourceLeakDetector.Level.DISABLED

Expand All @@ -16,9 +16,9 @@ fun main() {

val settings = Settings()
val store = BenchmarkPgClientStore("postgresql")
val templateEngine = JteAdapter(TEXT_HTML, precompiled = true)
val templateEngine = Jte(TEXT_HTML, precompiled = true)
val templateUrl = urlOf("classpath:fortunes.jte")
val engine = NettyEpollServerAdapter(
val engine = NettyEpollHttpServer(
keepAliveHandler = false,
httpAggregatorHandler = false,
chunkedHandler = false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ apply(from: "$gradleScripts/application.gradle")

dependencies {
api(project(":store_sql"))
api("com.hexagonkt:http_server_netty_epoll:$hexagonVersion")
api("com.hexagontk.http:http_server_netty_epoll:$hexagonVersion")
api("io.netty:netty-transport-native-epoll:$nettyVersion:linux-x86_64")
}
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package com.hexagonkt
package com.hexagontk

import com.hexagonkt.core.media.TEXT_HTML
import com.hexagonkt.core.urlOf
import com.hexagonkt.http.server.netty.epoll.NettyEpollServerAdapter
import com.hexagonkt.store.BenchmarkSqlStore
import com.hexagonkt.templates.jte.JteAdapter
import com.hexagontk.core.media.TEXT_HTML
import com.hexagontk.core.urlOf
import com.hexagontk.http.server.netty.epoll.NettyEpollHttpServer
import com.hexagontk.store.BenchmarkSqlStore
import com.hexagontk.templates.jte.Jte
import io.netty.util.ResourceLeakDetector
import io.netty.util.ResourceLeakDetector.Level.DISABLED

Expand All @@ -16,9 +16,9 @@ fun main() {

val settings = Settings()
val store = BenchmarkSqlStore("postgresql")
val templateEngine = JteAdapter(TEXT_HTML, precompiled = true)
val templateEngine = Jte(TEXT_HTML, precompiled = true)
val templateUrl = urlOf("classpath:fortunes.jte")
val engine = NettyEpollServerAdapter(
val engine = NettyEpollHttpServer(
keepAliveHandler = false,
httpAggregatorHandler = false,
chunkedHandler = false,
Expand Down
Loading
Loading