Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make Project runnable #3

Open
wants to merge 25 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
de53081
changed wrk2 to wrk (wrk2 does not exist after compiling the wrk2 pro…
ErikSimonsen May 4, 2021
293c6e5
Changed to OpenJdk 11
ErikSimonsen May 4, 2021
8bde0cb
Changed group and artifact id, changed quarkus plugin version to a no…
ErikSimonsen May 4, 2021
4989512
changed qDup release, otherwise an ssl exception is thrown when execu…
ErikSimonsen May 4, 2021
96bff1b
changed jdk version back to 14 (there exists no stable jdk 11 build f…
ErikSimonsen May 4, 2021
54b4aa4
changed jdk version again (because sdkman cant install version 14.0.0…
ErikSimonsen May 4, 2021
4812be5
reverted group id and fixed path for time.js script
ErikSimonsen May 4, 2021
1f0bd00
Changed class, as request Obj is not used anymore
ErikSimonsen May 4, 2021
8aa8fb2
fixed .jar name (how could this project even be used with so many err…
ErikSimonsen May 4, 2021
1c69ae2
changed back to runner-jar
ErikSimonsen May 4, 2021
f22ee9c
removed -runner suffix everywhere, because the final artifact name is…
ErikSimonsen May 4, 2021
486fccc
removed .dockerignore files because only a single .jar gets copied in…
ErikSimonsen May 4, 2021
f31c371
ignore previous commits, the problem was that the buildCmd in the ben…
ErikSimonsen May 4, 2021
a373de6
ignore previous commits, the problem was that the buildCmd in the ben…
ErikSimonsen May 4, 2021
97f5c30
Merge remote-tracking branch 'origin/master'
ErikSimonsen May 4, 2021
425c032
readded runRates (removed them to make the script shorter)
ErikSimonsen May 10, 2021
8d1fa30
changed readme, tried to specifiy where exactly to install the needed…
ErikSimonsen May 10, 2021
a0f837f
specified host machines in readme
ErikSimonsen May 10, 2021
3c02141
removed whitespaces
ErikSimonsen May 10, 2021
13d5132
readded .dockerignore files
ErikSimonsen May 10, 2021
76a48c1
readded .dockerignore files
ErikSimonsen May 10, 2021
3b18374
Merge branch 'master' into project_runnable
ErikSimonsen May 10, 2021
4bcd0f1
removed my specific server and client hostnames
ErikSimonsen May 10, 2021
4ac766e
added .git to repository url
ErikSimonsen May 10, 2021
f5d53c5
added set locale as en_US, otherwise (for other locals like de_DE) th…
ErikSimonsen May 19, 2021
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
46 changes: 27 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,31 +19,36 @@ Timing of system startup and results graphing is provided by [node.js](https://n
- Docker
- [sdkman](https://sdkman.io/)
- [node.js](https://nodejs.org/en/)
- [qDup](https://github.com/Hyperfoil/qDup/releases/tag/release-0.4.1)
- [qDup](https://github.com/Hyperfoil/qDup/releases/tag/release-0.6.3)
- [wrk2](https://github.com/giltene/wrk2)
- [jbang](https://github.com/maxandersen/jbang)

### Setup

1. Ensure [docker](https://docs.docker.com/get-docker/) deamon is running on the server that you wish to run the applications. Please refer to Docker installation documentation for your particular operating system.
1. Ensure [docker](https://docs.docker.com/get-docker/) deamon is running on the server-host that you wish to run the
applications. Please refer to Docker installation documentation for your particular operating system.

2. Install [node.js](https://nodejs.org/en/) on the server that will be used to run the benchmark applications.
2. Install [node.js](https://nodejs.org/en/) on the server-host that will be used to run the benchmark applications, and
the host (probably your current machine) that will be used to start the benchmark application from.

3. Install [sdkman](https://sdkman.io/install) on the server that will be used to run the benchmark applications.
3. Install [sdkman](https://sdkman.io/install) on the server-host that will be used to run the benchmark applications,
and the host (probably your current machine) that will be used to start the benchmark application from.

4. Install [jbang](https://github.com/maxandersen/jbang) on the server that will be used to run the benchmark applications.
4. Install [jbang](https://github.com/maxandersen/jbang) on the host that will be used generate the graphs from the
generated data.

```shell script
$ sdk install jbang
```

4. Build and install [wrk2](https://github.com/giltene/wrk2/wiki/Installing-wrk2-on-Linux) on the client machine that will be used to drive load to the server
4. Build and install [wrk2](https://github.com/giltene/wrk2/wiki/Installing-wrk2-on-Linux) on the client-host machine
that will be used to drive load to the server

CentOS / RedHat / Fedora

CentOS / RedHat / Fedora

```shell script
sudo yum -y groupinstall 'Development Tools'
sudo yum -y install openssl-devel git
sudo yum -y install openssl-devel git zlib-devel
git clone https://github.com/giltene/wrk2.git
cd wrk2
make
Expand Down Expand Up @@ -82,22 +87,25 @@ Timing of system startup and results graphing is provided by [node.js](https://n
ENVIRONMENT_URL: http://{SERVER_HOST}:8080/environment
...
```

where;
- `{USER}` is the username you wish to connect to the remote machine with
- `{CLIENT_HOST}` is the fully qualified domain name of the client machine to run generate load
- `{SERVER_HOST}` is the fully qualified domain name of the server machine with the docker deamon already running in step (1)

6. Run the benchmark script with qDup: `java -jar {path_to_qDup}/qDup-0.4.1-uber.jar -B ./results/data ./scripts/qDup/benchmark.yaml`.

N.B. this script may appear to freeze, it takes approx 30 mins to run and will not always write output to the terminal.
where;
- `{USER}` is the username you wish to connect to the remote machine with
- `{CLIENT_HOST}` is the fully qualified domain name of the client machine to run generate load
- `{SERVER_HOST}` is the fully qualified domain name of the server machine with the docker deamon already running in
step (1)

6. Run the benchmark script with
qDup: `java -jar {path_to_qDup}/qDup-0.6.3-uber.jar -B ./results/data ./scripts/qDup/benchmark.yaml`.

N.B. this script may appear to freeze, it takes approx 30 mins to run and will not always write output to the
terminal.

7. After the run has complete, process the run data with `processResults.sh`

```shell script
$ ./processResults.sh 4 {CLIENT_HOST} {SERVER_HOST}
$ ./processResults.sh 4 {SERVER_HOST} {CLIENT_HOST}
```

where;
- `4` is the number of cpus (this is used to calculate the % cpu utilization)
- `{CLIENT_HOST}` is the full qualified hostname of the client machine defined in `scripts/qDup/benchmark.yaml` in step (5)
Expand Down
2 changes: 1 addition & 1 deletion quarkus-io-thread/.dockerignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
*
!target/*-runner
!target/*-runner.jar
!target/lib/*
!target/lib/*
16 changes: 9 additions & 7 deletions quarkus-io-thread/pom.xml
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
<?xml version="1.0"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"
xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<groupId>org.acme</groupId>
<artifactId>code-with-quarkus</artifactId>
<artifactId>quarkus-io-thread</artifactId>
<version>1.0.0-SNAPSHOT</version>
<properties>
<compiler-plugin.version>3.8.1</compiler-plugin.version>
Expand All @@ -12,11 +13,12 @@
<maven.compiler.target>11</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<quarkus-plugin.version>999-SNAPSHOT</quarkus-plugin.version>
<quarkus-plugin.version>1.13.1.Final</quarkus-plugin.version>
<quarkus.platform.artifact-id>quarkus-bom</quarkus.platform.artifact-id>
<quarkus.platform.group-id>io.quarkus</quarkus.platform.group-id>
<quarkus.platform.version>999-SNAPSHOT</quarkus.platform.version>
<quarkus.platform.version>1.13.1.Final</quarkus.platform.version>
<surefire-plugin.version>2.22.1</surefire-plugin.version>
<quarkus.package.type>uber-jar</quarkus.package.type>
</properties>
<dependencyManagement>
<dependencies>
Expand Down Expand Up @@ -50,8 +52,8 @@
</dependency>
</dependencies>
<build>
<finalName>quarkus-io-thread</finalName>
<plugins>
<finalName>quarkus-io-thread</finalName>
<plugins>
<plugin>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-maven-plugin</artifactId>
Expand Down
4 changes: 2 additions & 2 deletions quarkus-io-thread/src/main/docker/Dockerfile.jvm
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM openjdk:14-alpine
FROM openjdk:11
COPY target/quarkus-io-thread-runner.jar quarkus-io-thread-runner.jar
EXPOSE 8080
CMD ["java", "-Dcom.sun.management.jmxremote", "-Xmx128m", "-Dquarkus.http.host=0.0.0.0", "-Djava.util.logging.manager=org.jboss.logmanager.LogManager", "-jar", "quarkus-io-thread-runner.jar"]
CMD ["java", "-Dcom.sun.management.jmxremote", "-Xmx128m", "-Dquarkus.http.host=0.0.0.0", "-Djava.util.logging.manager=org.jboss.logmanager.LogManager", "-jar", "quarkus-io-thread-runner.jar"]
4 changes: 2 additions & 2 deletions quarkus-io-thread/src/main/java/org/acme/VertxRoute.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ public VertxRoute(MessageService messageService) {

@Route(path = "/hello/:name", methods = HttpMethod.GET)
void greetings(RoutingExchange ex) {
Set<ConstraintViolation<RequestObj>> violations = validator.validate(new RequestWrapper(ex.getParam("name").get()));
if( violations.size() == 0) {
Set<ConstraintViolation<RequestWrapper>> violations = validator.validate(new RequestWrapper(ex.getParam("name").get()));
if (violations.size() == 0) {
ex.ok(messageService.sayHello(ex.getParam("name").orElse("world")));
} else {
StringBuilder vaidationError = new StringBuilder();
Expand Down
2 changes: 1 addition & 1 deletion quarkus-worker-pool/.dockerignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
*
!target/*-runner
!target/*-runner.jar
!target/lib/*
!target/lib/*
220 changes: 112 additions & 108 deletions quarkus-worker-pool/pom.xml
Original file line number Diff line number Diff line change
@@ -1,116 +1,120 @@
<?xml version="1.0"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<groupId>org.acme</groupId>
<artifactId>code-with-quarkus</artifactId>
<version>1.0.0-SNAPSHOT</version>
<properties>
<compiler-plugin.version>3.8.1</compiler-plugin.version>
<maven.compiler.parameters>true</maven.compiler.parameters>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<quarkus-plugin.version>999-SNAPSHOT</quarkus-plugin.version>
<quarkus.platform.artifact-id>quarkus-bom</quarkus.platform.artifact-id>
<quarkus.platform.group-id>io.quarkus</quarkus.platform.group-id>
<quarkus.platform.version>999-SNAPSHOT</quarkus.platform.version>
<surefire-plugin.version>2.22.1</surefire-plugin.version>
</properties>
<dependencyManagement>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"
xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<groupId>org.acme</groupId>
<artifactId>quarkus-worker-pool</artifactId>
<version>1.0.0-SNAPSHOT</version>
<properties>
<compiler-plugin.version>3.8.1</compiler-plugin.version>
<maven.compiler.parameters>true</maven.compiler.parameters>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<quarkus-plugin.version>1.13.1.Final</quarkus-plugin.version>
<quarkus.platform.artifact-id>quarkus-bom</quarkus.platform.artifact-id>
<quarkus.platform.group-id>io.quarkus</quarkus.platform.group-id>
<quarkus.platform.version>1.13.1.Final</quarkus.platform.version>
<surefire-plugin.version>3.0.0-M5</surefire-plugin.version>
<quarkus.package.type>uber-jar</quarkus.package.type>
</properties>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>${quarkus.platform.group-id}</groupId>
<artifactId>${quarkus.platform.artifact-id}</artifactId>
<version>${quarkus.platform.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<dependency>
<groupId>${quarkus.platform.group-id}</groupId>
<artifactId>${quarkus.platform.artifact-id}</artifactId>
<version>${quarkus.platform.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-resteasy</artifactId>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-junit5</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.rest-assured</groupId>
<artifactId>rest-assured</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-hibernate-validator</artifactId>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-resteasy</artifactId>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-junit5</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.rest-assured</groupId>
<artifactId>rest-assured</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-hibernate-validator</artifactId>
</dependency>
</dependencies>
<build>
<finalName>quarkus-worker-pool</finalName>
<plugins>
<plugin>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-maven-plugin</artifactId>
<version>${quarkus-plugin.version}</version>
<executions>
<execution>
<goals>
<goal>build</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>${compiler-plugin.version}</version>
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>${surefire-plugin.version}</version>
<configuration>
<systemProperties>
<java.util.logging.manager>org.jboss.logmanager.LogManager</java.util.logging.manager>
</systemProperties>
</configuration>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>native</id>
<activation>
<property>
<name>native</name>
</property>
</activation>
<build>
<build>
<finalName>quarkus-worker-pool</finalName>
<plugins>
<plugin>
<artifactId>maven-failsafe-plugin</artifactId>
<version>${surefire-plugin.version}</version>
<executions>
<execution>
<goals>
<goal>integration-test</goal>
<goal>verify</goal>
</goals>
<plugin>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-maven-plugin</artifactId>
<version>${quarkus-plugin.version}</version>
<executions>
<execution>
<goals>
<goal>build</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>${compiler-plugin.version}</version>
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>${surefire-plugin.version}</version>
<configuration>
<systemProperties>
<native.image.path>${project.build.directory}/${project.build.finalName}-runner</native.image.path>
</systemProperties>
<systemProperties>
<java.util.logging.manager>org.jboss.logmanager.LogManager</java.util.logging.manager>
</systemProperties>
</configuration>
</execution>
</executions>
</plugin>
</plugin>
</plugins>
</build>
<properties>
<quarkus.package.type>native</quarkus.package.type>
</properties>
</profile>
</profiles>
</build>
<profiles>
<profile>
<id>native</id>
<activation>
<property>
<name>native</name>
</property>
</activation>
<build>
<plugins>
<plugin>
<artifactId>maven-failsafe-plugin</artifactId>
<version>${surefire-plugin.version}</version>
<executions>
<execution>
<goals>
<goal>integration-test</goal>
<goal>verify</goal>
</goals>
<configuration>
<systemProperties>
<native.image.path>
${project.build.directory}/${project.build.finalName}-runner
</native.image.path>
</systemProperties>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
<properties>
<quarkus.package.type>native</quarkus.package.type>
</properties>
</profile>
</profiles>
</project>
2 changes: 1 addition & 1 deletion quarkus-worker-pool/src/main/docker/Dockerfile.jvm
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM openjdk:14-alpine
FROM openjdk:11
COPY target/quarkus-worker-pool-runner.jar quarkus-worker-pool-runner.jar
EXPOSE 8080
CMD ["java", "-Dcom.sun.management.jmxremote", "-Xmx128m", "-Dquarkus.http.host=0.0.0.0", "-Djava.util.logging.manager=org.jboss.logmanager.LogManager", "-jar", "quarkus-worker-pool-runner.jar"]
Loading