Speed up the pre-submission checks - #6153
Open
Manciukic wants to merge 4 commits into
Open
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #6153 +/- ##
=======================================
Coverage 82.99% 82.99%
=======================================
Files 277 277
Lines 30920 30920
=======================================
Hits 25663 25663
Misses 5257 5257
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
pylint's `jobs = 0` auto-detect reads cgroup v1 `cpu.shares`, which Docker leaves at its 1024 default, so it lints on one core in the dev container however many the host has. Takes the check from 32s to 16s. Signed-off-by: Riccardo Mancini <mancio@amazon.com>
pylint parallelises per file, so the slowest file bounds the whole run. tools/ab_plot.py took 15.4s of a 15.8s run, because astroid builds a full AST for matplotlib, numpy, pandas, scipy and seaborn. Ignoring them drops the check to 6.1s and reports the same messages: these libraries resolve too dynamically for the member checks to fire. Signed-off-by: Riccardo Mancini <mancio@amazon.com>
checkstyle and checkbuild run the same clippy command and differ only in which triples they cover, so running both at commit time checks the native architecture twice. Skip it in checkstyle and leave it to checkbuild, which also covers the cross-compiled architecture. The two then share no work, so running them concurrently takes a Rust-touching verification from 37s to 19s. checkstyle keeps clippy by default because CI runs no other clippy. Signed-off-by: Riccardo Mancini <mancio@amazon.com>
Manciukic
force-pushed
the
perf/verification-speedup
branch
from
August 25, 2026 15:57
d6ceeca to
a6d8a0d
Compare
Manciukic
marked this pull request as ready for review
August 25, 2026 16:37
not4s
approved these changes
Aug 25, 2026
zulinx86
approved these changes
Aug 26, 2026
JackThomson2
approved these changes
Aug 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes
Three independent speedups to the pre-submission checks:
-j. Itsjobs = 0auto-detect reads cgroup v1cpu.shares, which Docker leaves at its 1024 default, so it lints on onecore inside the dev container however many the host has.
ignored-modules. pylint parallelisesper file, so the slowest file bounds the whole run, and
tools/ab_plot.pytook 15.4s of a 15.8s run because astroid builds a full AST for matplotlib,
numpy, pandas, scipy and seaborn.
checkstyle --no-clippy.checkstyleandcheckbuildrun the sameclippy command and differ only in which triples they cover, so running both
checks the native architecture twice.
Reason
checkstyleandcheckbuild --allare what contributors run before pushing, sotheir cost is paid on every commit. Measured on a 96-core host with a warm cargo
cache:
CI's
stylestep runscheckstyleon its own, which goes from 39.0s to 16.4swith no source change. pylint was 31.7s of that 39.0s.
--no-clippydoes not remove clippy work, it moves the native run tocheckbuild, which then no longer inherits a warm cache fromcheckstyle(9.6s to 18.4s). The gain is in not doing that run twice.
It also stops the two commands clippying the same triple, which is what makes
running them concurrently worthwhile. Before, concurrency still helped when
something had changed, because
checkstylewas long enough to hidecheckbuildunderneath it, but it cost time when nothing had, since the twocontend for the native triple and cargo holds a lock on the build directory for
the whole build. After, the two share no work and the concurrent column is the
fastest in both rows.
License Acceptance
By submitting this pull request, I confirm that my contribution is made under
the terms of the Apache 2.0 license.
PR Checklist
tools/devtool checkbuild --allto verify that the PR passesbuild checks on all supported architectures.
tools/devtool checkstyle --no-clippyto verify that the PRpasses the automated style checks.
how they are solving the problem in a clear and encompassing way.
in the PR.
CHANGELOG.md. (None: thisonly touches developer tooling.)
Runbook for Firecracker API changes.
integration tests. (No new tests: the changed code is the test tooling
itself, and each commit was verified by running
checkstyleon it alone.)TODO.rust-vmm.