winIDEA SDK
Loading...
Searching...
No Matches
isys::CTestProfiler Class Reference

#include <CTestProfiler.h>

Inheritance diagram for isys::CTestProfiler:
isys::CTestTrace isys::CTestBase

Public Types

enum  EAnalyzerSectionId
 Ids of test specification sections.
enum  EAreaType { DATA_AREA , CODE_AREA }
 Profiler areas. More...
enum  ERunMode {
  M_OFF , M_START ,
  M_RESUME
}
 Trace modes. More...

Public Member Functions

isys::CTestProfilerStatisticsSPtr addArea (EAreaType areaType)
 Adds empty area to the end of the list.
void assignCodeAreas (isys::CTestProfilerSPtr &src)
 This method copies code areas from src to this object.
void assignDataAreas (isys::CTestProfilerSPtr &src)
 This method copies code areas from src to this object.
CTestBaseSPtr createInstance (const CTestBaseSPtr &parent) const
 Creates a new empty instance of this class.
 CTestProfiler ()
 Initializes new instance.
 CTestProfiler (const CTestBaseSPtr &parent)
 Initializes new instance.
int findArea (const std::string &areaName, int64_t areaValue)
 Returns index of the data area, or -1 if the area is not found.
int findArea (EAreaType areaType, const std::string &areaName)
 Returns index of the area or -1 if the area is not found.
isys::CTestProfilerStatisticsSPtr getArea (EAreaType areaType, int idx)
 Returns the requested area.
CTestBaseListSPtr getAreas (isys::CTestProfiler::EAreaType areaType, bool isConst)
 Returns areas of the given type.
size_t getAreasSize (EAreaType areaType)
 Returns the number of profiler area items.
CTestBaseListSPtr getCodeAreas (bool isConst)
 Returns code areas specified for profiler.
CTestBaseListSPtr getDataAreas (bool isConst)
 Returns data areas specified for profiler.
std::string getDocumentFileName ()
 Returns name of the document to contain trace results.
std::string getExportFileName ()
 Returns the export file name.
std::string getExportFormat ()
 Returns the export format type.
std::string getOpenMode ()
 Returns one of the open mode strings: "r", "w", or "a".
ERunMode getRunMode ()
 Returns run mode.
std::string getTriggerName ()
 Returns the name of the trigger to be used for trace start.
void insertArea (isys::CTestProfilerStatisticsSPtr area, EAreaType areaType, int idx)
 Adds empty area to the end of the list.
virtual bool isEmpty () const
 This method returns true, if the object contains no data.
iconnect::ETristate isExportActiveAreasOnly ()
 Returns true, when only areas with recoded activity will be exported.
bool isMerged () const
 Returns true, if the CTestSpecification section containing this object is merged.
iconnect::ETristate isProfileAUX ()
 Returns true, if AUX signals should be recorded during profiler session.
bool isRecordingConfigEmpty ()
 Returns true, if only profiler recoding configuration is empty, that means everything except data and code areas is empty.
iconnect::ETristate isSaveAfterTest ()
 Returns true, if the document should be saved after test.
iconnect::ETristate isSaveHistory ()
 Returns true, if profiler history should also be saved to output file.
iconnect::ETristate isSlowRun ()
 Returns E_TRUE, if slow run should be used for analyzer.
void removeArea (EAreaType areaType, int idx)
 Removes the requested area.
virtual void serialize (const isys::IEmitterSPtr &emitter)
 Sends contents of this class to emitter.
void setCloseAfterTest (iconnect::ETristate isClose)
 Sets close operation for trace document after test.
void setCodeAreas (CTestBaseListSPtr &)
 Sets code areas for profiler.
void setDataAreas (CTestBaseListSPtr &)
 Sets data areas for profiler.
void setDocumentFileName (const std::string &docFileName)
 Sets the name of the trace document.
void setExportActiveAreasOnly (iconnect::ETristate isExportActiveAreasOnly)
 If isExportActiveAreasOnly is true, then only areas with recorded activity (executed functions and modified data) will be exported.
void setExportFileName (const std::string &exportFileName)
 Sets the export file name.
void setExportFormat (const std::string &exportFormat)
 Sets export format for the trace document.
void setOpenMode (const std::string &openMode)
 Sets open mode for document.
void setProfileAUX (iconnect::ETristate isProfileAUX)
 If parameter is true, then AUX signals are recorded during profiling.
void setRunMode (ERunMode mode)
 Sets run mode.
void setSaveAfterTest (iconnect::ETristate isSave)
 Sets save operation for trace document after test.
void setSaveHistory (iconnect::ETristate isSave)
 Sets the save mode for output file.
void setSlowRun (iconnect::ETristate isSlowRun)
 If parameter is true, then slow run is used for analyzer.
