Tabnine Logo
ListReader.<init>
Code IndexAdd Tabnine to your IDE (free)

How to use
kieker.analysis.plugin.reader.list.ListReader
constructor

Best Java code snippets using kieker.analysis.plugin.reader.list.ListReader.<init> (Showing top 20 results out of 315)

origin: kieker-monitoring/kieker

  @Override
  protected AbstractReaderPlugin createReader(final IAnalysisController analysisController) {
    final Configuration listReaderConfig = new Configuration();
    listReaderConfig.setProperty(ListReader.CONFIG_PROPERTY_NAME_AWAIT_TERMINATION,
        Boolean.toString(Boolean.FALSE));
    final ListReader<IMonitoringRecord> listReader = new ListReader<>(listReaderConfig,
        analysisController);
    listReader.addAllObjects(this.replayList);
    return listReader;
  }
}
origin: kieker-monitoring/kieker

private void executeAnalysis(final File tempFile, final boolean append, final List<Integer> objectsToWrite) throws IllegalStateException,
    AnalysisConfigurationException {
  final Configuration configuration = new Configuration();
  configuration.setProperty(TeeFilter.CONFIG_PROPERTY_NAME_APPEND, Boolean.toString(append));
  configuration.setProperty(TeeFilter.CONFIG_PROPERTY_NAME_STREAM, tempFile.getAbsolutePath());
  final IAnalysisController analysisController = new AnalysisController();
  final TeeFilter teeFilter = new TeeFilter(configuration, analysisController);
  final ListReader<Integer> simpleListReader = new ListReader<Integer>(new Configuration(), analysisController);
  analysisController.connect(simpleListReader, ListReader.OUTPUT_PORT_NAME, teeFilter, TeeFilter.INPUT_PORT_NAME_EVENTS);
  simpleListReader.addAllObjects(objectsToWrite);
  analysisController.run();
}
origin: kieker-monitoring/kieker

/**
 * This method initializes the setup.
 */
@Before
public void before() {
  this.controller = new AnalysisController();
  this.reader = new ListReader<>(new Configuration(), this.controller);
  this.sinkPlugin = new ListCollectionFilter<>(new Configuration(), this.controller);
}
origin: kieker-monitoring/kieker

/**
 * A test for the counting filter with multiple readers.
 * 
 * @throws IllegalStateException
 *             If the test setup is somehow invalid (should not happen).
 * @throws AnalysisConfigurationException
 *             If the test setup is somehow invalid (should not happen).
 */
@Test
public void testConcurrently() throws IllegalStateException, AnalysisConfigurationException {
  this.simpleListReader.addObject(new Object());
  // register multiple readers (they fire concurrently)
  final ListReader<Object> reader2 = new ListReader<Object>(new Configuration(), this.analysisController);
  this.analysisController.connect(reader2, ListReader.OUTPUT_PORT_NAME, this.countingFilter, CountingFilter.INPUT_PORT_NAME_EVENTS);
  reader2.addObject(new Object());
  final ListReader<Object> reader3 = new ListReader<Object>(new Configuration(), this.analysisController);
  this.analysisController.connect(reader3, ListReader.OUTPUT_PORT_NAME, this.countingFilter, CountingFilter.INPUT_PORT_NAME_EVENTS);
  reader3.addObject(new Object());
  Assert.assertEquals(0, this.countingFilter.getMessageCount());
  this.analysisController.run();
  Assert.assertEquals(AnalysisController.STATE.TERMINATED, this.analysisController.getState());
  Assert.assertEquals(3, this.countingFilter.getMessageCount());
}
origin: kieker-monitoring/kieker

/**
 * This method prepares the test setup.
 * 
 * @throws IllegalStateException
 *             If something went wrong during the test setup (should not happen).
 * @throws AnalysisConfigurationException
 *             If something went wrong during the test setup (should not happen).
 */
@Before
public void before() throws IllegalStateException, AnalysisConfigurationException {
  this.analysisController = new AnalysisController();
  this.countingFilter = new CountingFilter(new Configuration(), this.analysisController);
  this.simpleListReader = new ListReader<Object>(new Configuration(), this.analysisController);
  this.analysisController.connect(this.simpleListReader, ListReader.OUTPUT_PORT_NAME, this.countingFilter, CountingFilter.INPUT_PORT_NAME_EVENTS);
}
origin: kieker-monitoring/kieker

@Test
public void testIt() throws Exception {
  final AbstractTraceProcessingFilter filter = this.provideWriterFilter(this.outputFile.getAbsolutePath(), this.analysisController);
  final ListReader<Object> reader = new ListReader<Object>(new Configuration(), this.analysisController);
  final List<Object> eventList = this.createTraces();
  reader.addAllObjects(eventList);
  this.analysisController.connect(reader, ListReader.OUTPUT_PORT_NAME, filter, this.provideFilterInputName());
  this.analysisController.connect(filter, AbstractTraceAnalysisFilter.REPOSITORY_PORT_NAME_SYSTEM_MODEL, this.modelRepo);
  this.analysisController.run();
  final String actualFileContent = StringUtils.readOutputFileAsString(this.outputFile);
  final String expectedFileContent = this.provideExpectedFileContent(eventList);
  Assert.assertEquals("Unexpected file content", expectedFileContent, actualFileContent);
}
origin: kieker-monitoring/kieker

final ListReader<Object> reader = new ListReader<Object>(new Configuration(), controller);
final TypeFilter typeFilter = new TypeFilter(typeFilterConfiguration, controller);
final ListCollectionFilter<Object> sinkPluginValidElements = new ListCollectionFilter<Object>(new Configuration(), controller);
origin: kieker-monitoring/kieker

final AnalysisController analysisController = new AnalysisController();
final ListReader<IMonitoringRecord> reader = new ListReader<>(new Configuration(), analysisController);
reader.addAllObjects(eventsToWrite);
origin: kieker-monitoring/kieker

private void runTestFailed(final TraceEventRecords records, final long maxTraceDuration, final long maxTraceTimeout) throws IllegalStateException,
AnalysisConfigurationException {
  final IAnalysisController controller = new AnalysisController();
  final ListReader<Object> reader = new ListReader<>(new Configuration(), controller);
  final Configuration configuration = new Configuration();
  configuration.setProperty(EventRecordTraceReconstructionFilter.CONFIG_PROPERTY_NAME_MAX_TRACE_DURATION, Long.toString(maxTraceDuration));
  configuration.setProperty(EventRecordTraceReconstructionFilter.CONFIG_PROPERTY_NAME_MAX_TRACE_TIMEOUT, Long.toString(maxTraceTimeout));
  final EventRecordTraceReconstructionFilter traceFilter = new EventRecordTraceReconstructionFilter(configuration, controller);
  final ListCollectionFilter<TraceEventRecords> sinkPlugin = new ListCollectionFilter<>(new Configuration(), controller);
  Assert.assertTrue(sinkPlugin.getList().isEmpty());
  controller.connect(reader, ListReader.OUTPUT_PORT_NAME, traceFilter, EventRecordTraceReconstructionFilter.INPUT_PORT_NAME_TRACE_RECORDS);
  controller.connect(traceFilter, EventRecordTraceReconstructionFilter.OUTPUT_PORT_NAME_TRACE_VALID, sinkPlugin, ListCollectionFilter.INPUT_PORT_NAME);
  reader.addObject(records.getTraceMetadata());
  for (final AbstractTraceEvent e : records.getTraceEvents()) {
    reader.addObject(e);
  }
  controller.run();
  Assert.assertEquals(AnalysisController.STATE.TERMINATED, controller.getState());
  // Make sure that no trace is generated
  Assert.assertEquals("There should be no trace", 0, sinkPlugin.getList().size());
}
origin: kieker-monitoring/kieker

final IAnalysisController controller = new AnalysisController();
final ListReader<Object> reader = new ListReader<>(new Configuration(), controller);
origin: kieker-monitoring/kieker

final ListReader<TraceEventRecords> reader = new ListReader<TraceEventRecords>(readerConfiguration, this.analysisController);
reader.addObject(traceEvents);
origin: kieker-monitoring/kieker

