Skip to content

Commit ee8adbd

Browse files
authored
Merge pull request #19 from brandtbucher/fix-mypy
Run `mypy` the correct number of times
2 parents d4868ff + 0601271 commit ee8adbd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

benchmarks/bm_mypy2/run_benchmark.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ def _bench_mypy(loops=20, *, legacy=False):
4040
elapsed = 0
4141
times = []
4242
with open(os.devnull, "w") as devnull:
43-
for i in range(loops):
43+
for i in range(loops + 1):
4444
# This is a macro benchmark for a Python implementation
4545
# so "elapsed" covers more than just how long main() takes.
4646
t0 = pyperf.perf_counter()
@@ -53,7 +53,7 @@ def _bench_mypy(loops=20, *, legacy=False):
5353
# Don't include results from the first run, since it loads the
5454
# files from disk. Subsequent runs will use the file contents in an
5555
# in-memory cache.
56-
if i > 1:
56+
if i > 0:
5757
elapsed += t1 - t0
5858
times.append(t0)
5959
times.append(pyperf.perf_counter())

0 commit comments

Comments
 (0)