Kieker 1.7

kieker.analysis.plugin.filter.forward
Class CountingThroughputFilter

java.lang.Object
  extended by kieker.analysis.analysisComponent.AbstractAnalysisComponent
      extended by kieker.analysis.plugin.AbstractPlugin
          extended by kieker.analysis.plugin.filter.AbstractFilterPlugin
              extended by kieker.analysis.plugin.filter.forward.CountingThroughputFilter
All Implemented Interfaces:
IAnalysisComponent, 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!

Since:
1.6
Author:
Andre van Hoorn, Jan Waller

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
          The name of the property determining the interval size.
static String CONFIG_PROPERTY_NAME_INTERVALS_BASED_ON_1ST_TSTAMP
          If the value is set to false, the intervals are computed based on time since 1970-1-1.
static String CONFIG_PROPERTY_NAME_TIMEUNIT
          The name of the property determining the time unit.
static String CONFIG_PROPERTY_VALUE_INTERVAL_SIZE_ONE_MINUTE
          The configuration property value for CONFIG_PROPERTY_NAME_INTERVAL_SIZE, leading to a bin size of 1 minute.
static String CONFIG_PROPERTY_VALUE_TIMEUNIT
          The default value of the time unit property (nanoseconds).
static String INPUT_PORT_NAME_OBJECTS
          The name of the input port receiving other objects.
static String INPUT_PORT_NAME_RECORDS
          The name of the input port receiving the records.
static String OUTPUT_PORT_NAME_RELAYED_OBJECTS
          The name of the output port delivering the received objects.
 
Fields inherited from class kieker.analysis.analysisComponent.AbstractAnalysisComponent
CONFIG_NAME
 
Constructor Summary
CountingThroughputFilter(Configuration configuration)
          Deprecated. To be removed in Kieker 1.8.
CountingThroughputFilter(Configuration configuration, IProjectContext projectContext)
          Creates a new instance of this class using the given parameters.
 
Method Summary
 Collection<Map.Entry<Long,Long>> getCountsPerInterval()
           
 Configuration getCurrentConfiguration()
          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.
 long getCurrentCountForCurrentInterval()
           
 long getFirstTimestampInCurrentInterval()
           
 long getIntervalSize()
           
 long getLastTimestampInCurrentInterval()
           
 void inputObjects(Object object)
          This method represents the input port for incoming object.
 void inputRecord(IMonitoringRecord record)
          This method represents the input port for incoming records.
 
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, getPluginDescription, getPluginName, getState, isConnectionAllowed, shutdown, start
 
Methods inherited from class kieker.analysis.analysisComponent.AbstractAnalysisComponent
getName, setProjectContext
 
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, getAllRepositoryPortNames, getConnectedPlugins, getCurrentRepositories, getName, getPluginDescription, getPluginName, getState
 

Field Detail

INPUT_PORT_NAME_RECORDS

public static final String INPUT_PORT_NAME_RECORDS
The name of the input port receiving the records.

See Also:
Constant Field Values

INPUT_PORT_NAME_OBJECTS

public static final String INPUT_PORT_NAME_OBJECTS
The name of the input port receiving other objects.

See Also:
Constant Field Values

OUTPUT_PORT_NAME_RELAYED_OBJECTS

public static final String OUTPUT_PORT_NAME_RELAYED_OBJECTS
The name of the output port delivering the received objects.

See Also:
Constant Field Values

CONFIG_PROPERTY_NAME_TIMEUNIT

public static final String CONFIG_PROPERTY_NAME_TIMEUNIT
The name of the property determining the time unit.

See Also:
Constant Field Values

CONFIG_PROPERTY_NAME_INTERVAL_SIZE

public static final String CONFIG_PROPERTY_NAME_INTERVAL_SIZE
The name of the property determining the interval size.

See Also:
Constant Field Values

CONFIG_PROPERTY_VALUE_TIMEUNIT

public static final String CONFIG_PROPERTY_VALUE_TIMEUNIT
The default value of the time unit property (nanoseconds).

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 time 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, leading to a bin size of 1 minute.

See Also:
Constant Field Values
Constructor Detail

CountingThroughputFilter

public CountingThroughputFilter(Configuration configuration,
                                IProjectContext projectContext)
Creates a new instance of this class using the given parameters.

Parameters:
configuration - The configuration for this component.
projectContext - The project context for this component.

CountingThroughputFilter

@Deprecated
public CountingThroughputFilter(Configuration configuration)
Deprecated. To be removed in Kieker 1.8.

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

Parameters:
configuration - The configuration for this component.
Method Detail

getCurrentConfiguration

public final Configuration getCurrentConfiguration()
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.

Specified by:
getCurrentConfiguration in interface IAnalysisComponent
Specified by:
getCurrentConfiguration in interface IPlugin
Specified by:
getCurrentConfiguration in class AbstractAnalysisComponent
Returns:
A completely filled configuration object.

inputRecord

public final void inputRecord(IMonitoringRecord record)
This method represents the input port for incoming records.

Parameters:
record - The next record.

inputObjects

public final void inputObjects(Object object)
This method represents the input port for incoming object.

Parameters:
object - The next object.

getCountsPerInterval

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

getIntervalSize

public long getIntervalSize()
Returns:
the intervalSize

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.7

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