diff options
Diffstat (limited to 'subprojects/store/src/jmh')
-rw-r--r-- | subprojects/store/src/jmh/java/tools/refinery/store/map/benchmarks/ImmutablePutExecutionPlan.java | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/subprojects/store/src/jmh/java/tools/refinery/store/map/benchmarks/ImmutablePutExecutionPlan.java b/subprojects/store/src/jmh/java/tools/refinery/store/map/benchmarks/ImmutablePutExecutionPlan.java index 7e89cd06..4708e6d3 100644 --- a/subprojects/store/src/jmh/java/tools/refinery/store/map/benchmarks/ImmutablePutExecutionPlan.java +++ b/subprojects/store/src/jmh/java/tools/refinery/store/map/benchmarks/ImmutablePutExecutionPlan.java | |||
@@ -5,12 +5,13 @@ | |||
5 | */ | 5 | */ |
6 | package tools.refinery.store.map.benchmarks; | 6 | package tools.refinery.store.map.benchmarks; |
7 | 7 | ||
8 | import java.util.Objects; | ||
8 | import java.util.Random; | 9 | import java.util.Random; |
9 | 10 | ||
10 | import tools.refinery.store.map.ContinousHashProvider; | 11 | import tools.refinery.store.map.ContinuousHashProvider; |
11 | import tools.refinery.store.map.VersionedMapStore; | 12 | import tools.refinery.store.map.VersionedMapStore; |
12 | import tools.refinery.store.map.VersionedMapStoreImpl; | 13 | import tools.refinery.store.map.internal.state.VersionedMapStoreStateImpl; |
13 | import tools.refinery.store.map.internal.VersionedMapImpl; | 14 | import tools.refinery.store.map.internal.state.VersionedMapStateImpl; |
14 | import tools.refinery.store.map.tests.utils.MapTestEnvironment; | 15 | import tools.refinery.store.map.tests.utils.MapTestEnvironment; |
15 | 16 | ||
16 | import org.openjdk.jmh.annotations.Level; | 17 | import org.openjdk.jmh.annotations.Level; |
@@ -35,7 +36,7 @@ public class ImmutablePutExecutionPlan { | |||
35 | 36 | ||
36 | private String[] values; | 37 | private String[] values; |
37 | 38 | ||
38 | private ContinousHashProvider<Integer> hashProvider = MapTestEnvironment.prepareHashProvider(false); | 39 | private ContinuousHashProvider<Integer> hashProvider = MapTestEnvironment.prepareHashProvider(false); |
39 | 40 | ||
40 | @Setup(Level.Trial) | 41 | @Setup(Level.Trial) |
41 | public void setUpTrial() { | 42 | public void setUpTrial() { |
@@ -43,9 +44,9 @@ public class ImmutablePutExecutionPlan { | |||
43 | values = MapTestEnvironment.prepareValues(nValues, true); | 44 | values = MapTestEnvironment.prepareValues(nValues, true); |
44 | } | 45 | } |
45 | 46 | ||
46 | public VersionedMapImpl<Integer, String> createSut() { | 47 | public VersionedMapStateImpl<Integer, String> createSut() { |
47 | VersionedMapStore<Integer, String> store = new VersionedMapStoreImpl<Integer, String>(hashProvider, values[0]); | 48 | VersionedMapStore<Integer, String> store = new VersionedMapStoreStateImpl<>(hashProvider, values[0]); |
48 | return (VersionedMapImpl<Integer, String>) store.createMap(); | 49 | return (VersionedMapStateImpl<Integer, String>) store.createMap(); |
49 | } | 50 | } |
50 | 51 | ||
51 | public Integer nextKey() { | 52 | public Integer nextKey() { |
@@ -53,7 +54,7 @@ public class ImmutablePutExecutionPlan { | |||
53 | } | 54 | } |
54 | 55 | ||
55 | public boolean isDefault(String value) { | 56 | public boolean isDefault(String value) { |
56 | return value == values[0]; | 57 | return Objects.equals(value,values[0]); |
57 | } | 58 | } |
58 | 59 | ||
59 | public String nextValue() { | 60 | public String nextValue() { |