A very good starting point, and potentially the last visualization style to add for now. As pointed out in discussions on rust-lang Zulip, there is a tradeoff to duplicated dependencies that may need revisiting in the future - the current approach of dividing the size by the number of dependents is good but not always the 'correct' method.
XVQXXAGZ4WHBQIU3WEUKLZX6FKV5V52LSTTGMFXR42WPWJZJNENQC
PVUQYWZEPOUY4VAFP77EFHZ4I6DJ6XXEUT7PNMBUQUIRG54E2P4QC
ZEN3WUPDVQWI7LPTEG3WQA5QSEHU74CUXVFJJFIJNSIFC7N2CMEAC
C43IWI7GMF6UEKGTXTK4GSQLAFD2SH6BKQRGR4ZQNITYSUK6RMXAC
YA5ITLOV2UWAQZWFJND2WM45DLWG7PTECNJQOLPZAHH2GETPI3HQC
LOR3KOXGQ2VYGDHXQ6MG22ZME5TMPFTUW7A5OG36IAVQANOCXBRAC
V2NPEIA6ZXW2FE24IQBPLUICWIGMW7R2K7MNXUUKMOAAQWSQ36WQC
T34OV3YQGRFMXYWEFLBCFMX3U2TVXF552B5B3S6HMBJZU66PDMYAC
OPTMCUTBEZQT3HETRWVBU4HYSB7NNBA4TY7QOOKCN3YLSMDKNM2QC
7CVIL7UJBYEZ4KHKPJ7ZYSVQ7BLQWWUSJLJR5FOXBICQTD5ETK4QC
JVYWRCPTXQUCJ2BYOWAU36BM5ZKJ5FLKHIKMLSJA7XWOVIY2DMDQC
UQJO24KBYI77E4J6LXWX2IUN7VABQKG6PGKBKWEPDCH5CKYBTC4AC
Style::Treemap => {
Treemap::new()
.data(treemap::data(graph, timings))
.item_style(ItemStyle::new().border_width(5).gap_width(1))
.visible_min(300_u64)
.upper_label(Label::new().show(true))
.color(treemap::color())
// TODO: this is a hack that sets the levels to be a complete worst-case
.levels(treemap::levels(timings.pkg_times().count()))
.color_by(ColorBy::Series)
.into()
}
struct Target {
kind: Vec<TargetKind>,
name: String,
src_path: Utf8PathBuf,
edition: Edition,
doc: bool,
doctest: bool,
test: bool,
pub struct Target {
pub kind: Vec<TargetKind>,
pub name: String,
pub src_path: Utf8PathBuf,
pub edition: Edition,
pub doc: bool,
pub doctest: bool,
pub test: bool,
package_id: cargo_metadata::PackageId,
target: Target,
mode: Mode,
duration: f64,
rmeta_time: Option<f64>,
pub package_id: cargo_metadata::PackageId,
pub target: Target,
pub mode: Mode,
pub duration: f64,
pub rmeta_time: Option<f64>,