Skip to content

Commit

Permalink
Deactivate tracing for choose version (#10351)
Browse files Browse the repository at this point in the history
  • Loading branch information
konstin authored Jan 7, 2025
1 parent eb6ad9a commit 180a138
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
3 changes: 3 additions & 0 deletions crates/uv-resolver/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -67,3 +67,6 @@ url = { workspace = true }
[dev-dependencies]
insta = { version = "1.40.0" }
toml = { workspace = true }

[features]
tracing-durations-export = []
5 changes: 4 additions & 1 deletion crates/uv-resolver/src/resolver/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1013,7 +1013,10 @@ impl<InstalledPackages: InstalledPackagesProvider> ResolverState<InstalledPackag
///
/// Returns `None` when there are no versions in the given range, rejecting the current partial
/// solution.
#[instrument(skip_all, fields(%package))]
// TODO(konsti): re-enable tracing. This trace is crucial to understanding the
// tracing-durations-export diagrams, but it took ~5% resolver thread runtime for apache-airflow
// when I last measured.
#[cfg_attr(feature = "tracing-durations-export", instrument(skip_all, fields(%package)))]
fn choose_version(
&self,
package: &PubGrubPackage,
Expand Down
1 change: 1 addition & 0 deletions crates/uv/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ performance = [
]
performance-memory-allocator = ["dep:uv-performance-memory-allocator"]
performance-flate2-backend = ["dep:uv-performance-flate2-backend"]
tracing-durations-export = ["dep:tracing-durations-export", "uv-resolver/tracing-durations-export"]

# Introduces a dependency on a local Python installation.
python = []
Expand Down

0 comments on commit 180a138

Please sign in to comment.