Skip to content

Commit

Permalink
Merge pull request #9555 from jkuhn1/master
Browse files Browse the repository at this point in the history
Inverno upgrade to 1.12.0 + various performance improvements
  • Loading branch information
msmith-techempower authored Jan 20, 2025
2 parents 63e664e + b1928b2 commit ff0bd35
Show file tree
Hide file tree
Showing 13 changed files with 310 additions and 210 deletions.
21 changes: 12 additions & 9 deletions frameworks/Java/inverno/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,23 @@

### Test Type Implementation Source Code

* [JSON](src/main/java/com/techempower/inverno/benchmark/internal/Handler.java)
* [PLAINTEXT](src/main/java/com/techempower/inverno/benchmark/internal/Handler.java)
* [DB](src/main/java/com/techempower/inverno/benchmark/internal/Handler.java)
* [QUERY](src/main/java/com/techempower/inverno/benchmark/internal/Handler.java)
* [CACHED QUERY](src/main/java/com/techempower/inverno/benchmark/internal/Handler.java)
* [UPDATE](src/main/java/com/techempower/inverno/benchmark/internal/Handler.java)
* [FORTUNES](src/main/java/com/techempower/inverno/benchmark/internal/Handler.java)
* [JSON](src/main/java/com/techempower/inverno/benchmark/internal/Controller.java)
* [PLAINTEXT](src/main/java/com/techempower/inverno/benchmark/internal/Controller.java)
* [DB](src/main/java/com/techempower/inverno/benchmark/internal/Controller.java)
* [QUERY](src/main/java/com/techempower/inverno/benchmark/internal/Controller.java)
* [CACHED QUERY](src/main/java/com/techempower/inverno/benchmark/internal/Controller.java)
* [UPDATE](src/main/java/com/techempower/inverno/benchmark/internal/Controller.java)
* [FORTUNES](src/main/java/com/techempower/inverno/benchmark/internal/Controller.java)

## Important Libraries

