[Perf] Better message for PERF VARIATION type

Reviewed By: ddino

Differential Revision: D13118585

fbshipit-source-id: 219b16236
master
Martino Luca 6 years ago committed by Facebook Github Bot
parent ed25b70ff2
commit b61d21cbff

@ -145,19 +145,19 @@ let issue_of_cost cost_info ~delta ~prev_cost ~curr_cost =
| `Increased ->
Format.fprintf fmt "increased"
in
let pp_raw_cost fmt cost_polynomial =
let pp_extra_msg fmt cost_polynomial =
if Config.developer_mode then
Format.fprintf fmt " Cost is %a (degree is %a)" CostDomain.BasicCost.pp cost_polynomial
Format.fprintf fmt "Cost is %a (degree is %a)" CostDomain.BasicCost.pp cost_polynomial
CostDomain.BasicCost.pp_degree cost_polynomial
else ()
else Format.fprintf fmt "Please make sure this is an expected change."
in
Format.asprintf "Complexity of this function has %a from %a to %a.%a"
Format.asprintf "Complexity of this function has %a from %a to %a. %a"
(MarkupFormatter.wrap_bold pp_delta)
delta
(MarkupFormatter.wrap_monospaced CostDomain.BasicCost.pp_degree_hum)
prev_cost
(MarkupFormatter.wrap_monospaced CostDomain.BasicCost.pp_degree_hum)
curr_cost pp_raw_cost curr_cost
curr_cost pp_extra_msg curr_cost
in
let line = cost_info.Jsonbug_t.loc.lnum in
let column = cost_info.Jsonbug_t.loc.cnum in

Loading…
Cancel
Save