diff --git a/Tools/scripts/summarize_stats.py b/Tools/scripts/summarize_stats.py index 5793e5c649d6b3..6df1c7f71f61dd 100644 --- a/Tools/scripts/summarize_stats.py +++ b/Tools/scripts/summarize_stats.py @@ -313,7 +313,7 @@ def kind_to_text(kind: int, opcode: str): def is_specializable(self, opcode: str) -> bool: return "specializable" in self._get_stats_for_opcode(opcode) - def get_specialized_total_counts(self) -> tuple[int, int, int]: + def get_specialized_total_counts(self) -> tuple[int, int, int, int]: basic = 0 specialized_hits = 0 specialized_misses = 0 @@ -442,7 +442,7 @@ def get_gc_stats(self) -> list[dict[str, int]]: gc_stats[gen_n][name] = value return gc_stats - def get_optimization_stats(self) -> dict[str, tuple[int, int | None]]: + def get_optimization_stats(self) -> dict[Doc, tuple[int, int | None]]: if "Optimization attempts" not in self._data: return {} @@ -515,7 +515,7 @@ def get_optimization_stats(self) -> dict[str, tuple[int, int | None]]: ), } - def get_optimizer_stats(self) -> dict[str, tuple[int, int | None]]: + def get_optimizer_stats(self) -> dict[Doc, tuple[int, int | None]]: attempts = self._data["Optimization optimizer attempts"] successes = self._data["Optimization optimizer successes"] no_memory = self._data["Optimization optimizer failure no memory"] @@ -1264,7 +1264,7 @@ def iter_optimization_tables(base_stats: Stats, head_stats: Stats | None = None) def rare_event_section() -> Section: - def calc_rare_event_table(stats: Stats) -> Table: + def calc_rare_event_table(stats: Stats) -> Rows: DOCS = { "set class": "Setting an object's class, `obj.__class__ = ...`", "set bases": "Setting the bases of a class, `cls.__bases__ = ...`", @@ -1395,7 +1395,7 @@ def to_markdown(x): print("Stats gathered on:", date.today(), file=out) -def output_stats(inputs: list[Path], json_output=str | None): +def output_stats(inputs: list[Path], json_output: str | None): match len(inputs): case 1: data = load_raw_data(Path(inputs[0]))