The tests were run with:
* [Java OpenJDK 16](https://openjdk.java.net/)
* [Inverno 1.4.1](https://inverno.io)
* [Java OpenJDK 21](https://openjdk.java.net/)
* [Inverno 1.12.0](https://inverno.io)
* [DSL-JSON 2.0.2](https://github.com/ngs-doo/dsl-json)

## Test URLs

### JSON

http://localhost:8080/json
Expand Down
3 changes: 1 addition & 2 deletions frameworks/Java/inverno/inverno-postgres.dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
FROM maven:3.9.6-amazoncorretto-21 as maven
FROM maven:3.9.9-eclipse-temurin-21 as maven
WORKDIR /inverno
COPY src src
COPY pom.xml pom.xml
RUN yum -y install binutils
RUN mvn package -q -Pio.inverno.io_uring

EXPOSE 8080
Expand Down
3 changes: 1 addition & 2 deletions frameworks/Java/inverno/inverno.dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
FROM maven:3.9.6-amazoncorretto-21 as maven
FROM maven:3.9.9-eclipse-temurin-21 as maven
WORKDIR /inverno
COPY src src
COPY pom.xml pom.xml
RUN yum -y install binutils
RUN mvn package -q -Pio.inverno.io_uring

EXPOSE 8080
Expand Down
64 changes: 54 additions & 10 deletions frameworks/Java/inverno/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>io.inverno.dist</groupId>
<artifactId>inverno-parent</artifactId>
<version>1.10.0</version>
<version>1.12.0</version>
</parent>
<groupId>com.techempower</groupId>
<artifactId>inverno-benchmark</artifactId>
Expand Down Expand Up @@ -53,6 +53,11 @@
<artifactId>unbescape</artifactId>
<version>1.1.6.RELEASE</version>
</dependency>
<dependency>
<groupId>com.dslplatform</groupId>
<artifactId>dsl-json</artifactId>
<version>2.0.2</version>
</dependency>
<dependency>
<groupId>io.vertx</groupId>
<artifactId>vertx-pg-client</artifactId>
Expand Down Expand Up @@ -82,7 +87,52 @@
<artifactId>log4j-core</artifactId>
</dependency>
</dependencies>


<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<executions>
<execution>
<id>default-compile</id>
<configuration>
<annotationProcessorPaths combine.children="append">
<path>
<groupId>com.dslplatform</groupId>
<artifactId>dsl-json</artifactId>
<version>2.0.2</version>
</path>
</annotationProcessorPaths>
</configuration>
</execution>
</executions>
</plugin>
</plugins>

<pluginManagement>
<plugins>
<plugin>
<groupId>io.inverno.tool</groupId>
<artifactId>inverno-maven-plugin</artifactId>
<configuration>
<moduleOverrides combine.children="append">
<module>
<name>com.dslplatform.dsl.json</name>
<uses>
<use>
<type>com.dslplatform.json.Configuration</type>
</use>
</uses>
</module>
</moduleOverrides>
<vmOptions>-Dlog4j2.simplelogLevel=INFO -Dlog4j2.level=INFO --add-reads com.techempower.inverno.benchmark=com.dslplatform.dsl.json --add-opens com.techempower.inverno.benchmark/com.techempower.inverno.benchmark.model=com.dslplatform.dsl.json</vmOptions>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>

<profiles>
<profile>
<id>io.inverno.epoll</id>
Expand Down Expand Up @@ -110,7 +160,7 @@
<launchers>
<launcher>
<name>inverno-benchmark</name>
<vmOptions>-Xms2g -Xmx2g -server -XX:+UseNUMA -XX:+UseParallelGC -Dlog4j2.level=OFF -Dio.netty.leakDetection.level=disabled -Dio.netty.buffer.checkBounds=false -Dio.netty.buffer.checkAccessible=false -Dvertx.disableHttpHeadersValidation=true -Dvertx.disableMetrics=true -Dvertx.disableH2c=true -Dvertx.disableWebsockets=true -Dvertx.flashPolicyHandler=false -Dvertx.threadChecks=false -Dvertx.disableContextTimings=true -Dvertx.disableTCCL=true --add-modules io.netty.transport.unix.common,io.netty.transport.classes.epoll,io.netty.transport.epoll.linux.x86_64</vmOptions>
<vmOptions>-Xms2g -Xmx2g -server -XX:+UseNUMA -XX:+UseParallelGC -Dlog4j2.level=OFF -Dio.netty.leakDetection.level=disabled -Dio.netty.buffer.checkBounds=false -Dio.netty.buffer.checkAccessible=false -Dvertx.disableHttpHeadersValidation=true -Dvertx.disableMetrics=true -Dvertx.disableH2c=true -Dvertx.disableWebsockets=true -Dvertx.flashPolicyHandler=false -Dvertx.threadChecks=false -Dvertx.disableContextTimings=true -Dvertx.disableTCCL=true --add-modules io.netty.transport.unix.common,io.netty.transport.classes.epoll,io.netty.transport.epoll.linux.x86_64 --add-reads com.techempower.inverno.benchmark=com.dslplatform.dsl.json --add-opens com.techempower.inverno.benchmark/com.techempower.inverno.benchmark.model=com.dslplatform.dsl.json</vmOptions>
</launcher>
</launchers>
<archiveFormats>
Expand All @@ -119,9 +169,6 @@
</configuration>
</execution>
</executions>
<configuration>
<vmOptions>--add-modules io.netty.transport.unix.common,io.netty.transport.classes.epoll,io.netty.transport.epoll.linux.x86_64</vmOptions>
</configuration>
</plugin>
</plugins>
</build>
Expand Down Expand Up @@ -157,7 +204,7 @@
<launchers>
<launcher>
<name>inverno-benchmark</name>
<vmOptions>-Xms2g -Xmx2g -server -XX:+UseNUMA -XX:+UseParallelGC -Dlog4j2.level=OFF -Dio.netty.leakDetection.level=disabled -Dio.netty.buffer.checkBounds=false -Dio.netty.buffer.checkAccessible=false -Dvertx.disableHttpHeadersValidation=true -Dvertx.disableMetrics=true -Dvertx.disableH2c=true -Dvertx.disableWebsockets=true -Dvertx.flashPolicyHandler=false -Dvertx.threadChecks=false -Dvertx.disableContextTimings=true -Dvertx.disableTCCL=true --add-modules io.netty.transport.unix.common,io.netty.incubator.transport.classes.io_uring,io.netty.incubator.transport.io_uring.linux.x86_64</vmOptions>
<vmOptions>-Xms2g -Xmx2g -server -XX:+UseNUMA -XX:+UseParallelGC -Dlog4j2.level=OFF -Dio.netty.leakDetection.level=disabled -Dio.netty.buffer.checkBounds=false -Dio.netty.buffer.checkAccessible=false -Dvertx.disableHttpHeadersValidation=true -Dvertx.disableMetrics=true -Dvertx.disableH2c=true -Dvertx.disableWebsockets=true -Dvertx.flashPolicyHandler=false -Dvertx.threadChecks=false -Dvertx.disableContextTimings=true -Dvertx.disableTCCL=true --add-modules io.netty.transport.unix.common,io.netty.incubator.transport.classes.io_uring,io.netty.incubator.transport.io_uring.linux.x86_64 --add-reads com.techempower.inverno.benchmark=com.dslplatform.dsl.json --add-opens com.techempower.inverno.benchmark/com.techempower.inverno.benchmark.model=com.dslplatform.dsl.json</vmOptions>
</launcher>
</launchers>
<archiveFormats>
Expand All @@ -166,9 +213,6 @@
</configuration>
</execution>
</executions>
<configuration>
<vmOptions>--add-modules io.netty.transport.unix.common,io.netty.incubator.transport.classes.io_uring,io.netty.incubator.transport.io_uring.linux.x86_64</vmOptions>
</configuration>
</plugin>
</plugins>
</build>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
package com.techempower.inverno.benchmark;

import java.io.IOException;
import java.util.function.Supplier;

import io.inverno.core.annotation.Bean;
import io.inverno.core.v1.Application;
import io.inverno.mod.configuration.ConfigurationSource;
import io.inverno.mod.configuration.source.BootstrapConfigurationSource;
import java.io.IOException;
import java.util.function.Supplier;

public class Main {

@Bean
public interface AppConfigurationSource extends Supplier<ConfigurationSource<?, ?, ?>> {}
public interface AppConfigurationSource extends Supplier<ConfigurationSource> {}

public static void main(String[] args) throws IllegalStateException, IOException {
Application.with(new Benchmark.Builder()
Expand Down
Loading

0 comments on commit ff0bd35

Please sign in to comment.