Kieker 1.6

kieker.analysis.plugin.filter.forward
Class CountingThroughputFilter

java.lang.Object
  extended by kieker.analysis.plugin.AbstractPlugin
      extended by kieker.analysis.plugin.filter.AbstractFilterPlugin
          extended by kieker.analysis.plugin.filter.forward.CountingThroughputFilter
All Implemented Interfaces:
IFilterPlugin, IPlugin

public final class CountingThroughputFilter
extends AbstractFilterPlugin

An instance of this class computes the throughput in terms of the number of events received per time unit. Note that only one of the input ports should be used in a configuration! TODO: In future versions, this filter should provide an output port in addition to the existing relay port. TODO: In future versions, the throughput computation could (additionally) be triggered by external timer events TODO: In future, introduce TimeUnits for resolution (currently assumed to be TimeUnit.NANOSECOND) TODO: Introduce bounding capacity (Circular Buffer)

Author:
Andre van Hoorn

Nested Class Summary
 
Nested classes/interfaces inherited from interface kieker.analysis.plugin.IPlugin
IPlugin.PluginInputPortReference, IPlugin.STATE
 
Field Summary
static String CONFIG_PROPERTY_NAME_INTERVAL_SIZE_NANOS
           
static String CONFIG_PROPERTY_NAME_INTERVALS_BASED_ON_1ST_TSTAMP
          If the value is set to false, the intervals are computed based on nanosecond 0 since 1970-1-1
static String CONFIG_PROPERTY_VALUE_INTERVAL_SIZE_ONE_MINUTE
          The configuration property value for CONFIG_PROPERTY_NAME_INTERVAL_SIZE_NANOS, leading to a bin size of 1 minute
static String INPUT_PORT_NAME_OBJECTS
           
static String INPUT_PORT_NAME_RECORDS
           
static String OUTPUT_PORT_NAME_RELAYED_OBJECTS
           
 
Fields inherited from class kieker.analysis.plugin.AbstractPlugin
CONFIG_NAME
 
Constructor Summary
CountingThroughputFilter(Configuration configuration)
          Constructs a CountingThroughputFilter.
 
Method Summary
 Collection<Map.Entry<Long,Long>> getCountsPerInterval()
           
 Configuration getCurrentConfiguration()
          This method should deliver a Configuration object containing the current configuration of this instance.
 long getCurrentCountForCurrentInterval()
           
 long getFirstTimestampInCurrentInterval()
           
 long getIntervalSizeNanos()
           
 long getLastTimestampInCurrentInterval()
           
 void inputObjects(Object object)
           
 void inputRecord(IMonitoringRecord record)
           
 
Methods inherited from class kieker.analysis.plugin.filter.AbstractFilterPlugin
init, terminate
 
Methods inherited from class kieker.analysis.plugin.AbstractPlugin
areAllRepositoryPortsConnected, connect, connect, getAllDisplayNames, getAllInputPortNames, getAllOutputPortNames, getAllRepositoryPortNames, getConnectedPlugins, getCurrentRepositories, getIncomingPlugins, getName, getPluginDescription, getPluginName, getState, isConnectionAllowed, shutdown, start
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface kieker.analysis.plugin.IPlugin
connect, getAllDisplayNames, getAllInputPortNames, getAllOutputPortNames, getConnectedPlugins, getCurrentRepositories, getName, getPluginDescription, getPluginName, getState
 

Field Detail

INPUT_PORT_NAME_RECORDS

public static final String INPUT_PORT_NAME_RECORDS
See Also:
Constant Field Values

INPUT_PORT_NAME_OBJECTS

public static final String INPUT_PORT_NAME_OBJECTS
See Also:
Constant Field Values

OUTPUT_PORT_NAME_RELAYED_OBJECTS

public static final String OUTPUT_PORT_NAME_RELAYED_OBJECTS
See Also:
Constant Field Values

CONFIG_PROPERTY_NAME_INTERVAL_SIZE_NANOS

public static final String CONFIG_PROPERTY_NAME_INTERVAL_SIZE_NANOS
See Also:
Constant Field Values

CONFIG_PROPERTY_NAME_INTERVALS_BASED_ON_1ST_TSTAMP

public static final String CONFIG_PROPERTY_NAME_INTERVALS_BASED_ON_1ST_TSTAMP
If the value is set to false, the intervals are computed based on nanosecond 0 since 1970-1-1

See Also:
Constant Field Values

CONFIG_PROPERTY_VALUE_INTERVAL_SIZE_ONE_MINUTE

public static final String CONFIG_PROPERTY_VALUE_INTERVAL_SIZE_ONE_MINUTE
The configuration property value for CONFIG_PROPERTY_NAME_INTERVAL_SIZE_NANOS, leading to a bin size of 1 minute

See Also:
Constant Field Values
Constructor Detail

CountingThroughputFilter

public CountingThroughputFilter(Configuration configuration)
Constructs a CountingThroughputFilter.

Method Detail

getCurrentConfiguration

public final Configuration getCurrentConfiguration()
Description copied from interface: IPlugin
This method should deliver a Configuration object containing the current configuration of this instance. In other words: The constructor should be able to use the given object to initialize a new instance of this class with the same intern properties.

Returns:
A completely filled configuration object.

inputRecord

public final void inputRecord(IMonitoringRecord record)

inputObjects

public final void inputObjects(Object object)

getCountsPerInterval

public Collection<Map.Entry<Long,Long>> getCountsPerInterval()

getIntervalSizeNanos

public long getIntervalSizeNanos()
Returns:
the intervalSizeNanos

getFirstTimestampInCurrentInterval

public long getFirstTimestampInCurrentInterval()
Returns:
the firstTimestampInCurrentInterval -1 if no record processed so far

getLastTimestampInCurrentInterval

public long getLastTimestampInCurrentInterval()
Returns:
the lastTimestampInCurrentInterval -1 if no record processed so far

getCurrentCountForCurrentInterval

public long getCurrentCountForCurrentInterval()
Returns:
the currentCountForCurrentInterval

Kieker 1.6

Copyright 2012 Kieker Project, http://kieker-monitoring.net