diff options
author | Mark Shannon <mark@hotpy.org> | 2022-02-01 15:05:18 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-01 15:05:18 (GMT) |
commit | 48be46ec1f3f8010570165daa1da4bf9961f3a83 (patch) | |
tree | 03c3f5810599572799b4645477622af83aa30ba2 /Tools/scripts | |
parent | 913e340a323c7e61ae6e4acbb1312b4342657bec (diff) | |
download | cpython-48be46ec1f3f8010570165daa1da4bf9961f3a83.zip cpython-48be46ec1f3f8010570165daa1da4bf9961f3a83.tar.gz cpython-48be46ec1f3f8010570165daa1da4bf9961f3a83.tar.bz2 |
bpo-46072: Add some object layout and allocation stats (GH-31051)
Diffstat (limited to 'Tools/scripts')
-rw-r--r-- | Tools/scripts/summarize_stats.py | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/Tools/scripts/summarize_stats.py b/Tools/scripts/summarize_stats.py index 34cbad5..2761dcb 100644 --- a/Tools/scripts/summarize_stats.py +++ b/Tools/scripts/summarize_stats.py @@ -105,7 +105,17 @@ def main(): total += value for key, value in stats.items(): if "Calls to" in key: - print(f"{key}: {value} {100*value/total:0.1f}%") + print(f" {key}: {value} {100*value/total:0.1f}%") + print("Object stats:") + total = stats.get("Object new values") + for key, value in stats.items(): + if key.startswith("Object"): + if "materialize" in key: + print(f" {key}: {value} {100*value/total:0.1f}%") + else: + print(f" {key}: {value}") + total = 0 + if __name__ == "__main__": main() |