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

How to use
kieker.analysis.plugin.reader.timer.TimeReader
constructor

Best Java code snippets using kieker.analysis.plugin.reader.timer.TimeReader.<init> (Showing top 7 results out of 315)

origin: kieker-monitoring/kieker

/**
 * Tests the "blocking" mode of the reader.
 * 
 * @throws InterruptedException
 *             If the thread is interrupted. This should not happen.
 */
@SuppressWarnings("unused")
@Test
public void testBlockingMode() throws InterruptedException {
  final AnalysisController ac = new AnalysisController();
  final AnalysisControllerThread thread = new AnalysisControllerThread(ac);
  final Configuration configuration = new Configuration();
  configuration.setProperty(TimeReader.CONFIG_PROPERTY_NAME_NUMBER_IMPULSES, Long.toString(TimeReader.INFINITE_EMITS));
  new TimeReader(configuration, ac);
  // We expect that the reader doesn't return immediately - in this case we expect the AC to run at least five seconds
  thread.start();
  Thread.sleep(5000);
  Assert.assertEquals(STATE.RUNNING, ac.getState());
  ac.terminate();
}
origin: kieker-monitoring/kieker

/**
 * Tests the "non blocking" mode of the reader.
 * 
 * @throws InterruptedException
 *             If the thread is interrupted. This should not happen.
 */
@SuppressWarnings("unused")
@Test
public void testNonBlockingMode() throws InterruptedException {
  final AnalysisController ac = new AnalysisController();
  final AnalysisControllerThread thread = new AnalysisControllerThread(ac);
  final Configuration configuration = new Configuration();
  configuration.setProperty(TimeReader.CONFIG_PROPERTY_NAME_NUMBER_IMPULSES, "1");
  configuration.setProperty(TimeReader.CONFIG_PROPERTY_NAME_DELAY_NS, "0");
  configuration.setProperty(TimeReader.CONFIG_PROPERTY_NAME_UPDATE_INTERVAL_NS, "1000000000");
  new TimeReader(configuration, ac);
  // We expect the reader to return very fast - in this case we expect the AC to return within five seconds
  thread.start();
  Thread.sleep(6000);
  Assert.assertEquals(STATE.TERMINATED, ac.getState());
}
origin: kieker-monitoring/kieker

final TimeReader timer = new TimeReader(timerConfig, analysisController);
origin: kieker-monitoring/kieker

configuration.setProperty(TimeReader.CONFIG_PROPERTY_NAME_UPDATE_INTERVAL_NS, "100000000");
configuration.setProperty(TimeReader.CONFIG_PROPERTY_NAME_NUMBER_IMPULSES, "10");
final TimeReader tr = new TimeReader(configuration, ac);
final CountingFilter cf = new CountingFilter(new Configuration(), ac);
origin: kieker-monitoring/kieker

/**
 * This test should make sure that the timer delivers a correct amount of records within a given limit.
 * 
 * @throws InterruptedException
 *             If the test thread is interrupted.
 * @throws IllegalStateException
 *             If the analysis is in the wrong state.
 * @throws AnalysisConfigurationException
 *             If the analysis is somehow invalid configured.
 */
@Test
public void testIntervalTimer() throws InterruptedException, IllegalStateException, AnalysisConfigurationException {
  // Running 5 seconds, firing one event per 100 ms, we expect to receive approx. 50 events.
  final AnalysisController ac = new AnalysisController();
  final AnalysisControllerThread thread = new AnalysisControllerThread(ac);
  final Configuration configuration = new Configuration();
  configuration.setProperty(TimeReader.CONFIG_PROPERTY_NAME_UPDATE_INTERVAL_NS, "100000000");
  final TimeReader tr = new TimeReader(configuration, ac);
  final CountingFilter cf = new CountingFilter(new Configuration(), ac);
  ac.connect(tr, TimeReader.OUTPUT_PORT_NAME_TIMESTAMP_RECORDS, cf, CountingFilter.INPUT_PORT_NAME_EVENTS);
  thread.start();
  Thread.sleep(5000);
  ac.terminate();
  Assert.assertTrue(cf.getMessageCount() > 40);
  Assert.assertTrue(cf.getMessageCount() < 60);
}
origin: kieker-monitoring/kieker

/**
 * This test makes sure that the reader stores its configuration.
 */
@Test
public void testConfigurationConservation() {
  final Configuration configuration = new Configuration();
  configuration.setProperty(TimeReader.CONFIG_PROPERTY_NAME_NUMBER_IMPULSES, "50");
  configuration.setProperty(TimeReader.CONFIG_PROPERTY_NAME_DELAY_NS, "42");
  configuration.setProperty(TimeReader.CONFIG_PROPERTY_NAME_UPDATE_INTERVAL_NS, "21");
  final TimeReader tr = new TimeReader(configuration, new AnalysisController());
  Assert.assertEquals(42, tr.getCurrentConfiguration().getLongProperty(TimeReader.CONFIG_PROPERTY_NAME_DELAY_NS));
  Assert.assertEquals(21, tr.getCurrentConfiguration().getLongProperty(TimeReader.CONFIG_PROPERTY_NAME_UPDATE_INTERVAL_NS));
  Assert.assertEquals(50, tr.getCurrentConfiguration().getLongProperty(TimeReader.CONFIG_PROPERTY_NAME_NUMBER_IMPULSES));
}
origin: kieker-monitoring/kieker

timerConfig.setProperty(TimeReader.CONFIG_PROPERTY_NAME_UPDATE_INTERVAL_NS, "5000000000");
timerConfig.setProperty(TimeReader.CONFIG_PROPERTY_NAME_NUMBER_IMPULSES, String.valueOf(this.expectedThroughputListOffsetSecondsInterval5Secs.length));
final TimeReader timeReader = new TimeReader(timerConfig, this.analysisController);
kieker.analysis.plugin.reader.timerTimeReader<init>

Javadoc

Creates a new timer using the given configuration.

Popular methods of TimeReader

  • sendTimestampEvent
    Sends the current system time as a new timestamp event.
  • terminate
  • getCurrentConfiguration

Popular in Java

  • Running tasks concurrently on multiple threads
  • startActivity (Activity)
  • setScale (BigDecimal)
  • getExternalFilesDir (Context)
  • FileOutputStream (java.io)
    An output stream that writes bytes to a file. If the output file exists, it can be replaced or appen
  • Runnable (java.lang)
    Represents a command that can be executed. Often used to run code in a different Thread.
  • URI (java.net)
    A Uniform Resource Identifier that identifies an abstract or physical resource, as specified by RFC
  • Time (java.sql)
    Java representation of an SQL TIME value. Provides utilities to format and parse the time's represen
  • Iterator (java.util)
    An iterator over a sequence of objects, such as a collection.If a collection has been changed since
  • StringTokenizer (java.util)
    Breaks a string into tokens; new code should probably use String#split.> // Legacy code: StringTo
  • From CI to AI: The AI layer in your organization
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