Skip to content

Commit

Permalink
Change performance reporting threshold (#81)
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexWaygood authored Jun 16, 2023
1 parent eac688b commit d99313f
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions mypy_primer/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -313,15 +313,16 @@ 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"({self.old_result.runtime:.1f}s -> {self.new_result.runtime:.1f}s)"
f": typechecking got {runtime_ratio:.2f}x {speed} "
f"({self.old_result.runtime:.1f}s -> {self.new_result.runtime:.1f}s)\n"
f"(Performance measurements are based on a single noisy sample)"
)
if self.diff:
ret += "\n" + self.diff
Expand Down

0 comments on commit d99313f

Please sign in to comment.