Skip to content

Commit a4fce82

Browse files
committed
Typing
1 parent 582b1b6 commit a4fce82

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

Tools/scripts/summarize_stats.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -399,13 +399,14 @@ def get_optimization_stats(self) -> dict[str, tuple[int, int | None]]:
399399
}
400400

401401
def get_histogram(self, prefix: str) -> list[tuple[int, int]]:
402-
rows: Rows = []
402+
rows = []
403403
for k, v in self._data.items():
404404
match = re.match(f"{prefix}\\[([0-9]+)\\]", k)
405405
if match is not None:
406406
entry = int(match.groups()[0])
407407
rows.append((entry, v))
408-
return sorted(rows)
408+
rows.sort()
409+
return rows
409410

410411

411412
class Count(int):
@@ -949,7 +950,11 @@ def calc_optimization_table(stats: Stats) -> Rows:
949950
optimization_stats = stats.get_optimization_stats()
950951

951952
return [
952-
(label, Count(value), Ratio(value, den, percentage=label != "Uops executed"))
953+
(
954+
label,
955+
Count(value),
956+
Ratio(value, den, percentage=label != "Uops executed"),
957+
)
953958
for label, (value, den) in optimization_stats.items()
954959
]
955960

0 commit comments

Comments
 (0)