|
|
|
@ -217,12 +217,20 @@ let of_costs ~(current_costs : Jsonbug_t.costs_report) ~(previous_costs : Jsonbu
|
|
|
|
|
in
|
|
|
|
|
let curr_cost_info, curr_cost = max_degree_polynomial current in
|
|
|
|
|
let _, prev_cost = max_degree_polynomial previous in
|
|
|
|
|
if
|
|
|
|
|
Config.filtering
|
|
|
|
|
&& (CostDomain.BasicCost.is_one curr_cost || CostDomain.BasicCost.is_one prev_cost)
|
|
|
|
|
then
|
|
|
|
|
(* transitions to/from zero costs are obvious, no need to flag them *)
|
|
|
|
|
(left, both, right)
|
|
|
|
|
else
|
|
|
|
|
let cmp = CostDomain.BasicCost.compare_by_degree curr_cost prev_cost in
|
|
|
|
|
let concat_opt l v = match v with Some v' -> v' :: l | None -> l in
|
|
|
|
|
if cmp > 0 then
|
|
|
|
|
(* introduced *)
|
|
|
|
|
let left' =
|
|
|
|
|
issue_of_cost curr_cost_info ~delta:`Increased ~prev_cost ~curr_cost |> concat_opt left
|
|
|
|
|
issue_of_cost curr_cost_info ~delta:`Increased ~prev_cost ~curr_cost
|
|
|
|
|
|> concat_opt left
|
|
|
|
|
in
|
|
|
|
|
(left', both, right)
|
|
|
|
|
else if cmp < 0 then
|
|
|
|
|