diff options
author | Mark Shannon <mark@hotpy.org> | 2021-08-10 13:53:05 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-08-10 13:53:05 (GMT) |
commit | 9816777861a3f19ea9faa5b98c9b7024f13c6b73 (patch) | |
tree | de8ab8ed96d053fb5dcc1ac70fee634941892c74 /Tools | |
parent | c7ea1e3dcea6fbc9842463ce2b785b43501b1eaa (diff) | |
download | cpython-9816777861a3f19ea9faa5b98c9b7024f13c6b73.zip cpython-9816777861a3f19ea9faa5b98c9b7024f13c6b73.tar.gz cpython-9816777861a3f19ea9faa5b98c9b7024f13c6b73.tar.bz2 |
Classify specialization failures. Provides more useful stats, with lower overhead. (GH-27701)
Diffstat (limited to 'Tools')
-rw-r--r-- | Tools/scripts/summarize_specialization_stats.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/Tools/scripts/summarize_specialization_stats.py b/Tools/scripts/summarize_specialization_stats.py index 1a13ae8..cc3ef85 100644 --- a/Tools/scripts/summarize_specialization_stats.py +++ b/Tools/scripts/summarize_specialization_stats.py @@ -23,6 +23,18 @@ def print_stats(name, family_stats): print(f"{key:>12}:{family_stats[key]:>12} {100*family_stats[key]/total:0.1f}%") for key in ("specialization_success", "specialization_failure"): print(f" {key}:{family_stats[key]:>12}") + total_failures = family_stats["specialization_failure"] + failure_kinds = [ 0 ] * 20 + for key in family_stats: + if not key.startswith("specialization_failure_kind"): + continue + _, index = key[:-1].split("[") + index = int(index) + failure_kinds[index] = family_stats[key] + for index, value in enumerate(failure_kinds): + if not value: + continue + print(f" kind {index:>2}: {value:>8} {100*value/total_failures:0.1f}%") def main(): stats = collections.defaultdict(collections.Counter) |