diff options
author | Mark Shannon <mark@hotpy.org> | 2022-05-18 13:38:43 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-18 13:38:43 (GMT) |
commit | a4460f2eb8b9db46a9bce3c450c8b038038a7c93 (patch) | |
tree | 7b05dbe2f220e575f642bf5c66fa1a54478aeb32 /Tools/scripts | |
parent | 3fa023721b495e02e1e6c89fdc737afc7d186cb5 (diff) | |
download | cpython-a4460f2eb8b9db46a9bce3c450c8b038038a7c93.zip cpython-a4460f2eb8b9db46a9bce3c450c8b038038a7c93.tar.gz cpython-a4460f2eb8b9db46a9bce3c450c8b038038a7c93.tar.bz2 |
Split refcount stats into 'interpreter' and 'non-interpreter' (GH-92919)
Diffstat (limited to 'Tools/scripts')
-rw-r--r-- | Tools/scripts/summarize_stats.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Tools/scripts/summarize_stats.py b/Tools/scripts/summarize_stats.py index f66fc7b..3d7479f 100644 --- a/Tools/scripts/summarize_stats.py +++ b/Tools/scripts/summarize_stats.py @@ -272,6 +272,8 @@ def emit_object_stats(stats): with Section("Object stats", summary="allocations, frees and dict materializatons"): total_materializations = stats.get("Object new values") total_allocations = stats.get("Object allocations") + total_increfs = stats.get("Object interpreter increfs") + stats.get("Object increfs") + total_decrefs = stats.get("Object interpreter decrefs") + stats.get("Object decrefs") rows = [] for key, value in stats.items(): if key.startswith("Object"): @@ -279,6 +281,10 @@ def emit_object_stats(stats): ratio = f"{100*value/total_materializations:0.1f}%" elif "allocations" in key: ratio = f"{100*value/total_allocations:0.1f}%" + elif "increfs" in key: + ratio = f"{100*value/total_increfs:0.1f}%" + elif "decrefs" in key: + ratio = f"{100*value/total_decrefs:0.1f}%" else: ratio = "" label = key[6:].strip() |