diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/junit/com/jogamp/common/nio/TestByteBufferCopyStream.java | 29 | ||||
-rw-r--r-- | src/junit/com/jogamp/common/nio/TestByteBufferInputStream.java | 18 |
2 files changed, 25 insertions, 22 deletions
diff --git a/src/junit/com/jogamp/common/nio/TestByteBufferCopyStream.java b/src/junit/com/jogamp/common/nio/TestByteBufferCopyStream.java index fef26b6..fff2c6f 100644 --- a/src/junit/com/jogamp/common/nio/TestByteBufferCopyStream.java +++ b/src/junit/com/jogamp/common/nio/TestByteBufferCopyStream.java @@ -150,6 +150,14 @@ public class TestByteBufferCopyStream extends JunitTracer { /** {@value} */ static final long halfMiB = 1L << 19; /** {@value} */ + static final long quaterGiB = 1L << 28; + /** {@value} */ + static final long quaterPlusGiB = quaterGiB + halfMiB; + /** {@value} */ + static final long halfGiB = 1L << 29; + /** {@value} */ + static final long halfPlusGiB = halfGiB + halfMiB; + /** {@value} */ static final long oneGiB = 1L << 30; /** {@value} */ static final long onePlusGiB = oneGiB + halfMiB; @@ -158,6 +166,9 @@ public class TestByteBufferCopyStream extends JunitTracer { /** {@value} */ static final long twoPlusGiB = twoGiB + halfMiB; + /** {@value} */ + static final long lala = ( 1L << 27 ); + @Test public void test00() throws IOException { final int srcSliceShift = MappedByteBufferInputStream.DEFAULT_SLICE_SHIFT; @@ -178,27 +189,27 @@ public class TestByteBufferCopyStream extends JunitTracer { @Test public void test02() throws IOException { - final int srcSliceShift = 28; // 256M bytes per slice - final int dstSliceShift = 28; // 256M bytes per slice - final long size = onePlusGiB; + final int srcSliceShift = 27; // 125M bytes per slice + final int dstSliceShift = 27; // 125M bytes per slice + final long size = halfPlusGiB; testImpl(getSimpleTestName(".")+"_In.bin", size, MappedByteBufferInputStream.CacheMode.FLUSH_PRE_SOFT, srcSliceShift, getSimpleTestName(".")+"_Out.bin", MappedByteBufferInputStream.CacheMode.FLUSH_PRE_SOFT, dstSliceShift ); } @Test public void test11() throws IOException { - final int srcSliceShift = 28; // 256M bytes per slice - final int dstSliceShift = 27; // 128M bytes per slice - final long size = onePlusGiB; + final int srcSliceShift = 26; // 64M bytes per slice + final int dstSliceShift = 25; // 32M bytes per slice + final long size = quaterPlusGiB; testImpl(getSimpleTestName(".")+"_In.bin", size, MappedByteBufferInputStream.CacheMode.FLUSH_PRE_SOFT, srcSliceShift, getSimpleTestName(".")+"_Out.bin", MappedByteBufferInputStream.CacheMode.FLUSH_PRE_SOFT, dstSliceShift ); } @Test public void test12() throws IOException { - final int srcSliceShift = 27; // 128M bytes per slice - final int dstSliceShift = 28; // 256M bytes per slice - final long size = onePlusGiB; + final int srcSliceShift = 25; // 32M bytes per slice + final int dstSliceShift = 26; // 64M bytes per slice + final long size = quaterPlusGiB; testImpl(getSimpleTestName(".")+"_In.bin", size, MappedByteBufferInputStream.CacheMode.FLUSH_PRE_SOFT, srcSliceShift, getSimpleTestName(".")+"_Out.bin", MappedByteBufferInputStream.CacheMode.FLUSH_PRE_SOFT, dstSliceShift ); } diff --git a/src/junit/com/jogamp/common/nio/TestByteBufferInputStream.java b/src/junit/com/jogamp/common/nio/TestByteBufferInputStream.java index 61961a3..f325b30 100644 --- a/src/junit/com/jogamp/common/nio/TestByteBufferInputStream.java +++ b/src/junit/com/jogamp/common/nio/TestByteBufferInputStream.java @@ -137,7 +137,7 @@ public class TestByteBufferInputStream extends JunitTracer { testCopyIntSize1Impl(fileHalfGiB, halfGiB); - testCopyIntSize1Impl(fileOneGiB, oneGiB); + // testCopyIntSize1Impl(fileOneGiB, oneGiB); } static enum SrcType { COPY, MMAP1, MMAP2_NONE, MMAP2_SOFT, MMAP2_HARD }; @@ -161,18 +161,10 @@ public class TestByteBufferInputStream extends JunitTracer { } void testCopyIntSize1Impl(final String testFileName, final long expSize) throws IOException { - testCopyIntSize1Impl(SrcType.COPY, buffer__8KiB, testFileName, expSize); - testCopyIntSize1Impl(SrcType.COPY, hunMiB, testFileName, expSize); - testCopyIntSize1Impl(SrcType.MMAP1, 0, testFileName, expSize); - testCopyIntSize1Impl(SrcType.MMAP2_SOFT, 0, testFileName, expSize); - System.err.println(); - } - void testCopyIntSize1Impl(final SrcType srcType, final int reqBufferSize, final String testFileName, final long expSize) throws IOException { - if( testCopyIntSize1Impl2(0, srcType, reqBufferSize, testFileName, expSize) ) { - if( testCopyIntSize1Impl2(1, srcType, reqBufferSize, testFileName, expSize) ) { - // testCopyIntSize1Impl2(2, srcType, reqBufferSize, testFileName, expSize); - } - } + testCopyIntSize1Impl2(0, SrcType.COPY, buffer__8KiB, testFileName, expSize); + testCopyIntSize1Impl2(0, SrcType.COPY, hunMiB, testFileName, expSize); + testCopyIntSize1Impl2(0, SrcType.MMAP1, 0, testFileName, expSize); + testCopyIntSize1Impl2(0, SrcType.MMAP2_SOFT, 0, testFileName, expSize); System.err.println(); } boolean testCopyIntSize1Impl2(final int iter, final SrcType srcType, final int reqBufferSize, final String testFileName, final long expSize) throws IOException { |