summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Shannon <mark@hotpy.org>2022-05-17 09:59:24 (GMT)
committerGitHub <noreply@github.com>2022-05-17 09:59:24 (GMT)
commit93fc14933b8605c8df23073574048408df61b538 (patch)
treedf45df1c2c6a8af0ec95a8a1266f959a09f3bf66
parent702e0da000bf28aa20cb7f3893b575d977506495 (diff)
downloadcpython-93fc14933b8605c8df23073574048408df61b538.zip
cpython-93fc14933b8605c8df23073574048408df61b538.tar.gz
cpython-93fc14933b8605c8df23073574048408df61b538.tar.bz2
Summarize stats: Increase number of predecessor/successor pairs shown from 3 to 5. (GH-92853)
-rw-r--r--Tools/scripts/summarize_stats.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/Tools/scripts/summarize_stats.py b/Tools/scripts/summarize_stats.py
index 91b1901..f66fc7b 100644
--- a/Tools/scripts/summarize_stats.py
+++ b/Tools/scripts/summarize_stats.py
@@ -315,7 +315,7 @@ def emit_pair_counts(opcode_stats, total):
emit_table(("Pair", "Count:", "Self:", "Cumulative:"),
rows
)
- with Section("Predecessor/Successor Pairs", summary="Top 3 predecessors and successors of each opcode"):
+ with Section("Predecessor/Successor Pairs", summary="Top 5 predecessors and successors of each opcode"):
predecessors = collections.defaultdict(collections.Counter)
successors = collections.defaultdict(collections.Counter)
total_predecessors = collections.Counter()
@@ -334,10 +334,10 @@ def emit_pair_counts(opcode_stats, total):
pred_rows = succ_rows = ()
if total1:
pred_rows = [(opname[pred], count, f"{count/total1:.1%}")
- for (pred, count) in predecessors[i].most_common(3)]
+ for (pred, count) in predecessors[i].most_common(5)]
if total2:
succ_rows = [(opname[succ], count, f"{count/total2:.1%}")
- for (succ, count) in successors[i].most_common(3)]
+ for (succ, count) in successors[i].most_common(5)]
with Section(name, 3, f"Successors and predecessors for {name}"):
emit_table(("Predecessors", "Count:", "Percentage:"),
pred_rows