Skip to content
Snippets Groups Projects
Verified Commit 2302b9f1 authored by David Beniamine's avatar David Beniamine
Browse files

Tests up

parent c6770663
Branches
Tags
No related merge requests found
Pipeline #249 passed
...@@ -26,6 +26,7 @@ def seq(): ...@@ -26,6 +26,7 @@ def seq():
for i in range(MAX_PROC): for i in range(MAX_PROC):
stress(i) stress(i)
def test_timer(): def test_timer():
timer = pyTiming.timer() timer = pyTiming.timer()
...@@ -44,13 +45,10 @@ def test_timer(): ...@@ -44,13 +45,10 @@ def test_timer():
timer.end() timer.end()
analysis = timer.get_analysis() 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'] > 1.1
assert analysis['processes']['parallelism'] < MAX_PROC assert analysis['processes']['parallelism'] < MAX_PROC
assert analysis['threads']['parallelism'] > .8 assert analysis['threads']['parallelism'] > .5
assert analysis['threads']['parallelism'] < 1.1 assert analysis['threads']['parallelism'] < 1.1
assert analysis['seq']['parallelism'] > .8 assert analysis['seq']['parallelism'] > .5
assert analysis['seq']['parallelism'] < 1.1 assert analysis['seq']['parallelism'] < 1.1
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment