summaryrefslogtreecommitdiffstats
path: root/src/junit/com/jogamp/common/util/IntIntHashMapTest.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/junit/com/jogamp/common/util/IntIntHashMapTest.java')
-rw-r--r--src/junit/com/jogamp/common/util/IntIntHashMapTest.java13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/junit/com/jogamp/common/util/IntIntHashMapTest.java b/src/junit/com/jogamp/common/util/IntIntHashMapTest.java
index bc02947..9d58db0 100644
--- a/src/junit/com/jogamp/common/util/IntIntHashMapTest.java
+++ b/src/junit/com/jogamp/common/util/IntIntHashMapTest.java
@@ -105,6 +105,11 @@ public class IntIntHashMapTest {
@Test
public void benchmark() {
+ benchmark(true);
+ benchmark(false);
+ }
+
+ void benchmark(boolean warmup) {
// simple benchmark
final IntIntHashMap intmap = new IntIntHashMap(1024);
@@ -158,9 +163,11 @@ public class IntIntHashMapTest {
map.remove(rndValues[i]);
}
- assertTrue("'put' to slow", intmapPutTime <= mapPutTime);
- assertTrue("'get' to slow", intmapGetTime <= mapGetTime);
- assertTrue("'remove' to slow", intmapRemoveTime <= mapRemoveTime);
+ if(!warmup) {
+ assertTrue("'put' too slow", intmapPutTime <= mapPutTime);
+ assertTrue("'get' too slow", intmapGetTime <= mapGetTime);
+ assertTrue("'remove' too slow", intmapRemoveTime <= mapRemoveTime);
+ }
}