Class UtilizationFilter
java.lang.Object
org.palladiosimulator.metricspec.metricentity.MetricEntity
org.palladiosimulator.edp2.datastream.AbstractDataSource
org.palladiosimulator.edp2.datastream.filter.AbstractAdapter
org.palladiosimulator.experimentanalysis.utilizationfilter.UtilizationFilter
- All Implemented Interfaces:
IAdaptable
,IPersistable
,IPersistableElement
,org.palladiosimulator.commons.designpatterns.IAbstractObservable<org.palladiosimulator.edp2.datastream.IDataSourceListener>
,org.palladiosimulator.edp2.datastream.configurable.IPropertyConfigurable
,org.palladiosimulator.edp2.datastream.filter.IFilter
,org.palladiosimulator.edp2.datastream.IDataSink
,org.palladiosimulator.edp2.datastream.IDataSource
,org.palladiosimulator.metricspec.metricentity.IMetricEntity
public final class UtilizationFilter
extends org.palladiosimulator.edp2.datastream.filter.AbstractAdapter
implements org.palladiosimulator.edp2.datastream.filter.IFilter, IPersistable, IPersistableElement
This class is a moving average implementation that calculates the utilization of an active
resource based on a set of
in case of a multi-core resource, based on a set of
That is, when being applied to an
(point in time, state of active resource)
tuple measurements,
or,in case of a multi-core resource, based on a set of
(point in time, 'overall' utilization of active resource)
tuple measurements.That is, when being applied to an
IDataSource
that provides measurements adhering to this
metric, this filter outputs a set of subsequent (point in time, utilization)
tuples. This
result set can be obtained by calling the getDataStream()
method.- See Also:
-
AbstractFilter
UtilizationFilterSlidingWindow
IDataSource
IDataStream
-
Field Summary
Fields inherited from class org.palladiosimulator.edp2.datastream.AbstractDataSource
datasourceChangedListener
-
Constructor Summary
ConstructorDescriptionInitializes a new instance of theUtilizationFilter
class.UtilizationFilter
(org.palladiosimulator.edp2.datastream.IDataSource datasource) Initializes a new instance of theUtilizationFilter
class with the given data source. -
Method Summary
Modifier and TypeMethodDescriptionboolean
canAccept
(org.palladiosimulator.edp2.datastream.IDataSource dataSource) org.palladiosimulator.edp2.datastream.configurable.PropertyConfigurable
org.palladiosimulator.edp2.datastream.IDataStream<org.palladiosimulator.measurementframework.MeasuringValue>
Obtains this filter's output data (i.e., a set of subsequent(point in time, utilization)
tuples) based on the current input data.void
Methods inherited from class org.palladiosimulator.edp2.datastream.filter.AbstractAdapter
computeOutputFromInput, getDataSource, getMeasuringPoint, setDataSource, shouldSkip
Methods inherited from class org.palladiosimulator.edp2.datastream.AbstractDataSource
addObserver, getAdapter, getConfiguration, getDefaultConfiguration, getKeys, getProperties, getPropertyType, isPropertyNotSet, removeObserver, setProperties, unsetProperty
Methods inherited from class org.palladiosimulator.metricspec.metricentity.MetricEntity
getMetricDesciption, isCompatibleWith, setMetricDescription
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.palladiosimulator.commons.designpatterns.IAbstractObservable
addObserver, removeObserver
Methods inherited from interface org.palladiosimulator.edp2.datastream.IDataSink
getDataSource, setDataSource
Methods inherited from interface org.palladiosimulator.edp2.datastream.IDataSource
getConfiguration, getMeasuringPoint
Methods inherited from interface org.palladiosimulator.metricspec.metricentity.IMetricEntity
getMetricDesciption, isCompatibleWith
-
Constructor Details
-
UtilizationFilter
public UtilizationFilter()Initializes a new instance of theUtilizationFilter
class. -
UtilizationFilter
public UtilizationFilter(org.palladiosimulator.edp2.datastream.IDataSource datasource) Initializes a new instance of theUtilizationFilter
class with the given data source.- Parameters:
datasource
- TheIDataSource
this filter is applied to.- Throws:
IllegalArgumentException
- if the data source metric does not match the input metric expected by the filter.
-
-
Method Details
-
canAccept
public boolean canAccept(org.palladiosimulator.edp2.datastream.IDataSource dataSource) - Specified by:
canAccept
in interfaceorg.palladiosimulator.edp2.datastream.IDataSink
-
getDataStream
public org.palladiosimulator.edp2.datastream.IDataStream<org.palladiosimulator.measurementframework.MeasuringValue> getDataStream()Obtains this filter's output data (i.e., a set of subsequent(point in time, utilization)
tuples) based on the current input data.- Specified by:
getDataStream
in interfaceorg.palladiosimulator.edp2.datastream.IDataSource
- Overrides:
getDataStream
in classorg.palladiosimulator.edp2.datastream.filter.AbstractAdapter
- Returns:
- An
IDataStream
containing the resulting utilization measurements. - Throws:
NullPointerException
- if no input data source has been set beforehand.
-
createProperties
public org.palladiosimulator.edp2.datastream.configurable.PropertyConfigurable createProperties()- Overrides:
createProperties
in classorg.palladiosimulator.edp2.datastream.filter.AbstractAdapter
-
getFactoryId
- Specified by:
getFactoryId
in interfaceIPersistableElement
-
saveState
- Specified by:
saveState
in interfaceIPersistable
-