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();