private void runTestEventBasedTraceRepair(final TraceEventRecords records, final long maxTraceDuration, final long maxTraceTimeout)
    throws IllegalStateException,
    AnalysisConfigurationException {
  final IAnalysisController controller = new AnalysisController();
  final ListReader<Object> reader = new ListReader<>(new Configuration(), controller);
  final Configuration configuration = new Configuration();
  configuration.setProperty(EventRecordTraceReconstructionFilter.CONFIG_PROPERTY_NAME_MAX_TRACE_DURATION, Long.toString(maxTraceDuration));
  configuration.setProperty(EventRecordTraceReconstructionFilter.CONFIG_PROPERTY_NAME_MAX_TRACE_TIMEOUT, Long.toString(maxTraceTimeout));
  configuration.setProperty(EventRecordTraceReconstructionFilter.CONFIG_PROPERTY_NAME_REPAIR_EVENT_BASED_TRACES, "true");
  final EventRecordTraceReconstructionFilter traceFilter = new EventRecordTraceReconstructionFilter(configuration, controller);
  final ListCollectionFilter<TraceEventRecords> sinkPlugin = new ListCollectionFilter<>(new Configuration(), controller);
  Assert.assertTrue(sinkPlugin.getList().isEmpty());
  controller.connect(reader, ListReader.OUTPUT_PORT_NAME, traceFilter, EventRecordTraceReconstructionFilter.INPUT_PORT_NAME_TRACE_RECORDS);
  controller.connect(traceFilter, EventRecordTraceReconstructionFilter.OUTPUT_PORT_NAME_TRACE_VALID, sinkPlugin, ListCollectionFilter.INPUT_PORT_NAME);
  reader.addObject(records.getTraceMetadata());
  for (final AbstractTraceEvent e : records.getTraceEvents()) {
    reader.addObject(e);
  }
  controller.run();
  Assert.assertEquals(AnalysisController.STATE.TERMINATED, controller.getState());
  Assert.assertEquals("No trace passed filter", 1, sinkPlugin.getList().size());
  Assert.assertTrue("Repair failed", records.getTraceEvents().length < sinkPlugin.getList().get(0).getTraceEvents().length);
  Assert.assertEquals("Did not repair all BeforeEvents", sinkPlugin.getList().get(0).getTraceEvents().length, 10);
}
origin: kieker-monitoring/kieker

final ListReader<NamedDoubleTimeSeriesPoint> theReaderForecast = new ListReader<>(readerForecastConfiguration, this.controller);
theReaderForecast.addAllObjects(this.createInputEventSetForecast());
origin: kieker-monitoring/kieker

/**
 * Set up for the AnomalyScoreCalculationFilterTest.
 *
 * @throws IllegalStateException
 *             If illegal state
 * @throws AnalysisConfigurationException
 *             If wrong configuration
 */
@Before
public void setUp() throws IllegalStateException,
    AnalysisConfigurationException {
  this.controller = new AnalysisController();
  // READER
  final Configuration readerScoreCalcConfiguration = new Configuration();
  readerScoreCalcConfiguration.setProperty(ListReader.CONFIG_PROPERTY_NAME_AWAIT_TERMINATION, Boolean.TRUE.toString());
  final ListReader<ForecastMeasurementPair> theReaderScoreCalc = new ListReader<>(readerScoreCalcConfiguration, this.controller);
  theReaderScoreCalc.addAllObjects(this.createInputEventSetScoreCalc());
  final Configuration scoreConfiguration = new Configuration();
  final AnomalyScoreCalculationFilter scoreCalc = new AnomalyScoreCalculationFilter(scoreConfiguration, this.controller);
  // SINK 1
  this.sinkAnomalyScore = new ListCollectionFilter<>(new Configuration(), this.controller);
  // CONNECTION
  this.controller
      .connect(theReaderScoreCalc, ListReader.OUTPUT_PORT_NAME, scoreCalc, AnomalyScoreCalculationFilter.INPUT_PORT_CURRENT_FORECAST_PAIR);
  this.controller
      .connect(scoreCalc, AnomalyScoreCalculationFilter.OUTPUT_PORT_ANOMALY_SCORE, this.sinkAnomalyScore, ListCollectionFilter.INPUT_PORT_NAME);
}
origin: kieker-monitoring/kieker

