Skip to content
This repository was archived by the owner on Mar 24, 2026. It is now read-only.
Merged
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
22 changes: 0 additions & 22 deletions frameworks/Clojure/ring-http-exchange/benchmark_config.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,29 +42,7 @@
"notes": "",
"versus": "httpserver-robaho"
},
"robaho-zgc": {
"json_url": "/json",
"plaintext_url": "/plaintext",
"fortune_url": "/fortunes",
"port": 8080,
"approach": "Realistic",
"classification": "Platform",
"database": "postgres",
"framework": "None",
"language": "Clojure",
"flavor": "None",
"orm": "Raw",
"platform": "Ring",
"webserver": "None",
"os": "Linux",
"database_os": "Linux",
"display_name": "ring-http-exchange-robaho-zgc",
"notes": "",
"versus": "ring-http-exchange-robaho"
},
"robaho-is": {
"json_url": "/json",
"plaintext_url": "/plaintext",
"fortune_url": "/fortunes",
"port": 8080,
"approach": "Realistic",
Expand Down
14 changes: 0 additions & 14 deletions frameworks/Clojure/ring-http-exchange/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -57,20 +57,6 @@ platform = "httpserver"
webserver = "None"
versus = "httpserver-robaho-graalvm"

[robaho-zgc]
urls.plaintext = "/plaintext"
urls.json = "/json"
urls.fortune = "/fortunes"
approach = "Realistic"
classification = "Platform"
database = "postgres"
database_os = "Linux"
os = "Linux"
orm = "Raw"
platform = "httpserver"
webserver = "None"
versus = "ring-http-exchange-robaho"

[robaho-is]
urls.plaintext = "/plaintext"
urls.json = "/json"
Expand Down
6 changes: 3 additions & 3 deletions frameworks/Clojure/ring-http-exchange/project.clj
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@

:dependencies [[org.clojure/clojure "1.12.3"]
[org.clojure/tools.logging "1.3.0"]
[org.clojars.jj/ring-http-exchange "1.2.14"]
[org.clojars.jj/ring-http-exchange "1.2.16"]
[seancorfield/next.jdbc "1.2.659"]
[org.clojars.jj/majavat "1.15.1"]
[org.clojars.jj/majavat "1.18.0"]
[hikari-cp "3.3.0"]
[org.clojars.jj/boa-sql "1.0.0"]
[org.clojars.jj/boa-sql "1.0.1"]
[org.postgresql/postgresql "42.7.8"]
[metosin/jsonista "0.3.13"]
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ COPY --from=lein /ring-http-exchange/target/ring-http-server-1.0.0-standalone.ja

EXPOSE 8080

CMD ["java", "-server", "-XX:+UseParallelGC", "-XX:MaxRAMPercentage=70", "-Dclojure.compiler.direct-linking=true", "-jar", "app.jar"]
CMD ["java", "-server", "-XX:+UseParallelGC", "-XX:MaxRAMPercentage=70", "-Dclojure.compiler.direct-linking=true", "-Drobaho.net.httpserver.nodelay=true", "-jar", "app.jar"]
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ COPY --from=lein /ring-http-exchange/target/ring-http-server-1.0.0-standalone.ja

EXPOSE 8080

CMD ["java", "-server", "-XX:+UseParallelGC", "-XX:MaxRAMPercentage=70", "-Dclojure.compiler.direct-linking=true", "-jar", "app.jar", "--inputstream"]
CMD ["java", "-server", "-XX:+UseParallelGC", "-XX:MaxRAMPercentage=70", "-Dclojure.compiler.direct-linking=true", "-Drobaho.net.httpserver.nodelay=true", "-jar", "app.jar", "--inputstream"]
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ COPY --from=lein /ring-http-exchange/target/ring-http-server-1.0.0-standalone.ja

EXPOSE 8080

CMD ["java", "-Xtune:throughput", "-Xgcpolicy:optthruput", "-XX:MaxRAMPercentage=70", "-XX:+UseContainerSupport", "-Dclojure.compiler.direct-linking=true", "-jar", "app.jar"]
CMD ["java", "-Xtune:throughput", "-Xgcpolicy:optthruput", "-XX:MaxRAMPercentage=70", "-XX:+UseContainerSupport", "-Dclojure.compiler.direct-linking=true", "-Drobaho.net.httpserver.nodelay=true", "-jar", "app.jar"]

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ COPY --from=lein /ring-http-exchange/target/ring-http-server-1.0.0-standalone.ja

EXPOSE 8080

CMD ["java", "-server", "-XX:+UseParallelGC", "-XX:MaxRAMPercentage=70", "-Dclojure.compiler.direct-linking=true", "-jar", "app.jar"]
CMD ["java", "-server", "-XX:+UseParallelGC", "-XX:MaxRAMPercentage=70", "-Dclojure.compiler.direct-linking=true", "-Drobaho.net.httpserver.nodelay=true", "-jar", "app.jar"]
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
(def db-spec {:idle-timeout 15000
:max-lifetime 60000
:minimum-idle 0
:maximum-pool-size 128
:jdbcUrl "jdbc:postgresql://tfb-database/hello_world?user=benchmarkdbuser&password=benchmarkdbpass"})
:maximum-pool-size 1024
:jdbcUrl "jdbc:postgresql://tfb-database/hello_world?user=benchmarkdbuser&password=benchmarkdbpass&tlsnowait=true"})

