From dfed1b947e683293fa55071a5c246a2adcdf974f Mon Sep 17 00:00:00 2001 From: kimchy Date: Fri, 17 Jun 2011 01:19:12 +0300 Subject: [PATCH] fix bench --- .../benchmark/trove/StringMapAdjustOrPutBenchmark.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/benchmark/micro/src/main/java/org/elasticsearch/benchmark/trove/StringMapAdjustOrPutBenchmark.java b/modules/benchmark/micro/src/main/java/org/elasticsearch/benchmark/trove/StringMapAdjustOrPutBenchmark.java index a434557c0eb..4f0b17fc155 100644 --- a/modules/benchmark/micro/src/main/java/org/elasticsearch/benchmark/trove/StringMapAdjustOrPutBenchmark.java +++ b/modules/benchmark/micro/src/main/java/org/elasticsearch/benchmark/trove/StringMapAdjustOrPutBenchmark.java @@ -76,10 +76,10 @@ public class StringMapAdjustOrPutBenchmark { if (REUSE) { iMap.clear(); } else { - map = new TObjectIntHashMap(); + iMap = new TObjectIntCustomHashMap(new StringIdentityHashingStrategy()); } for (long i = 0; i < PUT_OPERATIONS; i++) { - iMap = new TObjectIntCustomHashMap(new StringIdentityHashingStrategy()); + iMap.adjustOrPutValue(values[(int) (i % NUMBER_OF_KEYS)], 1, 1); } } stopWatch.stop(); @@ -93,10 +93,10 @@ public class StringMapAdjustOrPutBenchmark { if (REUSE) { iMap.clear(); } else { - map = new TObjectIntHashMap(); + iMap = new TObjectIntCustomHashMap(new IdentityHashingStrategy()); } for (long i = 0; i < PUT_OPERATIONS; i++) { - iMap = new TObjectIntCustomHashMap(new IdentityHashingStrategy()); + iMap.adjustOrPutValue(values[(int) (i % NUMBER_OF_KEYS)], 1, 1); } } stopWatch.stop();