Skip to content

Commit

Permalink
Formatter
Browse files Browse the repository at this point in the history
  • Loading branch information
mdboom committed Mar 15, 2024
1 parent 0069363 commit 412a930
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions Tools/scripts/summarize_stats.py
Original file line number Diff line number Diff line change
Expand Up @@ -517,13 +517,15 @@ def get_optimizer_stats(self) -> dict[str, tuple[int, int | None]]:
return {
Doc(
"Optimizer attempts",
"The number of times the trace optimizer (_Py_uop_analyze_and_optimize) was run."
"The number of times the trace optimizer (_Py_uop_analyze_and_optimize) was run.",
): (attempts, None),
Doc(
"Optimizer successes", "The number of traces that were successfully optimized."
"Optimizer successes",
"The number of traces that were successfully optimized.",
): (successes, attempts),
Doc(
"Optimizer no memory", "The number of optimizations that failed due to no memory."
"Optimizer no memory",
"The number of optimizations that failed due to no memory.",
): (no_memory, attempts),
}

Expand Down Expand Up @@ -1137,11 +1139,7 @@ def calc_optimizer_table(stats: Stats) -> Rows:
optimizer_stats = stats.get_optimizer_stats()

return [
(
label,
Count(value),
Ratio(value, den)
)
(label, Count(value), Ratio(value, den))
for label, (value, den) in optimizer_stats.items()
]

Expand Down

0 comments on commit 412a930

Please sign in to comment.