(defn -main
[& args]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,29 +2,22 @@
(:require
[jj.majavat :as majavat]
[jj.majavat.renderer :refer [->InputStreamRenderer]]
[jj.majavat.renderer.sanitizer :refer [->Html]]
[jj.sql.boa :as boa]
[jsonista.core :as json])
[jj.sql.boa :as boa])
(:import (java.io ByteArrayInputStream)))

(defrecord Response [body status headers])

(def query-fortunes (boa/execute (boa/->NextJdbcAdapter) "fortune.sql"))
(def query-fortunes (boa/build-query (boa/->NextJdbcAdapter) "fortune.sql"))

(def ^:private hello-world "Hello, World!")
(def ^:private hello-world-bytes (.getBytes "Hello, World!"))
(def ^:private ^:const additional-message {:id 0
:message "Additional fortune added at request time."})
(def ^:private ^:const fortune-headers {"Server" "ring-http-exchange"
"Content-Type" "text/html; charset=UTF-8"})
(def ^:private ^:const json-headers {"Server" "ring-http-exchange"
"Content-Type" "application/json"})
(def ^:private ^:const plain-text-headers {"Server" "ring-http-exchange"
"Content-Type" "text/plain"})

(def ^:private render-fortune (majavat/build-renderer "fortune.html"
{:renderer (->InputStreamRenderer
{:sanitizer (->Html)})}))

(def ^:private render-fortune (majavat/build-html-renderer "fortune.html"
{:renderer (->InputStreamRenderer)}))

