Builder_web.job_build_treemap: Calculating extra chunks inserted in treemap-scale

This commit is contained in:
rand00 2021-12-16 12:38:31 +01:00 committed by Reynir Björnsson
parent fdd00a17ab
commit 82c5614440

View file

@ -212,7 +212,7 @@ let add_routes datadir =
m "Error reading ELF file %a" Fpath.pp path)) m "Error reading ELF file %a" Fpath.pp path))
>>= fun infos -> >>= fun infos ->
let svg_html = let svg_html =
let info, excluded = let info, excluded_minors =
let size, info = let size, info =
infos infos
|> Info.import |> Info.import
@ -231,9 +231,19 @@ let add_routes datadir =
|> Info.cut 2 |> Info.cut 2
|> Info.partition_subtrees node_big_enough |> Info.partition_subtrees node_big_enough
in in
let scale_chunks =
let excluded_minors_size =
excluded_minors
|> List.map Info.compute_area
|> List.fold_left Int64.add 0L
in
[
"Minor subtrees", excluded_minors_size
]
in
info info
|> Treemap.of_tree |> Treemap.of_tree
|> Treemap.to_html_with_scale ~binary_size (*goto add 'excluded' via some new param*) |> Treemap.to_html_with_scale ~binary_size ~scale_chunks
|> Fmt.to_to_string (Tyxml.Html.pp ()) |> Fmt.to_to_string (Tyxml.Html.pp ())
(* |> Treemap.svg (* |> Treemap.svg
* |> Fmt.to_to_string (Tyxml.Svg.pp ()) *) * |> Fmt.to_to_string (Tyxml.Svg.pp ()) *)