[cost] Model Map.containsValue

Reviewed By: da319

Differential Revision: D26016675

fbshipit-source-id: 35a7e4d50
master
Ezgi Çiçek 4 years ago committed by Facebook GitHub Bot
parent 840a10afaa
commit 34eb8ebafb

@ -303,6 +303,8 @@ module Call = struct
$+...$--> BoundsOfCollection.linear_length ~of_function:"Iterable.forEach"
; +PatternMatch.Java.implements_map &:: "forEach" $ capt_exp
$+...$--> BoundsOfCollection.linear_length ~of_function:"Map.forEach"
; +PatternMatch.Java.implements_map &:: "containsValue" $ capt_exp
$+...$--> BoundsOfCollection.linear_length ~of_function:"Map.containsValue"
; +PatternMatch.Java.implements_collections
&:: "fill" <>$ capt_exp
$+...$--> BoundsOfCollection.linear_length ~of_function:"Collections.fill"

@ -27,4 +27,8 @@ class MapTest {
newmap.putAll(map);
for (Integer name : newmap.values()) {}
}
boolean containsNullValue_linear(HashMap<Integer, String> keyMap) {
return keyMap.containsValue(null);
}
}

@ -301,6 +301,7 @@ codetoanalyze/java/performance/Loops.java, codetoanalyze.java.performance.Loops.
codetoanalyze/java/performance/Loops.java, codetoanalyze.java.performance.Loops.unboundedSymbol_FP():void, , OnUIThread:false, [Unbounded value x,Call to void Loops.loop_linear(int),Loop]
codetoanalyze/java/performance/Loops.java, codetoanalyze.java.performance.Loops.zeropad_linear_FN(java.lang.String,java.lang.String):void, 17, OnUIThread:false, []
codetoanalyze/java/performance/MapTest.java, MapTest.<init>(), 2, OnUIThread:false, []
codetoanalyze/java/performance/MapTest.java, MapTest.containsNullValue_linear(java.util.HashMap):boolean, 4 + keyMap.length, OnUIThread:false, [{keyMap.length},Modeled call to Map.containsValue]
codetoanalyze/java/performance/MapTest.java, MapTest.entrySet_linear(java.util.Map):void, 8 + 8 ⋅ map.length + 3 ⋅ (map.length + 1), OnUIThread:false, [{map.length + 1},Loop,{map.length},Loop]
codetoanalyze/java/performance/MapTest.java, MapTest.keySet_linear(java.util.Map):void, 8 + 8 ⋅ map.length + 3 ⋅ (map.length + 1), OnUIThread:false, [{map.length + 1},Loop,{map.length},Loop]
codetoanalyze/java/performance/MapTest.java, MapTest.putAll_linear(java.util.Map):void, 14 + 8 ⋅ map.length + 3 ⋅ (map.length + 1), OnUIThread:false, [{map.length + 1},Loop,{map.length},Loop]

Loading…
Cancel
Save