diff --git a/test/src/org/josh/JoshDB/FileTrie/ConsistencyTest.java b/test/src/org/josh/JoshDB/FileTrie/ConsistencyTest.java index 5eb3dbc..2b02dc9 100644 --- a/test/src/org/josh/JoshDB/FileTrie/ConsistencyTest.java +++ b/test/src/org/josh/JoshDB/FileTrie/ConsistencyTest.java @@ -439,7 +439,7 @@ public void testReadWriteMetadataConsistency() for (int i = 0; i < testArray.length; i++) { - testArray[i] = new byte[random.nextInt(0x10000)]; + testArray[i] = new byte[0x10000]; random.nextBytes(testArray[i]); } @@ -505,6 +505,8 @@ public void testReadWriteMetadataConsistency() readSucesses[i] = false; } + long startTime = System.nanoTime(); + startAndJoinThreads ( testArray.length, @@ -572,6 +574,22 @@ public void testReadWriteMetadataConsistency() } ); + long endTime = System.nanoTime(); + + System + .out + .println + ( + "It took " + + (endTime - startTime) + + " nanoseconds" + + " to read " + + testArray.length + + " objects, each " + + testArray[0].length + + " bytes long" + ); + boolean globalSuccess = true; for (int i = 0; i < readSucesses.length; i++) {