Skip to content

Run mypy the correct number of times #19

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 29, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions benchmarks/bm_mypy2/run_benchmark.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def _bench_mypy(loops=20, *, legacy=False):
elapsed = 0
times = []
with open(os.devnull, "w") as devnull:
for i in range(loops):
for i in range(loops + 1):
# This is a macro benchmark for a Python implementation
# so "elapsed" covers more than just how long main() takes.
t0 = pyperf.perf_counter()
Expand All @@ -53,7 +53,7 @@ def _bench_mypy(loops=20, *, legacy=False):
# Don't include results from the first run, since it loads the
# files from disk. Subsequent runs will use the file contents in an
# in-memory cache.
if i > 1:
if i > 0:
elapsed += t1 - t0
times.append(t0)
times.append(pyperf.perf_counter())
Expand Down