MCPcopy Index your code
hub / github.com/graphql-java/graphql-java / mapGet

Method mapGet

src/jmh/java/benchmark/MapBenchmark.java:75–78  ·  view source on GitHub ↗
(Blackhole blackhole, Map<String, Integer> mapp)

Source from the content-addressed store, hash-verified

73 }
74
75 private void mapGet(Blackhole blackhole, Map<String, Integer> mapp) {
76 int index = rand(0, numberEntries);
77 blackhole.consume(mapp.get("string" + index));
78 }
79
80 private int rand(int loInc, int hiExc) {
81 return random.nextInt(hiExc - loInc) + loInc;

Callers 3

benchmarkHashMapMethod · 0.95
benchmarkImmutableMapMethod · 0.95

Calls 2

randMethod · 0.95
getMethod · 0.65

Tested by

no test coverage detected