From 0e20b6f8696aa0b18e82988bf4bf99f91254f848 Mon Sep 17 00:00:00 2001 From: Weihang Lo Date: Thu, 11 Dec 2025 22:23:26 -0500 Subject: [PATCH 1/5] refactor: rename to make root units outstanding --- src/cargo/ops/cargo_compile/mod.rs | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/cargo/ops/cargo_compile/mod.rs b/src/cargo/ops/cargo_compile/mod.rs index 92c80129031..60f6c8a331e 100644 --- a/src/cargo/ops/cargo_compile/mod.rs +++ b/src/cargo/ops/cargo_compile/mod.rs @@ -397,7 +397,7 @@ pub fn create_bcx<'a, 'gctx>( }) .collect(); - let mut units = Vec::new(); + let mut root_units = Vec::new(); let mut unit_graph = HashMap::new(); let mut scrape_units = Vec::new(); @@ -479,14 +479,14 @@ pub fn create_bcx<'a, 'gctx>( &profiles, interner, )?); - units.extend(targeted_root_units); + root_units.extend(targeted_root_units); scrape_units.extend(targeted_scrape_units); } // TODO: In theory, Cargo should also dedupe the roots, but I'm uncertain // what heuristics to use in that case. if build_config.intent.wants_deps_docs() { - remove_duplicate_doc(build_config, &units, &mut unit_graph); + remove_duplicate_doc(build_config, &root_units, &mut unit_graph); } let host_kind_requested = build_config @@ -496,10 +496,10 @@ pub fn create_bcx<'a, 'gctx>( // Rebuild the unit graph, replacing the explicit host targets with // CompileKind::Host, removing `artifact_target_for_features` and merging any dependencies // shared with build and artifact dependencies. - (units, scrape_units, unit_graph) = rebuild_unit_graph_shared( + (root_units, scrape_units, unit_graph) = rebuild_unit_graph_shared( interner, unit_graph, - &units, + &root_units, &scrape_units, host_kind_requested.then_some(explicit_host_kind), build_config.compile_time_deps_only, @@ -507,7 +507,7 @@ pub fn create_bcx<'a, 'gctx>( let mut extra_compiler_args = HashMap::new(); if let Some(args) = extra_args { - if units.len() != 1 { + if root_units.len() != 1 { anyhow::bail!( "extra arguments to `{}` can only be passed to one \ target, consider filtering\nthe package by passing, \ @@ -515,10 +515,10 @@ pub fn create_bcx<'a, 'gctx>( extra_args_name ); } - extra_compiler_args.insert(units[0].clone(), args); + extra_compiler_args.insert(root_units[0].clone(), args); } - for unit in units + for unit in root_units .iter() .filter(|unit| unit.mode.is_doc() || unit.mode.is_doc_test()) .filter(|unit| rustdoc_document_private_items || unit.target.is_bin()) @@ -541,7 +541,7 @@ pub fn create_bcx<'a, 'gctx>( // Validate target src path for each root unit let mut error_count: usize = 0; - for unit in &units { + for unit in &root_units { if let Some(target_src_path) = unit.target.src_path().path() { validate_target_path_as_source_file( gctx, @@ -619,7 +619,7 @@ where `` is the latest version supporting rustc {rustc_version}" profiles, extra_compiler_args, target_data, - units, + root_units, unit_graph, scrape_units, )?; From 07902c7ec730ef70993e7c6118c46a21b47d183a Mon Sep 17 00:00:00 2001 From: Weihang Lo Date: Fri, 12 Dec 2025 00:58:03 -0500 Subject: [PATCH 2/5] feat(log): unit-gragh construction events --- src/cargo/ops/cargo_compile/mod.rs | 10 +++ src/cargo/util/log_message.rs | 10 +++ tests/testsuite/build_analysis.rs | 100 ++++++++++++++++++++--------- 3 files changed, 90 insertions(+), 30 deletions(-) diff --git a/src/cargo/ops/cargo_compile/mod.rs b/src/cargo/ops/cargo_compile/mod.rs index 60f6c8a331e..ba111b34778 100644 --- a/src/cargo/ops/cargo_compile/mod.rs +++ b/src/cargo/ops/cargo_compile/mod.rs @@ -401,6 +401,11 @@ pub fn create_bcx<'a, 'gctx>( let mut unit_graph = HashMap::new(); let mut scrape_units = Vec::new(); + if let Some(logger) = logger { + let elapsed = ws.gctx().creation_time().elapsed().as_secs_f64(); + logger.log(LogMessage::UnitGraphStarted { elapsed }); + } + for SpecsAndResolvedFeatures { specs, resolved_features, @@ -505,6 +510,11 @@ pub fn create_bcx<'a, 'gctx>( build_config.compile_time_deps_only, ); + if let Some(logger) = logger { + let elapsed = ws.gctx().creation_time().elapsed().as_secs_f64(); + logger.log(LogMessage::UnitGraphFinished { elapsed }); + } + let mut extra_compiler_args = HashMap::new(); if let Some(args) = extra_args { if root_units.len() != 1 { diff --git a/src/cargo/util/log_message.rs b/src/cargo/util/log_message.rs index e91833a5649..08c7da58a3b 100644 --- a/src/cargo/util/log_message.rs +++ b/src/cargo/util/log_message.rs @@ -39,6 +39,16 @@ pub enum LogMessage { /// Workspace root directory. workspace_root: PathBuf, }, + /// Emitted when unit graph generation starts. + UnitGraphStarted { + /// Seconds elapsed from build start. + elapsed: f64, + }, + /// Emitted when unit graph generation finishes. + UnitGraphFinished { + /// Seconds elapsed from build start. + elapsed: f64, + }, /// Emitted when a compilation unit starts. UnitStarted { /// Package ID specification. diff --git a/tests/testsuite/build_analysis.rs b/tests/testsuite/build_analysis.rs index 2f11ab24055..5eedb022da3 100644 --- a/tests/testsuite/build_analysis.rs +++ b/tests/testsuite/build_analysis.rs @@ -127,10 +127,7 @@ fn log_msg_timing_info() { &get_log(0), str![[r#" [ - { - "...": "{...}", - "reason": "build-started" - }, + "{...}", { "elapsed": "{...}", "index": 0, @@ -224,10 +221,7 @@ fn log_msg_timing_info_section_timings() { &get_log(0), str![[r#" [ - { - "...": "{...}", - "reason": "build-started" - }, + "{...}", { "elapsed": "{...}", "index": 0, @@ -373,28 +367,22 @@ fn log_rebuild_reason_fresh_build() { "#]]) .run(); - // Fresh builds do NOT log rebuild-reason - // Only build-started and timing-info are logged + // Fresh builds do NOT log rebuild-reason, + // which is emitted between unit-graph-finished and unit-started assert_e2e().eq( &get_log(0), str![[r#" [ + "{...}", { "...": "{...}", - "reason": "build-started" + "reason": "unit-graph-finished" }, { "...": "{...}", "reason": "unit-started" }, - { - "...": "{...}", - "reason": "unit-rmeta-finished" - }, - { - "...": "{...}", - "reason": "unit-finished" - } + "{...}" ] "#]] .is_json() @@ -430,9 +418,10 @@ fn log_rebuild_reason_file_changed() { &get_log(0), str![[r#" [ + "{...}", { "...": "{...}", - "reason": "build-started" + "reason": "unit-graph-finished" }, { "cause": { @@ -458,14 +447,7 @@ fn log_rebuild_reason_file_changed() { "...": "{...}", "reason": "unit-started" }, - { - "...": "{...}", - "reason": "unit-rmeta-finished" - }, - { - "...": "{...}", - "reason": "unit-finished" - } + "{...}" ] "#]] .is_json() @@ -498,9 +480,10 @@ fn log_rebuild_reason_no_rebuild() { &get_log(0), str![[r#" [ + "{...}", { - "reason": "build-started", - "...": "{...}" + "...": "{...}", + "reason": "unit-graph-finished" } ] "#]] @@ -509,6 +492,63 @@ fn log_rebuild_reason_no_rebuild() { ); } +#[cargo_test] +fn log_msg_unit_graph() { + let p = project() + .file( + "Cargo.toml", + r#" + [package] + name = "foo" + version = "0.0.0" + edition = "2015" + + [dependencies] + bar = { path = "bar" } + "#, + ) + .file("src/lib.rs", "") + .file("build.rs", "fn main() {}") + .file("bar/Cargo.toml", &basic_manifest("bar", "0.0.0")) + .file("bar/src/lib.rs", "") + .build(); + + // `cargo doc` generates more units than `cargo check` + // * check bar + // * build foo build.rs + // * run foo build.rs + // * doc foo + // * doc bar + p.cargo("doc -Zbuild-analysis") + .env("CARGO_BUILD_ANALYSIS_ENABLED", "true") + .masquerade_as_nightly_cargo(&["build-analysis", "section-timings"]) + .run(); + + assert_e2e().eq( + &get_log(0), + str![[r#" +[ + "{...}", + { + "elapsed": "{...}", + "reason": "unit-graph-started", + "run_id": "[..]T[..]Z-[..]", + "timestamp": "[..]T[..]Z" + }, + { + "elapsed": "{...}", + "reason": "unit-graph-finished", + "run_id": "[..]T[..]Z-[..]", + "timestamp": "[..]T[..]Z" + }, + "{...}" +] +"#]] + .is_json() + .against_jsonlines(), + ); +} + fn get_log(idx: usize) -> String { std::fs::read_to_string(log_file(idx)).unwrap() } From d259e47e44d265c7b2b04f3c3eb2faba3ec5f5dc Mon Sep 17 00:00:00 2001 From: Weihang Lo Date: Fri, 12 Dec 2025 01:39:51 -0500 Subject: [PATCH 3/5] feat(log): dependency resolution events --- src/cargo/ops/cargo_compile/mod.rs | 10 ++++++ src/cargo/util/log_message.rs | 10 ++++++ tests/testsuite/build_analysis.rs | 51 ++++++++++++++++++++++++++++++ 3 files changed, 71 insertions(+) diff --git a/src/cargo/ops/cargo_compile/mod.rs b/src/cargo/ops/cargo_compile/mod.rs index ba111b34778..246897f27bf 100644 --- a/src/cargo/ops/cargo_compile/mod.rs +++ b/src/cargo/ops/cargo_compile/mod.rs @@ -304,6 +304,11 @@ pub fn create_bcx<'a, 'gctx>( } }; let dry_run = false; + + if let Some(logger) = logger { + let elapsed = ws.gctx().creation_time().elapsed().as_secs_f64(); + logger.log(LogMessage::ResolutionStarted { elapsed }); + } let resolve = ops::resolve_ws_with_opts( ws, &mut target_data, @@ -321,6 +326,11 @@ pub fn create_bcx<'a, 'gctx>( specs_and_features, } = resolve; + if let Some(logger) = logger { + let elapsed = ws.gctx().creation_time().elapsed().as_secs_f64(); + logger.log(LogMessage::ResolutionFinished { elapsed }); + } + let std_resolve_features = if let Some(crates) = &gctx.cli_unstable().build_std { let (std_package_set, std_resolve, std_features) = standard_lib::resolve_std( ws, diff --git a/src/cargo/util/log_message.rs b/src/cargo/util/log_message.rs index 08c7da58a3b..1183bdc212e 100644 --- a/src/cargo/util/log_message.rs +++ b/src/cargo/util/log_message.rs @@ -39,6 +39,16 @@ pub enum LogMessage { /// Workspace root directory. workspace_root: PathBuf, }, + /// Emitted when resolving dependencies starts. + ResolutionStarted { + /// Seconds elapsed from build start. + elapsed: f64, + }, + /// Emitted when resolving dependencies finishes. + ResolutionFinished { + /// Seconds elapsed from build start. + elapsed: f64, + }, /// Emitted when unit graph generation starts. UnitGraphStarted { /// Seconds elapsed from build start. diff --git a/tests/testsuite/build_analysis.rs b/tests/testsuite/build_analysis.rs index 5eedb022da3..b7c36455580 100644 --- a/tests/testsuite/build_analysis.rs +++ b/tests/testsuite/build_analysis.rs @@ -549,6 +549,57 @@ fn log_msg_unit_graph() { ); } +#[cargo_test] +fn log_msg_resolution_events() { + let p = project() + .file( + "Cargo.toml", + r#" + [package] + name = "foo" + version = "0.0.0" + edition = "2015" + + [dependencies] + bar = { path = "bar" } + "#, + ) + .file("src/lib.rs", "") + .file("build.rs", "fn main() {}") + .file("bar/Cargo.toml", &basic_manifest("bar", "0.0.0")) + .file("bar/src/lib.rs", "") + .build(); + + p.cargo("doc -Zbuild-analysis") + .env("CARGO_BUILD_ANALYSIS_ENABLED", "true") + .masquerade_as_nightly_cargo(&["build-analysis", "section-timings"]) + .run(); + + assert_e2e().eq( + &get_log(0), + str![[r#" +[ + "{...}", + { + "elapsed": "{...}", + "reason": "resolution-started", + "run_id": "[..]T[..]Z-[..]", + "timestamp": "[..]T[..]Z" + }, + { + "elapsed": "{...}", + "reason": "resolution-finished", + "run_id": "[..]T[..]Z-[..]", + "timestamp": "[..]T[..]Z" + }, + "{...}" +] +"#]] + .is_json() + .against_jsonlines(), + ); +} + fn get_log(idx: usize) -> String { std::fs::read_to_string(log_file(idx)).unwrap() } From e668300ef65add3e93176f27287a91fdaed500ab Mon Sep 17 00:00:00 2001 From: Weihang Lo Date: Fri, 12 Dec 2025 17:13:30 -0500 Subject: [PATCH 4/5] feat(log): unit-registered event --- src/cargo/core/compiler/build_context/mod.rs | 5 ++ src/cargo/ops/cargo_compile/mod.rs | 18 ++++++ src/cargo/util/log_message.rs | 13 +++++ tests/testsuite/build_analysis.rs | 60 ++++++++++++++++++++ 4 files changed, 96 insertions(+) diff --git a/src/cargo/core/compiler/build_context/mod.rs b/src/cargo/core/compiler/build_context/mod.rs index 355e32c1663..4ba3bb668f8 100644 --- a/src/cargo/core/compiler/build_context/mod.rs +++ b/src/cargo/core/compiler/build_context/mod.rs @@ -78,6 +78,9 @@ pub struct BuildContext<'a, 'gctx> { /// The dependency graph of units to compile. pub unit_graph: UnitGraph, + /// A map from unit to index. + pub unit_to_index: HashMap, + /// Reverse-dependencies of documented units, used by the `rustdoc --scrape-examples` flag. pub scrape_units: Vec, @@ -96,6 +99,7 @@ impl<'a, 'gctx> BuildContext<'a, 'gctx> { target_data: RustcTargetData<'gctx>, roots: Vec, unit_graph: UnitGraph, + unit_to_index: HashMap, scrape_units: Vec, ) -> CargoResult> { let all_kinds = unit_graph @@ -116,6 +120,7 @@ impl<'a, 'gctx> BuildContext<'a, 'gctx> { target_data, roots, unit_graph, + unit_to_index, scrape_units, all_kinds, }) diff --git a/src/cargo/ops/cargo_compile/mod.rs b/src/cargo/ops/cargo_compile/mod.rs index 246897f27bf..881fa0d9a5b 100644 --- a/src/cargo/ops/cargo_compile/mod.rs +++ b/src/cargo/ops/cargo_compile/mod.rs @@ -64,6 +64,7 @@ use annotate_snippets::{Group, Level, Origin}; pub use compile_filter::{CompileFilter, FilterRule, LibRule}; pub(super) mod unit_generator; +use itertools::Itertools as _; use unit_generator::UnitGenerator; mod packages; @@ -520,7 +521,23 @@ pub fn create_bcx<'a, 'gctx>( build_config.compile_time_deps_only, ); + // unit_graph must be immutable after this point. + let unit_graph = unit_graph; + let units: Vec<_> = unit_graph.keys().sorted().collect(); + let unit_to_index: HashMap<_, _> = units + .iter() + .enumerate() + .map(|(i, &unit)| (unit.clone(), i as u64)) + .collect(); if let Some(logger) = logger { + for (i, unit) in units.into_iter().enumerate() { + logger.log(LogMessage::UnitRegistered { + package_id: unit.pkg.package_id().to_spec(), + target: (&unit.target).into(), + mode: unit.mode, + index: i as u64, + }); + } let elapsed = ws.gctx().creation_time().elapsed().as_secs_f64(); logger.log(LogMessage::UnitGraphFinished { elapsed }); } @@ -641,6 +658,7 @@ where `` is the latest version supporting rustc {rustc_version}" target_data, root_units, unit_graph, + unit_to_index, scrape_units, )?; diff --git a/src/cargo/util/log_message.rs b/src/cargo/util/log_message.rs index 1183bdc212e..5c57252a2ec 100644 --- a/src/cargo/util/log_message.rs +++ b/src/cargo/util/log_message.rs @@ -59,6 +59,19 @@ pub enum LogMessage { /// Seconds elapsed from build start. elapsed: f64, }, + /// Emitted when a compilation unit is registered in the unit graph, + /// right before [`LogMessage::UnitGraphFinished`] that Cargo finalizes + /// the unit graph. + UnitRegistered { + /// Package ID specification. + package_id: PackageIdSpec, + /// Cargo target (lib, bin, example, etc.). + target: Target, + /// The compilation action this unit is for (check, build, test, etc.). + mode: CompileMode, + /// Unit index for compact reference in subsequent events. + index: u64, + }, /// Emitted when a compilation unit starts. UnitStarted { /// Package ID specification. diff --git a/tests/testsuite/build_analysis.rs b/tests/testsuite/build_analysis.rs index b7c36455580..d40297f87a5 100644 --- a/tests/testsuite/build_analysis.rs +++ b/tests/testsuite/build_analysis.rs @@ -535,6 +535,66 @@ fn log_msg_unit_graph() { "run_id": "[..]T[..]Z-[..]", "timestamp": "[..]T[..]Z" }, + { + "index": 0, + "mode": "check", + "package_id": "path+[ROOTURL]/foo/bar#0.0.0", + "reason": "unit-registered", + "run_id": "[..]T[..]Z-[..]", + "target": { + "kind": "lib", + "name": "bar" + }, + "timestamp": "[..]T[..]Z" + }, + { + "index": 1, + "mode": "doc", + "package_id": "path+[ROOTURL]/foo/bar#0.0.0", + "reason": "unit-registered", + "run_id": "[..]T[..]Z-[..]", + "target": { + "kind": "lib", + "name": "bar" + }, + "timestamp": "[..]T[..]Z" + }, + { + "index": 2, + "mode": "doc", + "package_id": "path+[ROOTURL]/foo#0.0.0", + "reason": "unit-registered", + "run_id": "[..]T[..]Z-[..]", + "target": { + "kind": "lib", + "name": "foo" + }, + "timestamp": "[..]T[..]Z" + }, + { + "index": 3, + "mode": "build", + "package_id": "path+[ROOTURL]/foo#0.0.0", + "reason": "unit-registered", + "run_id": "[..]T[..]Z-[..]", + "target": { + "kind": "build-script", + "name": "build-script-build" + }, + "timestamp": "[..]T[..]Z" + }, + { + "index": 4, + "mode": "run-custom-build", + "package_id": "path+[ROOTURL]/foo#0.0.0", + "reason": "unit-registered", + "run_id": "[..]T[..]Z-[..]", + "target": { + "kind": "build-script", + "name": "build-script-build" + }, + "timestamp": "[..]T[..]Z" + }, { "elapsed": "{...}", "reason": "unit-graph-finished", From 9a238b923756e7ef28ea48ac534107a9e81798e9 Mon Sep 17 00:00:00 2001 From: Weihang Lo Date: Fri, 12 Dec 2025 17:17:15 -0500 Subject: [PATCH 5/5] fix(log): fix unit_to_index mapping from bcx This also drops unit metadata fields in unit-started event. The metdata is moved to unit-registered event instead --- src/cargo/core/compiler/timings/mod.rs | 16 +- src/cargo/ops/cargo_report/timings.rs | 13 +- src/cargo/util/log_message.rs | 16 +- tests/testsuite/build_analysis.rs | 24 - ...20060724T012128000Z-b0fd440798ab3cfb.jsonl | 632 +-- ...-20060724T012128000Z-b0fd440798ab3cfb.html | 3997 ++++------------- 6 files changed, 975 insertions(+), 3723 deletions(-) diff --git a/src/cargo/core/compiler/timings/mod.rs b/src/cargo/core/compiler/timings/mod.rs index aaeb57c744d..71f4d9997c1 100644 --- a/src/cargo/core/compiler/timings/mod.rs +++ b/src/cargo/core/compiler/timings/mod.rs @@ -17,7 +17,6 @@ use crate::util::{CargoResult, GlobalContext}; use cargo_util::paths; use indexmap::IndexMap; -use itertools::Itertools as _; use std::collections::HashMap; use std::io::BufWriter; use std::time::{Duration, Instant}; @@ -53,9 +52,6 @@ pub struct Timings<'gctx> { /// Total number of dirty units. total_dirty: u32, /// A map from unit to index. - /// - /// This for saving log size. - /// Only the unit-started event needs to hold the entire unit information. unit_to_index: HashMap, /// Time tracking for each individual unit. unit_times: Vec, @@ -174,13 +170,6 @@ impl<'gctx> Timings<'gctx> { None } }; - let unit_to_index = bcx - .unit_graph - .keys() - .sorted() - .enumerate() - .map(|(i, unit)| (unit.clone(), i as u64)) - .collect(); Timings { gctx: bcx.gctx, @@ -193,7 +182,7 @@ impl<'gctx> Timings<'gctx> { profile, total_fresh: 0, total_dirty: 0, - unit_to_index, + unit_to_index: bcx.unit_to_index.clone(), unit_times: Vec::new(), active: HashMap::new(), last_cpu_state, @@ -237,9 +226,6 @@ impl<'gctx> Timings<'gctx> { }; if let Some(logger) = build_runner.bcx.logger { logger.log(LogMessage::UnitStarted { - package_id: unit_time.unit.pkg.package_id().to_spec(), - target: (&unit_time.unit.target).into(), - mode: unit_time.unit.mode, index: self.unit_to_index[&unit_time.unit], elapsed: start, }); diff --git a/src/cargo/ops/cargo_report/timings.rs b/src/cargo/ops/cargo_report/timings.rs index 666dc8467fb..c17a84f68c5 100644 --- a/src/cargo/ops/cargo_report/timings.rs +++ b/src/cargo/ops/cargo_report/timings.rs @@ -1,5 +1,6 @@ //! The `cargo report timings` command. +use std::collections::HashMap; use std::ffi::OsStr; use std::fs::File; use std::io::BufReader; @@ -178,6 +179,8 @@ fn prepare_context(log: &Path, run_id: &RunId) -> CargoResult = IndexMap::new(); + let mut unit_by_index: HashMap = HashMap::new(); + for (log_index, result) in serde_json::Deserializer::from_reader(reader) .into_iter::() .enumerate() @@ -208,13 +211,17 @@ fn prepare_context(log: &Path, run_id: &RunId) -> CargoResult { + unit_by_index.insert(index, (package_id, target, mode)); + } + LogMessage::UnitStarted { index, elapsed } => { + let (package_id, target, mode) = unit_by_index.get(&index).unwrap(); + let version = package_id .version() .map(|v| v.to_string()) @@ -223,7 +230,7 @@ fn prepare_context(log: &Path, run_id: &RunId) -> CargoResultCargo Build Timings Total units:0 -Max concurrency:11 (jobs=10 ncpu=10) +Max concurrency:10 (jobs=10 ncpu=10) Build start:2006-07-24T01:21:28Z -Total time:10.1s +Total time:5.6s rustc:1.94.0-nightly
Host: [..]
Target: [..] @@ -246,158 +246,158 @@