void setTriggerName (const std::string &triggerName)
 Sets name of the trigger to be used for trace start.
void swapAreas (EAreaType areaType, int idx1, int idx2)
 Swaps two areas in the list.
virtual std::string toString ()
 Returns object data as YAML string.

Static Public Member Functions

static CTestProfilerSPtr cast (CTestBaseSPtr &testBase)
 Casts the given pointer to this class.

Protected Member Functions

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

Detailed Description

Deprecated
use CTestAnalyzer and CTestAnalyzerProfiler instead.

This class contains specification for profiler recording during test execution.

 

Member Enumeration Documentation

◆ EAreaType

Profiler areas.

Enumerator
DATA_AREA 

profiler data area

CODE_AREA 

profiler code area

◆ ERunMode

Trace modes.

Enumerator
M_OFF 

trace will not be configured or started

M_START 

start trace

M_RESUME 

Deprecated: use open mode 'a' instead, see setOpenMode().

Resumes session, currently supported only for coverage. Method setRunMode(M_RESUME) throws an exception if called on trace or profiler document.

Constructor & Destructor Documentation

◆ CTestProfiler() [1/2]

isys::CTestProfiler::CTestProfiler ( )

Initializes new instance.

Since
9.12.288

◆ CTestProfiler() [2/2]

