Sho 8000 w elapsed time for build and publishing #188
Merged
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.
Helps #169.
The logs for a single language/version look like this:
logs
The longest "start"/"done" times are:
This is the longest part of the build, taking about 90 minutes here.
(The slowest command is the actual Sphinx/latex/PDF build:
make -C /srv/docsbuild/cpython/Doc ...
)This PR adds a duration to the "done" line:
We also have a "Publishing start"/"Publishing done" pair, which can take a couple of minutes (#184) so I added it there too.
This means we can easily see how long they take in the logs, which will help us analyse build times for #169.
I added tests for the new
format_seconds
function, plus added it to the CI with linting.It uses the
match
statement, new in Python 3.10, so that's the minimum required. The docs server uses 3.10 (although 3.12 is also installed).