mirror of
https://github.com/python/cpython.git
synced 2025-07-24 11:44:31 +00:00
Add specialization stats for FOR_ITER. (GH-31079)
This commit is contained in:
parent
f66c857572
commit
0d05da1fbf
3 changed files with 74 additions and 1 deletions
|
@ -26,7 +26,7 @@ for name in opcode.opname[1:]:
|
|||
TOTAL = "specialization.deferred", "specialization.hit", "specialization.miss", "execution_count"
|
||||
|
||||
def print_specialization_stats(name, family_stats):
|
||||
if "specialization.deferred" not in family_stats:
|
||||
if "specialization.failure" not in family_stats:
|
||||
return
|
||||
total = sum(family_stats.get(kind, 0) for kind in TOTAL)
|
||||
if total == 0:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue