Skip to content

Commit e43e227

Browse files
author
jj
committed
merge httpserver and httpserver-robaho into single project
1 parent 04ca1da commit e43e227

File tree

9 files changed

+198
-102
lines changed

9 files changed

+198
-102
lines changed
Lines changed: 0 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -1,63 +1,5 @@
11
{
22
"framework": "httpserver-robaho",
33
"tests": [
4-
{
5-
"default": {
6-
"json_url": "/json",
7-
"plaintext_url": "/plaintext",
8-
"port": 8080,
9-
"approach": "Realistic",
10-
"classification": "Platform",
11-
"database": "None",
12-
"framework": "None",
13-
"language": "Java",
14-
"flavor": "None",
15-
"orm": "Raw",
16-
"platform": "httpserver",
17-
"webserver": "None",
18-
"os": "Linux",
19-
"database_os": "Linux",
20-
"display_name": "httpserver-robaho",
21-
"notes": "",
22-
"versus": ""
23-
},
24-
"postgres": {
25-
"fortune_url": "/fortunes",
26-
"port": 8080,
27-
"approach": "Realistic",
28-
"classification": "Platform",
29-
"database": "Postgres",
30-
"framework": "None",
31-
"language": "Java",
32-
"flavor": "None",
33-
"orm": "Raw",
34-
"platform": "httpserver",
35-
"webserver": "None",
36-
"os": "Linux",
37-
"database_os": "Linux",
38-
"display_name": "httpserver-robaho-postgres",
39-
"notes": "",
40-
"versus": ""
41-
},
42-
"graalvm": {
43-
"json_url": "/json",
44-
"plaintext_url": "/plaintext",
45-
"port": 8080,
46-
"approach": "Realistic",
47-
"classification": "Platform",
48-
"database": "None",
49-
"framework": "None",
50-
"language": "Java",
51-
"flavor": "None",
52-
"orm": "Raw",
53-
"platform": "httpserver",
54-
"webserver": "None",
55-
"os": "Linux",
56-
"database_os": "Linux",
57-
"display_name": "httpserver-robaho-graalvm",
58-
"notes": "",
59-
"versus": "httpserver-robaho"
60-
}
61-
}
624
]
635
}

frameworks/Java/httpserver/benchmark_config.json

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,64 @@
5858
"notes": "",
5959
"versus": "httpserver"
6060
}
61+
},
62+
{
63+
"robaho": {
64+
"json_url": "/json",
65+
"plaintext_url": "/plaintext",
66+
"port": 8080,
67+
"approach": "Realistic",
68+
"classification": "Platform",
69+
"database": "None",
70+
"framework": "None",
71+
"language": "Java",
72+
"flavor": "None",
73+
"orm": "Raw",
74+
"platform": "httpserver",
75+
"webserver": "None",
76+
"os": "Linux",
77+
"database_os": "Linux",
78+
"display_name": "httpserver-robaho",
79+
"notes": "",
80+
"versus": ""
81+
},
82+
"robaho-postgres": {
83+
"fortune_url": "/fortunes",
84+
"port": 8080,
85+
"approach": "Realistic",
86+
"classification": "Platform",
87+
"database": "Postgres",
88+
"framework": "None",
89+
"language": "Java",
90+
"flavor": "None",
91+
"orm": "Raw",
92+
"platform": "httpserver",
93+
"webserver": "None",
94+
"os": "Linux",
95+
"database_os": "Linux",
96+
"display_name": "httpserver-robaho-postgres",
97+
"notes": "",
98+
"versus": ""
99+
},
100+
"robaho-graalvm": {
101+
"json_url": "/json",
102+
"plaintext_url": "/plaintext",
103+
"port": 8080,
104+
"approach": "Realistic",
105+
"classification": "Platform",
106+
"database": "None",
107+
"framework": "None",
108+
"language": "Java",
109+
"flavor": "None",
110+
"orm": "Raw",
111+
"platform": "httpserver",
112+
"webserver": "None",
113+
"os": "Linux",
114+
"database_os": "Linux",
115+
"display_name": "httpserver-robaho-graalvm",
116+
"notes": "",
117+
"versus": "httpserver-robaho"
118+
}
61119
}
62120
]
63121
}

