MCPcopy Index your code
hub / github.com/python/cpython / calc_specialization_failure_kind_table

Function calc_specialization_failure_kind_table

Tools/scripts/summarize_stats.py:922–938  ·  view source on GitHub ↗
(name: str)

Source from the content-addressed store, hash-verified

920 return calc
921
922 def calc_specialization_failure_kind_table(name: str) -> RowCalculator:
923 def calc(stats: Stats) -> Rows:
924 opcode_stats = stats.get_opcode_stats("opcode")
925 failures = opcode_stats.get_specialization_failure_kinds(name)
926 total = opcode_stats.get_specialization_failure_total(name)
927
928 return sorted(
929 [
930 (label, Count(value), Ratio(value, total))
931 for label, value in failures.items()
932 if value
933 ],
934 key=itemgetter(1),
935 reverse=True,
936 )
937
938 return calc
939
940 def iter_specialization_tables(base_stats: Stats, head_stats: Stats | None = None):
941 opcode_base_stats = base_stats.get_opcode_stats("opcode")

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…