[cost] fix objc block name comparison

Summary:
Following the previous diff, the reason we mistakingly introduced new block as complexity increases is because when we are computing the hash of block, we return the string `block` to compute the hash for all block.

This diff fixes this case by returning the non-verbose name of the block when returning hashable name.

Reviewed By: ezgicicek

Differential Revision: D23729710

fbshipit-source-id: a345d3045
master
Qianyi Shu 4 years ago committed by Facebook GitHub Bot
parent 8a844ab67f
commit 88eb380cc3

@ -637,6 +637,9 @@ let hashable_name proc_name =
before the first colon is used for the bug hash *)
let name = F.asprintf "%a" (pp_simplified_string ~withclass:true) proc_name in
List.hd_exn (String.split name ~on:':')
| Block bsig ->
let name = F.asprintf "%a" (Block.pp Non_verbose) bsig in
List.hd_exn (String.split name ~on:':')
| _ ->
(* Other cases for C and C++ method names *)
F.asprintf "%a" (pp_simplified_string ~withclass:true) proc_name

@ -1 +0,0 @@
EXECUTION_TIME_COMPLEXITY_INCREASE, no_bucket, src/DiffBlock.m, objc_blockHandler.create_block_here:array:call:_2, 0, [Previous Cost of objc_blockHandler.func_linear_1 is 22 (degree is 0),Updated Cost of objc_blockHandler.create_block_here:array:call:_2 is 5 + 5 ⋅ array->elements.length + 4 ⋅ (array->elements.length + 1) (degree is 1),{array->elements.length + 1},Loop]
Loading…
Cancel
Save