frameworks/Java/httpserver/config.toml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,58 @@ orm = "Raw"
2525
platform = "httpserver"
2626
webserver = "None"
2727
versus = ""
28+
29+
30+
[graalvm]
31+
urls.plaintext = "/plaintext"
32+
urls.json = "/json"
33+
approach = "Realistic"
34+
classification = "Platform"
35+
database = "None"
36+
database_os = "Linux"
37+
os = "Linux"
38+
orm = "Raw"
39+
platform = "httpserver"
40+
webserver = "None"
41+
versus = "httpserver"
42+
43+
44+
[robaho]
45+
urls.plaintext = "/plaintext"
46+
urls.json = "/json"
47+
approach = "Realistic"
48+
classification = "Platform"
49+
database = "None"
50+
database_os = "Linux"
51+
os = "Linux"
52+
orm = "Raw"
53+
platform = "httpserver"
54+
webserver = "None"
55+
versus = "httpserver"
56+
57+
58+
[robaho-postgres]
59+
urls.fortune = "/fortunes"
60+
approach = "Realistic"
61+
classification = "Platform"
62+
database = "Postgres"
63+
database_os = "Linux"
64+
os = "Linux"
65+
orm = "Raw"
66+
platform = "httpserver"
67+
webserver = "None"
68+
versus = ""
69+
70+
71+
[robaho-graalvm]
72+
urls.plaintext = "/plaintext"
73+
urls.json = "/json"
74+
approach = "Realistic"
75+
classification = "Platform"
76+
database = "None"
77+
database_os = "Linux"
78+
os = "Linux"
79+
orm = "Raw"
80+
platform = "httpserver"
81+
webserver = "None"
82+
versus = "httpserver-robaho"
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
FROM jelastic/maven:3.9.9-openjdk-23.0.1-almalinux-9 as maven
2+
WORKDIR /httpserver-robaho
3+
COPY pom.xml pom.xml
4+
COPY src src
5+
RUN mvn compile -P robaho assembly:single -q
6+
7+
FROM ghcr.io/graalvm/graalvm-community:24
8+
WORKDIR /httpserver-robaho
9+
COPY --from=maven /httpserver-robaho/target/httpserver-1.0-jar-with-dependencies.jar app.jar
10+
11+
EXPOSE 8080
12+
13+
CMD ["java", "-server", "-jar", "app.jar"]
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
FROM jelastic/maven:3.9.9-openjdk-23.0.1-almalinux-9 as maven
2+
WORKDIR /httpserver-robaho
3+
COPY pom.xml pom.xml
4+
COPY src src
5+
RUN mvn compile -P robaho assembly:single -q
6+
7+
FROM openjdk:23-jdk-slim
8+
WORKDIR /httpserver-robaho
9+
COPY --from=maven /httpserver-robaho/target/httpserver-1.0-jar-with-dependencies.jar app.jar
10+
11+
EXPOSE 8080
12+
13+
CMD ["java", "-server", "-jar", "app.jar", "postgres"]
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
FROM jelastic/maven:3.9.9-openjdk-23.0.1-almalinux-9 as maven
2+
WORKDIR /httpserver-robaho
3+
COPY pom.xml pom.xml
4+
COPY src src
5+
RUN mvn compile -P robaho assembly:single -q
6+
7+
FROM openjdk:23-jdk-slim
8+
WORKDIR /httpserver-robaho
9+
COPY --from=maven /httpserver-robaho/target/httpserver-1.0-jar-with-dependencies.jar app.jar
10+
11+
EXPOSE 8080
12+
13+
CMD ["java", "-server", "-jar", "app.jar"]

frameworks/Java/httpserver/pom.xml

Lines changed: 19 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
2-
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
2+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
33

44
<modelVersion>4.0.0</modelVersion>
55

@@ -16,14 +16,9 @@
1616

1717
<dependencies>
1818
<dependency>
19-
<groupId>com.fasterxml.jackson.core</groupId>
20-
<artifactId>jackson-databind</artifactId>
21-
<version>2.16.0</version>
22-
</dependency>
23-
<dependency>
24-
<groupId>com.fasterxml.jackson.module</groupId>
25-
<artifactId>jackson-module-afterburner</artifactId>
26-
<version>2.9.9</version>
19+
<groupId>com.googlecode.json-simple</groupId>
20+
<artifactId>json-simple</artifactId>
21+
<version>1.1.1</version>
2722
</dependency>
2823

2924
<dependency>
@@ -49,6 +44,21 @@
4944
<version>1.8.0-beta4</version>
5045
</dependency>
5146
</dependencies>
47+
<profiles>
48+
<profile>
49+
<id>robaho</id>
50+
<activation>
51+
<activeByDefault>false</activeByDefault>
52+
</activation>
53+
<dependencies>
54+
<dependency>
55+
<groupId>io.github.robaho</groupId>
56+
<artifactId>httpserver</artifactId>
57+
<version>1.0.23</version>
58+
</dependency>
59+
</dependencies>
60+
</profile>
61+
</profiles>
5262

5363
<build>
5464
<plugins>
Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
11
package benchmarks;
22

3-
public class Message {
3+
import java.io.IOException;
4+
import java.io.Writer;
5+
import java.util.Map;
46

5-
private final String message;
7+
import org.json.simple.JSONStreamAware;
8+
import org.json.simple.JSONValue;
69

7-
public Message(String message) {
8-
this.message = message;
9-
}
10+
public record Message(String message) implements JSONStreamAware {
1011

11-
public String getMessage() {
12-
return message;
12+
@Override
13+
public void writeJSONString(Writer out) throws IOException {
14+
JSONValue.writeJSONString(Map.of("message", message), out);
1315
}
14-
1516
}

0 commit comments

Comments
 (0)