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

Function calc_deferred_by_table

Tools/scripts/summarize_stats.py:1033–1045  ·  view source on GitHub ↗
(stats: Stats)

Source from the content-addressed store, hash-verified

1031 ]
1032
1033 def calc_deferred_by_table(stats: Stats) -> Rows:
1034 opcode_stats = stats.get_opcode_stats("opcode")
1035 deferred_counts = opcode_stats.get_deferred_counts()
1036 total = sum(deferred_counts.values())
1037 if total == 0:
1038 return []
1039
1040 return [
1041 (name, Count(value), Ratio(value, total))
1042 for name, value in sorted(
1043 deferred_counts.items(), key=itemgetter(1), reverse=True
1044 )[:10]
1045 ]
1046
1047 def calc_misses_by_table(stats: Stats) -> Rows:
1048 opcode_stats = stats.get_opcode_stats("opcode")

Callers

nothing calls this directly

Calls 7

itemgetterClass · 0.90
CountClass · 0.85
get_opcode_statsMethod · 0.80
get_deferred_countsMethod · 0.80
RatioClass · 0.70
valuesMethod · 0.45
itemsMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…