@Ignore // NOCS
@Test
public void testRecordsWithoutStringSame() throws IllegalStateException, AnalysisConfigurationException {
  final AnalysisController analysisController = new AnalysisController();
  final ListReader<IMonitoringRecord> reader = new ListReader<>(new Configuration(), analysisController);
  final StringBufferFilter stringBufferFilter = new StringBufferFilter(new Configuration(), analysisController);
  final ListCollectionFilter<IMonitoringRecord> collectionFilter = new ListCollectionFilter<>(new Configuration(), analysisController);
  analysisController.connect(reader, ListReader.OUTPUT_PORT_NAME, stringBufferFilter, StringBufferFilter.INPUT_PORT_NAME_EVENTS);
  analysisController.connect(stringBufferFilter, StringBufferFilter.OUTPUT_PORT_NAME_RELAYED_EVENTS, collectionFilter, ListCollectionFilter.INPUT_PORT_NAME);
  final IMonitoringRecord recordIn1 = new EmptyRecord();
  reader.addObject(recordIn1);
  analysisController.run();
  Assert.assertEquals(AnalysisController.STATE.TERMINATED, analysisController.getState());
  final List<IMonitoringRecord> records = collectionFilter.getList();
  Assert.assertEquals("Unexpected number of records", 1, records.size());
  final IMonitoringRecord recordOut1 = records.get(0);
  Assert.assertSame("First output record not same as first input record", recordIn1, recordOut1); // includes no String, hence "as-is"
}
origin: kieker-monitoring/kieker

private void runTestFailedInterleaved(final TraceEventRecords trace1, final TraceEventRecords trace2, final long maxTraceDuration, final long maxTraceTimeout)
    throws IllegalStateException, AnalysisConfigurationException {
  final IAnalysisController controller = new AnalysisController();
  final ListReader<Object> reader = new ListReader<>(new Configuration(), controller);
  final Configuration configuration = new Configuration();
  configuration.setProperty(EventRecordTraceReconstructionFilter.CONFIG_PROPERTY_NAME_MAX_TRACE_DURATION, Long.toString(maxTraceDuration));
  configuration.setProperty(EventRecordTraceReconstructionFilter.CONFIG_PROPERTY_NAME_MAX_TRACE_TIMEOUT, Long.toString(maxTraceTimeout));
  final EventRecordTraceReconstructionFilter traceFilter = new EventRecordTraceReconstructionFilter(configuration, controller);
  final ListCollectionFilter<TraceEventRecords> sinkPlugin = new ListCollectionFilter<>(new Configuration(), controller);
  Assert.assertTrue(sinkPlugin.getList().isEmpty());
  final ListCollectionFilter<TraceEventRecords> sinkPluginFailed = new ListCollectionFilter<>(new Configuration(), controller);
  Assert.assertTrue(sinkPluginFailed.getList().isEmpty());
  controller.connect(reader, ListReader.OUTPUT_PORT_NAME, traceFilter, EventRecordTraceReconstructionFilter.INPUT_PORT_NAME_TRACE_RECORDS);
  controller.connect(traceFilter, EventRecordTraceReconstructionFilter.OUTPUT_PORT_NAME_TRACE_VALID, sinkPlugin, ListCollectionFilter.INPUT_PORT_NAME);
  controller.connect(traceFilter, EventRecordTraceReconstructionFilter.OUTPUT_PORT_NAME_TRACE_INVALID, sinkPluginFailed, ListCollectionFilter.INPUT_PORT_NAME);
  reader.addObject(trace1.getTraceMetadata());
  reader.addObject(trace2.getTraceMetadata());
  final AbstractTraceEvent[] events1 = trace1.getTraceEvents();
  final AbstractTraceEvent[] events2 = trace2.getTraceEvents();
  for (int i = 0; i < events1.length; i++) {
    reader.addObject(events1[i]);
    reader.addObject(events2[i]);
  }
  controller.run();
  Assert.assertEquals(AnalysisController.STATE.TERMINATED, controller.getState());
  // Make sure that only one of the two traces is generated
  Assert.assertEquals("There should be no trace", 1, sinkPlugin.getList().size());
}
origin: kieker-monitoring/kieker

