Codota Logo
TimeReader.<init>
Code IndexAdd Codota 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)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
LocalDateTime l =
  • Codota Iconnew LocalDateTime()
  • Codota IconLocalDateTime.now()
  • Codota IconDateTimeFormatter formatter;String text;formatter.parseLocalDateTime(text)
  • Smart code suggestions by Codota
}
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

  • Reactive rest calls using spring rest template
  • requestLocationUpdates (LocationManager)
  • putExtra (Intent)
  • compareTo (BigDecimal)
    Compares this BigDecimal with the specified BigDecimal. Two BigDecimal objects that are equal in val
  • Pointer (com.sun.jna)
    An abstraction for a native pointer data type. A Pointer instance represents, on the Java side, a na
  • InputStreamReader (java.io)
    An InputStreamReader is a bridge from byte streams to character streams: It reads bytes and decodes
  • ResultSet (java.sql)
    An interface for an object which represents a database table entry, returned as the result of the qu
  • Collections (java.util)
    This class consists exclusively of static methods that operate on or return collections. It contains
  • Enumeration (java.util)
    A legacy iteration interface.New code should use Iterator instead. Iterator replaces the enumeration
  • Hashtable (java.util)
    Hashtable is a synchronized implementation of Map. All optional operations are supported.Neither key
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now