فهرست منبع

Bump to vert.x 4.1.5 (#6840)

* Bump to vert.x 4.1.4

Signed-off-by: Paulo Lopes <[email protected]>

* Fix template engine version misalign

Signed-off-by: Paulo Lopes <[email protected]>

* Removing susom as it's not compatible with vert.x 4

Signed-off-by: Paulo Lopes <[email protected]>

* Removing mongo as performance wise it's not suitable and isn't maintained

Signed-off-by: Paulo Lopes <[email protected]>
Paulo Lopes 3 سال پیش
والد
کامیت
2cebf97e4e

+ 4 - 46
frameworks/Java/vertx-web/benchmark_config.json

@@ -20,32 +20,11 @@
       "notes": "",
       "versus": "vertx"
     },
-    "mongodb": {
-      "db_url": "/mongo/db",
-      "query_url": "/mongo/queries?queries=",
-      "fortune_url": "/mongo/fortunes",
-      "update_url": "/mongo/update?queries=",
-      "port": 8080,
-      "approach": "Realistic",
-      "classification": "Micro",
-      "database": "MongoDB",
-      "framework": "vertx-web",
-      "language": "Java",
-      "flavor": "None",
-      "orm": "Raw",
-      "platform": "Vert.x",
-      "webserver": "None",
-      "os": "Linux",
-      "database_os": "Linux",
-      "display_name": "vertx-web-mongodb",
-      "notes": "",
-      "versus": ""
-    },
     "postgres": {
-      "db_url": "/psql/db",
-      "query_url": "/psql/queries?queries=",
-      "fortune_url": "/psql/fortunes",
-      "update_url": "/psql/update?queries=",
+      "db_url": "/db",
+      "query_url": "/queries?queries=",
+      "fortune_url": "/fortunes",
+      "update_url": "/update?queries=",
       "port": 8080,
       "approach": "Realistic",
       "classification": "Micro",
@@ -61,27 +40,6 @@
       "display_name": "vertx-web-postgres",
       "notes": "",
       "versus": ""
-    },
-    "susom-postgres": {
-      "db_url": "/dbpsql/db",
-      "query_url": "/dbpsql/queries?queries=",
-      "fortune_url": "/dbpsql/fortunes",
-      "update_url": "/dbpsql/update?queries=",
-      "port": 8080,
-      "approach": "Realistic",
-      "classification": "Micro",
-      "database": "Postgres",
-      "framework": "vertx-web",
-      "language": "Java",
-      "flavor": "None",
-      "orm": "Raw",
-      "platform": "Vert.x",
-      "webserver": "None",
-      "os": "Linux",
-      "database_os": "Linux",
-      "display_name": "vertx-web-susom",
-      "notes": "",
-      "versus": ""
     }
   }]
 }

+ 4 - 34
frameworks/Java/vertx-web/config.toml

@@ -14,41 +14,11 @@ platform = "Vert.x"
 webserver = "None"
 versus = "vertx"
 
-[mongodb]
-urls.db = "/mongo/db"
-urls.query = "/mongo/queries?queries="
-urls.update = "/mongo/update?queries="
-urls.fortune = "/mongo/fortunes"
-approach = "Realistic"
-classification = "Micro"
-database = "MongoDB"
-database_os = "Linux"
-os = "Linux"
-orm = "Raw"
-platform = "Vert.x"
-webserver = "None"
-versus = ""
-
 [postgres]
-urls.db = "/psql/db"
-urls.query = "/psql/queries?queries="
-urls.update = "/psql/update?queries="
-urls.fortune = "/psql/fortunes"
-approach = "Realistic"
-classification = "Micro"
-database = "Postgres"
-database_os = "Linux"
-os = "Linux"
-orm = "Raw"
-platform = "Vert.x"
-webserver = "None"
-versus = ""
-
-[susom-postgres]
-urls.db = "/dbpsql/db"
-urls.query = "/dbpsql/queries?queries="
-urls.update = "/dbpsql/update?queries="
-urls.fortune = "/dbpsql/fortunes"
+urls.db = "/db"
+urls.query = "/queries?queries="
+urls.update = "/update?queries="
+urls.fortune = "/fortunes"
 approach = "Realistic"
 classification = "Micro"
 database = "Postgres"

