Skip to content

Commit

Permalink
bump thresholds
Browse files Browse the repository at this point in the history
  • Loading branch information
casperdcl committed Jul 19, 2020
1 parent 75f8e92 commit 5a3d4f2
Showing 1 changed file with 4 additions and 30 deletions.
34 changes: 4 additions & 30 deletions tqdm/tests/tests_perf.py
Original file line number Diff line number Diff line change
Expand Up @@ -268,12 +268,6 @@ def test_iter_overhead_hard():
total = int(1e5)

with closing(MockIO()) as our_file:
with trange(1, file=our_file, leave=True, miniters=1,
mininterval=0, maxinterval=0) as t:
with relative_timer() as prime:
for i in t:
pass

a = 0
with trange(total, file=our_file, leave=True, miniters=1,
mininterval=0, maxinterval=0) as t:
Expand All @@ -288,8 +282,7 @@ def test_iter_overhead_hard():
a += i
our_file.write(("%i" % a) * 40)

assert_performance(
85, 'trange', time_tqdm() - prime(), 'range', time_bench())
assert_performance(125, 'trange', time_tqdm(), 'range', time_bench())


@with_setup(pretest, posttest)
Expand All @@ -300,12 +293,6 @@ def test_manual_overhead_hard():
total = int(1e5)

with closing(MockIO()) as our_file:
with trange(1, file=our_file, leave=True, miniters=1,
mininterval=0, maxinterval=0) as t:
with relative_timer() as prime:
for i in t:
pass

t = tqdm(total=total * 10, file=our_file, leave=True, miniters=1,
mininterval=0, maxinterval=0)
a = 0
Expand All @@ -320,8 +307,7 @@ def test_manual_overhead_hard():
a += i
our_file.write(("%i" % a) * 40)

assert_performance(
85, 'tqdm', time_tqdm() - prime(), 'range', time_bench())
assert_performance(125, 'tqdm', time_tqdm(), 'range', time_bench())


@with_setup(pretest, posttest)
Expand All @@ -332,12 +318,6 @@ def test_iter_overhead_simplebar_hard():
total = int(1e4)

with closing(MockIO()) as our_file:
with trange(1, file=our_file, leave=True, miniters=1,
mininterval=0, maxinterval=0) as t:
with relative_timer() as prime:
for i in t:
pass

a = 0
with trange(total, file=our_file, leave=True, miniters=1,
mininterval=0, maxinterval=0) as t:
Expand All @@ -354,7 +334,7 @@ def test_iter_overhead_simplebar_hard():
a += i

assert_performance(
5, 'trange', time_tqdm() - prime(), 'simple_progress', time_bench())
7.5, 'trange', time_tqdm(), 'simple_progress', time_bench())


@with_setup(pretest, posttest)
Expand All @@ -365,12 +345,6 @@ def test_manual_overhead_simplebar_hard():
total = int(1e4)

with closing(MockIO()) as our_file:
with trange(1, file=our_file, leave=True, miniters=1,
mininterval=0, maxinterval=0) as t:
with relative_timer() as prime:
for i in t:
pass

t = tqdm(total=total * 10, file=our_file, leave=True, miniters=1,
mininterval=0, maxinterval=0)
a = 0
Expand All @@ -389,4 +363,4 @@ def test_manual_overhead_simplebar_hard():
simplebar_update(10)

assert_performance(
5, 'tqdm', time_tqdm() - prime(), 'simple_progress', time_bench())
7.5, 'tqdm', time_tqdm(), 'simple_progress', time_bench())

0 comments on commit 5a3d4f2

Please sign in to comment.