Cargo Build Timings

1. -jiff v0.2.16 -2.6s -1.9s (74%) -0.5s (21%) -0.1s (4%) +serde_derive v1.0.228 +1.4s +0.8s (54%) +0.3s (19%) +0.4s (27%) 2. -serde_derive v1.0.228 -1.7s -1.0s (59%) -0.3s (18%) -0.4s (22%) +serde_core v1.0.228 +1.1s +1.0s (89%) +0.1s (9%) +0.0s (1%) 3. -thiserror-impl v2.0.17 -1.4s -0.4s (27%) -0.3s (20%) -0.8s (53%) +quote v1.0.42 build-script +1.1s +0.1s (13%) +0.1s (7%) +0.9s (79%) 4. -serde_core v1.0.228 build-script -1.4s -0.1s (7%) -0.1s (7%) -1.2s (86%) +thiserror v2.0.17 build-script +1.1s +0.2s (14%) +0.1s (11%) +0.9s (76%) 5. -proc-macro2 v1.0.103 build-script -1.4s -0.1s (8%) -0.1s (7%) -1.2s (85%) +serde_json v1.0.145 build-script +1.1s +0.1s (12%) +0.0s (4%) +0.9s (83%) 6. -serde_core v1.0.228 build-script (run) -1.3s - - - +proc-macro2 v1.0.103 build-script +1.0s +0.2s (15%) +0.1s (11%) +0.7s (72%) 7. -quote v1.0.42 build-script -1.3s -0.1s (8%) -0.1s (7%) -1.1s (84%) +serde_core v1.0.228 build-script +1.0s +0.2s (15%) +0.1s (10%) +0.7s (74%) 8. -icu_properties_data v2.1.1 build-script -1.3s -0.1s (6%) -0.0s (1%) -1.2s (91%) +serde v1.0.228 build-script +1.0s +0.2s (16%) +0.1s (10%) +0.7s (74%) 9. -icu_normalizer_data v2.1.1 build-script -1.3s -0.1s (7%) -0.0s (1%) -1.1s (90%) +quote v1.0.42 build-script (run) +0.9s + + + 10. -thiserror v2.0.17 build-script (run) -1.3s - - - +syn v2.0.111 +0.9s +0.6s (71%) +0.2s (26%) +0.0s (1%) 11. -zerofrom-derive v0.1.6 -1.2s -0.2s (15%) -0.2s (20%) -0.8s (63%) +thiserror v2.0.17 build-script (run) +0.8s + + + 12. -syn v2.0.111 -1.2s -0.9s (73%) -0.3s (24%) -0.0s (2%) +thiserror-impl v2.0.17 +0.8s +0.2s (32%) +0.1s (18%) +0.4s (49%) 13. -typeid v1.0.3 build-script -1.2s -0.1s (6%) -0.1s (4%) -1.1s (89%) +serde_json v1.0.145 build-script (run) +0.7s + + + 14. -zerovec-derive v0.11.2 -1.2s -0.3s (29%) -0.3s (21%) -0.6s (50%) +serde_json v1.0.145 +0.6s +0.4s (70%) +0.1s (26%) +0.0s (2%) 15. -num-traits v0.2.19 build-script (run) -1.2s - - - +serde v1.0.228 +0.5s +0.4s (87%) +0.0s (10%) +0.0s (2%) 16. -typeid v1.0.3 build-script (run) -1.2s +proc-macro2 v1.0.103 build-script (run) +0.5s @@ -406,158 +406,88 @@

