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:
-
AbstractFilterUtilizationFilterSlidingWindowIDataSourceIDataStream
-
Field Summary
Fields inherited from class org.palladiosimulator.edp2.datastream.AbstractDataSource
datasourceChangedListener -
Constructor Summary
ConstructorsConstructorDescriptionInitializes a new instance of theUtilizationFilterclass.UtilizationFilter(org.palladiosimulator.edp2.datastream.IDataSource datasource) Initializes a new instance of theUtilizationFilterclass with the given data source. -
Method Summary
Modifier and TypeMethodDescriptionbooleancanAccept(org.palladiosimulator.edp2.datastream.IDataSource dataSource) org.palladiosimulator.edp2.datastream.configurable.PropertyConfigurableorg.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.voidMethods inherited from class org.palladiosimulator.edp2.datastream.filter.AbstractAdapter
computeOutputFromInput, getDataSource, getMeasuringPoint, setDataSource, shouldSkipMethods inherited from class org.palladiosimulator.edp2.datastream.AbstractDataSource
addObserver, getAdapter, getConfiguration, getDefaultConfiguration, getKeys, getProperties, getPropertyType, isPropertyNotSet, removeObserver, setProperties, unsetPropertyMethods inherited from class org.palladiosimulator.metricspec.metricentity.MetricEntity
getMetricDesciption, isCompatibleWith, setMetricDescriptionMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.palladiosimulator.commons.designpatterns.IAbstractObservable
addObserver, removeObserverMethods inherited from interface org.palladiosimulator.edp2.datastream.IDataSink
getDataSource, setDataSourceMethods inherited from interface org.palladiosimulator.edp2.datastream.IDataSource
getConfiguration, getMeasuringPointMethods inherited from interface org.palladiosimulator.metricspec.metricentity.IMetricEntity
getMetricDesciption, isCompatibleWith
-
Constructor Details
-
UtilizationFilter
public UtilizationFilter()Initializes a new instance of theUtilizationFilterclass. -
UtilizationFilter
public UtilizationFilter(org.palladiosimulator.edp2.datastream.IDataSource datasource) Initializes a new instance of theUtilizationFilterclass with the given data source.- Parameters:
datasource- TheIDataSourcethis 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:
canAcceptin 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:
getDataStreamin interfaceorg.palladiosimulator.edp2.datastream.IDataSource- Overrides:
getDataStreamin classorg.palladiosimulator.edp2.datastream.filter.AbstractAdapter- Returns:
- An
IDataStreamcontaining 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:
createPropertiesin classorg.palladiosimulator.edp2.datastream.filter.AbstractAdapter
-
getFactoryId
- Specified by:
getFactoryIdin interfaceIPersistableElement
-
saveState
- Specified by:
saveStatein interfaceIPersistable
-