deb: give the build-user setup and resume cleanup their own phases
The profile's build-dependency phase spanned everything between the apt passes and the build step, and for a kernel incremental build that hid ~13 minutes of housekeeping: the recursive chown handing the staged tree to the build user, and the resume_clear quirk dropping the previous attempt's stamp caches. Both now enter the profiler (ClearingResumeCaches only when the quirk has paths and a tree is carried, PreparingBuildUser only for rootless builds), so the status bar and pkh deb profile show where the time actually goes — on a large carried tree the chown dominates, which is the honest answer to a 6m30s DEPS column next to a 19m19s phase.
This commit is contained in:
@@ -43,6 +43,12 @@ pub enum Phase {
|
||||
InjectingPackages,
|
||||
/// apt-get build-dep
|
||||
InstallingBuildDeps,
|
||||
/// Drop the resumed tree's input-untracked stamp caches (quirk:
|
||||
/// `resume_clear`)
|
||||
ClearingResumeCaches,
|
||||
/// Create the unprivileged build user and hand the staged tree to
|
||||
/// it (rootless builds)
|
||||
PreparingBuildUser,
|
||||
/// debian/rules build
|
||||
Building,
|
||||
/// fakeroot debian/rules binary
|
||||
@@ -63,6 +69,8 @@ impl Phase {
|
||||
Phase::ApplyingPatches => "Applying patches",
|
||||
Phase::InjectingPackages => "Injecting packages",
|
||||
Phase::InstallingBuildDeps => "Installing build dependencies",
|
||||
Phase::ClearingResumeCaches => "Clearing resumed build caches",
|
||||
Phase::PreparingBuildUser => "Preparing the build user",
|
||||
Phase::Building => "Building package",
|
||||
Phase::ProducingBinaries => "Producing binary packages",
|
||||
Phase::RetrievingArtifacts => "Retrieving artifacts",
|
||||
@@ -82,6 +90,8 @@ impl Phase {
|
||||
Phase::ApplyingPatches => "applying_patches",
|
||||
Phase::InjectingPackages => "injecting_packages",
|
||||
Phase::InstallingBuildDeps => "installing_build_deps",
|
||||
Phase::ClearingResumeCaches => "clearing_resume_caches",
|
||||
Phase::PreparingBuildUser => "preparing_build_user",
|
||||
Phase::Building => "building",
|
||||
Phase::ProducingBinaries => "producing_binaries",
|
||||
Phase::RetrievingArtifacts => "retrieving_artifacts",
|
||||
@@ -101,6 +111,8 @@ impl Phase {
|
||||
"applying_patches" => Phase::ApplyingPatches,
|
||||
"injecting_packages" => Phase::InjectingPackages,
|
||||
"installing_build_deps" => Phase::InstallingBuildDeps,
|
||||
"clearing_resume_caches" => Phase::ClearingResumeCaches,
|
||||
"preparing_build_user" => Phase::PreparingBuildUser,
|
||||
"building" => Phase::Building,
|
||||
"producing_binaries" => Phase::ProducingBinaries,
|
||||
"retrieving_artifacts" => Phase::RetrievingArtifacts,
|
||||
@@ -122,6 +134,9 @@ fn default_classifier(phase: Phase) -> Box<dyn Classifier> {
|
||||
Phase::InstallingBuildDeps => {
|
||||
Box::new(AptInstallClassifier::new("Installing build dependencies"))
|
||||
}
|
||||
Phase::ClearingResumeCaches | Phase::PreparingBuildUser => {
|
||||
Box::new(GenericClassifier::new())
|
||||
}
|
||||
Phase::Building | Phase::ProducingBinaries => Box::new(MakeClassifier::new()),
|
||||
Phase::RetrievingArtifacts => Box::new(GenericClassifier::new()),
|
||||
}
|
||||
@@ -1147,6 +1162,8 @@ mod tests {
|
||||
Phase::ApplyingPatches,
|
||||
Phase::InjectingPackages,
|
||||
Phase::InstallingBuildDeps,
|
||||
Phase::ClearingResumeCaches,
|
||||
Phase::PreparingBuildUser,
|
||||
Phase::Building,
|
||||
Phase::ProducingBinaries,
|
||||
Phase::RetrievingArtifacts,
|
||||
|
||||
Reference in New Issue
Block a user