winIDEA SDK
isys::CTestAnalyzerProfiler Class Reference

Description

This class contains specification for profiler recording during test execution.

 

#include <CTestAnalyzerProfiler.h>

Inheritance diagram for isys::CTestAnalyzerProfiler:
isys::CTestBase

Public Types

enum  EAreaType { DATA_AREA , CODE_AREA }
 Profiler areas. More...
 

Public Member Functions

 CTestAnalyzerProfiler ()
 Initializes new instance.
 
 CTestAnalyzerProfiler (const CTestBaseSPtr &parent)
 Initializes new instance. More...
 
CTestBaseSPtr createInstance (const CTestBaseSPtr &parent) const
 Creates a new empty instance of this class.
 
void assignCodeAreas (isys::CTestAnalyzerProfilerSPtr &src)
 This method copies code areas from src to this object.
 
void assignDataAreas (isys::CTestAnalyzerProfilerSPtr &src)
 This method copies code areas from src to this object.
 
iconnect::ETristate isActive ()
 Returns E_TRUE if this section is active (export is performed, and analysis is run for coverage and profiler).
 
iconnect::ETristate isMeasureAllFunctions ()
 Returns E_TRUE, if all functions should be measured, not only ones from code areas list. More...
 
bool isMerged () const
 Returns true, if the CTestSpecification section containing this object is merged. More...
 
EProfilerExportFormat getExportFormat ()
 Returns the export format. More...
 
std::string getExportFileName ()
 Returns the export file name. More...
 
iconnect::ETristate isExportActiveAreasOnly ()
 Returns true, when only areas with recoded activity will be exported. More...
 
iconnect::ETristate isProfileAUX ()
 Returns true, if AUX signals should be recorded during profiler session.
 
iconnect::ETristate isSaveHistory ()
 Returns true, if profiler history should also be saved to output file.
 
CTestBaseListSPtr getAreas (EAreaType areaType, bool isConst)
 Returns areas of the given type.
 
CTestBaseListSPtr getCodeAreas (bool isConst)
 Returns code areas specified for profiler. More...
 
CTestBaseListSPtr getDataAreas (bool isConst)
 Returns code areas specified for profiler. More...
 
int findArea (EAreaType areaType, const std::string &areaName)
 Returns index of the area or -1 if the area is not found. More...
 
int findArea (const std::string &areaName, const std::string &areaValue)
 Returns index of the data area, or -1 if the area is not found. More...
 
isys::CTestProfilerStatisticsSPtr getArea (EAreaType areaType, int idx)
 Returns the requested area.
 
void swapAreas (EAreaType areaType, int idx1, int idx2)
 Swaps two areas in the list.
 
void setActive (iconnect::ETristate isActive)
 If isActive == true, recording is exported and analysis is performed.
 
void setMeasureAllFunctions (iconnect::ETristate isMeasureAllFunctions)
 
void setExportFormat (EProfilerExportFormat exportFormat)
 Sets format variant of the export format.
 
void setExportFileName (const std::string &file)
 Sets format variant of the export format.
 
void setExportActiveAreasOnly (iconnect::ETristate isExportActiveAreasOnly)
 If isExportActiveAreasOnly is true, then only areas with recorded activity (executed functions and modified data) will be exported. More...
 
void setProfileAUX (iconnect::ETristate isProfileAUX)
 If parameter is true, then AUX signals are recorded during profiling.
 
void setSaveHistory (iconnect::ETristate isSave)
 Sets the save mode for output file. More...
 
void setCodeAreas (CTestBaseListSPtr &)
 Sets code areas for profiler.
 
void setDataAreas (CTestBaseListSPtr &)
 Sets data areas for profiler.
 
virtual bool isEmpty () const
 This method returns true, if the object contains no data.
 
virtual void serialize (const isys::IEmitterSPtr &emitter)
 Sends contents of this class to emitter.
 
virtual std::string toString ()
 Returns object data as YAML string.
 

Static Public Member Functions

static CTestAnalyzerProfilerSPtr cast (CTestBaseSPtr &testBase)
 Casts the given object to this class. More...
 

