This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| docker run -i - rm -p 8080:8080 - memory=200MB - cpus=1 - name=quarkus-jvm quarkus/code-with-quarkus-jvm |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Concurrency Level: 100 | |
| Time taken for tests: 32.945 seconds | |
| Complete requests: 10000 | |
| Failed requests: 0 | |
| Total transferred: 1440000 bytes | |
| HTML transferred: 730000 bytes | |
| Requests per second: 303.54 [#/sec] (mean) | |
| Time per request: 329.445 [ms] (mean) | |
| Time per request: 3.294 [ms] (mean, across all concurrent requests) | |
| Transfer rate: 42.69 [Kbytes/sec] received |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Concurrency Level: 100 | |
| Time taken for tests: 65.168 seconds | |
| Complete requests: 10000 | |
| Failed requests: 0 | |
| Total transferred: 1440000 bytes | |
| HTML transferred: 730000 bytes | |
| Requests per second: 153.45 [#/sec] (mean) <----- throughput ------------------------------------------ | |
| Time per request: 651.675 [ms] (mean) <----- avg latency ------------------------------------------ | |
| Time per request: 6.517 [ms] (mean, across all concurrent requests) | |
| Transfer rate: 21.58 [Kbytes/sec] received |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Concurrency Level: 100 | |
| Time taken for tests: 65.168 seconds | |
| Complete requests: 10000 | |
| Failed requests: 0 | |
| Total transferred: 1440000 bytes | |
| HTML transferred: 730000 bytes | |
| Requests per second: 153.45 [#/sec] (mean) | |
| Time per request: 651.675 [ms] (mean) | |
| Time per request: 6.517 [ms] (mean, across all concurrent requests) | |
| Transfer rate: 21.58 [Kbytes/sec] receivedConcurrency Level: 100 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| docker build -f src/main/docker/Dockerfile.jvm -t quarkus/code-with-quarkus-jvm . | |
| docker run -i --rm -p 8080:8080 --memory=100MB --cpus=0.5 --name=quarkus-jvm quarkus/code-with-quarkus-jvm |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package org.acme | |
| import io.vertx.core.json.JsonArray | |
| import io.vertx.core.json.JsonObject | |
| import io.vertx.mutiny.mysqlclient.MySQLPool | |
| import io.vertx.mutiny.sqlclient.Row | |
| import io.vertx.mutiny.sqlclient.RowSet | |
| import java.util.concurrent.CompletionStage | |
| import javax.inject.Inject | |
| import javax.ws.rs.GET |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # the service | |
| package main | |
| import ( | |
| "database/sql" | |
| "fmt" | |
| "github.com/gin-gonic/gin" | |
| _ "github.com/go-sql-driver/mysql" | |
| "net/http" | |
| ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ... | |
| JsonLayout: | |
| ... | |
| keyValuePair: | |
| - key: uptime | |
| value: '$${uptime:seconds}' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Configuration: | |
| name: Default | |
| packages: "com.company.core.logging" | |
| Appenders: | |
| Console: | |
| - name: json | |
| target: SYSTEM_OUT | |
| JsonLayout: | |
| compact: true | |
| complete: false |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.company.core.logging | |
| import org.apache.logging.log4j.core.LogEvent | |
| import org.apache.logging.log4j.core.config.plugins.Plugin | |
| import org.apache.logging.log4j.core.lookup.StrLookup | |
| import java.time.Instant | |
| @Plugin(name = "uptime", category = StrLookup.CATEGORY) | |
| class UptimeLoockup : StrLookup { | |
| companion object { | |
| var startTime: Instant = Instant.now() | |
| } |