From 89831e61dc68b29ceb6c1cc579f6a7bb17a46d70 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Fri, 3 Oct 2014 03:47:27 +0200 Subject: TestByteBufferCopyStream, TestByteBufferInputStream: Reduce load and test time --- .../common/nio/TestByteBufferCopyStream.java | 29 +++++++++++++++------- 1 file changed, 20 insertions(+), 9 deletions(-) (limited to 'src/junit/com/jogamp/common/nio/TestByteBufferCopyStream.java') 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 ); } -- cgit v1.2.3