Browse Source

Merge branch 'round-14' of https://github.com/TechEmpower/FrameworkBenchmarks into round-14

Keith Newman 9 years ago
parent
commit
6af2e4f7c0

+ 1 - 0
frameworks/Java/undertow-jersey-hikaricp/benchmark_config.json

@@ -7,6 +7,7 @@
       "db_url": "/db?single=true",
       "query_url": "/db?queries=",
       "fortune_url": "/fortunes",
+      "plaintext_url": "/plaintext",
       "port": 8080,
       "approach": "Realistic",
       "classification": "Micro",

+ 1 - 1
frameworks/Java/undertow-jersey-hikaricp/src/main/java/hello/JerseyWebServer.java

@@ -35,7 +35,7 @@ public class JerseyWebServer
     final int dbPort = Integer.parseInt(cmd.getOptionValue("dbport", "3306"));
 
     ResourceConfig config = new ResourceConfig(DbResource.class,
-        FortunesResource.class, JsonResource.class,
+        FortunesResource.class, JsonResource.class, PlaintextResource.class,
         JsonMessageBodyWriter.class, ServerResponseFilter.class, RequestExceptionMapper.class);
 
     config.setProperties(new HashMap<String, Object>()

+ 18 - 0
frameworks/Java/undertow-jersey-hikaricp/src/main/java/hello/PlaintextResource.java

@@ -0,0 +1,18 @@
+package hello;
+
+import javax.inject.*;
+import javax.ws.rs.*;
+import java.util.*;
+
+@Singleton
+@Path("/plaintext")
+public class PlaintextResource
+{
+
+  @GET
+  @Produces("text/plain")
+  public String plaintext()
+  {
+    return "Hello, World!";
+  }
+}