+ 8 - 25
frameworks/Java/vertx-web/pom.xml

@@ -7,12 +7,12 @@
 
   <groupId>io.vertx</groupId>
   <artifactId>vertx-web-benchmark</artifactId>
-  <version>3.9.2</version>
+  <version>4.1.5</version>
 
   <properties>
     <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-    <maven.compiler.source>8</maven.compiler.source>
-    <maven.compiler.target>8</maven.compiler.target>
+    <maven.compiler.source>11</maven.compiler.source>
+    <maven.compiler.target>11</maven.compiler.target>
     <!-- the main class -->
     <main.verticle>io.vertx.benchmark.App</main.verticle>
   </properties>
@@ -36,13 +36,14 @@
     </dependency>
 
     <dependency>
-      <groupId>io.vertx</groupId>
-      <artifactId>vertx-web</artifactId>
+      <groupId>com.fasterxml.jackson.module</groupId>
+      <artifactId>jackson-module-blackbird</artifactId>
+      <version>2.12.4</version>
     </dependency>
 
     <dependency>
       <groupId>io.vertx</groupId>
-      <artifactId>vertx-mongo-client</artifactId>
+      <artifactId>vertx-web</artifactId>
     </dependency>
 
     <dependency>
@@ -61,24 +62,6 @@
       <classifier>linux-x86_64</classifier>
     </dependency>
 
-    <dependency>
-      <groupId>com.github.susom</groupId>
-      <artifactId>database</artifactId>
-      <version>3.0</version>
-    </dependency>
-
-    <dependency>
-      <groupId>org.postgresql</groupId>
-      <artifactId>postgresql</artifactId>
-      <version>42.2.5</version>
-    </dependency>
-
-    <dependency>
-      <groupId>javax.xml.bind</groupId>
-      <artifactId>jaxb-api</artifactId>
-      <version>2.2.12</version>
-    </dependency>
-
   </dependencies>
 
   <build>
@@ -87,7 +70,7 @@
       <plugin>
         <groupId>com.fizzed</groupId>
         <artifactId>rocker-maven-plugin</artifactId>
-        <version>0.24.0</version>
+        <version>1.3.0</version>
         <executions>
           <execution>
             <id>generate-rocker-templates</id>

+ 15 - 316
frameworks/Java/vertx-web/src/main/java/io/vertx/benchmark/App.java

@@ -1,10 +1,6 @@
 package io.vertx.benchmark;
 
-import com.github.susom.database.Config;
-import com.github.susom.database.ConfigFrom;
-import com.github.susom.database.DatabaseProviderVertx;
-import com.github.susom.database.DatabaseProviderVertx.Builder;
-import com.github.susom.database.SqlInsert;
+import com.fasterxml.jackson.module.blackbird.BlackbirdModule;
 import io.vertx.benchmark.model.Fortune;
 import io.vertx.benchmark.model.Message;
 import io.vertx.benchmark.model.World;
@@ -12,7 +8,7 @@ import io.vertx.core.*;
 import io.vertx.core.http.HttpHeaders;
 import io.vertx.core.json.Json;
 import io.vertx.core.json.JsonObject;
-import io.vertx.ext.mongo.MongoClient;
+import io.vertx.core.json.jackson.DatabindCodec;
 import io.vertx.ext.web.Router;
 import io.vertx.ext.web.RoutingContext;
 import io.vertx.ext.web.templ.rocker.RockerTemplateEngine;
