diff --git a/pyTiming/tests/test_pt.py b/pyTiming/tests/test_pt.py index dccdd8c0ed17bc33a634d2cfa0a8358501551844..a6e6602e7da84537a9c0632e0f658ceb07b4a2ae 100644 --- a/pyTiming/tests/test_pt.py +++ b/pyTiming/tests/test_pt.py @@ -26,6 +26,7 @@ def seq(): for i in range(MAX_PROC): stress(i) + def test_timer(): timer = pyTiming.timer() @@ -44,13 +45,10 @@ def test_timer(): timer.end() analysis = timer.get_analysis() + # TODO : improve these asserts constants, basicly the only real parallelism (i.e > 1) occurs on processes assert analysis['processes']['parallelism'] > 1.1 assert analysis['processes']['parallelism'] < MAX_PROC - assert analysis['threads']['parallelism'] > .8 + assert analysis['threads']['parallelism'] > .5 assert analysis['threads']['parallelism'] < 1.1 - assert analysis['seq']['parallelism'] > .8 + assert analysis['seq']['parallelism'] > .5 assert analysis['seq']['parallelism'] < 1.1 - - - -