diff --git a/src/main/java/teetime/variant/explicitScheduling/stage/kieker/fileToRecord/ZipFile2RecordFilter.java b/src/main/java/teetime/variant/explicitScheduling/stage/kieker/fileToRecord/ZipFile2RecordFilter.java index ef5bcd718ee25d9efd92dad4d36c565ea37b5d53..7c88e0341c22f34d55a1ec14f80600731c83785f 100644 --- a/src/main/java/teetime/variant/explicitScheduling/stage/kieker/fileToRecord/ZipFile2RecordFilter.java +++ b/src/main/java/teetime/variant/explicitScheduling/stage/kieker/fileToRecord/ZipFile2RecordFilter.java @@ -16,15 +16,12 @@ package teetime.variant.explicitScheduling.stage.kieker.fileToRecord; import java.io.BufferedInputStream; -import java.io.BufferedReader; import java.io.DataInputStream; import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.IOException; import java.io.InputStream; -import java.io.InputStreamReader; -import java.io.UnsupportedEncodingException; import java.util.zip.ZipEntry; import java.util.zip.ZipInputStream; @@ -40,7 +37,7 @@ import kieker.common.util.filesystem.FSUtil; /** * @author Christian Wulf - * + * * @since 1.10 */ public class ZipFile2RecordFilter extends AbstractFilter<ZipFile2RecordFilter> { @@ -84,13 +81,21 @@ public class ZipFile2RecordFilter extends AbstractFilter<ZipFile2RecordFilter> { private void createAndSendRecordsFromZipFile(final Context<ZipFile2RecordFilter> context, final File zipFile, final ClassNameRegistry classNameRegistry) throws FileNotFoundException { final ZipInputStream zipInputStream = new ZipInputStream(new FileInputStream(zipFile)); - final BufferedReader reader; - try { - reader = new BufferedReader(new InputStreamReader(zipInputStream, FSUtil.ENCODING)); - } catch (final UnsupportedEncodingException e) { - this.logger.error("This exception should never occur.", e); - return; - } + // BufferedReader reader; + // try { + // reader = new BufferedReader(new InputStreamReader(zipInputStream, FSUtil.ENCODING)); + // } catch (final UnsupportedEncodingException e) { + // this.logger.error("This exception should never occur.", e); + // return; + // } finally { + // if (null != reader) { + // try { + // reader.close(); + // } catch (IOException e) { + // throw new IllegalStateException(e); + // } + // } + // } final DataInputStream input = new DataInputStream(new BufferedInputStream(zipInputStream, 1024 * 1024)); ZipEntry zipEntry; diff --git a/src/main/java/teetime/variant/methodcall/framework/core/Pipeline.java b/src/main/java/teetime/variant/methodcall/framework/core/Pipeline.java index 71ae10fc0237f74aaf0311122854572325de3b3e..6934bf29114678233bf3f794a43aa2cc3d482faa 100644 --- a/src/main/java/teetime/variant/methodcall/framework/core/Pipeline.java +++ b/src/main/java/teetime/variant/methodcall/framework/core/Pipeline.java @@ -35,6 +35,7 @@ public class Pipeline<I, O> implements Stage<I, O> { this.lastStage = stage; } + @SuppressWarnings("unchecked") @Override public CommittableQueue<O> execute2(final CommittableQueue<I> elements) { // CommittableQueue queue = this.firstStage.execute2(elements); @@ -44,6 +45,7 @@ public class Pipeline<I, O> implements Stage<I, O> { // return this.lastStage.execute2(queue); // below is faster than above (probably because of the instantiation of a list iterator in each (!) execution) + @SuppressWarnings("rawtypes") CommittableQueue queue = elements; for (int i = 0; i < this.stages.length; i++) { diff --git a/src/test/java/teetime/variant/methodcall/examples/experiment03/MethodCallThroughputAnalysis3.java b/src/test/java/teetime/variant/methodcall/examples/experiment03/MethodCallThroughputAnalysis3.java index 8611d4661cd7ff224a43ab7a224668deb29c6185..1f905d129e654c01332f3a97066f6fbbb50eee63 100644 --- a/src/test/java/teetime/variant/methodcall/examples/experiment03/MethodCallThroughputAnalysis3.java +++ b/src/test/java/teetime/variant/methodcall/examples/experiment03/MethodCallThroughputAnalysis3.java @@ -31,7 +31,7 @@ import teetime.variant.methodcall.stage.StopTimestampFilter; /** * @author Christian Wulf - * + * * @since 1.10 */ public class MethodCallThroughputAnalysis3 extends Analysis { @@ -70,7 +70,7 @@ public class MethodCallThroughputAnalysis3 extends Analysis { final StopTimestampFilter stopTimestampFilter = new StopTimestampFilter(); final CollectorSink<TimestampObject> collectorSink = new CollectorSink<TimestampObject>(this.timestampObjects); - final List<Stage> stageList = new ArrayList<Stage>(); + final List<Stage<?, ?>> stageList = new ArrayList<Stage<?, ?>>(); stageList.add(objectProducer); stageList.add(startTimestampFilter); stageList.addAll(Arrays.asList(noopFilters)); @@ -78,7 +78,7 @@ public class MethodCallThroughputAnalysis3 extends Analysis { stageList.add(collectorSink); // using an array decreases the performance from 60ms to 200ms (by 3x) - final Stage[] stages = stageList.toArray(new Stage[0]); + final Stage<?, ?>[] stages = stageList.toArray(new Stage[0]); final WrappingPipeline pipeline = new WrappingPipeline() { @Override @@ -93,7 +93,7 @@ public class MethodCallThroughputAnalysis3 extends Analysis { Object element = null; for (int i = 0; i < stages.length; i++) { - Stage stage = stages[i]; + Stage<?, ?> stage = stages[i]; element = stage.execute(element); if (element == null) { return false; diff --git a/src/test/java/teetime/variant/methodcall/examples/experiment08/MethodCallThroughputAnalysis8.java b/src/test/java/teetime/variant/methodcall/examples/experiment08/MethodCallThroughputAnalysis8.java index 7045b348c4e812b1229a6efb59d88dc9fdd3ec04..90c034ebc545476c864b0631f26379f9ea1d2bab 100644 --- a/src/test/java/teetime/variant/methodcall/examples/experiment08/MethodCallThroughputAnalysis8.java +++ b/src/test/java/teetime/variant/methodcall/examples/experiment08/MethodCallThroughputAnalysis8.java @@ -32,7 +32,7 @@ import teetime.variant.methodcall.stage.StopTimestampFilter; /** * @author Christian Wulf - * + * * @since 1.10 */ public class MethodCallThroughputAnalysis8 extends Analysis { @@ -71,7 +71,7 @@ public class MethodCallThroughputAnalysis8 extends Analysis { final StopTimestampFilter stopTimestampFilter = new StopTimestampFilter(); final CollectorSink<TimestampObject> collectorSink = new CollectorSink<TimestampObject>(this.timestampObjects); - final List<AbstractStage> stageList = new ArrayList<AbstractStage>(); + final List<AbstractStage<?, ?>> stageList = new ArrayList<AbstractStage<?, ?>>(); stageList.add(objectProducer); stageList.add(startTimestampFilter); stageList.addAll(Arrays.asList(noopFilters)); @@ -79,7 +79,7 @@ public class MethodCallThroughputAnalysis8 extends Analysis { stageList.add(collectorSink); // using an array decreases the performance from 60ms to 200ms (by 3x) - final AbstractStage[] stages = stageList.toArray(new AbstractStage[0]); + final AbstractStage<?, ?>[] stages = stageList.toArray(new AbstractStage[0]); final WrappingPipeline pipeline = new WrappingPipeline() { private int startIndex; @@ -89,7 +89,7 @@ public class MethodCallThroughputAnalysis8 extends Analysis { // using the foreach for arrays (i.e., w/o using an iterator variable) increases the performance from 200ms to 130ms Object element = null; for (int i = this.startIndex; i < stages.length; i++) { - Stage stage = stages[i]; + Stage<?, ?> stage = stages[i]; element = stage.execute(element); if (element == null) { return false;