Cargo Build Timings

17. -serde v1.0.228 build-script -1.2s -0.1s (6%) -0.1s (6%) -1.0s (87%) +memchr v2.7.6 +0.4s +0.3s (74%) +0.1s (24%) +0.0s (0%) 18. -serde_core v1.0.228 -1.2s -1.0s (86%) -0.1s (12%) -0.0s (1%) +tracing-core v0.1.35 +0.4s +0.3s (65%) +0.1s (32%) +0.0s (0%) 19. -cargo-util-schemas v0.12.0 -1.1s -0.8s (74%) -0.3s (24%) -0.0s (3%) +once_cell v1.21.3 +0.3s +0.3s (85%) +0.0s (12%) +0.0s (0%) 20. -erased-serde v0.4.9 build-script -1.0s -0.1s (7%) -0.1s (5%) -0.9s (88%) +serde_core v1.0.228 build-script (run) +0.3s + + + 21. -displaydoc v0.2.5 -1.0s -0.2s (17%) -0.2s (21%) -0.6s (62%) +ryu v1.0.20 +0.3s +0.2s (66%) +0.1s (23%) +0.0s (11%) 22. -yoke-derive v0.8.1 -1.0s -0.2s (18%) -0.2s (19%) -0.6s (62%) +proc-macro2 v1.0.103 +0.3s +0.2s (66%) +0.1s (27%) +0.0s (4%) 23. -proc-macro2 v1.0.103 build-script (run) -1.0s - - - +rustfix v0.9.4 +0.3s +0.2s (70%) +0.1s (26%) +0.0s (4%) 24. -icu_properties_data v2.1.1 build-script (run) -0.9s - - - - - - - -25. -num-traits v0.2.19 build-script -0.9s -0.0s (5%) -0.0s (1%) -0.8s (93%) - - - - -26. -thiserror v2.0.17 build-script -0.9s -0.0s (6%) -0.1s (7%) -0.8s (87%) - - - - -27. -zerovec v0.11.5 -0.7s -0.6s (93%) -0.0s (3%) -0.0s (1%) - - - - -28. -erased-serde v0.4.9 build-script (run) -0.7s - - - - - - - -29. -serde v1.0.228 -0.7s -0.6s (88%) -0.1s (10%) -0.0s (0%) - - - - -30. -icu_properties v2.1.1 -0.6s -0.5s (78%) -0.1s (20%) +thiserror v2.0.17 +0.2s +0.2s (90%) +0.0s (2%) 0.0s (0%) -31. -quote v1.0.42 build-script (run) -0.6s - - - - - - - -32. +25. serde v1.0.228 build-script (run) -0.5s +0.2s @@ -565,400 +495,70 @@

