docs(stats): update get_stats() example to current output (worker keys + counts) - #622
Open
pacocartones wants to merge 1 commit into
Open
docs(stats): update get_stats() example to current output (worker keys + counts)#622pacocartones wants to merge 1 commit into
pacocartones wants to merge 1 commit into
Conversation
The get_stats() example in stats.rst predates the multiprocessing support added in 9.1.0: it still shows DIFF COUNT 37 / DISTANCE CACHE HIT COUNT 0 and omits the four WORKER * keys that get_stats() now always returns (a test, test_serial_run_exposes_worker_keys_zeroed, enforces their presence). The .rst files are not run as doctests, so the drift went unnoticed. This updates the example to the exact current output (run against dev).
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.
Fix the
get_stats()example in the Stats docsThe example output under "Get Stats" in
docstrings/stats.rstis out of date. Sincethe multiprocessing support landed in 9.1.0,
get_stats()also returns fouraggregated worker counters that are always present (zeroed on a serial run):
WORKER DIFF COUNTWORKER PASSES COUNTWORKER DISTANCE CACHE HIT COUNTWORKER BATCH COUNTThe documented example still shows the pre-9.1.0 dict, so it neither lists those keys
nor matches the current counter values. Running the example exactly as written now
gives:
This updates the example to that output. Docs-only change; the
WORKER *keys beingpresent in serial mode is the intended behaviour and is already covered by
tests/test_multiprocessing.py.(
docs/stats.rstis a symlink todeepdiff/docstrings/stats.rst, so the single editcovers both.)