mirror of
https://github.com/astral-sh/uv.git
synced 2025-12-04 00:54:42 +00:00
Better tracing span (#513)
This will help us get better insight into what is happening and how long it takes. I'm particularly interested in how long the different source dist steps take (download, extract, build step(s)), to make better decisions about their caching, which i want to report through tracing. Example output: ```console $ RUST_LOG=puffin=info cargo run --bin puffin -q -- pip-compile -v --no-cache scripts/requirements/all-kinds.in > /dev/null puffin_distribution::source_dist::download_source_dist filename="werkzeug-3.0.1.tar.gz", source_dist=werkzeug @ff1904eb5e/werkzeug-3.0.1.tar.gzpuffin_dispatch::build_source source_dist="werkzeug @ff1904eb5e/werkzeug-3.0.1.tar.gz", subdirectory=None puffin_build::extract_archive sdist="werkzeug-3.0.1.tar.gz" puffin_dispatch::resolve requirements="flit-core <4" puffin_dispatch::install requirements="flit-core ==3.9.0", venv="/tmp/.tmpgZAEAh/.venv" puffin_build::get_requires_for_build_wheel name="build_wheel", python_version=3.12 puffin_build::build package_id="werkzeug @ff1904eb5e/werkzeug-3.0.1.tar.gz" puffin_build::run_python_script name="build_wheel", python_version=3.12 puffin_dispatch::build_source source_dist="pydantic-extra-types @ git+https://github.com/pydantic/pydantic-extra-types.git@843b753e9e8cb74e83cac55598719b39a4d5ef1f", subdirectory=None puffin_dispatch::resolve requirements="hatchling" puffin_dispatch::install requirements="hatchling ==1.18.0, trove-classifiers ==2023.11.22, editables ==0.5, pathspec ==0.11.2, pluggy ==1.3.0, packaging ==23.2", venv="/tmp/.tmpJjweUn/.venv" puffin_build::get_requires_for_build_wheel name="build_wheel", python_version=3.12 puffin_build::build package_id="pydantic-extra-types @ git+https://github.com/pydantic/pydantic-extra-types.git@843b753e9e8cb74e83cac55598719b39a4d5ef1f" puffin_build::run_python_script name="build_wheel", python_version=3.12 puffin_distribution::source_dist::download_source_dist filename="django-allauth-0.51.0.tar.gz", source_dist=django-allauth==0.51.0 puffin_dispatch::build_source source_dist="django-allauth==0.51.0", subdirectory=None puffin_build::extract_archive sdist="django-allauth-0.51.0.tar.gz" puffin_dispatch::resolve requirements="wheel, setuptools, pip" puffin_dispatch::install requirements="setuptools ==69.0.2, pip ==23.3.1, wheel ==0.42.0", venv="/tmp/.tmplSZisu/.venv" puffin_build::build package_id="django-allauth==0.51.0" Resolved 35 packages in 11.71s ```
This commit is contained in:
parent
46c26108df
commit
2539f00952
5 changed files with 46 additions and 16 deletions
|
|
@ -11,7 +11,7 @@ use cargo_util::{paths, ProcessBuilder};
|
|||
use git2::{self, ErrorClass, ObjectType};
|
||||
use reqwest::Client;
|
||||
use reqwest::StatusCode;
|
||||
use tracing::{debug, info, warn};
|
||||
use tracing::{debug, warn};
|
||||
use url::Url;
|
||||
|
||||
use crate::util::retry;
|
||||
|
|
@ -409,7 +409,7 @@ impl<'a> GitCheckout<'a> {
|
|||
fn reset(&self) -> Result<()> {
|
||||
let ok_file = self.path.join(CHECKOUT_READY_LOCK);
|
||||
let _ = paths::remove_file(&ok_file);
|
||||
info!("reset {} to {}", self.repo.path().display(), self.revision);
|
||||
debug!("reset {} to {}", self.repo.path().display(), self.revision);
|
||||
|
||||
// Ensure libgit2 won't mess with newlines when we vendor.
|
||||
if let Ok(mut git_config) = self.repo.config() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue