From d99313faf21d1e9cb2c66a16ff0beeff175f1505 Mon Sep 17 00:00:00 2001 From: Alex Waygood Date: Fri, 16 Jun 2023 21:20:26 +0100 Subject: [PATCH] Change performance reporting threshold (#81) --- mypy_primer/model.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/mypy_primer/model.py b/mypy_primer/model.py index da41a1f..8c88bf1 100644 --- a/mypy_primer/model.py +++ b/mypy_primer/model.py @@ -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