[CostReport] Add procedure name to cost report items

Reviewed By: ezgicicek

Differential Revision: D14703597

fbshipit-source-id: 5bfeb29c8
master
Katie Ots 6 years ago committed by Facebook Github Bot
parent de1ae90a27
commit d805a0ddba

@ -64,6 +64,7 @@ type hum_info = {
type cost_item = {
hash : string;
loc : loc;
procedure_name : string;
procedure_id : string;
polynomial : string;
hum : hum_info;

@ -361,6 +361,7 @@ module JsonCostsPrinter = MakeJsonListPrinter (struct
let file = SourceFile.to_rel_path loc.Location.file in
{ Jsonbug_t.hash= compute_hash ~severity:"" ~bug_type:"" ~proc_name ~file ~qualifier:""
; loc= {file; lnum= loc.Location.line; cnum= loc.Location.col; enum= -1}
; procedure_name= Typ.Procname.get_method proc_name
; procedure_id= procedure_id_of_procname proc_name
; polynomial= CostDomain.BasicCost.encode basic_operation_cost
; hum }

Loading…
Cancel
Save