Skip to content

Commit aec5ad2

Browse files
committed
Add tests for new adapter
1 parent 91d5ed2 commit aec5ad2

File tree

9 files changed

+81
-14
lines changed

9 files changed

+81
-14
lines changed

frameworks/Kotlin/hexagon/benchmark_config.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
"notes": "http://hexagonkt.com",
4949
"versus": "servlet"
5050
},
51-
"jettyloom": {
51+
"jdk": {
5252
"json_url": "/json",
5353
"db_url": "/db",
5454
"query_url": "/query?queries=",
@@ -67,11 +67,11 @@
6767
"webserver": "None",
6868
"os": "Linux",
6969
"database_os": "Linux",
70-
"display_name": "Hexagon Jetty Loom PostgreSQL",
70+
"display_name": "Hexagon JDK PostgreSQL",
7171
"notes": "http://hexagonkt.com",
7272
"versus": "servlet"
7373
},
74-
"jettyloom-pgclient": {
74+
"jdk-pgclient": {
7575
"json_url": "/json",
7676
"db_url": "/db",
7777
"query_url": "/query?queries=",
@@ -90,7 +90,7 @@
9090
"webserver": "None",
9191
"os": "Linux",
9292
"database_os": "Linux",
93-
"display_name": "Hexagon Jetty Loom PgClient",
93+
"display_name": "Hexagon JDK PgClient",
9494
"notes": "http://hexagonkt.com",
9595
"versus": "servlet"
9696
},

frameworks/Kotlin/hexagon/config.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ platform = "Servlet"
1919
webserver = "None"
2020
versus = "servlet"
2121

22-
[jettyloom]
22+
[jdk]
2323
urls.plaintext = "/plaintext"
2424
urls.json = "/json"
2525
urls.db = "/db"
@@ -37,7 +37,7 @@ platform = "Servlet"
3737
webserver = "None"
3838
versus = "servlet"
3939

40-
[jettyloom-pgclient]
40+
[jdk-pgclient]
4141
urls.plaintext = "/plaintext"
4242
urls.json = "/json"
4343
urls.db = "/db"
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#
22
# BUILD
33
#
4-
FROM docker.io/bellsoft/liberica-runtime-container:jdk-all-21-cds-musl AS build
4+
FROM docker.io/bellsoft/liberica-runtime-container:jdk-all-23-cds-musl AS build
55
USER root
66
WORKDIR /hexagon
77

@@ -12,13 +12,13 @@ RUN ./gradlew --quiet -x test installDist
1212
#
1313
# RUNTIME
1414
#
15-
FROM docker.io/bellsoft/liberica-runtime-container:jre-21-musl
16-
ARG PROJECT=hexagon_jetty_pgclient
15+
FROM docker.io/bellsoft/liberica-runtime-container:jre-23-musl
16+
ARG PROJECT=hexagon_jdk_pgclient
1717

1818
ENV POSTGRESQL_DB_HOST tfb-database
1919
ENV JDK_JAVA_OPTIONS --enable-preview -XX:+AlwaysPreTouch -XX:+UseParallelGC -XX:+UseNUMA -DvirtualThreads=true
2020
ENV maximumPoolSize 300
2121

2222
COPY --from=build /hexagon/$PROJECT/build/install/$PROJECT /opt/$PROJECT
2323

24-
ENTRYPOINT [ "/opt/hexagon_jetty_pgclient/bin/hexagon_jetty_pgclient" ]
24+
ENTRYPOINT [ "/opt/hexagon_jdk_pgclient/bin/hexagon_jdk_pgclient" ]
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#
22
# BUILD
33
#
4-
FROM docker.io/bellsoft/liberica-runtime-container:jdk-all-21-cds-musl AS build
4+
FROM docker.io/bellsoft/liberica-runtime-container:jdk-all-23-cds-musl AS build
55
USER root
66
WORKDIR /hexagon
77

@@ -12,13 +12,13 @@ RUN ./gradlew --quiet -x test installDist
1212
#
1313
# RUNTIME
1414
#
15-
FROM docker.io/bellsoft/liberica-runtime-container:jre-21-musl
16-
ARG PROJECT=hexagon_jetty_postgresql
15+
FROM docker.io/bellsoft/liberica-runtime-container:jre-23-musl
16+
ARG PROJECT=hexagon_jdk_postgresql
1717

1818
ENV POSTGRESQL_DB_HOST tfb-database
1919
ENV JDK_JAVA_OPTIONS --enable-preview -XX:+AlwaysPreTouch -XX:+UseParallelGC -XX:+UseNUMA -DvirtualThreads=true
2020
ENV maximumPoolSize 300
2121

2222
COPY --from=build /hexagon/$PROJECT/build/install/$PROJECT /opt/$PROJECT
2323

24-
ENTRYPOINT [ "/opt/hexagon_jetty_postgresql/bin/hexagon_jetty_postgresql" ]
24+
ENTRYPOINT [ "/opt/hexagon_jdk_postgresql/bin/hexagon_jdk_postgresql" ]
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
2+
apply(from: "$gradleScripts/application.gradle")
3+
4+
dependencies {
5+
api(project(":store_pgclient"))
6+
api("com.hexagontk.http:http_server_jdk:$hexagonVersion")
7+
}
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
package com.hexagontk
2+
3+
import com.hexagontk.core.media.TEXT_HTML
4+
import com.hexagontk.core.urlOf
5+
import com.hexagontk.http.server.jdk.JdkHttpServer
6+
import com.hexagontk.store.BenchmarkPgClientStore
7+
import com.hexagontk.templates.jte.Jte
8+
import java.util.concurrent.Executors.newVirtualThreadPerTaskExecutor
9+
10+
fun main() {
11+
System.setProperty("sun.net.httpserver.idleInterval", "5")
12+
System.setProperty("sun.net.httpserver.maxIdleConnections", "400")
13+
14+
val settings = Settings()
15+
val store = BenchmarkPgClientStore("postgresql")
16+
val templateEngine = Jte(TEXT_HTML, precompiled = true)
17+
val templateUrl = urlOf("classpath:fortunes.jte")
18+
val engine = JdkHttpServer(
19+
executor = newVirtualThreadPerTaskExecutor(),
20+
backlog = 2_048
21+
)
22+
23+
val benchmark = Benchmark(engine, store, templateEngine, templateUrl, settings)
24+
benchmark.server.start()
25+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
2+
apply(from: "$gradleScripts/application.gradle")
3+
apply(from: "$gradleScripts/native.gradle")
4+
5+
dependencies {
6+
api(project(":store_sql"))
7+
api("com.hexagontk.http:http_server_jdk:$hexagonVersion")
8+
}
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
package com.hexagontk
2+
3+
import com.hexagontk.core.media.TEXT_HTML
4+
import com.hexagontk.core.urlOf
5+
import com.hexagontk.http.server.jdk.JdkHttpServer
6+
import com.hexagontk.store.BenchmarkSqlStore
7+
import com.hexagontk.templates.jte.Jte
8+
import java.util.concurrent.Executors.newVirtualThreadPerTaskExecutor
9+
10+
fun main() {
11+
System.setProperty("sun.net.httpserver.idleInterval", "5")
12+
System.setProperty("sun.net.httpserver.maxIdleConnections", "400")
13+
14+
val settings = Settings()
15+
val store = BenchmarkSqlStore("postgresql")
16+
val templateEngine = Jte(TEXT_HTML, precompiled = true)
17+
val templateUrl = urlOf("classpath:fortunes.jte")
18+
val engine = JdkHttpServer(
19+
executor = newVirtualThreadPerTaskExecutor(),
20+
backlog = 2_048
21+
)
22+
23+
val benchmark = Benchmark(engine, store, templateEngine, templateUrl, settings)
24+
benchmark.server.start()
25+
}

frameworks/Kotlin/hexagon/settings.gradle

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ include(
99
"hexagon_jetty_postgresql",
1010
"hexagon_helidon_pgclient",
1111
"hexagon_helidon_postgresql",
12+
"hexagon_jdk_pgclient",
13+
"hexagon_jdk_postgresql",
1214
"hexagon_nettyepoll_pgclient",
1315
"hexagon_nettyepoll_postgresql",
1416
"hexagon_tomcat_postgresql",

0 commit comments

Comments
 (0)