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

Function calc_call_stats_table

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

Source from the content-addressed store, hash-verified

1099
1100def call_stats_section() -> Section:
1101 def calc_call_stats_table(stats: Stats) -> Rows:
1102 call_stats = stats.get_call_stats()
1103 total = sum(v for k, v in call_stats.items() if "Calls to" in k)
1104 return [
1105 (key, Count(value), Ratio(value, total))
1106 for key, value in call_stats.items()
1107 ]
1108
1109 return Section(
1110 "Call stats",

Callers

nothing calls this directly

Calls 4

CountClass · 0.85
get_call_statsMethod · 0.80
RatioClass · 0.70
itemsMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…