[cost] Fix class name lookup in Cold Start

Reviewed By: jvillard

Differential Revision: D14870135

fbshipit-source-id: 623777865
master
Ezgi Çiçek 6 years ago committed by Facebook Github Bot
parent b802620bc8
commit bbc417cb44

@ -138,16 +138,13 @@ let to_map key_func report =
let issue_of_cost cost_info ~delta ~prev_cost ~curr_cost = let issue_of_cost cost_info ~delta ~prev_cost ~curr_cost =
let file = cost_info.Jsonbug_t.loc.file in let file = cost_info.Jsonbug_t.loc.file in
let class_name, method_name = let method_name = cost_info.Jsonbug_t.procedure_name in
match String.split cost_info.Jsonbug_t.procedure_id ~on:'(' with let class_name =
| [qualified_function; _] -> ( match Str.split (Str.regexp ("." ^ method_name)) cost_info.Jsonbug_t.procedure_id with
match String.split qualified_function ~on:'.' with | [class_name; _] ->
| [class_name; method_name] -> class_name
(class_name, method_name)
| _ ->
("", cost_info.Jsonbug_t.procedure_id) )
| _ -> | _ ->
("", cost_info.Jsonbug_t.procedure_id) ""
in in
let procname = ExternalPerfData.make_void_signature_procname class_name method_name in let procname = ExternalPerfData.make_void_signature_procname class_name method_name in
let source_file = SourceFile.create ~warn_on_error:false file in let source_file = SourceFile.create ~warn_on_error:false file in

Loading…
Cancel
Save