Protected Member Functions

void setStaticTagsAsConst ()
 This method is called by all objects which are immediately contained in CTestSpecification, for example CTestCoverage, CTestHIL, ...
 

Member Enumeration Documentation

◆ EAreaType

Profiler areas.

Enumerator
DATA_AREA 

profiler data area

CODE_AREA 

profiler code area

Constructor & Destructor Documentation

◆ CTestAnalyzerProfiler()

isys::CTestAnalyzerProfiler::CTestAnalyzerProfiler ( const CTestBaseSPtr parent)

Initializes new instance.

Parameters
parentan instance of parent CTestSpecification class. Used only when parsing YAML declaration. Can be specified as NULL if the object is not initialized by parser.

Member Function Documentation

◆ cast()

static CTestAnalyzerProfilerSPtr isys::CTestAnalyzerProfiler::cast ( CTestBaseSPtr testBase)
static

Casts the given object to this class.

Returns NULL if input is NULL.

Exceptions
IllegalArgumentExceptionif input object is not instance of this class.

◆ findArea() [1/2]

int isys::CTestAnalyzerProfiler::findArea ( const std::string &  areaName,
const std::string &  areaValue 
)

Returns index of the data area, or -1 if the area is not found.

This method searches for data areas with value set.

◆ findArea() [2/2]

int isys::CTestAnalyzerProfiler::findArea ( EAreaType  areaType,
const std::string &  areaName 
)

Returns index of the area or -1 if the area is not found.

Parameters
areaTypeif set to DATA_AREA, then only data areas without value set can match.
areaName

◆ getCodeAreas()

CTestBaseListSPtr isys::CTestAnalyzerProfiler::getCodeAreas ( bool  isConst)

Returns code areas specified for profiler.

The returned list contains instances of CTestProfilerStatisticsSPtr.

◆ getDataAreas()

CTestBaseListSPtr isys::CTestAnalyzerProfiler::getDataAreas ( bool  isConst)

Returns code areas specified for profiler.

The returned list contains instances of CTestProfilerStatisticsSPtr.

◆ getExportFileName()

std::string isys::CTestAnalyzerProfiler::getExportFileName ( )

Returns the export file name.

If empty, no export is performed.

◆ getExportFormat()

EProfilerExportFormat isys::CTestAnalyzerProfiler::getExportFormat ( )

Returns the export format.

Empty string means XML format.

◆ isExportActiveAreasOnly()

iconnect::ETristate isys::CTestAnalyzerProfiler::isExportActiveAreasOnly ( )

Returns true, when only areas with recoded activity will be exported.

Returns false, if all configured areas will be exported.

◆ isMeasureAllFunctions()

iconnect::ETristate isys::CTestAnalyzerProfiler::isMeasureAllFunctions ( )

Returns E_TRUE, if all functions should be measured, not only ones from code areas list.

If E_FALSE is returned, only functions from code areas list will be measured.

◆ isMerged()

bool isys::CTestAnalyzerProfiler::isMerged ( ) const
virtual

Returns true, if the CTestSpecification section containing this object is merged.


Reimplemented from isys::CTestBase.

◆ setExportActiveAreasOnly()

void isys::CTestAnalyzerProfiler::setExportActiveAreasOnly ( iconnect::ETristate  isExportActiveAreasOnly)

If isExportActiveAreasOnly is true, then only areas with recorded activity (executed functions and modified data) will be exported.

Otherwise all configured areas will be exported.

◆ setMeasureAllFunctions()

void isys::CTestAnalyzerProfiler::setMeasureAllFunctions ( iconnect::ETristate  isMeasureAllFunctions)
Parameters
isMeasureAllFunctionsif E_TRUE, all functions should be measured, not only ones from code areas list. If E_FALSE, only functions from code areas list will be measured.

◆ setSaveHistory()

void isys::CTestAnalyzerProfiler::setSaveHistory ( iconnect::ETristate  isSave)

Sets the save mode for output file.

If true, history will also be saved.