Skip to content
Snippets Groups Projects
Commit 3d5c0a9b authored by Nelson Tavares de Sousa's avatar Nelson Tavares de Sousa
Browse files

Merge remote-tracking branch 'origin/master' into site

Conflicts:
	.settings/edu.umd.cs.findbugs.core.prefs
parents b344ebf4 539c2bce
No related branches found
No related tags found
No related merge requests found
Showing
with 45 additions and 48 deletions
#FindBugs User Preferences #FindBugs User Preferences
#Tue Dec 16 14:21:23 CET 2014 #Tue Dec 16 13:48:45 CET 2014
detector_threshold=3 detector_threshold=3
effort=max effort=max
excludefilter0=.fbExcludeFilterFile|true excludefilter0=.fbExcludeFilterFile|true
......
...@@ -7,7 +7,6 @@ import org.jctools.queues.spec.ConcurrentQueueSpec; ...@@ -7,7 +7,6 @@ import org.jctools.queues.spec.ConcurrentQueueSpec;
import org.jctools.queues.spec.Ordering; import org.jctools.queues.spec.Ordering;
import org.jctools.queues.spec.Preference; import org.jctools.queues.spec.Preference;
import teetime.framework.pipe.AbstractPipe;
import teetime.framework.signal.ISignal; import teetime.framework.signal.ISignal;
public abstract class AbstractInterThreadPipe extends AbstractPipe { public abstract class AbstractInterThreadPipe extends AbstractPipe {
......
package teetime.framework; package teetime.framework;
import teetime.framework.pipe.AbstractPipe;
import teetime.framework.signal.ISignal; import teetime.framework.signal.ISignal;
public abstract class AbstractIntraThreadPipe extends AbstractPipe { public abstract class AbstractIntraThreadPipe extends AbstractPipe {
......
package teetime.framework.pipe; package teetime.framework;
import teetime.framework.Stage; import teetime.framework.pipe.IPipe;
import teetime.framework.InputPort;
import teetime.framework.OutputPort;
public abstract class AbstractPipe implements IPipe { public abstract class AbstractPipe implements IPipe {
......
...@@ -50,24 +50,13 @@ public class Analysis implements UncaughtExceptionHandler { ...@@ -50,24 +50,13 @@ public class Analysis implements UncaughtExceptionHandler {
/** /**
* *
* @return a map of thread/throwable pair * @return a collection of thread/throwable pairs
*/ */
public Collection<Pair<Thread, Throwable>> start() { public Collection<Pair<Thread, Throwable>> start() {
// start analysis // start analysis
for (Thread thread : this.consumerThreads) { startThreads(this.consumerThreads);
thread.setUncaughtExceptionHandler(this); startThreads(this.finiteProducerThreads);
thread.start(); startThreads(this.infiniteProducerThreads);
}
for (Thread thread : this.finiteProducerThreads) {
thread.setUncaughtExceptionHandler(this);
thread.start();
}
for (Thread thread : this.infiniteProducerThreads) {
thread.setUncaughtExceptionHandler(this);
thread.start();
}
// wait for the analysis to complete // wait for the analysis to complete
try { try {
...@@ -97,12 +86,19 @@ public class Analysis implements UncaughtExceptionHandler { ...@@ -97,12 +86,19 @@ public class Analysis implements UncaughtExceptionHandler {
return this.exceptions; return this.exceptions;
} }
private void startThreads(final Iterable<Thread> threads) {
for (Thread thread : threads) {
thread.setUncaughtExceptionHandler(this);
thread.start();
}
}
public AnalysisConfiguration getConfiguration() { public AnalysisConfiguration getConfiguration() {
return this.configuration; return this.configuration;
} }
@Override @Override
public void uncaughtException(final Thread t, final Throwable e) { public void uncaughtException(final Thread thread, final Throwable throwable) {
this.exceptions.add(Pair.of(t, e)); this.exceptions.add(Pair.of(thread, throwable));
} }
} }
package teetime.framework; package teetime.framework;
import teetime.framework.pipe.IPipe; public final class InputPort<T> extends AbstractPort<T> {
public class InputPort<T> extends AbstractPort<T> {
private final Stage owningStage; private final Stage owningStage;
...@@ -11,26 +9,13 @@ public class InputPort<T> extends AbstractPort<T> { ...@@ -11,26 +9,13 @@ public class InputPort<T> extends AbstractPort<T> {
this.owningStage = owningStage; this.owningStage = owningStage;
} }
public T receive() {
@SuppressWarnings("unchecked")
final T element = (T) this.pipe.removeLast();
return element;
}
public T read() {
@SuppressWarnings("unchecked")
final T element = (T) this.pipe.readLast();
return element;
}
/** /**
* Connects this input port with the given <code>pipe</code> bi-directionally
* *
* @param pipe * @return the next element from the connected pipe
*/ */
@Override @SuppressWarnings("unchecked")
public void setPipe(final IPipe pipe) { public T receive() {
this.pipe = pipe; return (T) this.pipe.removeLast();
} }
public Stage getOwningStage() { public Stage getOwningStage() {
......
package teetime.framework;
public final class TerminateException extends RuntimeException {
private static final long serialVersionUID = 6841651916837487909L;
@Override
public synchronized Throwable fillInStackTrace() {
return this;
}
}
...@@ -5,9 +5,9 @@ import static org.junit.Assert.assertEquals; ...@@ -5,9 +5,9 @@ import static org.junit.Assert.assertEquals;
import java.util.Map; import java.util.Map;
import java.util.Map.Entry; import java.util.Map.Entry;
import util.test.AbstractProfiledPerformanceAssertion;
import util.test.PerformanceResult; import util.test.PerformanceResult;
import util.test.PerformanceTest; import util.test.PerformanceTest;
import util.test.AbstractProfiledPerformanceAssertion;
public class ChwHomeComparisonMethodcallWithPorts extends AbstractProfiledPerformanceAssertion { public class ChwHomeComparisonMethodcallWithPorts extends AbstractProfiledPerformanceAssertion {
...@@ -69,8 +69,12 @@ public class ChwHomeComparisonMethodcallWithPorts extends AbstractProfiledPerfor ...@@ -69,8 +69,12 @@ public class ChwHomeComparisonMethodcallWithPorts extends AbstractProfiledPerfor
// assertEquals(75, value17, 4.1); // +22 // assertEquals(75, value17, 4.1); // +22
// since 04.11.2014 (incl.) // since 04.11.2014 (incl.)
// assertEquals(40, value15, 4.1); // -28
// assertEquals(78, value17, 4.1); // +3
// since 13.12.2014 (incl.)
assertEquals(40, value15, 4.1); // -28 assertEquals(40, value15, 4.1); // -28
assertEquals(78, value17, 4.1); // +3 assertEquals(43, value17, 4.1); // -35
// below results vary too much, possibly due to the OS' scheduler // below results vary too much, possibly due to the OS' scheduler
// assertEquals(RESULT_TESTS_16, (double) test16a.quantiles.get(0.5) / test1.quantiles.get(0.5), 5.1); // assertEquals(RESULT_TESTS_16, (double) test16a.quantiles.get(0.5) / test1.quantiles.get(0.5), 5.1);
......
...@@ -24,6 +24,8 @@ class ChwHomePerformanceCheck extends AbstractPerformanceCheck { ...@@ -24,6 +24,8 @@ class ChwHomePerformanceCheck extends AbstractPerformanceCheck {
// since 11.08.2014 (incl.) // since 11.08.2014 (incl.)
// assertEquals(47, value10, 2.1); // +21 // assertEquals(47, value10, 2.1); // +21
// since 31.08.2014 (incl.) // since 31.08.2014 (incl.)
assertEquals(51, medianSpeedup, 3.2); // assertEquals(51, medianSpeedup, 3.2); // +4
// since 13.12.2014 (incl.)
assertEquals(40, medianSpeedup, 3.2); // -11
} }
} }
...@@ -30,6 +30,8 @@ class ChwHomePerformanceCheck extends AbstractPerformanceCheck { ...@@ -30,6 +30,8 @@ class ChwHomePerformanceCheck extends AbstractPerformanceCheck {
// since 04.11.2014 (incl.) // since 04.11.2014 (incl.)
// assertEquals(84, medianSpeedup, 2.1); // +22 // assertEquals(84, medianSpeedup, 2.1); // +22
// since 05.12.2014 (incl.) // since 05.12.2014 (incl.)
assertEquals(75, medianSpeedup, 2.1); // -9 // assertEquals(75, medianSpeedup, 2.1); // -9
// since 13.12.2014 (incl.)
assertEquals(44, medianSpeedup, 2.1); // -31
} }
} }
target/site/images/code_screenshot.jpg

460 KiB

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