From 0f5ed50e860155b58b63f8e6d10fa7fbcca82596 Mon Sep 17 00:00:00 2001 From: Mark Nellemann Date: Wed, 28 Jun 2023 07:29:44 +0200 Subject: [PATCH 1/5] README examples for running --- README.md | 9 +++++++++ .../java/biz/nellemann/memstress/MyDatabase.java | 12 ++++-------- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index e69de29..b881675 100644 --- a/README.md +++ b/README.md @@ -0,0 +1,9 @@ +# Memory Performance Test + +## Examples + +```shell +java -Xms128g -Xmx128g -XX:+UseLargePages -XX:+AlwaysPreTouch \ + -XX:-UseParallelGC -XX:MaxGCPauseMillis=500 -Xgcthreads3 \ + -jar memstress-0.0.1-all.jar -t 128 +``` diff --git a/src/main/java/biz/nellemann/memstress/MyDatabase.java b/src/main/java/biz/nellemann/memstress/MyDatabase.java index 174dcff..6d494c4 100644 --- a/src/main/java/biz/nellemann/memstress/MyDatabase.java +++ b/src/main/java/biz/nellemann/memstress/MyDatabase.java @@ -10,6 +10,7 @@ import java.nio.ByteBuffer; import java.time.Duration; import java.time.Instant; import java.util.ArrayList; +import java.util.Arrays; import java.util.HashMap; import java.util.Random; @@ -44,9 +45,7 @@ public class MyDatabase { for (int i = 0; i < 128; i++) { baseCar[i] = 'A'; } - for (int i = 0; i < byteBase.length; i++) { - byteBase[i] = 0; - } + Arrays.fill(byteBase, (byte) 0); } @@ -79,16 +78,13 @@ public class MyDatabase { String randomString() { baseCar[(idx++) % 128]++; - String s = new String(baseCar); - return s; + return new String(baseCar); } ByteBuffer randomBytes() { byteBase[(idx2++) % byteBase.length]++; byte[] bytes = new byte[byteBase.length]; - for (int i = 0; i < bytes.length; i++) { - bytes[i] = byteBase[i]; - } + System.arraycopy(byteBase, 0, bytes, 0, bytes.length); return ByteBuffer.wrap(bytes); } -- 2.43.4 From a7f0bc482254fdc0bddc464bef61ea85b0869e14 Mon Sep 17 00:00:00 2001 From: Mark Nellemann Date: Wed, 28 Jun 2023 10:40:45 +0200 Subject: [PATCH 2/5] Initial try on reading data back. --- README.md | 32 +++++++++++++++ build.gradle | 39 ------------------- .../biz/nellemann/memstress/Application.java | 5 +-- .../biz/nellemann/memstress/MyDatabase.java | 33 +++++++++++++--- .../memstress/db/DatabaseManager.java | 18 ++++++++- 5 files changed, 79 insertions(+), 48 deletions(-) diff --git a/README.md b/README.md index b881675..9a7018e 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,41 @@ # Memory Performance Test + ## Examples ```shell java -Xms128g -Xmx128g -XX:+UseLargePages -XX:+AlwaysPreTouch \ + -XX:-UseParallelGC -XX:MaxGCPauseMillis=500 -Xgcthreads3 \ + -jar memstress-0.0.1-all.jar -t 96 +``` + + +```shell +java -Xms144g -Xmx144g -XX:+UseLargePages -XX:+AlwaysPreTouch \ -XX:-UseParallelGC -XX:MaxGCPauseMillis=500 -Xgcthreads3 \ -jar memstress-0.0.1-all.jar -t 128 ``` + +```shell +java -Xms160g -Xmx160g -XX:+UseLargePages -XX:+AlwaysPreTouch \ + -XX:-UseParallelGC -XX:MaxGCPauseMillis=500 -Xgcthreads3 \ + -jar memstress-0.0.1-all.jar -t 144 +``` + +```shell +java -Xms192g -Xmx192g -XX:+UseLargePages -XX:+AlwaysPreTouch \ + -XX:-UseParallelGC -XX:MaxGCPauseMillis=500 -Xgcthreads3 \ + -jar memstress-0.0.1-all.jar -t 160 +``` + +```shell +java -Xms240g -Xmx240g -XX:+UseLargePages -XX:+AlwaysPreTouch \ + -XX:-UseParallelGC -XX:MaxGCPauseMillis=500 -Xgcthreads3 \ + -jar memstress-0.0.1-all.jar -t 192 +``` + +```shell +java -Xms256g -Xmx256g -XX:+UseLargePages -XX:+AlwaysPreTouch \ + -XX:-UseParallelGC -XX:MaxGCPauseMillis=500 -Xgcthreads3 \ + -jar memstress-0.0.1-all.jar -t 240 +``` diff --git a/build.gradle b/build.gradle index 192ec8a..85125ab 100644 --- a/build.gradle +++ b/build.gradle @@ -2,7 +2,6 @@ plugins { id 'groovy' id 'application' id "net.nemerosa.versioning" version "2.15.1" - id "com.netflix.nebula.ospackage" version "11.2.0" id 'com.github.johnrengelman.shadow' version '8.1.1' } @@ -55,41 +54,3 @@ jar { ) } } - -apply plugin: 'com.netflix.nebula.ospackage' -ospackage { - packageName = 'memstress' - release = '1' - user = 'root' - packager = "Mark Nellemann " - - into '/opt/memstress' - - from(shadowJar.outputs.files) { - into 'lib' - } - - from('build/scriptsShadow') { - into 'bin' - } - - from(['README.md', 'LICENSE']) { - into 'doc' - } - -} - -buildDeb { - dependsOn build, startShadowScripts -} - -buildRpm { - dependsOn build, startShadowScripts - os = org.redline_rpm.header.Os.LINUX -} - -tasks.register("packages") { - group "build" - dependsOn ":buildDeb" - dependsOn ":buildRpm" -} diff --git a/src/main/java/biz/nellemann/memstress/Application.java b/src/main/java/biz/nellemann/memstress/Application.java index 64c025c..5c87900 100644 --- a/src/main/java/biz/nellemann/memstress/Application.java +++ b/src/main/java/biz/nellemann/memstress/Application.java @@ -27,9 +27,8 @@ public class Application implements Callable { public Integer call() throws Exception { MyDatabase database = new MyDatabase(maxTables, maxRowsPerTable, maxDataPerRow); - database.build("testDb"); - - System.out.println("TODO: How to search / read from data stored in rows?"); + database.write("testDb"); + database.read("testDb"); Scanner scanner = new Scanner(System.in); System.out.println("Press ENTER to stop"); diff --git a/src/main/java/biz/nellemann/memstress/MyDatabase.java b/src/main/java/biz/nellemann/memstress/MyDatabase.java index 6d494c4..ee23892 100644 --- a/src/main/java/biz/nellemann/memstress/MyDatabase.java +++ b/src/main/java/biz/nellemann/memstress/MyDatabase.java @@ -12,7 +12,7 @@ import java.time.Instant; import java.util.ArrayList; import java.util.Arrays; import java.util.HashMap; -import java.util.Random; +import java.util.concurrent.atomic.AtomicLong; public class MyDatabase { @@ -22,7 +22,6 @@ public class MyDatabase { private final int BYTE_SIZE_1GB = 1_000_000_000; private final DatabaseManager databaseManager = new DatabaseManager(); - private final Random random = new Random(); // Use when searching or using later? private final ArrayList tables = new ArrayList
(); @@ -49,9 +48,11 @@ public class MyDatabase { } - public Database build(String dbName) { + public void write(String dbName) { Instant instant1 = Instant.now(); Database database = databaseManager.createDatabase(dbName); + + AtomicLong bytesWritten = new AtomicLong(); for (int t = 1; t <= maxTables; t++) { String tableName = String.format("table_%d", t); @@ -64,6 +65,7 @@ public class MyDatabase { HashMap map = new HashMap(); for (int m = 1; m <= maxDataPerRow; m++) { map.put(randomString(), randomBytes()); + bytesWritten.addAndGet(byteBase.length); } table.insertEntry(rowIdx, map); } @@ -72,10 +74,31 @@ public class MyDatabase { } Instant instant2 = Instant.now(); - log.info("Done building in-memory database \"{}\" in {}", dbName, Duration.between(instant1, instant2)); - return database; + log.info("Done writing {} to \"{}\" in {}", bytesWritten, dbName, Duration.between(instant1, instant2)); } + + public void read(String dbName) { + Instant instant1 = Instant.now(); + Database database = databaseManager.getDatabase(dbName); + + AtomicLong bytesRead = new AtomicLong(); + for(Table table : tables) { + table.getRows().forEach((idx, row) -> { + HashMap values = row.getColumnValuesMap(); + values.forEach((str, byteBuffer) -> { + byte[] array = byteBuffer.array(); + bytesRead.addAndGet(array.length); + }); + }); + } + Instant instant2 = Instant.now(); + log.info("Done reading {} from \"{}\" in {}", bytesRead.get(), dbName, Duration.between(instant1, instant2)); + + } + + + String randomString() { baseCar[(idx++) % 128]++; return new String(baseCar); diff --git a/src/main/java/biz/nellemann/memstress/db/DatabaseManager.java b/src/main/java/biz/nellemann/memstress/db/DatabaseManager.java index dd3a420..41b6c99 100644 --- a/src/main/java/biz/nellemann/memstress/db/DatabaseManager.java +++ b/src/main/java/biz/nellemann/memstress/db/DatabaseManager.java @@ -3,14 +3,19 @@ */ package biz.nellemann.memstress.db; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + import java.util.HashMap; public class DatabaseManager { + final Logger log = LoggerFactory.getLogger(DatabaseManager.class); + private HashMap databaseHashMap; public Database createDatabase(String databaseName) { if (databaseHashMap.containsKey(databaseName)) { - System.out.println("A database already exists with this name"); + log.warn("createDatabase() - A database already exists with this name: {}", databaseName); } else { databaseHashMap.put(databaseName, new Database(databaseName)); } @@ -21,6 +26,17 @@ public class DatabaseManager { databaseHashMap.remove(databaseName); } + + public Database getDatabase(String databaseName) { + if (databaseHashMap.containsKey(databaseName)) { + return databaseHashMap.get(databaseName); + } else { + log.warn("getDatabase() - Database was not found: {}", databaseName); + } + return null; + } + + public DatabaseManager() { this.databaseHashMap = new HashMap<>(); } -- 2.43.4 From 8c530c347729533973a39708bef0d4b09e57fc21 Mon Sep 17 00:00:00 2001 From: Mark Nellemann Date: Thu, 29 Jun 2023 09:41:28 +0200 Subject: [PATCH 3/5] Second try on reading data from memory. --- .../java/biz/nellemann/memstress/Application.java | 8 -------- .../java/biz/nellemann/memstress/MyDatabase.java | 14 +++++++++----- 2 files changed, 9 insertions(+), 13 deletions(-) diff --git a/src/main/java/biz/nellemann/memstress/Application.java b/src/main/java/biz/nellemann/memstress/Application.java index 5c87900..5b708a0 100644 --- a/src/main/java/biz/nellemann/memstress/Application.java +++ b/src/main/java/biz/nellemann/memstress/Application.java @@ -3,8 +3,6 @@ package biz.nellemann.memstress; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import picocli.CommandLine; - -import java.util.Scanner; import java.util.concurrent.Callable; @CommandLine.Command(name = "memstress", mixinStandardHelpOptions = true, versionProvider = VersionProvider.class, description = "Memory performance measurement tool.") @@ -29,12 +27,6 @@ public class Application implements Callable { MyDatabase database = new MyDatabase(maxTables, maxRowsPerTable, maxDataPerRow); database.write("testDb"); database.read("testDb"); - - Scanner scanner = new Scanner(System.in); - System.out.println("Press ENTER to stop"); - String s= scanner.nextLine(); - scanner.close(); - database.destroy("testDb"); return 0; diff --git a/src/main/java/biz/nellemann/memstress/MyDatabase.java b/src/main/java/biz/nellemann/memstress/MyDatabase.java index ee23892..282d867 100644 --- a/src/main/java/biz/nellemann/memstress/MyDatabase.java +++ b/src/main/java/biz/nellemann/memstress/MyDatabase.java @@ -56,7 +56,7 @@ public class MyDatabase { for (int t = 1; t <= maxTables; t++) { String tableName = String.format("table_%d", t); - log.info("Creating table \"{}\"", tableName); + log.debug("Creating table \"{}\"", tableName); Table table = database.createTable(tableName); @@ -74,7 +74,7 @@ public class MyDatabase { } Instant instant2 = Instant.now(); - log.info("Done writing {} to \"{}\" in {}", bytesWritten, dbName, Duration.between(instant1, instant2)); + log.info("Done writing {}b to \"{}\" in {}", bytesWritten, dbName, Duration.between(instant1, instant2)); } @@ -87,13 +87,17 @@ public class MyDatabase { table.getRows().forEach((idx, row) -> { HashMap values = row.getColumnValuesMap(); values.forEach((str, byteBuffer) -> { - byte[] array = byteBuffer.array(); - bytesRead.addAndGet(array.length); + byteBuffer.rewind(); + while (byteBuffer.hasRemaining()) { + byte[] tmp = new byte[BYTE_SIZE_1MB]; + byteBuffer.get(tmp); + bytesRead.addAndGet(tmp.length); + } }); }); } Instant instant2 = Instant.now(); - log.info("Done reading {} from \"{}\" in {}", bytesRead.get(), dbName, Duration.between(instant1, instant2)); + log.info("Done reading {}b from \"{}\" in {}", bytesRead.get(), dbName, Duration.between(instant1, instant2)); } -- 2.43.4 From e1d3395fa3518c6c85c9c4173ddb28796bbaed6d Mon Sep 17 00:00:00 2001 From: Mark Nellemann Date: Thu, 29 Jun 2023 11:05:45 +0200 Subject: [PATCH 4/5] Average times and multiple test iterations. --- README.md | 35 +++---------------- .../biz/nellemann/memstress/Application.java | 21 ++++++++--- .../{MyDatabase.java => MemDatabase.java} | 19 ++++++---- 3 files changed, 33 insertions(+), 42 deletions(-) rename src/main/java/biz/nellemann/memstress/{MyDatabase.java => MemDatabase.java} (84%) diff --git a/README.md b/README.md index 9a7018e..adf38d6 100644 --- a/README.md +++ b/README.md @@ -3,39 +3,12 @@ ## Examples +Test with 8GB memory: ```shell -java -Xms128g -Xmx128g -XX:+UseLargePages -XX:+AlwaysPreTouch \ - -XX:-UseParallelGC -XX:MaxGCPauseMillis=500 -Xgcthreads3 \ - -jar memstress-0.0.1-all.jar -t 96 +java -Xms10g -Xmx10g -XX:+AlwaysPreTouch -jar memstress-0.0.1-all.jar -t 8 ``` - +Test with 100GB memory: ```shell -java -Xms144g -Xmx144g -XX:+UseLargePages -XX:+AlwaysPreTouch \ - -XX:-UseParallelGC -XX:MaxGCPauseMillis=500 -Xgcthreads3 \ - -jar memstress-0.0.1-all.jar -t 128 -``` - -```shell -java -Xms160g -Xmx160g -XX:+UseLargePages -XX:+AlwaysPreTouch \ - -XX:-UseParallelGC -XX:MaxGCPauseMillis=500 -Xgcthreads3 \ - -jar memstress-0.0.1-all.jar -t 144 -``` - -```shell -java -Xms192g -Xmx192g -XX:+UseLargePages -XX:+AlwaysPreTouch \ - -XX:-UseParallelGC -XX:MaxGCPauseMillis=500 -Xgcthreads3 \ - -jar memstress-0.0.1-all.jar -t 160 -``` - -```shell -java -Xms240g -Xmx240g -XX:+UseLargePages -XX:+AlwaysPreTouch \ - -XX:-UseParallelGC -XX:MaxGCPauseMillis=500 -Xgcthreads3 \ - -jar memstress-0.0.1-all.jar -t 192 -``` - -```shell -java -Xms256g -Xmx256g -XX:+UseLargePages -XX:+AlwaysPreTouch \ - -XX:-UseParallelGC -XX:MaxGCPauseMillis=500 -Xgcthreads3 \ - -jar memstress-0.0.1-all.jar -t 240 +java -Xms128g -Xmx128g -XX:+AlwaysPreTouch -jar memstress-0.0.1-all.jar -t 100 ``` diff --git a/src/main/java/biz/nellemann/memstress/Application.java b/src/main/java/biz/nellemann/memstress/Application.java index 5b708a0..f03bb6f 100644 --- a/src/main/java/biz/nellemann/memstress/Application.java +++ b/src/main/java/biz/nellemann/memstress/Application.java @@ -3,6 +3,8 @@ package biz.nellemann.memstress; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import picocli.CommandLine; + +import java.time.Duration; import java.util.concurrent.Callable; @CommandLine.Command(name = "memstress", mixinStandardHelpOptions = true, versionProvider = VersionProvider.class, description = "Memory performance measurement tool.") @@ -20,14 +22,25 @@ public class Application implements Callable { @CommandLine.Option(names = { "-d", "--data" }, paramLabel = "NUM", description = "Create this much data (MB) pr. row [default: ${DEFAULT-VALUE}]") int maxDataPerRow = 100; + @CommandLine.Option(names = { "-i", "--iterations" }, paramLabel = "NUM", description = "Iterate test his many times [default: ${DEFAULT-VALUE}]") + int iterations = 3; @Override public Integer call() throws Exception { - MyDatabase database = new MyDatabase(maxTables, maxRowsPerTable, maxDataPerRow); - database.write("testDb"); - database.read("testDb"); - database.destroy("testDb"); + long writeTimeMillis = 0; + long readTimeMillis = 0; + + for(int i = 1; i <= iterations; i++) { + log.info("Starting test {} of {}", i, iterations); + MemDatabase database = new MemDatabase(maxTables, maxRowsPerTable, maxDataPerRow); + writeTimeMillis += database.write("testDb"); + readTimeMillis += database.read("testDb"); + database.destroy("testDb"); + } + + log.info("Average writing time: {}", Duration.ofMillis(writeTimeMillis / iterations)); + log.info("Average reading time: {}", Duration.ofMillis(readTimeMillis / iterations)); return 0; } diff --git a/src/main/java/biz/nellemann/memstress/MyDatabase.java b/src/main/java/biz/nellemann/memstress/MemDatabase.java similarity index 84% rename from src/main/java/biz/nellemann/memstress/MyDatabase.java rename to src/main/java/biz/nellemann/memstress/MemDatabase.java index 282d867..07c581f 100644 --- a/src/main/java/biz/nellemann/memstress/MyDatabase.java +++ b/src/main/java/biz/nellemann/memstress/MemDatabase.java @@ -14,9 +14,9 @@ import java.util.Arrays; import java.util.HashMap; import java.util.concurrent.atomic.AtomicLong; -public class MyDatabase { +public class MemDatabase { - final Logger log = LoggerFactory.getLogger(MyDatabase.class); + final Logger log = LoggerFactory.getLogger(MemDatabase.class); private final int BYTE_SIZE_1MB = 1_000_000; private final int BYTE_SIZE_1GB = 1_000_000_000; @@ -35,7 +35,7 @@ public class MyDatabase { private char[] baseCar; private byte[] byteBase; - public MyDatabase(int tables, int rows, int size) { + public MemDatabase(int tables, int rows, int size) { this.maxTables = tables; this.maxRowsPerTable = rows; this.maxDataPerRow = size; @@ -48,7 +48,7 @@ public class MyDatabase { } - public void write(String dbName) { + public long write(String dbName) { Instant instant1 = Instant.now(); Database database = databaseManager.createDatabase(dbName); @@ -74,11 +74,14 @@ public class MyDatabase { } Instant instant2 = Instant.now(); - log.info("Done writing {}b to \"{}\" in {}", bytesWritten, dbName, Duration.between(instant1, instant2)); + Duration duration = Duration.between(instant1, instant2); + log.info("Done writing {} bytes -> \"{}\" in {}", bytesWritten, dbName, duration); + + return duration.toMillis(); } - public void read(String dbName) { + public long read(String dbName) { Instant instant1 = Instant.now(); Database database = databaseManager.getDatabase(dbName); @@ -97,8 +100,10 @@ public class MyDatabase { }); } Instant instant2 = Instant.now(); - log.info("Done reading {}b from \"{}\" in {}", bytesRead.get(), dbName, Duration.between(instant1, instant2)); + Duration duration = Duration.between(instant1, instant2); + log.info("Done reading {} bytes <- \"{}\" in {}", bytesRead.get(), dbName, duration); + return duration.toMillis(); } -- 2.43.4 From 85a0ce42041c7c5e06bf9e718146f50261d8a2ad Mon Sep 17 00:00:00 2001 From: Mark Nellemann Date: Thu, 29 Jun 2023 20:40:27 +0200 Subject: [PATCH 5/5] Rename package and app. --- build.gradle | 2 +- gradle.properties | 4 ++-- settings.gradle | 2 +- .../nellemann/{memstress => jmemperf}/Application.java | 4 ++-- .../nellemann/{memstress => jmemperf}/MemDatabase.java | 8 ++++---- .../{memstress => jmemperf}/VersionProvider.java | 2 +- .../nellemann/{memstress => jmemperf}/db/Database.java | 2 +- .../{memstress => jmemperf}/db/DatabaseManager.java | 2 +- .../biz/nellemann/{memstress => jmemperf}/db/Row.java | 2 +- .../biz/nellemann/{memstress => jmemperf}/db/Table.java | 2 +- src/main/resources/logback.xml | 2 +- .../{memstress => jmemperf}/ApplicationTest.groovy | 2 +- 12 files changed, 17 insertions(+), 17 deletions(-) rename src/main/java/biz/nellemann/{memstress => jmemperf}/Application.java (90%) rename src/main/java/biz/nellemann/{memstress => jmemperf}/MemDatabase.java (95%) rename src/main/java/biz/nellemann/{memstress => jmemperf}/VersionProvider.java (93%) rename src/main/java/biz/nellemann/{memstress => jmemperf}/db/Database.java (97%) rename src/main/java/biz/nellemann/{memstress => jmemperf}/db/DatabaseManager.java (97%) rename src/main/java/biz/nellemann/{memstress => jmemperf}/db/Row.java (97%) rename src/main/java/biz/nellemann/{memstress => jmemperf}/db/Table.java (98%) rename src/test/groovy/biz/nellemann/{memstress => jmemperf}/ApplicationTest.groovy (83%) diff --git a/build.gradle b/build.gradle index 85125ab..5ee067b 100644 --- a/build.gradle +++ b/build.gradle @@ -29,7 +29,7 @@ java { } application { - mainClass = 'biz.nellemann.memstress.Application' + mainClass = 'biz.nellemann.jmemperf.Application' } tasks.named('test') { diff --git a/gradle.properties b/gradle.properties index 2eae34a..6bbf328 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,3 +1,3 @@ -projectId = memstress -projectGroup = biz.nellemann.memstress +projectId = jmemperf +projectGroup = biz.nellemann.jmemperf projectVersion = 0.0.1 diff --git a/settings.gradle b/settings.gradle index 8592cea..56a9f21 100644 --- a/settings.gradle +++ b/settings.gradle @@ -12,4 +12,4 @@ plugins { id 'org.gradle.toolchains.foojay-resolver-convention' version '0.4.0' } -rootProject.name = 'memstress' +rootProject.name = 'jmemperf' diff --git a/src/main/java/biz/nellemann/memstress/Application.java b/src/main/java/biz/nellemann/jmemperf/Application.java similarity index 90% rename from src/main/java/biz/nellemann/memstress/Application.java rename to src/main/java/biz/nellemann/jmemperf/Application.java index f03bb6f..86ecca7 100644 --- a/src/main/java/biz/nellemann/memstress/Application.java +++ b/src/main/java/biz/nellemann/jmemperf/Application.java @@ -1,4 +1,4 @@ -package biz.nellemann.memstress; +package biz.nellemann.jmemperf; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -7,7 +7,7 @@ import picocli.CommandLine; import java.time.Duration; import java.util.concurrent.Callable; -@CommandLine.Command(name = "memstress", mixinStandardHelpOptions = true, versionProvider = VersionProvider.class, description = "Memory performance measurement tool.") +@CommandLine.Command(name = "jmemperf", mixinStandardHelpOptions = true, versionProvider = VersionProvider.class, description = "Memory performance measurement tool.") public class Application implements Callable { final Logger log = LoggerFactory.getLogger(Application.class); diff --git a/src/main/java/biz/nellemann/memstress/MemDatabase.java b/src/main/java/biz/nellemann/jmemperf/MemDatabase.java similarity index 95% rename from src/main/java/biz/nellemann/memstress/MemDatabase.java rename to src/main/java/biz/nellemann/jmemperf/MemDatabase.java index 07c581f..5dffec3 100644 --- a/src/main/java/biz/nellemann/memstress/MemDatabase.java +++ b/src/main/java/biz/nellemann/jmemperf/MemDatabase.java @@ -1,8 +1,8 @@ -package biz.nellemann.memstress; +package biz.nellemann.jmemperf; -import biz.nellemann.memstress.db.Database; -import biz.nellemann.memstress.db.DatabaseManager; -import biz.nellemann.memstress.db.Table; +import biz.nellemann.jmemperf.db.Database; +import biz.nellemann.jmemperf.db.DatabaseManager; +import biz.nellemann.jmemperf.db.Table; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/src/main/java/biz/nellemann/memstress/VersionProvider.java b/src/main/java/biz/nellemann/jmemperf/VersionProvider.java similarity index 93% rename from src/main/java/biz/nellemann/memstress/VersionProvider.java rename to src/main/java/biz/nellemann/jmemperf/VersionProvider.java index fc3265a..baf10e0 100644 --- a/src/main/java/biz/nellemann/memstress/VersionProvider.java +++ b/src/main/java/biz/nellemann/jmemperf/VersionProvider.java @@ -1,4 +1,4 @@ -package biz.nellemann.memstress; +package biz.nellemann.jmemperf; import picocli.CommandLine; diff --git a/src/main/java/biz/nellemann/memstress/db/Database.java b/src/main/java/biz/nellemann/jmemperf/db/Database.java similarity index 97% rename from src/main/java/biz/nellemann/memstress/db/Database.java rename to src/main/java/biz/nellemann/jmemperf/db/Database.java index 7d63efb..b199680 100644 --- a/src/main/java/biz/nellemann/memstress/db/Database.java +++ b/src/main/java/biz/nellemann/jmemperf/db/Database.java @@ -1,7 +1,7 @@ /** * Example taken from: https://medium.com/@mithoonkumar/design-an-in-memory-nosql-database-ood-428d48b68dfa */ -package biz.nellemann.memstress.db; +package biz.nellemann.jmemperf.db; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/src/main/java/biz/nellemann/memstress/db/DatabaseManager.java b/src/main/java/biz/nellemann/jmemperf/db/DatabaseManager.java similarity index 97% rename from src/main/java/biz/nellemann/memstress/db/DatabaseManager.java rename to src/main/java/biz/nellemann/jmemperf/db/DatabaseManager.java index 41b6c99..333a8b0 100644 --- a/src/main/java/biz/nellemann/memstress/db/DatabaseManager.java +++ b/src/main/java/biz/nellemann/jmemperf/db/DatabaseManager.java @@ -1,7 +1,7 @@ /** * Example taken from: https://medium.com/@mithoonkumar/design-an-in-memory-nosql-database-ood-428d48b68dfa */ -package biz.nellemann.memstress.db; +package biz.nellemann.jmemperf.db; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/src/main/java/biz/nellemann/memstress/db/Row.java b/src/main/java/biz/nellemann/jmemperf/db/Row.java similarity index 97% rename from src/main/java/biz/nellemann/memstress/db/Row.java rename to src/main/java/biz/nellemann/jmemperf/db/Row.java index 07fe2e6..aae91ea 100644 --- a/src/main/java/biz/nellemann/memstress/db/Row.java +++ b/src/main/java/biz/nellemann/jmemperf/db/Row.java @@ -1,7 +1,7 @@ /** * Example taken from: https://medium.com/@mithoonkumar/design-an-in-memory-nosql-database-ood-428d48b68dfa */ -package biz.nellemann.memstress.db; +package biz.nellemann.jmemperf.db; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/src/main/java/biz/nellemann/memstress/db/Table.java b/src/main/java/biz/nellemann/jmemperf/db/Table.java similarity index 98% rename from src/main/java/biz/nellemann/memstress/db/Table.java rename to src/main/java/biz/nellemann/jmemperf/db/Table.java index a464cdb..bc247b2 100644 --- a/src/main/java/biz/nellemann/memstress/db/Table.java +++ b/src/main/java/biz/nellemann/jmemperf/db/Table.java @@ -1,7 +1,7 @@ /** * Example taken from: https://medium.com/@mithoonkumar/design-an-in-memory-nosql-database-ood-428d48b68dfa */ -package biz.nellemann.memstress.db; +package biz.nellemann.jmemperf.db; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/src/main/resources/logback.xml b/src/main/resources/logback.xml index 1c6f3db..0640d69 100644 --- a/src/main/resources/logback.xml +++ b/src/main/resources/logback.xml @@ -3,7 +3,7 @@ false - %cyan(%d{yyyy-MM-dd HH:mm:ss.SSS}) %gray([%-10thread]) %highlight(%-5level) %magenta(%logger{12}) - %msg%n + %cyan(%d{yyyy-MM-dd HH:mm:ss.SSS}) - %msg%n diff --git a/src/test/groovy/biz/nellemann/memstress/ApplicationTest.groovy b/src/test/groovy/biz/nellemann/jmemperf/ApplicationTest.groovy similarity index 83% rename from src/test/groovy/biz/nellemann/memstress/ApplicationTest.groovy rename to src/test/groovy/biz/nellemann/jmemperf/ApplicationTest.groovy index 91c31b1..52550bf 100644 --- a/src/test/groovy/biz/nellemann/memstress/ApplicationTest.groovy +++ b/src/test/groovy/biz/nellemann/jmemperf/ApplicationTest.groovy @@ -1,7 +1,7 @@ /* * This Spock specification was generated by the Gradle 'init' task. */ -package biz.nellemann.memstress +package biz.nellemann.jmemperf import spock.lang.Specification -- 2.43.4