isys::CTestProfiler::CTestProfiler ( 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.
Since
9.12.288

Member Function Documentation

◆ addArea()

isys::CTestProfilerStatisticsSPtr isys::CTestProfiler::addArea ( EAreaType areaType)

Adds empty area to the end of the list.

Since
9.12.288

◆ assignCodeAreas()

void isys::CTestProfiler::assignCodeAreas ( isys::CTestProfilerSPtr & src)

This method copies code areas from src to this object.

Since
9.12.288

◆ assignDataAreas()

void isys::CTestProfiler::assignDataAreas ( isys::CTestProfilerSPtr & src)

This method copies code areas from src to this object.

Since
9.12.288

◆ createInstance()

CTestBaseSPtr isys::CTestProfiler::createInstance ( const CTestBaseSPtr & parent) const
virtual

Creates a new empty instance of this class.

Since
9.12.288

Reimplemented from isys::CTestTrace.

◆ findArea() [1/2]

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

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

This method searches for data areas with value set.

Since
9.12.288

◆ findArea() [2/2]

int isys::CTestProfiler::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.
areaNamename of area.
Since
9.12.288

◆ getArea()

isys::CTestProfilerStatisticsSPtr isys::CTestProfiler::getArea ( EAreaType areaType,
int idx )

Returns the requested area.

Since
9.12.288

◆ getAreas()

CTestBaseListSPtr isys::CTestProfiler::getAreas ( isys::CTestProfiler::EAreaType areaType,
bool isConst )

Returns areas of the given type.

Since
9.12.288

◆ getAreasSize()

size_t isys::CTestProfiler::getAreasSize ( EAreaType areaType)

Returns the number of profiler area items.

Since
9.12.288

◆ getCodeAreas()

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

Returns code areas specified for profiler.

Since
9.12.288

◆ getDataAreas()

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

Returns data areas specified for profiler.

Since
9.12.288

◆ getDocumentFileName()

std::string isys::CTestTrace::getDocumentFileName ( )
inherited

Returns name of the document to contain trace results.

Since
9.12.288

◆ getExportFileName()

std::string isys::CTestTrace::getExportFileName ( )
inherited

Returns the export file name.

Since
9.12.288

◆ getExportFormat()

std::string isys::CTestTrace::getExportFormat ( )
inherited

Returns the export format type.

See CAnalyzerDocController for possible values.

Since
9.12.288

◆ getOpenMode()

std::string isys::CTestTrace::getOpenMode ( )
inherited

Returns one of the open mode strings: "r", "w", or "a".

Since
9.12.288

◆ getRunMode()

ERunMode isys::CTestTrace::getRunMode ( )
inherited

Returns run mode.

Since
9.12.288

◆ getTriggerName()

std::string isys::CTestTrace::getTriggerName ( )
inherited

Returns the name of the trigger to be used for trace start.

The trigger should be defined in winIDEA GUI.

Since
9.12.288

◆ insertArea()

void isys::CTestProfiler::insertArea ( isys::CTestProfilerStatisticsSPtr area,
EAreaType areaType,
int idx )

Adds empty area to the end of the list.

Since
9.12.288

◆ isEmpty()

virtual bool isys::CTestBase::isEmpty ( ) const
virtualinherited

This method returns true, if the object contains no data.

Since
9.12.288

◆ isExportActiveAreasOnly()

iconnect::ETristate isys::CTestProfiler::isExportActiveAreasOnly ( )

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

Returns false, if all configured areas will be exported.

Since
9.12.288

◆ isMerged()

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

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


Since
9.12.288

Reimplemented from isys::CTestTrace.

◆ isProfileAUX()

iconnect::ETristate isys::CTestProfiler::isProfileAUX ( )

Returns true, if AUX signals should be recorded during profiler session.

Since
9.12.288

◆ isRecordingConfigEmpty()

bool isys::CTestProfiler::isRecordingConfigEmpty ( )

Returns true, if only profiler recoding configuration is empty, that means everything except data and code areas is empty.

Since
9.12.288

◆ isSaveAfterTest()

iconnect::ETristate isys::CTestTrace::isSaveAfterTest ( )
inherited

Returns true, if the document should be saved after test.

Since
9.12.288

◆ isSaveHistory()

iconnect::ETristate isys::CTestProfiler::isSaveHistory ( )

Returns true, if profiler history should also be saved to output file.

Since
9.12.288

◆ isSlowRun()

iconnect::ETristate isys::CTestTrace::isSlowRun ( )
inherited

Returns E_TRUE, if slow run should be used for analyzer.

Since
9.12.288

◆ removeArea()

void isys::CTestProfiler::removeArea ( EAreaType areaType,
int idx )

Removes the requested area.

Since
9.12.288

◆ serialize()

virtual void isys::CTestBase::serialize ( const isys::IEmitterSPtr & emitter)
virtualinherited

Sends contents of this class to emitter.

Since
9.12.288

Reimplemented in isys::CLogResult, and isys::CTestEnvironmentConfig.

◆ setCloseAfterTest()

void isys::CTestTrace::setCloseAfterTest ( iconnect::ETristate isClose)
inherited

Sets close operation for trace document after test.

Since
9.12.288

◆ setCodeAreas()

void isys::CTestProfiler::setCodeAreas ( CTestBaseListSPtr & )

Sets code areas for profiler.

Since
9.12.288

◆ setDataAreas()

void isys::CTestProfiler::setDataAreas ( CTestBaseListSPtr & )

Sets data areas for profiler.

Since
9.12.288

◆ setDocumentFileName()

void isys::CTestTrace::setDocumentFileName ( const std::string & docFileName)
inherited

Sets the name of the trace document.

Since
9.12.288

◆ setExportActiveAreasOnly()

void isys::CTestProfiler::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.

Since
9.12.288

◆ setExportFileName()

void isys::CTestTrace::setExportFileName ( const std::string & exportFileName)
inherited

Sets the export file name.

Since
9.12.288

◆ setExportFormat()

void isys::CTestTrace::setExportFormat ( const std::string & exportFormat)
inherited

Sets export format for the trace document.

See CAnalyzerDocController for possible values.

Since
9.12.288

◆ setOpenMode()

void isys::CTestTrace::setOpenMode ( const std::string & openMode)
inherited

Sets open mode for document.

Parameters
openModecan be one of:
  • 'u' opens existing document, and updates its contents
  • 'w' creates new document or overwrites the existing one
  • 'a' opens existing document. Coverage will append its contents on start, while profiler and trace do not support appending yet.
  • empty string, which defaults to 'w'. Note that default values are NOT written to test specification file - that's why they are defaults.
Since
9.12.288

◆ setProfileAUX()

void isys::CTestProfiler::setProfileAUX ( iconnect::ETristate isProfileAUX)

If parameter is true, then AUX signals are recorded during profiling.

Since
9.12.288

◆ setRunMode()

void isys::CTestTrace::setRunMode ( ERunMode mode)
inherited

Sets run mode.

Since
9.12.288

◆ setSaveAfterTest()

void isys::CTestTrace::setSaveAfterTest ( iconnect::ETristate isSave)
inherited

Sets save operation for trace document after test.

Since
9.12.288

◆ setSaveHistory()

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

Sets the save mode for output file.

If true, history will also be saved.

Since
9.12.288

◆ setSlowRun()

void isys::CTestTrace::setSlowRun ( iconnect::ETristate isSlowRun)
inherited

If parameter is true, then slow run is used for analyzer.

Since
9.12.288

◆ setTriggerName()

void isys::CTestTrace::setTriggerName ( const std::string & triggerName)
inherited

Sets name of the trigger to be used for trace start.

The trigger must be defined in winIDEA GUI.

Since
9.12.288

◆ swapAreas()

void isys::CTestProfiler::swapAreas ( EAreaType areaType,
int idx1,
int idx2 )

Swaps two areas in the list.

Since
9.12.288

◆ toString()

virtual std::string isys::CTestBase::toString ( )
virtualinherited

Returns object data as YAML string.

Since
9.12.288