Repository navigation
Release 1.1.0: show report times in µs, ms or s so fast sections stay visible - #23
Merged
Merged
Conversation
The text report printed seconds with four decimals, so any section under 50 µs read 0.0000 s; a whole recursive fib(6) call tree came out as zeros. Each time now has three decimals in the largest of µs, ms and s that keeps the number below 1000, picked after rounding so 999.9996 µs reads 1.000 ms. The dictionary and JSON readers are unchanged and still return seconds. Docs examples show real output from the new format.
Bump __version__ to 1.1.0 and move the report-units entry into its changelog section. The report text changes format, so this is a minor release rather than a patch. Also correct the getting-started percentage that the refreshed example output no longer matched, explain the report units there, and update the bug template's version placeholder.
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.
What does this change?
Report readability. The text report printed seconds with four decimals, so any section under 50 µs read
0.0000 s. Timing a recursivefib(6)gave:Each time now has three decimals, in
µs,msors, whichever keeps the number below 1000:The unit is picked after rounding, so 999.9996 µs reads
1.000 ms, never1000.000 µs. Seconds keep millisecond resolution (2.500 s,3725.000 s).get_execution_timings()and the JSON export don't change and still return plain seconds.Compatibility: this changes the report text, which is output for people to read, not a typed API. Anyone parsing it will need to update, and the changelog entry says so. That makes this a minor release rather than a patch.
Release: bumps
__version__to 1.1.0 and adds the[1.1.0]changelog section. The bug-report template's version placeholder is now 1.1.0.Docs: the example outputs in the README, index, getting started, reports, timing-code and counters pages are replaced with real output from running those examples on this branch. The reports guide, the getting-started report explanation and the
get_execution_times_reportdocstring describe the unit rule. The getting-started text quotedvalidate's percentage from the old output (13.88%); it now matches the new output (13.97%).Checklist
uv run pytest --covpasses (120 tests, 100% statement and branch coverage). It also passes locally on 3.12, 3.13, 3.14 and 3.14t.uv run ruff checkanduv run ruff format --checkpassuv run basedpyrightpasses (0 errors, 0 warnings)mainand pass here; three existing exact-report assertions are updatedCHANGELOG.mdupdateduv buildandtwine check --strictpass, and the wheel reports 1.1.0.-W -n.