@@ -28,155 +24,9 @@ import static io.vertx.benchmark.Helper.randomWorld;
 
 public class App extends AbstractVerticle {
 
-  /**
-   * MongoDB implementation
-   */
-  private final class MongoDBBenchmark {
-    private final JsonObject FIELDS = new JsonObject().put("_id", 0);
-
-    private final MongoClient database;
-    // In order to use a template we first need to create an engine
-    private final RockerTemplateEngine engine;
-
-    public MongoDBBenchmark(Vertx vertx, JsonObject config) {
-      final JsonObject mongoConfig = config.copy();
-
-      // mongo is configured without credentials
-      mongoConfig.remove("username");
-      mongoConfig.remove("password");
-
-      this.database = MongoClient.createShared(vertx, mongoConfig);
-      this.engine = RockerTemplateEngine.create();
-    }
-
-    public final void dbHandler(final RoutingContext ctx) {
-      database.findOne("world", new JsonObject().put("_id", randomWorld()), FIELDS, findOne -> {
-        if (findOne.failed()) {
-          ctx.fail(findOne.cause());
-          return;
-        }
-
-        ctx.response()
-            .putHeader(HttpHeaders.SERVER, SERVER)
-            .putHeader(HttpHeaders.DATE, date)
-            .putHeader(HttpHeaders.CONTENT_TYPE, "application/json")
-            .end(Json.encodeToBuffer(new World(findOne.result())));
-      });
-    }
-
-    public final void queriesHandler(final RoutingContext ctx) {
-      final int queries = Helper.getQueries(ctx.request());
-
-      final World[] worlds = new World[queries];
-
-      new Handler<Integer>() {
-        @Override
-        public void handle(Integer idx) {
-          if (idx == queries) {
-            // stop condition
-            ctx.response()
-                .putHeader(HttpHeaders.SERVER, SERVER)
-                .putHeader(HttpHeaders.DATE, date)
-                .putHeader(HttpHeaders.CONTENT_TYPE, "application/json")
-                .end(Json.encodeToBuffer(worlds));
-
-          } else {
-
-            final Handler<Integer> self = this;
-
-            database.findOne("world", new JsonObject().put("_id", randomWorld()), FIELDS, findOne -> {
-              if (findOne.failed()) {
-                ctx.fail(findOne.cause());
-                return;
-              }
-
-              worlds[idx] = new World(findOne.result());
-              self.handle(idx + 1);
-            });
-          }
-        }
-      }.handle(0);
-    }
-
-    public final void fortunesHandler(final RoutingContext ctx) {
-      final List<Fortune> fortunes = new LinkedList<>();
-
-      database.find("fortune", new JsonObject(), find -> {
-        if (find.failed()) {
-          ctx.fail(find.cause());
-          return;
-        }
-
-        for (JsonObject document : find.result()) {
-          fortunes.add(new Fortune(document));
-        }
-
-        fortunes.add(new Fortune(0, "Additional fortune added at request time."));
-        Collections.sort(fortunes);
-
-        ctx.put("fortunes", fortunes);
-
-        // and now delegate to the engine to render it.
-        engine.render(ctx.data(), "templates/Fortunes.rocker.html", res -> {
-          if (res.succeeded()) {
-            ctx.response()
-                .putHeader(HttpHeaders.SERVER, SERVER)
-                .putHeader(HttpHeaders.DATE, date)
-                .putHeader(HttpHeaders.CONTENT_TYPE, "text/html; charset=UTF-8")
-                .end(res.result());
-          } else {
-            ctx.fail(res.cause());
-          }
-        });
-      });
-    }
-
-    public final void updateHandler(final RoutingContext ctx) {
-      final int queries = Helper.getQueries(ctx.request());
-      final World[] worlds = new World[queries];
-
-      new Handler<Integer>() {
-        @Override
-        public void handle(Integer idx) {
-          if (idx == queries) {
-            // stop condition
-            ctx.response()
-                .putHeader(HttpHeaders.SERVER, SERVER)
-                .putHeader(HttpHeaders.DATE, date)
-                .putHeader(HttpHeaders.CONTENT_TYPE, "application/json")
-                .end(Json.encodeToBuffer(worlds));
-
-          } else {
-
-            final Handler<Integer> self = this;
-
-            final int id = randomWorld();
-
-            final JsonObject query = new JsonObject().put("_id", id);
-
-            database.findOne("world", query, FIELDS, findOne -> {
-              if (findOne.failed()) {
-                ctx.fail(findOne.cause());
-                return;
-              }
-
-              final int newRandomNumber = randomWorld();
-
-              database.update("world", query, new JsonObject().put("$set", new JsonObject().put("randomNumber", newRandomNumber)), update -> {
-                if (update.failed()) {
-                  ctx.fail(update.cause());
-                  return;
-                }
-
-                worlds[idx] = new World(id, newRandomNumber);
-                self.handle(idx + 1);
-              });
-            });
-
-          }
-        }
-      }.handle(0);
-    }
+  static {
+    DatabindCodec.mapper().registerModule(new BlackbirdModule());
+    DatabindCodec.prettyMapper().registerModule(new BlackbirdModule());
   }
 
   /**
@@ -200,13 +50,14 @@ public class App extends AbstractVerticle {
         .setPort(config.getInteger("port", 5432))
         .setUser(config.getString("username"))
         .setPassword(config.getString("password"))
-        .setDatabase(config.getString("database"));
+        .setDatabase(config.getString("database"))
+        .setPipeliningLimit(100_000); // Large pipelining means less flushing and we use a single connection anyway;
 
       client = PgPool.pool(vertx, options, new PoolOptions().setMaxSize(4));
       this.engine = RockerTemplateEngine.create();
     }
 
-    public final void dbHandler(final RoutingContext ctx) {
+    public void dbHandler(final RoutingContext ctx) {
       client
         .preparedQuery(SELECT_WORLD)
         .execute(Tuple.of(randomWorld()), res -> {
@@ -231,7 +82,7 @@ public class App extends AbstractVerticle {
       });
     }
 
-    public final void queriesHandler(final RoutingContext ctx) {
+    public void queriesHandler(final RoutingContext ctx) {
 
       final int queries = Helper.getQueries(ctx.request());
       final World[] worlds = new World[queries];
@@ -264,7 +115,7 @@ public class App extends AbstractVerticle {
       }
     }
 
-    public final void fortunesHandler(final RoutingContext ctx) {
+    public void fortunesHandler(final RoutingContext ctx) {
 
       client.preparedQuery(SELECT_FORTUNE).execute(ar -> {
           if (ar.succeeded()) {
@@ -304,7 +155,7 @@ public class App extends AbstractVerticle {
         });
     }
 
-    public final void updateHandler(final RoutingContext ctx) {
+    public void updateHandler(final RoutingContext ctx) {
 
          final int queries = Helper.getQueries(ctx.request());
          final World[] worlds = new World[queries];
@@ -351,148 +202,6 @@ public class App extends AbstractVerticle {
     }
   }
 
-  /**
-   * Implementation using com.github.susom:database library and standard JDBC driver.
-   */
-  private final class DatabaseSqlBenchmark {
-    private final Builder dbBuilder;
-
-    // In order to use a template we first need to create an engine
-    private final RockerTemplateEngine engine;
-
-    DatabaseSqlBenchmark(Vertx vertx, JsonObject jsonConfig) {
-      Config config = ConfigFrom.firstOf().custom(jsonConfig::getString)
-          .rename("username", "database.user")
-          .rename("password", "database.password")
-          .rename("maxPoolSize", "database.pool.size")
-          .value("database.url", "jdbc:postgresql://" + jsonConfig.getString("host") + "/" + jsonConfig.getString("database"))
-          .get();
-      dbBuilder = DatabaseProviderVertx.pooledBuilder(vertx, config);
-      engine = RockerTemplateEngine.create();
-    }
-
-    void dbHandler(final RoutingContext ctx) {
-      dbBuilder.transactAsync(dbs ->
-        dbs.get().toSelect("SELECT id, randomnumber from WORLD where id = ?")
-            .argInteger(randomWorld())
-            .queryFirstOrNull(row -> new World(row.getIntegerOrZero(), row.getIntegerOrZero()))
-      , call -> {
-        if (call.succeeded()) {
-          if (call.result() == null) {
-            ctx.fail(404);
-          } else {
-            ctx.response()
-                .putHeader(HttpHeaders.SERVER, SERVER)
-                .putHeader(HttpHeaders.DATE, date)
-                .putHeader(HttpHeaders.CONTENT_TYPE, "application/json")
-                .end(Json.encode(call.result()));
-          }
-        } else {
-          ctx.fail(call.cause());
-        }
-      });
-    }
-
-    void queriesHandler(final RoutingContext ctx) {
-      int queries = Helper.getQueries(ctx.request());
-
-      dbBuilder.transactAsync(dbs -> {
-        List<World> worlds = new ArrayList<>();
-        for (int i = 1; i <= queries; i++) {
-          dbs.get()
-              .toSelect("SELECT id, randomnumber from WORLD where id = ?")
-              .argInteger(randomWorld())
-              .queryFirstOrNull(row -> worlds.add(new World(row.getIntegerOrZero(), row.getIntegerOrZero())));
-        }
-        return worlds;
-      }, call -> {
-        if (call.succeeded()) {
-          if (call.result() == null) {
-            ctx.fail(404);
-          } else {
-            ctx.response()
-                .putHeader(HttpHeaders.SERVER, SERVER)
-                .putHeader(HttpHeaders.DATE, date)
-                .putHeader(HttpHeaders.CONTENT_TYPE, "application/json")
-                .end(Json.encodeToBuffer(call.result()));
-          }
-        } else {
-          ctx.fail(call.cause());
-        }
-      });
-    }
-
-    final void fortunesHandler(final RoutingContext ctx) {
-      dbBuilder.transactAsync(dbs -> {
-        List<Fortune> fortunes = dbs.get()
-            .toSelect("SELECT id, message from FORTUNE")
-            .queryMany(row -> new Fortune(row.getIntegerOrZero(), row.getStringOrEmpty()));
-        fortunes.add(new Fortune(0, "Additional fortune added at request time."));
-        Collections.sort(fortunes);
-        return fortunes;
-      }, call -> {
-        if (call.succeeded()) {
-          if (call.result() == null || call.result().isEmpty()) {
-            ctx.fail(404);
-          } else {
-            ctx.put("fortunes", call.result());
-            engine.render(ctx.data(), "templates/Fortunes.rocker.html", res -> {
-              if (res.succeeded()) {
-                ctx.response()
-                    .putHeader(HttpHeaders.SERVER, SERVER)
-                    .putHeader(HttpHeaders.DATE, date)
-                    .putHeader(HttpHeaders.CONTENT_TYPE, "text/html; charset=UTF-8")
-                    .end(res.result());
-              } else {
-                ctx.fail(res.cause());
-              }
-            });
-          }
-        } else {
-          ctx.fail(call.cause());
-        }
-      });
-    }
-
-    void updateHandler(final RoutingContext ctx) {
-      int queries = Helper.getQueries(ctx.request());
-
-      dbBuilder.transactAsync(dbs -> {
-        List<World> worlds = new ArrayList<>();
-        // Haven't implemented batching yet on toUpdate(), so hijack toInsert() as work-around
-        SqlInsert batchUpdate = dbs.get().toInsert("UPDATE WORLD SET randomnumber = ? WHERE id = ?");
-        for (int i = 1; i <= queries; i++) {
-          World oldWorld = dbs.get()
-              .toSelect("SELECT id, randomnumber from WORLD where id = ?")
-              .argInteger(randomWorld())
-              .queryFirstOrNull(row -> new World(row.getIntegerOrZero(), row.getIntegerOrZero()));
-          if (oldWorld == null) {
-            return null;
-          }
-          World newWorld = new World(oldWorld.getId(), randomWorld());
-          worlds.add(newWorld);
-          batchUpdate.argInteger(newWorld.getRandomNumber()).argInteger(newWorld.getId()).batch();
-        }
-        batchUpdate.insertBatchUnchecked();
-        return worlds;
-      }, call -> {
-        if (call.succeeded()) {
-          if (call.result() == null) {
-            ctx.fail(404);
-          } else {
-            ctx.response()
-                .putHeader(HttpHeaders.SERVER, SERVER)
-                .putHeader(HttpHeaders.DATE, date)
-                .putHeader(HttpHeaders.CONTENT_TYPE, "application/json")
-                .end(Json.encodeToBuffer(call.result()));
-          }
-        } else {
-          ctx.fail(call.cause());
-        }
-      });
-    }
-  }
-
   private static final String SERVER = "vertx-web";
   private String date;
 
@@ -504,9 +213,7 @@ public class App extends AbstractVerticle {
     // refresh the value as a periodic task
     vertx.setPeriodic(1000, handler -> date = DateTimeFormatter.RFC_1123_DATE_TIME.format(ZonedDateTime.now()));
 
-    final MongoDBBenchmark mongoDBBenchmark = new MongoDBBenchmark(vertx, config());
     final PgClientBenchmark pgClientBenchmark= new PgClientBenchmark(vertx, config());
-    final DatabaseSqlBenchmark databaseSqlBenchmark = new DatabaseSqlBenchmark(vertx, config());
 
     /*
      * This test exercises the framework fundamentals including keep-alive support, request routing, request header
@@ -524,35 +231,27 @@ public class App extends AbstractVerticle {
      * This test exercises the framework's object-relational mapper (ORM), random number generator, database driver,
      * and database connection pool.
      */
-    app.get("/mongo/db").handler(mongoDBBenchmark::dbHandler);
-    app.get("/psql/db").handler(pgClientBenchmark::dbHandler);
-    app.get("/dbpsql/db").handler(databaseSqlBenchmark::dbHandler);
+    app.get("/db").handler(pgClientBenchmark::dbHandler);
 
     /*
      * This test is a variation of Test #2 and also uses the World table. Multiple rows are fetched to more dramatically
      * punish the database driver and connection pool. At the highest queries-per-request tested (20), this test
      * demonstrates all frameworks' convergence toward zero requests-per-second as database activity increases.
      */
-    app.get("/mongo/queries").handler(mongoDBBenchmark::queriesHandler);
-    app.get("/psql/queries").handler(pgClientBenchmark::queriesHandler);
-    app.get("/dbpsql/queries").handler(databaseSqlBenchmark::queriesHandler);
+    app.get("/queries").handler(pgClientBenchmark::queriesHandler);
 
     /*
      * This test exercises the ORM, database connectivity, dynamic-size collections, sorting, server-side templates,
      * XSS countermeasures, and character encoding.
      */
-    app.get("/mongo/fortunes").handler(mongoDBBenchmark::fortunesHandler);
-    app.get("/psql/fortunes").handler(pgClientBenchmark::fortunesHandler);
-    app.get("/dbpsql/fortunes").handler(databaseSqlBenchmark::fortunesHandler);
+    app.get("/fortunes").handler(pgClientBenchmark::fortunesHandler);
 
     /*
      * This test is a variation of Test #3 that exercises the ORM's persistence of objects and the database driver's
      * performance at running UPDATE statements or similar. The spirit of this test is to exercise a variable number of
      * read-then-write style database operations.
      */
-    app.route("/mongo/update").handler(mongoDBBenchmark::updateHandler);
-    app.route("/psql/update").handler(pgClientBenchmark::updateHandler);
-    app.route("/dbpsql/update").handler(databaseSqlBenchmark::updateHandler);
+    app.route("/update").handler(pgClientBenchmark::updateHandler);
 
     /*
      * This test is an exercise of the request-routing fundamentals only, designed to demonstrate the capacity of

+ 4 - 1
frameworks/Java/vertx-web/src/main/java/io/vertx/benchmark/Helper.java

@@ -2,10 +2,13 @@ package io.vertx.benchmark;
 
 import io.vertx.core.http.HttpServerRequest;
 
+import java.util.SplittableRandom;
 import java.util.concurrent.ThreadLocalRandom;
 
 public final class Helper {
 
+  private static final SplittableRandom RANDOM = new SplittableRandom();
+
   private Helper() {
   }
 
@@ -37,6 +40,6 @@ public final class Helper {
    * @return a random world number
    */
   static int randomWorld() {
-    return 1 + ThreadLocalRandom.current().nextInt(10000);
+    return 1 + RANDOM.nextInt(10000);
   }
 }

+ 0 - 30
frameworks/Java/vertx-web/vertx-web-mongodb.dockerfile

@@ -1,30 +0,0 @@
-FROM maven:3.6.1-jdk-11-slim as maven
-WORKDIR /vertx-web
-COPY scripts scripts
-COPY src src
-COPY pom.xml pom.xml
-RUN mvn package -q
-
-EXPOSE 8080
-
-CMD java \
-    -server                                           \
-    -XX:+UseNUMA                                      \
-    -XX:+UseParallelGC                                \
-    -XX:+AggressiveOpts                               \
-    -Dvertx.disableMetrics=true                       \
-    -Dvertx.disableH2c=true                           \
-    -Dvertx.disableWebsockets=true                    \
-    -Dvertx.flashPolicyHandler=false                  \
-    -Dvertx.threadChecks=false                        \
-    -Dvertx.disableContextTimings=true                \
-    -Dvertx.disableTCCL=true                          \
-    -Dvertx.disableHttpHeadersValidation=true         \
-    -jar                                              \
-    target/vertx-web-benchmark-3.9.2-fat.jar          \
-    --instances                                       \
-    `grep --count ^processor /proc/cpuinfo`           \
-    --conf                                            \
-    src/main/conf/config.json                         \
-    --options                                         \
-    src/main/conf/vertx.json

+ 4 - 1
frameworks/Java/vertx-web/vertx-web-postgres.dockerfile

@@ -20,8 +20,11 @@ CMD java \
     -Dvertx.disableContextTimings=true                \
     -Dvertx.disableTCCL=true                          \
     -Dvertx.disableHttpHeadersValidation=true         \
+    -Dvertx.eventLoopPoolSize=$((`grep --count ^processor /proc/cpuinfo`)) \
+    -Dio.netty.buffer.checkBounds=false               \
+    -Dio.netty.buffer.checkAccessible=false           \
     -jar                                              \
-    target/vertx-web-benchmark-3.9.2-fat.jar          \
+    target/vertx-web-benchmark-4.1.5-fat.jar          \
     --instances                                       \
     `grep --count ^processor /proc/cpuinfo`           \
     --conf                                            \

+ 0 - 30
frameworks/Java/vertx-web/vertx-web-susom-postgres.dockerfile

@@ -1,30 +0,0 @@
-FROM maven:3.6.1-jdk-11-slim as maven
-WORKDIR /vertx-web
-COPY scripts scripts
-COPY src src
-COPY pom.xml pom.xml
-RUN mvn package -q
-
-EXPOSE 8080
-
-CMD java \
-    -server                                           \
-    -XX:+UseNUMA                                      \
-    -XX:+UseParallelGC                                \
-    -XX:+AggressiveOpts                               \
-    -Dvertx.disableMetrics=true                       \
-    -Dvertx.disableH2c=true                           \
-    -Dvertx.disableWebsockets=true                    \
-    -Dvertx.flashPolicyHandler=false                  \
-    -Dvertx.threadChecks=false                        \
-    -Dvertx.disableContextTimings=true                \
-    -Dvertx.disableTCCL=true                          \
-    -Dvertx.disableHttpHeadersValidation=true         \
-    -jar                                              \
-    target/vertx-web-benchmark-3.9.2-fat.jar          \
-    --instances                                       \
-    `grep --count ^processor /proc/cpuinfo`           \
-    --conf                                            \
-    src/main/conf/config.json                         \
-    --options                                         \
-    src/main/conf/vertx.json

+ 4 - 1
frameworks/Java/vertx-web/vertx-web.dockerfile

@@ -20,8 +20,11 @@ CMD java \
     -Dvertx.disableContextTimings=true                \
     -Dvertx.disableTCCL=true                          \
     -Dvertx.disableHttpHeadersValidation=true         \
+    -Dvertx.eventLoopPoolSize=$((`grep --count ^processor /proc/cpuinfo`)) \
+    -Dio.netty.buffer.checkBounds=false               \
+    -Dio.netty.buffer.checkAccessible=false           \
     -jar                                              \
-    target/vertx-web-benchmark-3.9.2-fat.jar          \
+    target/vertx-web-benchmark-4.1.5-fat.jar          \
     --instances                                       \
     `grep --count ^processor /proc/cpuinfo`           \
     --conf                                            \