Cargo Build Timings

-33. -autocfg v1.5.0 -0.5s -0.2s (44%) -0.3s (54%) -0.0s (4%) +26. +unicode-ident v1.0.22 +0.2s +0.1s (78%) +0.0s (17%) +0.0s (6%) -34. -icu_locale_core v2.1.1 -0.5s -0.3s (72%) -0.1s (26%) +27. +tracing v0.1.43 +0.1s +0.1s (68%) +0.0s (27%) 0.0s (0%) -35. -num-traits v0.2.19 -0.4s -0.4s (86%) -0.1s (12%) -0.0s (2%) - - - - -36. -toml v0.9.8 -0.4s -0.2s (54%) -0.2s (41%) -0.0s (5%) - - - - -37. -zerotrie v0.2.3 -0.4s -0.4s (88%) -0.0s (9%) +28. +quote v1.0.42 +0.1s +0.1s (60%) +0.0s (32%) 0.0s (0%) -38. -erased-serde v0.4.9 -0.4s -0.3s (70%) -0.1s (22%) -0.0s (5%) - - - - -39. -url v2.5.7 -0.4s -0.3s (69%) -0.1s (27%) -0.0s (3%) - - - - -40. -synstructure v0.13.2 -0.4s -0.2s (45%) -0.2s (49%) -0.0s (3%) - - - - -41. -thiserror v2.0.17 -0.4s -0.3s (97%) -0.0s (1%) +29. +pin-project-lite v0.2.16 +0.1s +0.1s (88%) 0.0s (3%) +0.0s (8%) -42. -icu_normalizer_data v2.1.1 build-script (run) -0.3s - - - - - - - -43. -yoke v0.8.1 -0.3s -0.3s (96%) -0.0s (1%) -0.0s (3%) - - - - -44. -semver v1.0.27 -0.3s -0.2s (51%) -0.1s (43%) -0.0s (3%) - - - - -45. -proc-macro2 v1.0.103 -0.3s -0.2s (66%) -0.1s (31%) -0.0s (3%) - - - - -46. -icu_normalizer v2.1.1 -0.3s -0.2s (64%) -0.1s (34%) -0.0s (4%) - - - - -47. -idna v1.1.0 -0.3s -0.1s (50%) -0.1s (46%) -0.0s (4%) - - - - -48. -serde-untagged v0.1.9 -0.3s -0.2s (77%) -0.0s (17%) -0.0s (4%) - - - - -49. -toml_datetime v0.7.3 -0.3s -0.2s (59%) -0.1s (37%) -0.0s (0%) - - - - -50. -zerofrom v0.1.6 -0.3s -0.2s (89%) -0.0s (7%) -0.0s (0%) - - - - -51. -icu_collections v2.1.1 -0.2s -0.2s (69%) -0.1s (31%) -0.0s (0%) - - - - -52. -writeable v0.6.2 -0.2s -0.2s (80%) -0.0s (16%) -0.0s (0%) - - - - -53. -percent-encoding v2.3.2 -0.2s -0.1s (71%) -0.0s (24%) -0.0s (0%) - - - - -54. -serde-value v0.7.0 -0.2s -0.1s (63%) -0.1s (34%) -0.0s (0%) - - - - -55. -litemap v0.8.1 -0.2s -0.2s (78%) -0.0s (10%) -0.0s (5%) - - - - -56. -icu_provider v2.1.1 -0.2s -0.1s (72%) -0.0s (20%) -0.0s (0%) - - - - -57. -smallvec v1.15.1 -0.2s -0.1s (79%) -0.0s (12%) -0.0s (6%) - - - - -58. -quote v1.0.42 -0.2s -0.1s (62%) -0.0s (27%) -0.0s (0%) - - - - -59. -unicode-ident v1.0.22 -0.1s -0.1s (70%) -0.0s (20%) -0.0s (7%) - - - - -60. -serde_spanned v1.0.3 -0.1s -0.1s (69%) -0.0s (17%) -0.0s (7%) - - - - -61. -ordered-float v2.10.1 -0.1s -0.1s (81%) -0.0s (11%) -0.0s (0%) - - - - -62. -icu_properties_data v2.1.1 -0.1s -0.1s (83%) -0.0s (6%) -0.0s (0%) - - - - -63. -tinystr v0.8.2 -0.1s -0.1s (79%) -0.0s (12%) -0.0s (9%) - - - - -64. -form_urlencoded v1.2.2 -0.1s -0.1s (63%) -0.0s (33%) -0.0s (10%) - - - - -65. -stable_deref_trait v1.2.1 -0.1s -0.1s (77%) -0.0s (5%) -0.0s (10%) - - - - -66. -potential_utf v0.1.4 -0.1s -0.1s (69%) -0.0s (23%) -0.0s (0%) - - - - -67. -utf8_iter v1.0.4 -0.1s -0.1s (71%) -0.0s (12%) -0.0s (0%) - - - - -68. -idna_adapter v1.2.1 -0.1s -0.1s (75%) -0.0s (17%) -0.0s (0%) - - - - -69. -typeid v1.0.3 -0.1s -0.0s (73%) -0.0s (24%) -0.0s (17%) - - - - -70. -icu_normalizer_data v2.1.1 -0.1s -0.0s (70%) -0.0s (19%) -0.0s (0%) +30. +itoa v1.0.15 +0.1s +0.1s (82%) +0.0s (5%) +0.0s (8%)