geopm  3.1.1.dev214+gba4f9f6d
GEOPM - Global Extensible Open Power Manager
Public Member Functions | Static Public Member Functions | List of all members
geopm::EditDistEpochRecordFilter Class Reference

#include <EditDistEpochRecordFilter.hpp>

Inheritance diagram for geopm::EditDistEpochRecordFilter:
Inheritance graph
[legend]
Collaboration diagram for geopm::EditDistEpochRecordFilter:
Collaboration graph
[legend]

Public Member Functions

 EditDistEpochRecordFilter (int history_buffer_size, int min_hysteresis_base_period, int min_detectable_period, double stable_period_hysteresis, double unstable_period_hysteresis)
 Default constructor for the filter. More...
 
 EditDistEpochRecordFilter (std::shared_ptr< EditDistPeriodicityDetector > edpd, int min_hysteresis_base_period, int min_detectable_period, double stable_period_hysteresis, double unstable_period_hysteresis)
 
 EditDistEpochRecordFilter (const std::string &name)
 
virtual ~EditDistEpochRecordFilter ()=default
 
std::vector< record_sfilter (const record_s &record) override
 Apply a filter to a stream of records. More...
 
- Public Member Functions inherited from geopm::RecordFilter
 RecordFilter ()=default
 Default constructor for pure virtual interface. More...
 
virtual ~RecordFilter ()=default
 Default destructor for pure virtual interface. More...
 

Static Public Member Functions

static void parse_name (const std::string &name, int &history_buffer_size, int &min_hysteresis_base_period, int &min_detectable_period, double &stable_period_hysteresis, double &unstable_period_hysteresis)
 Static function that will parse the filter string for the edit_distance into the constructor arguments for a EditDistanceEpochRecordFilter. Failure to parse will result in a thrown Exception with GEOPM_ERROR_INVALID type. More...
 
- Static Public Member Functions inherited from geopm::RecordFilter
static std::unique_ptr< RecordFiltermake_unique (const std::string &name)
 

Constructor & Destructor Documentation

◆ EditDistEpochRecordFilter() [1/3]

geopm::EditDistEpochRecordFilter::EditDistEpochRecordFilter ( int  history_buffer_size,
int  min_hysteresis_base_period,
int  min_detectable_period,
double  stable_period_hysteresis,
double  unstable_period_hysteresis 
)

Default constructor for the filter.

Parameters
[in]history_buffer_sizeNumber of region entry events stored in order to determine an epoch.
[in]min_hysteresis_base_periodMinimum period length in number of records that will be considered stable in order to begin emitting epoch records. Suggested default is 4.
[in]min_detectable_periodMinimum period length in number of records that is considered by the algorithm as potentially a period. Suggested default is 3.
[in]stable_period_hysteresisFactor that along with the period length that determines when a stable period has been detected. Suggested default is 1.
[in]unstable_period_hysteresisFactor that along with the period length that determines when the period has become unstable. This happens when the period changes from the previously detected length. Suggested default is 1.5.

◆ EditDistEpochRecordFilter() [2/3]

geopm::EditDistEpochRecordFilter::EditDistEpochRecordFilter ( std::shared_ptr< EditDistPeriodicityDetector edpd,
int  min_hysteresis_base_period,
int  min_detectable_period,
double  stable_period_hysteresis,
double  unstable_period_hysteresis 
)

◆ EditDistEpochRecordFilter() [3/3]

geopm::EditDistEpochRecordFilter::EditDistEpochRecordFilter ( const std::string &  name)

◆ ~EditDistEpochRecordFilter()

virtual geopm::EditDistEpochRecordFilter::~EditDistEpochRecordFilter ( )
virtualdefault

Member Function Documentation

◆ filter()

std::vector< record_s > geopm::EditDistEpochRecordFilter::filter ( const record_s record)
overridevirtual

Apply a filter to a stream of records.

This method is called repeatedly by a user to update a filtered time stream with a new record. The input record is used to update the state of the filter and the method returns a vector containing any filtered values resulting from the update.

Parameters
[in]recordThe update value to be filtered.
Returns
Vector of zero or more records to update the filtered stream.

Implements geopm::RecordFilter.

◆ parse_name()

void geopm::EditDistEpochRecordFilter::parse_name ( const std::string &  name,
int &  history_buffer_size,
int &  min_hysteresis_base_period,
int &  min_detectable_period,
double &  stable_period_hysteresis,
double &  unstable_period_hysteresis 
)
static

Static function that will parse the filter string for the edit_distance into the constructor arguments for a EditDistanceEpochRecordFilter. Failure to parse will result in a thrown Exception with GEOPM_ERROR_INVALID type.


The documentation for this class was generated from the following files: