Skip to content

Commit ea2ef13

Browse files
authored
Add blackbird test and update Hexagon version (#6849)
* Fix error with URLs in JEE servers * Clean up * Avoid classpath URLs * Fix template loading error * Fix template loading error * Chores * Fix template loading error * Delete MongoDB DB support Storage support in Hexagon will be moved outside the Toolkit, and so, it will be left outside the benchmark. * Fix runtime problem * Update Hexagon version * Make Jackson Blackbird module optional * Add variation with Blackbird module enabled * Upgrade Hexagon version
1 parent 2cebf97 commit ea2ef13

File tree

5 files changed

+75
-7
lines changed

5 files changed

+75
-7
lines changed

frameworks/Kotlin/hexagon/benchmark_config.json

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,29 @@
2525
"notes": "http://hexagonkt.com",
2626
"versus": "servlet"
2727
},
28+
"blackbird": {
29+
"json_url": "/json",
30+
"db_url": "/postgresql/db",
31+
"query_url": "/postgresql/query?queries=",
32+
"fortune_url": "/postgresql/pebble/fortunes",
33+
"update_url": "/postgresql/update?queries=",
34+
"cached_query_url": "/postgresql/cached?count=",
35+
"plaintext_url": "/plaintext",
36+
"port": 9090,
37+
"approach": "Realistic",
38+
"classification": "Micro",
39+
"database": "postgres",
40+
"framework": "Hexagon",
41+
"language": "Kotlin",
42+
"orm": "Raw",
43+
"platform": "Servlet",
44+
"webserver": "None",
45+
"os": "Linux",
46+
"database_os": "Linux",
47+
"display_name": "Hexagon Jetty PostgreSQL",
48+
"notes": "http://hexagonkt.com",
49+
"versus": "servlet"
50+
},
2851
"resin": {
2952
"json_url": "/json",
3053
"db_url": "/postgresql/db",

frameworks/Kotlin/hexagon/build.gradle

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11

22
plugins {
3-
id "org.jetbrains.kotlin.jvm" version "1.5.21"
3+
id "org.jetbrains.kotlin.jvm" version "1.5.31"
44
}
55

66
ext {
7-
gradleScripts = "https://raw.githubusercontent.com/hexagonkt/hexagon/1.4.2/gradle"
7+
gradleScripts = "https://raw.githubusercontent.com/hexagonkt/hexagon/1.4.7/gradle"
88

9-
hexagonVersion = "1.4.2"
9+
hexagonVersion = "1.4.7"
1010
hikariVersion = "5.0.0"
11-
jettyVersion = "10.0.6"
12-
postgresqlVersion = "42.2.23"
11+
jettyVersion = "10.0.7"
12+
postgresqlVersion = "42.2.24"
1313
cache2kVersion = "2.2.1.Final"
14-
jacksonBlackbirdVersion = "2.12.4"
14+
jacksonBlackbirdVersion = "2.13.0"
1515
}
1616

1717
apply(from: "$gradleScripts/kotlin.gradle")

frameworks/Kotlin/hexagon/config.toml

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

22+
[blackbird]
23+
urls.plaintext = "/plaintext"
24+
urls.json = "/json"
25+
urls.db = "/postgresql/db"
26+
urls.query = "/postgresql/query?queries="
27+
urls.update = "/postgresql/update?queries="
28+
urls.fortune = "/postgresql/pebble/fortunes"
29+
urls.cached_query = "/postgresql/cached?count="
30+
approach = "Realistic"
31+
classification = "Micro"
32+
database = "postgres"
33+
database_os = "Linux"
34+
os = "Linux"
35+
orm = "Raw"
36+
platform = "Servlet"
37+
webserver = "None"
38+
versus = "servlet"
39+
2240
[resin]
2341
urls.plaintext = "/plaintext"
2442
urls.json = "/json"
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
#
2+
# BUILD
3+
#
4+
FROM gradle:7.2-jdk11 AS gradle_build
5+
USER root
6+
WORKDIR /hexagon
7+
8+
COPY src src
9+
COPY build.gradle build.gradle
10+
RUN gradle --quiet
11+
12+
#
13+
# RUNTIME
14+
#
15+
FROM adoptopenjdk:11-jre-hotspot-bionic
16+
ENV DBSTORE postgresql
17+
ENV POSTGRESQL_DB_HOST tfb-database
18+
ENV WEBENGINE jetty
19+
ENV PROJECT hexagon
20+
ENV ENABLE_BLACKBIRD true
21+
22+
COPY --from=gradle_build /hexagon/build/install/$PROJECT /opt/$PROJECT
23+
24+
EXPOSE 9090
25+
26+
ENTRYPOINT /opt/$PROJECT/bin/$PROJECT

frameworks/Kotlin/hexagon/src/main/kotlin/Benchmark.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package com.hexagonkt
22

33
import com.fasterxml.jackson.module.blackbird.BlackbirdModule
4+
import com.hexagonkt.helpers.Jvm
45
import com.hexagonkt.http.server.Server
56
import com.hexagonkt.http.server.ServerPort
67
import com.hexagonkt.http.server.ServerSettings
@@ -36,7 +37,7 @@ internal val benchmarkServer: Server by lazy {
3637
}
3738

3839
fun main() {
39-
if (System.getenv().containsKey("ENABLE_BLACKBIRD"))
40+
if (Jvm.systemFlag("ENABLE_BLACKBIRD"))
4041
Json.mapper.registerModule(BlackbirdModule())
4142
SerializationManager.mapper = JacksonMapper
4243
SerializationManager.formats = linkedSetOf(Json)

0 commit comments

Comments
 (0)