winIDEA SDK
|
This class contains specification for profiler recording during test execution.
#include <CTestProfiler.h>
Public Types | |
enum | EAreaType { DATA_AREA , CODE_AREA } |
Profiler areas. More... | |
enum | ERunMode { M_OFF , M_START , M_RESUME } |
Trace modes. More... | |
enum | EAnalyzerSectionId |
Ids of test specification sections. | |
Public Member Functions | |
CTestProfiler () | |
Initializes new instance. | |
CTestProfiler (const CTestBaseSPtr &parent) | |
Initializes new instance. More... | |
CTestBaseSPtr | createInstance (const CTestBaseSPtr &parent) const |
Creates a new empty instance of this class. | |
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. | |
bool | isMerged () const |
Returns true, if the CTestSpecification section containing this object is merged. More... | |
bool | isRecordingConfigEmpty () |
Returns true, if only profiler recoding configuration is empty, that means everything except data and code areas is empty. | |
iconnect::ETristate | isProfileAUX () |
Returns true, if AUX signals should be recorded during profiler session. | |
iconnect::ETristate | isExportActiveAreasOnly () |
Returns true, when only areas with recoded activity will be exported. More... | |
iconnect::ETristate | isSaveHistory () |
Returns true, if profiler history should also be saved to output file. | |
CTestBaseListSPtr | getAreas (isys::CTestProfiler::EAreaType areaType, bool isConst) |
Returns areas of the given type. | |
CTestBaseListSPtr | getCodeAreas (bool isConst) |
Returns code areas specified for profiler. | |
CTestBaseListSPtr | getDataAreas (bool isConst) |
Returns data areas specified for profiler. | |
size_t | getAreasSize (EAreaType areaType) |
Returns the number of profiler area items. | |
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, int64_t 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. | |
isys::CTestProfilerStatisticsSPtr | addArea (EAreaType areaType) |
Adds empty area to the end of the list. | |
void | insertArea (isys::CTestProfilerStatisticsSPtr area, EAreaType areaType, int idx) |
Adds empty area to the end of the list. | |
void | removeArea (EAreaType areaType, int idx) |
Removes the requested area. | |
void | swapAreas (EAreaType areaType, int idx1, int idx2) |
Swaps two areas in the list. | |
void | setProfileAUX (iconnect::ETristate isProfileAUX) |
If parameter is true , then AUX signals are recorded during profiling. | |
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 | 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. | |
ERunMode | getRunMode () |
Returns run mode. | |
iconnect::ETristate | isSlowRun () |
Returns E_TRUE, if slow run should be used for analyzer. | |
std::string | getDocumentFileName () |
Returns name of the document to contain trace results. | |
std::string | getOpenMode () |
Returns one of the open mode strings: "r", "w", or "a". | |
iconnect::ETristate | isSaveAfterTest () |
Returns true, if the document should be saved after test. | |
std::string | getTriggerName () |
Returns the name of the trigger to be used for trace start. More... | |
std::string | getExportFormat () |
Returns the export format type. More... | |
std::string | getExportFileName () |
Returns the export file name. | |
void | setRunMode (ERunMode mode) |
Sets run mode. | |
void | setSlowRun (iconnect::ETristate isSlowRun) |
If parameter is true , then slow run is used for analyzer. | |
void | setDocumentFileName (const std::string &docFileName) |
Sets the name of the trace document. | |
void | setOpenMode (const std::string &openMode) |
Sets open mode for document. More... | |
void | setSaveAfterTest (iconnect::ETristate isSave) |
Sets save operation for trace document after test. | |
void | setCloseAfterTest (iconnect::ETristate isClose) |
Sets close operation for trace document after test. | |
void | setTriggerName (const std::string &triggerName) |
Sets name of the trigger to be used for trace start. More... | |
void | setExportFormat (const std::string &exportFormat) |
Sets export format for the trace document. More... | |
void | setExportFileName (const std::string &exportFileName) |
Sets the export file name. | |
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 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, ... | |
|
inherited |
Trace modes.
Enumerator | |
---|---|
M_OFF | trace will not be configured or started |
M_START | start trace |
M_RESUME | Deprecated: use open mode Resumes session, currently supported only for coverage. Method setRunMode(M_RESUME) throws an exception if called on trace or profiler document. |
isys::CTestProfiler::CTestProfiler | ( | const CTestBaseSPtr & | parent | ) |
Initializes new instance.
parent | an instance of parent CTestSpecification class. Used only when parsing YAML declaration. Can be specified as NULL if the object is not initialized by parser. |
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.
int isys::CTestProfiler::findArea | ( | EAreaType | areaType, |
const std::string & | areaName | ||
) |
Returns index of the area or -1 if the area is not found.
areaType | if set to DATA_AREA, then only data areas without value set can match. |
areaName | name of area. |
|
inherited |
Returns the export format type.
See CAnalyzerDocController for possible values.
|
inherited |
Returns the name of the trigger to be used for trace start.
The trigger should be defined in winIDEA GUI.
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.
|
virtual |
Returns true, if the CTestSpecification section containing this object is merged.
Reimplemented from isys::CTestTrace.
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.
|
inherited |
Sets export format for the trace document.
See CAnalyzerDocController for possible values.
|
inherited |
Sets open mode for document.
openMode | can be one of:
|
void isys::CTestProfiler::setSaveHistory | ( | iconnect::ETristate | isSave | ) |
Sets the save mode for output file.
If true, history will also be saved.
|
inherited |
Sets name of the trigger to be used for trace start.
The trigger must be defined in winIDEA GUI.