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

Class Section

Tools/scripts/summarize_stats.py:712–742  ·  view source on GitHub ↗

A Section defines a section of the output document.

Source from the content-addressed store, hash-verified

710
711
712class Section:
713 """
714 A Section defines a section of the output document.
715 """
716
717 def __init__(
718 self,
719 title: str = "",
720 summary: str = "",
721 part_iter=None,
722 *,
723 comparative: bool = True,
724 doc: str = "",
725 ):
726 self.title = title
727 if not summary:
728 self.summary = title.lower()
729 else:
730 self.summary = summary
731 self.doc = textwrap.dedent(doc)
732 if part_iter is None:
733 part_iter = []
734 if isinstance(part_iter, list):
735
736 def iter_parts(base_stats: Stats, head_stats: Stats | None):
737 yield from part_iter
738
739 self.part_iter = iter_parts
740 else:
741 self.part_iter = part_iter
742 self.comparative = comparative
743
744
745def calc_execution_count_table(prefix: str) -> RowCalculator:

Callers 14

execution_count_sectionFunction · 0.70
pair_count_sectionFunction · 0.70
pre_succ_pairs_sectionFunction · 0.70
specialization_sectionFunction · 0.70
call_stats_sectionFunction · 0.70
object_stats_sectionFunction · 0.70
gc_stats_sectionFunction · 0.70
iter_optimization_tablesFunction · 0.70
optimization_sectionFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…