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
#Tue Dec 16 14:21:23 CET 2014
#Tue Dec 16 13:48:45 CET 2014
detector_threshold=3
effort=max
excludefilter0=.fbExcludeFilterFile|true
......
......@@ -7,7 +7,6 @@ import org.jctools.queues.spec.ConcurrentQueueSpec;
import org.jctools.queues.spec.Ordering;
import org.jctools.queues.spec.Preference;
import teetime.framework.pipe.AbstractPipe;
import teetime.framework.signal.ISignal;
public abstract class AbstractInterThreadPipe extends AbstractPipe {
......
package teetime.framework;
import teetime.framework.pipe.AbstractPipe;
import teetime.framework.signal.ISignal;
public abstract class AbstractIntraThreadPipe extends AbstractPipe {
......
package teetime.framework.pipe;
package teetime.framework;
import teetime.framework.Stage;
import teetime.framework.InputPort;
import teetime.framework.OutputPort;
import teetime.framework.pipe.IPipe;
public abstract class AbstractPipe implements IPipe {
......
......@@ -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() {
// start analysis
for (Thread thread : this.consumerThreads) {
thread.setUncaughtExceptionHandler(this);
thread.start();
}
for (Thread thread : this.finiteProducerThreads) {
thread.setUncaughtExceptionHandler(this);
thread.start();
}
for (Thread thread : this.infiniteProducerThreads) {
thread.setUncaughtExceptionHandler(this);
thread.start();
}
startThreads(this.consumerThreads);
startThreads(this.finiteProducerThreads);
startThreads(this.infiniteProducerThreads);
// wait for the analysis to complete
try {
......@@ -97,12 +86,19 @@ public class Analysis implements UncaughtExceptionHandler {
return this.exceptions;
}
private void startThreads(final Iterable<Thread> threads) {
for (Thread thread : threads) {
thread.setUncaughtExceptionHandler(this);
thread.start();
}
}
public AnalysisConfiguration getConfiguration() {
return this.configuration;
}
@Override
public void uncaughtException(final Thread t, final Throwable e) {
this.exceptions.add(Pair.of(t, e));
public void uncaughtException(final Thread thread, final Throwable throwable) {
this.exceptions.add(Pair.of(thread, throwable));
}
}
package teetime.framework;
import teetime.framework.pipe.IPipe;
public class InputPort<T> extends AbstractPort<T> {
public final class InputPort<T> extends AbstractPort<T> {
private final Stage owningStage;
......@@ -11,26 +9,13 @@ public class InputPort<T> extends AbstractPort<T> {
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
public void setPipe(final IPipe pipe) {
this.pipe = pipe;
@SuppressWarnings("unchecked")
public T receive() {
return (T) this.pipe.removeLast();
}
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;
import java.util.Map;
import java.util.Map.Entry;
import util.test.AbstractProfiledPerformanceAssertion;
import util.test.PerformanceResult;
import util.test.PerformanceTest;
import util.test.AbstractProfiledPerformanceAssertion;
public class ChwHomeComparisonMethodcallWithPorts extends AbstractProfiledPerformanceAssertion {
......@@ -69,8 +69,12 @@ public class ChwHomeComparisonMethodcallWithPorts extends AbstractProfiledPerfor
// assertEquals(75, value17, 4.1); // +22
// 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(78, value17, 4.1); // +3
assertEquals(43, value17, 4.1); // -35
// 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);
......
......@@ -24,6 +24,8 @@ class ChwHomePerformanceCheck extends AbstractPerformanceCheck {
// since 11.08.2014 (incl.)
// assertEquals(47, value10, 2.1); // +21
// 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 {
// since 04.11.2014 (incl.)
// assertEquals(84, medianSpeedup, 2.1); // +22
// 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