Skip to content
Snippets Groups Projects
Commit dd24f919 authored by Christian Wulf's avatar Christian Wulf
Browse files

refactored code for perf reasons;

adapted expected perf results
parent 3af76fc4
No related branches found
No related tags found
No related merge requests found
...@@ -32,7 +32,8 @@ public abstract class AbstractInterThreadPipe extends AbstractPipe { ...@@ -32,7 +32,8 @@ public abstract class AbstractInterThreadPipe extends AbstractPipe {
} }
protected final boolean isThreadWaiting(final Thread thread) { protected final boolean isThreadWaiting(final Thread thread) {
return thread.getState() == State.WAITING || thread.getState() == State.TIMED_WAITING; final State state = thread.getState(); // store state in variable for performance reasons
return state == State.WAITING || state == State.TIMED_WAITING;
} }
/** /**
......
...@@ -37,7 +37,7 @@ class ChwHomePerformanceCheck extends AbstractPerformanceCheck { ...@@ -37,7 +37,7 @@ class ChwHomePerformanceCheck extends AbstractPerformanceCheck {
// since 04.11.2014 (incl.) // since 04.11.2014 (incl.)
// assertEquals(71, medianSpeedup, 2.1); // +27 // assertEquals(71, medianSpeedup, 2.1); // +27
// since 05.12.2014 (incl.) // since 05.12.2014 (incl.)
assertEquals(43, medianSpeedup, 2.1); // -28 (41-56) assertEquals(43, medianSpeedup, 4.1); // -28 (41-56)
} }
private void checkSingleElementPipes() { private void checkSingleElementPipes() {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment