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
81 changes: 81 additions & 0 deletions frameworks/Java/avaje-jex/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
# Avaje Jex Benchmarking Test

## Important Libraries
The tests were run with:
* [Java 24](https://openjdk.java.net)
* [Avaje Http 3.3](https://github.com/avaje/avaje-http)
* [Avaje Inject 11.5](https://github.com/avaje/avaje-inject)
* [Avaje Jex 3.2](https://github.com/avaje/avaje-jex)
* [HikariCP 6.3.0](https://github.com/brettwooldridge/HikariCP)
* [jstachio 1.3.7](https://github.com/jstachio/jstachio)

[Avaje Jex](https://avaje.io) is a micro web framework for Java's built-in `jdk.httpserver` API.

```java
Jex.create()
.get("/", ctx -> ctx.text("hello"))
.start();
```

## Test Implementation Source Code

### Plain Text Test
* [Plain test source](src/main/java/benchmark/Main.java)

### JSON Encoding Test
* [JSON test source](src/main/java/benchmark/Main.java)

### Single Query Test
* [Single query test source](src/main/java/benchmark/DatabaseController.java)

### Multiple Queries Test
* [Multiple queries test source](src/main/java/benchmark/DatabaseController.java)

### Database Update Test
* [Database update test source](src/main/java/benchmark/DatabaseController.java)

### Fortunes Test
* [Fortunes test source](src/main/java/benchmark/DatabaseController.java)

## Test URLs
### JSON

http://localhost:8080/json

### PLAINTEXT

http://localhost:8080/plaintext

### DB

http://localhost:8080/db

### QUERY

http://localhost:8080/queries?queries=

### UPDATE

http://localhost:8080/updates?queries=

### FORTUNES

http://localhost:8080/fortunes

## build

### java's httpserver impl

`mvn clean package`

### robaho's httpserver impl

`mvn clean package -P robaho`

### jetty's httpserver impl

`mvn clean package -P jetty`

## run

`java -p ./target/modules/ -m avaje.techempower`
8 changes: 8 additions & 0 deletions frameworks/Java/avaje-jex/avaje-jex-jetty.dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
FROM maven:3.9.9-eclipse-temurin-24 AS build
WORKDIR /avaje-jex
COPY pom.xml pom.xml
COPY src src
RUN mvn package -q -P jetty
EXPOSE 8080

CMD ["java", "-XX:+UseNUMA", "-XX:+UseParallelGC", "-p", "./target/modules/", "-m", "avaje.techempower"]
8 changes: 8 additions & 0 deletions frameworks/Java/avaje-jex/avaje-jex-robaho.dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
FROM maven:3.9.9-eclipse-temurin-24 AS build
WORKDIR /avaje-jex
COPY pom.xml pom.xml
COPY src src
RUN mvn package -q -P robaho
EXPOSE 8080

CMD ["java", "-XX:+UseNUMA", "-XX:+UseParallelGC", "-p", "./target/modules/", "-m", "avaje.techempower"]
8 changes: 8 additions & 0 deletions frameworks/Java/avaje-jex/avaje-jex.dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
FROM maven:3.9.9-eclipse-temurin-24 AS build
WORKDIR /avaje-jex
COPY pom.xml pom.xml
COPY src src
RUN mvn package -q
EXPOSE 8080

CMD ["java", "-XX:+UseNUMA", "-XX:+UseParallelGC", "-p", "./target/modules/", "-m", "avaje.techempower"]
76 changes: 76 additions & 0 deletions frameworks/Java/avaje-jex/benchmark_config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
{
"framework": "avaje-jex",
"tests": [
{
"default": {
"json_url": "/json",
"plaintext_url": "/plaintext",
"db_url": "/db",
"query_url": "/queries?queries=",
"fortune_url": "/fortunes",
"update_url": "/updates?queries=",
"port": 8080,
"approach": "Realistic",
"classification": "Micro",
"framework": "avaje-jex",
"language": "Java",
"flavor": "None",
"platform": "httpserver",
"database": "Postgres",
"database_os": "Linux",
"orm": "Raw",
"webserver": "None",
"os": "Linux",
"notes": "avaje-jex using jdk.httpserver",
"display_name": "avaje-jex",
"versus": "httpserver"
},
"robaho": {
"json_url": "/json",
"plaintext_url": "/plaintext",
"db_url": "/db",
"query_url": "/queries?queries=",
"fortune_url": "/fortunes",
"update_url": "/updates?queries=",
"port": 8080,
"approach": "Realistic",
"classification": "Micro",
"framework": "avaje-jex",
"language": "Java",
"flavor": "None",
"platform": "robaho",
"database": "Postgres",
"database_os": "Linux",
"orm": "Raw",
"webserver": "None",
"os": "Linux",
"notes": "avaje-jex using robaho's httpserver",
"display_name": "avaje-jex-robaho",
"versus": "robaho-httpserver"
},
"jetty": {
"json_url": "/json",
"plaintext_url": "/plaintext",
"db_url": "/db",
"query_url": "/queries?queries=",
"fortune_url": "/fortunes",
"update_url": "/updates?queries=",
"port": 8080,
"approach": "Realistic",
"classification": "Micro",
"framework": "avaje-jex",
"language": "Java",
"flavor": "None",
"platform": "Jetty",
"database": "Postgres",
"database_os": "Linux",
"orm": "Raw",
"webserver": "None",
"os": "Linux",
"notes": "avaje-jex using Jetty",
"display_name": "avaje-jex-jetty",
"versus": "jetty"
}
}
]
}
53 changes: 53 additions & 0 deletions frameworks/Java/avaje-jex/config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
[framework]
name = "avaje-jex"

[main]
urls.plaintext = "/plaintext"
urls.json = "/json"
urls.db = "/db"
urls.query = "/queries?queries="
urls.update = "/updates?queries="
urls.fortune = "/fortunes"
approach = "Realistic"
classification = "Micro"
database = "Postgres"
database_os = "Linux"
os = "Linux"
orm = "Raw"
platform = "jdk-httpserver"
webserver = "None"
versus = "httpserver"

[robaho]
urls.plaintext = "/plaintext"
urls.json = "/json"
urls.db = "/db"
urls.query = "/queries?queries="
urls.update = "/updates?queries="
urls.fortune = "/fortunes"
approach = "Realistic"
classification = "Micro"
database = "Postgres"
database_os = "Linux"
os = "Linux"
orm = "Raw"
platform = "robaho-httpserver"
webserver = "None"
versus = "robaho-httpserver"

[jetty]
urls.plaintext = "/plaintext"
urls.json = "/json"
urls.db = "/db"
urls.query = "/queries?queries="
urls.update = "/updates?queries="
urls.fortune = "/fortunes"
approach = "Realistic"
classification = "Micro"
database = "Postgres"
database_os = "Linux"
os = "Linux"
orm = "Raw"
platform = "Jetty"
webserver = "None"
versus = "jetty"
Loading
Loading