summaryrefslogtreecommitdiffstats
path: root/Tools
diff options
context:
space:
mode:
authorMark Shannon <mark@hotpy.org>2022-06-27 11:24:23 (GMT)
committerGitHub <noreply@github.com>2022-06-27 11:24:23 (GMT)
commitc0453a40faaadb43d2e69767af6c9680f8689063 (patch)
treed8ab19e5244e552e5d1b371651593be9be5142e4 /Tools
parent33fc3b5e42f241ab81cc6d115711545b4f9e271e (diff)
downloadcpython-c0453a40faaadb43d2e69767af6c9680f8689063.zip
cpython-c0453a40faaadb43d2e69767af6c9680f8689063.tar.gz
cpython-c0453a40faaadb43d2e69767af6c9680f8689063.tar.bz2
GH-94163: Add BINARY_SLICE and STORE_SLICE instructions. (GH-94168)
Diffstat (limited to 'Tools')
-rw-r--r--Tools/scripts/summarize_stats.py13
1 files changed, 7 insertions, 6 deletions
diff --git a/Tools/scripts/summarize_stats.py b/Tools/scripts/summarize_stats.py
index 26e9c4e..2e8261a 100644
--- a/Tools/scripts/summarize_stats.py
+++ b/Tools/scripts/summarize_stats.py
@@ -60,12 +60,13 @@ def print_specialization_stats(name, family_stats, defines):
for key in ("specialization.success", "specialization.failure"):
total_attempts += family_stats.get(key, 0)
rows = []
- for key in ("specialization.success", "specialization.failure"):
- label = key[len("specialization."):]
- label = label[0].upper() + label[1:]
- val = family_stats.get(key, 0)
- rows.append((label, val, f"{100*val/total_attempts:0.1f}%"))
- emit_table(("", "Count:", "Ratio:"), rows)
+ if total_attempts:
+ for key in ("specialization.success", "specialization.failure"):
+ label = key[len("specialization."):]
+ label = label[0].upper() + label[1:]
+ val = family_stats.get(key, 0)
+ rows.append((label, val, f"{100*val/total_attempts:0.1f}%"))
+ emit_table(("", "Count:", "Ratio:"), rows)
total_failures = family_stats.get("specialization.failure", 0)
failure_kinds = [ 0 ] * 30
for key in family_stats: