Skip to content

Commit 9d613b1

Browse files
conformance tests: drop timing information (#2070)
Timing information is nice to have but the current data is not very reliable, as it is the timing on whatever machine was used by the person who most recently regenerated the results. It's also a big source of merge conflicts, basically meaning that every pair of changes to the conformance suite will merge conflict with each other. To make it more pleasant to work with the conformance suite, let's just drop the timings.
1 parent b57e1ff commit 9d613b1

File tree

7 files changed

+5
-28
lines changed

7 files changed

+5
-28
lines changed

conformance/results/mypy/version.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
11
version = "mypy 1.17.1"
2-
test_duration = 2.04
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
11
version = "pyright 1.1.403"
2-
test_duration = 1.83

conformance/results/results.html

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -159,16 +159,12 @@ <h3>Python Type System Conformance Test Results</h3>
159159
<div class="table_container"><table><tbody>
160160
<tr><th class="col1">&nbsp;</th>
161161
<th class='tc-header'><div class='tc-name'>mypy 1.17.1</div>
162-
<div class='tc-time'>2.0sec</div>
163162
</th>
164163
<th class='tc-header'><div class='tc-name'>pyright 1.1.403</div>
165-
<div class='tc-time'>1.3sec</div>
166164
</th>
167165
<th class='tc-header'><div class='tc-name'>pyre 0.9.25</div>
168-
<div class='tc-time'>10.2sec</div>
169166
</th>
170167
<th class='tc-header'><div class='tc-name'>zuban 0.0.19</div>
171-
<div class='tc-time'>0.32sec</div>
172168
</th>
173169
</tr>
174170
<tr><th class="column" colspan="5">
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
11
version = "zuban 0.0.19"
2-
test_duration = 0.32

conformance/src/main.py

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,15 @@ def run_tests(
2222
root_dir: Path,
2323
type_checker: TypeChecker,
2424
test_cases: Sequence[Path],
25-
skip_timing: bool = False,
2625
):
2726
print(f"Running tests for {type_checker.name}")
2827

2928
test_start_time = time()
3029
tests_output = type_checker.run_tests([file.name for file in test_cases])
3130
test_duration = time() - test_start_time
3231

32+
print(f"Completed tests for {type_checker.name} in {test_duration:.2f} seconds")
33+
3334
for _, output in tests_output.items():
3435
type_checker.parse_errors(output.splitlines())
3536

@@ -40,7 +41,7 @@ def run_tests(
4041
type_checker, results_dir, test_case, tests_output.get(test_case.name, "")
4142
)
4243

43-
update_type_checker_info(type_checker, root_dir, test_duration, skip_timing=skip_timing)
44+
update_type_checker_info(type_checker, root_dir)
4445

4546

4647
def get_expected_errors(test_case: Path) -> tuple[
@@ -217,9 +218,7 @@ def update_output_for_test(
217218
tomlkit.dump(existing_results, f)
218219

219220

220-
def update_type_checker_info(
221-
type_checker: TypeChecker, root_dir: Path, test_duration: float, skip_timing: bool = False
222-
):
221+
def update_type_checker_info(type_checker: TypeChecker, root_dir: Path):
223222
# Record the version of the type checker used for the latest run.
224223
version_file = root_dir / "results" / type_checker.name / "version.toml"
225224

@@ -234,8 +233,6 @@ def update_type_checker_info(
234233
existing_info = {}
235234

236235
existing_info["version"] = type_checker.get_version()
237-
if not skip_timing:
238-
existing_info["test_duration"] = round(test_duration, 2)
239236

240237
version_file.parent.mkdir(parents=True, exist_ok=True)
241238
with open(version_file, "w") as f:
@@ -266,7 +263,7 @@ def main():
266263
if not type_checker.install():
267264
print(f"Skipping tests for {type_checker.name}")
268265
else:
269-
run_tests(root_dir, type_checker, test_cases, skip_timing=options.skip_timing)
266+
run_tests(root_dir, type_checker, test_cases)
270267

271268
# Generate a summary report.
272269
generate_summary(root_dir)

conformance/src/options.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
@dataclass
1010
class _Options:
1111
report_only: bool | None
12-
skip_timing: bool
1312

1413

1514
def parse_options(argv: list[str]) -> _Options:
@@ -20,10 +19,5 @@ def parse_options(argv: list[str]) -> _Options:
2019
action="store_true",
2120
help="regenerates the test suite report from past results",
2221
)
23-
reporting_group.add_argument(
24-
"--skip-timing",
25-
action="store_true",
26-
help="do not update timing information in the output files",
27-
)
2822
ret = _Options(**vars(parser.parse_args(argv)))
2923
return ret

conformance/src/reporting.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -46,15 +46,8 @@ def generate_summary_html(root_dir: Path) -> str:
4646
existing_info = {}
4747

4848
version = existing_info["version"] or "Unknown version"
49-
test_duration = existing_info.get("test_duration")
5049

5150
summary_html.append(f"<th class='tc-header'><div class='tc-name'>{version}</div>")
52-
if test_duration is not None:
53-
if test_duration < 1:
54-
duration = f"{test_duration:.2f}"
55-
else:
56-
duration = f"{test_duration:.1f}"
57-
summary_html.append(f"<div class='tc-time'>{duration}sec</div>")
5851
summary_html.append("</th>")
5952

6053
summary_html.append("</tr>")

0 commit comments

Comments
 (0)