final ListReader<StorableDetectionResult> theReader = new ListReader<>(readerConfiguration, this.controller);
theReader.addAllObjects(this.createInputEventSet());
origin: kieker-monitoring/kieker

@Ignore // NOCS
@Test
public void testRecordsWithStringEqualButNeverSame() throws IllegalStateException, AnalysisConfigurationException {
  final IAnalysisController analysisController = new AnalysisController();
  final ListReader<IMonitoringRecord> reader = new ListReader<>(new Configuration(), analysisController);
  final StringBufferFilter stringBufferFilter = new StringBufferFilter(new Configuration(), analysisController);
  final ListCollectionFilter<IMonitoringRecord> collectionFilter = new ListCollectionFilter<>(new Configuration(), analysisController);
  analysisController.connect(reader, ListReader.OUTPUT_PORT_NAME, stringBufferFilter, StringBufferFilter.INPUT_PORT_NAME_EVENTS);
  analysisController.connect(stringBufferFilter, StringBufferFilter.OUTPUT_PORT_NAME_RELAYED_EVENTS, collectionFilter, ListCollectionFilter.INPUT_PORT_NAME);
  long timestamp = 3268936L;
  final IMonitoringRecord recordIn1 = TestStringBufferFilter.createOperationExecutionRecord(timestamp);
  timestamp++;
  final IMonitoringRecord recordIn2 = TestStringBufferFilter.createOperationExecutionRecord(timestamp);
  reader.addObject(recordIn1);
  reader.addObject(recordIn2);
  analysisController.run();
  Assert.assertEquals(AnalysisController.STATE.TERMINATED, analysisController.getState());
  final List<IMonitoringRecord> records = collectionFilter.getList();
  Assert.assertEquals("Unexpected number of records", 2, records.size());
  final IMonitoringRecord recordOut1 = records.get(0);
  final IMonitoringRecord recordOut2 = records.get(1);
  Assert.assertNotSame("First output record same as first input record", recordIn1, recordOut1); // includes String, hence NOT "as-is"
  Assert.assertEquals("First output record doesn't equal first input record", recordIn1, recordOut1); // ... but must be equal
  Assert.assertNotSame("Second output record same as second input record", recordIn2, recordOut2); // includes String, hence NOT "as-is"
  Assert.assertEquals("Second output record doesn't equal second input record", recordIn2, recordOut2); // ... but must be equal
}
origin: kieker-monitoring/kieker

/**
 * Sets up a simple test filter structure (SimpleListReader -> RecordConverter -> ListCollectionFilter)
 * and creates an OperationExecutionRecord that will be converterd for testing reasons.
 * 
 * @throws Exception
 *             throws exceptions that are thrown while setting up the filter structure
 */
@Before
public void setUp() throws Exception {
  final OperationExecutionRecord oer;
  final RecordConverter recordConverter;
  this.analysisController = new AnalysisController();
  recordConverter = new RecordConverter(new Configuration(), this.analysisController);
  this.simpleListReader = new ListReader<OperationExecutionRecord>(new Configuration(), this.analysisController);
  this.listCollectionfilter = new ListCollectionFilter<NamedDoubleRecord>(new Configuration(), this.analysisController);
  this.analysisController.connect(this.simpleListReader, ListReader.OUTPUT_PORT_NAME, recordConverter, RecordConverter.INPUT_PORT_NAME_OER);
  this.analysisController.connect(recordConverter, RecordConverter.OUTPUT_PORT_NAME_NDR, this.listCollectionfilter, ListCollectionFilter.INPUT_PORT_NAME);
  oer = new OperationExecutionRecord(RecordConverterTest.operationSignature,
      OperationExecutionRecord.NO_SESSION_ID,
      OperationExecutionRecord.NO_TRACE_ID,
      RecordConverterTest.timeIn,
      RecordConverterTest.timeOut,
      RecordConverterTest.hostAppInput,
      OperationExecutionRecord.NO_EOI_ESS,
      OperationExecutionRecord.NO_EOI_ESS);
  oer.setLoggingTimestamp(RecordConverterTest.loggingTimestamp);
  this.convertRecord(oer);
}
origin: kieker-monitoring/kieker

