changeset 16:494232ec77d8

Much shorter alloc.* tests.
author shade
date Tue, 29 Nov 2016 17:00:50 +0100
parents 15c589c2251f
children 27e18d65dad9
files src/main/java/org/openjdk/gcbench/GCBench.java src/main/java/org/openjdk/gcbench/tests/Dimensions.java
diffstat 2 files changed, 12 insertions(+), 12 deletions(-) [+]
line wrap: on
line diff
--- a/src/main/java/org/openjdk/gcbench/GCBench.java	Tue Nov 29 11:42:31 2016 +0100
+++ b/src/main/java/org/openjdk/gcbench/GCBench.java	Tue Nov 29 17:00:50 2016 +0100
@@ -157,21 +157,21 @@
             tests.add(new DimensionalTest(baseOpts, org.openjdk.gcbench.alloc.plain.Objects.class,
                     "alloc.peak.object", groupDescr + "Allocates plain Java Objects.",
                     Dimensions.threads(),
-                    Dimensions.heapSize(8)
+                    Dimensions.heapSize(4)
             ));
 
             tests.add(new DimensionalTest(baseOpts, org.openjdk.gcbench.alloc.plain.PrimArray.class,
                     "alloc.peak.intarray", groupDescr + "Allocates int[] arrays of different sizes.",
                     Dimensions.threads(),
-                    Dimensions.heapSize(8),
-                    Dimensions.size(Sequence.powersOfTen_Sub(1, 1_000_000))
+                    Dimensions.heapSize(4),
+                    Dimensions.size(Sequence.powersOfTen(1, 10_000_000))
             ));
 
             tests.add(new DimensionalTest(baseOpts, org.openjdk.gcbench.alloc.plain.RefArray.class,
                     "alloc.peak.refarray", groupDescr + "Allocates Object[] arrays of different sizes.",
                     Dimensions.threads(),
-                    Dimensions.heapSize(8),
-                    Dimensions.size(Sequence.powersOfTen_Sub(1, 1_000_000))
+                    Dimensions.heapSize(4),
+                    Dimensions.size(Sequence.powersOfTen(1, 10_000_000))
             ));
         }
 
@@ -183,20 +183,20 @@
             tests.add(new DimensionalTest(baseOpts, org.openjdk.gcbench.alloc.ratelimited.Objects.class,
                     "alloc.rated.object", groupDescr + "Allocates plain Java Objects.",
                     true,
-                    Dimensions.heapSize(8)
+                    Dimensions.heapSize(4)
             ));
 
             tests.add(new DimensionalTest(baseOpts, org.openjdk.gcbench.alloc.ratelimited.PrimArray.class,
                     "alloc.rated.intarray", groupDescr + "Allocates int[] arrays of different sizes.",
                     true,
-                    Dimensions.heapSize(8),
-                    Dimensions.size(Sequence.powersOfTen_Sub(1, 10000))
+                    Dimensions.heapSize(4),
+                    Dimensions.size(Sequence.powersOfTen(1, 10_000_000))
             ));
 
             tests.add(new DimensionalTest(baseOpts, org.openjdk.gcbench.alloc.ratelimited.RefArray.class,
                     "alloc.rated.refarray", groupDescr + "Allocates Object[] arrays of different sizes.",
-                    Dimensions.heapSize(8),
-                    Dimensions.size(Sequence.powersOfTen_Sub(1, 10000))
+                    Dimensions.heapSize(4),
+                    Dimensions.size(Sequence.powersOfTen(1, 10_000_000))
             ));
         }
 
--- a/src/main/java/org/openjdk/gcbench/tests/Dimensions.java	Tue Nov 29 11:42:31 2016 +0100
+++ b/src/main/java/org/openjdk/gcbench/tests/Dimensions.java	Tue Nov 29 17:00:50 2016 +0100
@@ -10,13 +10,13 @@
 
     public static Dimension heapSize(int steps) {
         int maxHeap = MaxHeapDetector.MAX_HEAP;
-        return heapSize(maxHeap / steps, maxHeap - maxHeap / steps, steps);
+        return heapSize(maxHeap / 16, maxHeap - maxHeap / 16, steps);
     }
 
     public static Dimension lds(int steps) {
         int maxHeap = MaxHeapDetector.MAX_HEAP;
         return new Dimension(DimensionType.LDS,
-                Sequence.steps(maxHeap / steps, maxHeap - maxHeap / steps, steps));
+                Sequence.steps(maxHeap / 16, maxHeap - maxHeap / 16, steps));
     }
 
     public static Dimension size(Sequence seq) {