Skip to content

Commit

Permalink
Improve performance reports
Browse files Browse the repository at this point in the history
- Differences less than 10 seconds seem to happen quite regularly just due to random variations in GitHub Actions, so don't report performance changes if the difference is less than 10 seconds.
- Clarify that it's mypy that got faster/slower, not the package we're running mypy on :-)
  • Loading branch information
AlexWaygood authored May 2, 2023
1 parent e7b3a13 commit 81739a7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mypy_primer.py
Original file line number Diff line number Diff line change
Expand Up @@ -558,14 +558,14 @@ def format_concise(self) -> str:
else:
speed = "slower"

has_runtime_diff = runtime_diff > 5 and runtime_ratio > 1.05
has_runtime_diff = runtime_diff > 10 and runtime_ratio > 1.05
if not self.diff and not has_runtime_diff:
return ""

ret = f"{self.project.name} ({self.project.location})"
if has_runtime_diff:
ret += (
f" got {runtime_ratio:.2f}x {speed} "
f": type-checking got {runtime_ratio:.2f}x {speed} "
f"({self.old_result.runtime:.1f}s -> {self.new_result.runtime:.1f}s)"
)
if self.diff:
Expand Down

0 comments on commit 81739a7

Please sign in to comment.