(defn- get-body [datasource]
(let [context (as-> (query-fortunes datasource) fortunes
Expand All @@ -35,8 +28,6 @@
(defn get-handler [data-source]
(fn [req]
(case (req :uri)
"/plaintext" (Response. (ByteArrayInputStream. hello-world-bytes) 200 plain-text-headers)
"/json" (Response. (ByteArrayInputStream. (json/write-value-as-bytes {:message hello-world})) 200 json-headers)
"/fortunes" (Response. (get-body data-source) 200 fortune-headers)
(Response. (ByteArrayInputStream. hello-world-bytes) 200 {"Server" "ring-http-exchange"
"Content-Type" "text/plain"}))))
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
(ns ring-http-exchange.string-handler
(:require
[jj.majavat :as majavat]
[jj.majavat.renderer :refer [->StringRenderer]]
[jj.majavat.renderer.sanitizer :refer [->Html]]
[jj.sql.boa :as boa]
[jsonista.core :as json]))

(defrecord Response [body status headers])

(def query-fortunes (boa/execute (boa/->NextJdbcAdapter) "fortune.sql"))
(def query-fortunes (boa/build-query (boa/->NextJdbcAdapter) "fortune.sql"))

(def ^:private ^:const hello-world "Hello, World!")
(def ^:private ^:const additional-message {:id 0
Expand All @@ -20,9 +18,7 @@
(def ^:private ^:const plain-text-headers {"Server" "ring-http-exchange"
"Content-Type" "text/plain"})

(def ^:private render-fortune (majavat/build-renderer "fortune.html"
{:renderer (->StringRenderer
{:sanitizer (->Html)})}))
(def ^:private render-fortune (majavat/build-html-renderer "fortune.html"))

(defn- get-body [datasource]
(let [context (as-> (query-fortunes datasource) fortunes
Expand Down
38 changes: 13 additions & 25 deletions frameworks/Java/httpserver/benchmark_config.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,12 @@
{
"default": {
"json_url": "/json",
"fortune_url": "/fortunes",
"plaintext_url": "/plaintext",
"port": 8080,
"approach": "Realistic",
"classification": "Platform",
"database": "None",
"database": "postgres",
"framework": "None",
"language": "Java",
"flavor": "None",
Expand All @@ -21,31 +22,14 @@
"notes": "",
"versus": ""
},
"postgres": {
"fortune_url": "/fortunes",
"port": 8080,
"approach": "Realistic",
"classification": "Platform",
"database": "Postgres",
"framework": "None",
"language": "Java",
"flavor": "None",
"orm": "Raw",
"platform": "httpserver",
"webserver": "None",
"os": "Linux",
"database_os": "Linux",
"display_name": "httpserver-postgres",
"notes": "",
"versus": ""
},
"graalvm": {
"json_url": "/json",
"fortune_url": "/fortunes",
"plaintext_url": "/plaintext",
"port": 8080,
"approach": "Realistic",
"classification": "Platform",
"database": "None",
"database": "postgres",
"framework": "None",
"language": "Java",
"flavor": "None",
Expand All @@ -60,11 +44,12 @@
},
"robaho": {
"json_url": "/json",
"fortune_url": "/fortunes",
"plaintext_url": "/plaintext",
"port": 8080,
"approach": "Realistic",
"classification": "Platform",
"database": "None",
"database": "postgres",
"framework": "None",
"language": "Java",
"flavor": "None",
Expand All @@ -77,12 +62,14 @@
"notes": "",
"versus": ""
},
"robaho-postgres": {
"robaho-zgc": {
"json_url": "/json",
"fortune_url": "/fortunes",
"plaintext_url": "/plaintext",
"port": 8080,
"approach": "Realistic",
"classification": "Platform",
"database": "Postgres",
"database": "postgres",
"framework": "None",
"language": "Java",
"flavor": "None",
Expand All @@ -91,17 +78,18 @@
"webserver": "None",
"os": "Linux",
"database_os": "Linux",
"display_name": "httpserver-robaho-postgres",
"display_name": "httpserver-robaho",
"notes": "",
"versus": ""
},
"robaho-graalvm": {
"json_url": "/json",
"fortune_url": "/fortunes",
"plaintext_url": "/plaintext",
"port": 8080,
"approach": "Realistic",
"classification": "Platform",
"database": "None",
"database": "postgres",
"framework": "None",
"language": "Java",
"flavor": "None",
Expand Down
38 changes: 15 additions & 23 deletions frameworks/Java/httpserver/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,36 +3,25 @@ name = "httpserver"

[main]
urls.plaintext = "/plaintext"
urls.json = "/json"
approach = "Realistic"
classification = "Platform"
database = "None"
database_os = "Linux"
os = "Linux"
orm = "Raw"
platform = "httpserver"
webserver = "None"
versus = ""

[postgres]
urls.fortune = "/fortunes"
urls.json = "/json"
approach = "Realistic"
classification = "Platform"
database = "Postgres"
database = "postgres"
database_os = "Linux"
os = "Linux"
orm = "Raw"
platform = "httpserver"
webserver = "None"
versus = ""


[graalvm]
urls.plaintext = "/plaintext"
urls.fortune = "/fortunes"
urls.json = "/json"
approach = "Realistic"
classification = "Platform"
database = "None"
database = "postgres"
database_os = "Linux"
os = "Linux"
orm = "Raw"
Expand All @@ -43,10 +32,11 @@ versus = "httpserver"

[robaho]
urls.plaintext = "/plaintext"
urls.fortune = "/fortunes"
urls.json = "/json"
approach = "Realistic"
classification = "Platform"
database = "None"
database = "postgres"
database_os = "Linux"
os = "Linux"
orm = "Raw"
Expand All @@ -55,28 +45,30 @@ webserver = "None"
versus = "httpserver"


[robaho-postgres]
[robaho-graalvm]
urls.plaintext = "/plaintext"
urls.fortune = "/fortunes"
urls.json = "/json"
approach = "Realistic"
classification = "Platform"
database = "Postgres"
database = "postgres"
database_os = "Linux"
os = "Linux"
orm = "Raw"
platform = "httpserver"
webserver = "None"
versus = ""

versus = "httpserver-robaho"

[robaho-graalvm]
[robaho-zgc]
urls.plaintext = "/plaintext"
urls.fortune = "/fortunes"
urls.json = "/json"
approach = "Realistic"
classification = "Platform"
database = "None"
database = "postgres"
database_os = "Linux"
os = "Linux"
orm = "Raw"
platform = "httpserver"
webserver = "None"
versus = "httpserver-robaho"
versus = "httpserver"
13 changes: 0 additions & 13 deletions frameworks/Java/httpserver/httpserver-postgres.dockerfile

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ COPY --from=maven /httpserver-robaho/target/httpserver-1.0-jar-with-dependencies

EXPOSE 8080

CMD ["java", "-server", "-XX:MaxRAMPercentage=70", "-jar", "app.jar"]
CMD ["java", "-server", "-XX:MaxRAMPercentage=70", "-Drobaho.net.httpserver.nodelay=true", "-XX:+UseParallelGC", "-jar", "app.jar"]
Loading
Loading