Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ Java 21 needs to be installed to run jdiskmark.
3. Extract release zip archive into desired location.
```
Examples:
/Users/username/jdiskmark-v0.6.0
/Users/username/jdiskmark-v0.6.0
/opt/jdiskmark-v0.6.0
```

Expand Down Expand Up @@ -84,6 +84,7 @@ Source code is available on our [github repo](https://github.com/JDiskMark/jdm-j
- TODO: #33 maven build - lane
- TODO: #40 gui presentation issues - james
- #84 processor info resolved for (sp) installs
- #73 refactor benchmark data model, keyboard op sel

### v0.6.2 linux optimized ui
- #64 persist IOPS, write sync - val
Expand Down
6 changes: 3 additions & 3 deletions build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -83,12 +83,12 @@
<!-- version properties -->
<property name="pkg.name" value="jdiskmark"/>
<property name="app.name" value="JDiskMark"/>
<property name="version" value="0.6.2"/>
<property name="version" value="0.6.3-dev"/>
<!-- full semver does not work for msi product versions -->
<property name="msi.version" value="0.6.2"/>
<property name="msi.version" value="0.6.3"/>
<property name="msi.app.title" value="${app.name} ${version}"/>
<property name="release.dir" value="${pkg.name}-${version}"/>
<property name="dmg.version" value="1.6.0"/>
<property name="dmg.version" value="1.6.3"/>

<!-- msi signing properties -->
<property name="timestamp.server.url" value="http://timestamp.sectigo.com"/>
Expand Down
6 changes: 5 additions & 1 deletion src/META-INF/persistence.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,11 @@
<property name="jakarta.persistence.jdbc.url" value="jdbc:derby:derbyDB;create=true"/>
<property name="jakarta.persistence.jdbc.driver" value="org.apache.derby.jdbc.EmbeddedDriver"/>
<property name="eclipselink.logging.level" value="FINE"/>
<property name="eclipselink.ddl-generation" value="create-or-extend-tables"/>
<!-- per gemini this is deprecated -->
<!--<property name="eclipselink.ddl-generation" value="create-or-extend-tables"/>-->
<!-- this will drop and create a new db every time, useful for testing -->
<!--<property name="jakarta.persistence.schema-generation.database.action" value="drop-and-create"/>-->
<property name="jakarta.persistence.schema-generation.database.action" value="create-or-extend-tables"/>
</properties>
</persistence-unit>
</persistence>
30 changes: 17 additions & 13 deletions src/jdiskmark/App.java
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public static enum State { IDLE_STATE, DISK_TEST_STATE };
public static boolean writeSyncEnable = false;

// run configuration
public static Benchmark.BlockSequence blockSequence = Benchmark.BlockSequence.SEQUENTIAL;
public static BenchmarkOperation.BlockSequence blockSequence = BenchmarkOperation.BlockSequence.SEQUENTIAL;
public static int numOfSamples = 200; // desired number of samples
public static int numOfBlocks = 32; // desired number of blocks
public static int blockSizeKb = 512; // size of a block in KBs
Expand All @@ -76,7 +76,9 @@ public static enum State { IDLE_STATE, DISK_TEST_STATE };
public static long rIops = -1;

public static HashMap<String, Benchmark> benchmarks = new HashMap<>();
public static Benchmark.IOMode ioMode = Benchmark.IOMode.WRITE;
public static HashMap<String, BenchmarkOperation> operations = new HashMap<>();
public static Benchmark.BenchmarkType benchmarkType = Benchmark.BenchmarkType.WRITE;
public static BenchmarkOperation.IOMode ioMode = BenchmarkOperation.IOMode.WRITE;


/**
Expand Down Expand Up @@ -210,6 +212,9 @@ public static void loadConfig() {
// configure settings from properties
String value;

value = p.getProperty("benchmarkType", String.valueOf(benchmarkType));
benchmarkType = Benchmark.BenchmarkType.valueOf(value.toUpperCase());

value = p.getProperty("multiFile", String.valueOf(multiFile));
multiFile = Boolean.parseBoolean(value);

Expand All @@ -220,10 +225,7 @@ public static void loadConfig() {
autoReset = Boolean.parseBoolean(value);

value = p.getProperty("blockSequence", String.valueOf(blockSequence));
blockSequence = Benchmark.BlockSequence.valueOf(value.toUpperCase());

value = p.getProperty("ioMode", String.valueOf(ioMode));
App.ioMode = Benchmark.IOMode.valueOf(value.toUpperCase());
blockSequence = BenchmarkOperation.BlockSequence.valueOf(value.toUpperCase());

value = p.getProperty("showMaxMin", String.valueOf(showMaxMin));
showMaxMin = Boolean.parseBoolean(value);
Expand Down Expand Up @@ -254,6 +256,7 @@ public static void saveConfig() {
if (p == null) { p = new Properties(); }

// configure properties
p.setProperty("benchmarkType", benchmarkType.name());
p.setProperty("multiFile", String.valueOf(multiFile));
p.setProperty("autoRemoveData", String.valueOf(autoRemoveData));
p.setProperty("autoReset", String.valueOf(autoReset));
Expand All @@ -266,7 +269,6 @@ public static void saveConfig() {
p.setProperty("numOfThreads", String.valueOf(numOfThreads));
p.setProperty("writeSyncEnable", String.valueOf(writeSyncEnable));
p.setProperty("palette", Gui.palette.name());
p.setProperty("ioMode", ioMode.name());

// write properties file
try {
Expand All @@ -278,13 +280,12 @@ public static void saveConfig() {
}

public static boolean isReadEnabled() {
return ioMode == Benchmark.IOMode.READ || ioMode == Benchmark.IOMode.READ_WRITE;
}
return benchmarkType == Benchmark.BenchmarkType.READ || benchmarkType == Benchmark.BenchmarkType.READ_WRITE;
}

public static boolean isWriteEnabled() {
return ioMode == Benchmark.IOMode.WRITE || ioMode == Benchmark.IOMode.READ_WRITE;
}

return benchmarkType == Benchmark.BenchmarkType.WRITE || benchmarkType == Benchmark.BenchmarkType.READ_WRITE;
}

public static String getConfigString() {
StringBuilder sb = new StringBuilder();
Expand All @@ -302,7 +303,7 @@ public static String getConfigString() {
sb.append("blockSizeKb: ").append(blockSizeKb).append('\n');
sb.append("numOfThreads: ").append(numOfThreads).append('\n');
sb.append("palette: ").append(Gui.palette).append('\n');
sb.append("ioMode: ").append(ioMode).append('\n');
sb.append("ioMode: ").append(benchmarkType).append('\n');
return sb.toString();
}

Expand All @@ -314,6 +315,9 @@ public static void loadBenchmarks() {
Benchmark.findAll().stream().forEach((Benchmark run) -> {
benchmarks.put(run.getStartTimeString(), run);
Gui.runPanel.addRun(run);
for (BenchmarkOperation o : run.getOperations()) {
operations.put(o.getStartTimeString(), o);
}
});
}

Expand Down
Loading