Deactivate tracing for choose version (#10351)

This commit is contained in:
konsti 2025-01-07 10:55:06 +01:00 committed by GitHub
parent eb6ad9a4fa
commit 180a138161
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 8 additions and 1 deletions

View File

@ -67,3 +67,6 @@ url = { workspace = true }
[dev-dependencies] [dev-dependencies]
insta = { version = "1.40.0" } insta = { version = "1.40.0" }
toml = { workspace = true } toml = { workspace = true }
[features]
tracing-durations-export = []

View File

@ -1013,7 +1013,10 @@ impl<InstalledPackages: InstalledPackagesProvider> ResolverState<InstalledPackag
/// ///
/// Returns `None` when there are no versions in the given range, rejecting the current partial /// Returns `None` when there are no versions in the given range, rejecting the current partial
/// solution. /// 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( fn choose_version(
&self, &self,
package: &PubGrubPackage, package: &PubGrubPackage,

View File

@ -142,6 +142,7 @@ performance = [
] ]
performance-memory-allocator = ["dep:uv-performance-memory-allocator"] performance-memory-allocator = ["dep:uv-performance-memory-allocator"]
performance-flate2-backend = ["dep:uv-performance-flate2-backend"] 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. # Introduces a dependency on a local Python installation.
python = [] python = []