private static GraphTestSetup prepareEnvironment(final AnalysisController analysisController, final AbstractGraphProducingFilter<?> graphProducer,
    final String inputPortName, final String systemModelRepositoryPortName, final List<OperationExecutionRecord> executionRecords,
    final AbstractGraphFilter<?, ?, ?, ?>... graphFilters) throws AnalysisConfigurationException {
  final SystemModelRepository systemModelRepository = new SystemModelRepository(new Configuration(), analysisController);
  final ListReader<OperationExecutionRecord> readerPlugin = new ListReader<>(new Configuration(), analysisController);
  readerPlugin.addAllObjects(executionRecords);
  final ExecutionRecordTransformationFilter transformationFilter = new ExecutionRecordTransformationFilter(new Configuration(), analysisController);
  final TraceReconstructionFilter traceReconstructionFilter = new TraceReconstructionFilter(new Configuration(), analysisController);
  // Correct the behavior of the extended list filter as properties are not inherited.
  final Configuration graphReceiverConfiguration = new Configuration();
  graphReceiverConfiguration.setProperty(ListCollectionFilter.CONFIG_PROPERTY_NAME_MAX_NUMBER_OF_ENTRIES,
      ListCollectionFilter.CONFIG_PROPERTY_VALUE_NUMBER_OF_ENTRIES);
  final GraphReceiverPlugin graphReceiver = new GraphReceiverPlugin(graphReceiverConfiguration, analysisController);
  // Connect repositories
  analysisController.connect(transformationFilter, AbstractTraceAnalysisFilter.REPOSITORY_PORT_NAME_SYSTEM_MODEL, systemModelRepository);
  analysisController.connect(traceReconstructionFilter, AbstractTraceAnalysisFilter.REPOSITORY_PORT_NAME_SYSTEM_MODEL, systemModelRepository);
  if (systemModelRepositoryPortName != null) {
    analysisController.connect(graphProducer, systemModelRepositoryPortName, systemModelRepository);
  }
  // Connect plugins
  analysisController.connect(readerPlugin, ListReader.OUTPUT_PORT_NAME,
      transformationFilter, ExecutionRecordTransformationFilter.INPUT_PORT_NAME_RECORDS);
  analysisController.connect(transformationFilter, ExecutionRecordTransformationFilter.OUTPUT_PORT_NAME_EXECUTIONS,
      traceReconstructionFilter, TraceReconstructionFilter.INPUT_PORT_NAME_EXECUTIONS);
  analysisController.connect(traceReconstructionFilter, TraceReconstructionFilter.OUTPUT_PORT_NAME_MESSAGE_TRACE,
      graphProducer, inputPortName);
  DependencyGraphTestUtil.connectGraphFilters(analysisController, graphProducer, graphFilters, graphReceiver);
  return new GraphTestSetup(analysisController, graphReceiver);
}
kieker.analysis.plugin.reader.listListReader<init>

Javadoc

Creates a new instance of this class using the given parameters.

Popular methods of ListReader

  • addAllObjects
    This method adds all given records to our list.
  • addObject
    This method adds the given object to our list.

Popular in Java

  • Reading from database using SQL prepared statement
  • putExtra (Intent)
  • onRequestPermissionsResult (Fragment)
  • findViewById (Activity)
  • Arrays (java.util)
    This class contains various methods for manipulating arrays (such as sorting and searching). This cl
  • Hashtable (java.util)
    A plug-in replacement for JDK1.5 java.util.Hashtable. This version is based on org.cliffc.high_scale
  • TimerTask (java.util)
    The TimerTask class represents a task to run at a specified time. The task may be run once or repeat
  • JFrame (javax.swing)
  • JTextField (javax.swing)
  • Location (org.springframework.beans.factory.parsing)
    Class that models an arbitrary location in a Resource.Typically used to track the location of proble
  • Best plugins for Eclipse
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now