winIDEA SDK
|
This class contains configuration for export of profiler measurements.
All setters return reference to this
, so we can chain calls to set values, for example:
cfg = CProfilerExportFormat().setFileName('profilerResult.xml') .setTimeScope(CProfilerExportFormat::ETimeAll) .setAreaScope(CProfilerExportFormat::EAreaAll);
#include <CProfilerController2.h>
Inherits std::enable_shared_from_this< CProfilerExportConfig >.
Public Types | |
enum | EAreaScope { EAreaAll , EAreaFilter } |
This enum defines available area scopes for profiler measurement export. More... | |
enum | EContextScope { EContextAll , EContextNeutral , EContextCurrent } |
This enum defines available context scopes for profiler measurement export. More... | |
enum | EExportPartitionNameMode { EPNameAuto , EPNameAlways , EPNameNever , EPNameConfigName } |
This enum defines when to add download file name to area name in exported files, for example: 'iCounter' vs. More... | |
enum | ETimeScope { ETimeAll , ETimeBetweenMarkers } |
This enum defines available time scopes format for profiler measurement export. More... | |
Public Member Functions | |
CProfilerExportConfig () | |
Constructs object with default settings, as described with each method. More... | |
EAreaScope | getAreaScope () const |
Returns profiler area scope. | |
std::string | getAreaScopeAsStr () const |
Returns string, which can be used for setting of option '/Document/<file name>/ProfilerExport.Scope.AreaScope'. More... | |
std::string | getAUXFilter () const |
Returns a list of IO ports to be exported. More... | |
std::string | getContextFilter () const |
Returns context filter. More... | |
EContextScope | getContextScope () const |
Returns profiler context to be exported. | |
std::string | getContextScopeAsStr () const |
Returns string, which can be used for setting of option '/Document/<file name>/ProfilerExport.Export.ContextScope'. More... | |
int64_t | getEndTime () const |
Returns export and time. | |
EExportPartitionNameMode | getExportPartitionNameMode () const |
Returns setting, which defines when download file name should be appended to exported area names. | |
std::string | getExportPartitionNameModeAsStr () const |
Returns string, which can be used for setting of option '/Document/<file name>/ProfilerExport.Export.ExportPartitionName'. More... | |
std::string | getFileName () const |
Returns profiler file name. | |
CProfilerFormatBaseSPtr | getFormatter () |
Returns formatter object, which configures export file format. | |
std::string | getFunctionsFilter () const |
Returns a list of functions to be exported. More... | |
int64_t | getStartTime () const |
Returns export start time. | |
ETimeScope | getTimeScope () const |
Returns profiler time scope. | |
std::string | getTimeScopeAsStr () const |
Returns string, which can be used for setting of option '/Document/<file name>/ProfilerExport.Scope.TimeScope'. More... | |
std::string | getVariablesFilter () const |
Returns a list of variables to be exported. More... | |
bool | isExportActiveAreasOnly () const |
Returns true, if only areas with recorded activity will be exported. More... | |
bool | isExportAUX () const |
Returns export flag for AUX area. More... | |
bool | isExportData () const |
Returns export flag for data area. More... | |
bool | isExportFunctions () const |
Returns export flag for functions area. More... | |
bool | isExportLines () const |
bool | isLaunchViewer () const |
Returns true, if viewer will be launched after export. | |
bool | isSaveInfo () const |
bool | isSaveStatistics () const |
Returns true, if profiler statistics should be exported. | |
bool | isSaveTimeline () const |
Returns true, if profiler time-line should be exported. | |
CProfilerExportConfigSPtr | setAreaExportSections (bool isExportFunctions, bool isExportData, bool isExportAUX) |
If area scope is set to EAreaAll (see method setAreaScope()), then this method defines better granularity, so that some types of areas are not exported. More... | |
CProfilerExportConfigSPtr | setAreaExportSections (bool isExportFunctions, bool isExportLines, bool isExportData, bool isExportAUX) |
CProfilerExportConfigSPtr | setAreaScope (EAreaScope areaScope) |
Sets the area scope (default: EAreaAll). More... | |
CProfilerExportConfigSPtr | setAUXFilter (const std::string &namesOfIOPorts) |
Sets names of IO ports for which profiler measurements should be exported (default: empty). More... | |
CProfilerExportConfigSPtr | setContextFilter (const std::string &contextToExport) |
Sets context for which profiler measurements should be exported (default: empty). More... | |
CProfilerExportConfigSPtr | setContextScope (EContextScope saveContext) |
Sets context to be exported to file (default: EContextNeutral). | |
CProfilerExportConfigSPtr | setExportActiveAreasOnly (bool isExportActiveAreasOnly) |
Sets areas to export. More... | |
CProfilerExportConfigSPtr | setExportPartitionNameMode (EExportPartitionNameMode exportPartNameMode) |
Sets when download file name should be appended to exported area names. | |
CProfilerExportConfigSPtr | setFileName (const std::string &fileName) |
Sets the name of the exported file. More... | |
CProfilerExportConfigSPtr | setFormatter (CProfilerFormatBaseSPtr &formatter) |
Sets formatter object, which configures export file format. More... | |
CProfilerExportConfigSPtr | setFunctionsFilter (const std::string &namesOfFunctions) |
Sets names of functions for which profiler measurements should be exported (default: empty). More... | |
CProfilerExportConfigSPtr | setLaunchViewer (bool isLaunchViewer) |
If set to true , launches the system default viewer for the specified document type after export, for example notepad for text documents (default: false). | |
void | setOptions (CIDEController &ide, const std::string &docFileName) |
Writes options to winIDEA. | |
CProfilerExportConfigSPtr | setSaveInfo (bool isSaveInfo) |
CProfilerExportConfigSPtr | setSaveStatistics (bool isSaveStatistics) |
If set to true , statistics data is exported to file (default: true). | |
CProfilerExportConfigSPtr | setSaveTimeline (bool isSaveTimeline) |
If set to true , time-line data is exported (default: false). More... | |
CProfilerExportConfigSPtr | setTimeFilter (int64_t startTime, int64_t endTime) |
Sets time-frame for which profiler measurements should be exported (default: both times are set to 0, but are not used if setTimeScope(ETimeBetweenMarkers) is not called). More... | |
CProfilerExportConfigSPtr | setTimeScope (ETimeScope timeScope) |
Sets the time scope (default: ETimeAll). | |
CProfilerExportConfigSPtr | setVariablesFilter (const std::string &namesOfVariables) |
Sets names of variables for which profiler measurements should be exported (default: empty). More... | |
std::string | toString () |
Returns contents of this object in human readable form. | |
This enum defines available area scopes for profiler measurement export.
Enumerator | |
---|---|
EAreaAll | all areas are exported |
EAreaFilter | export only areas specified with calls to setFunctionsFilter(), setVariablesFilter(), and setAUXFilter(). |
This enum defines available context scopes for profiler measurement export.
Enumerator | |
---|---|
EContextAll | functions are exported for all contexts. Statistics contains information about time spent in each context (IRQ, task). |
EContextNeutral | functions are exported without context info, times in statistics are sumed for all contexts |
EContextCurrent | export only context specified with call setContextFilter(). |
This enum defines when to add download file name to area name in exported files, for example: 'iCounter' vs.
'iCounter,,sample.elf'.
This enum defines available time scopes format for profiler measurement export.
Enumerator | |
---|---|
ETimeAll | export recorded samples regardless of timestamp |
ETimeBetweenMarkers | export only samples between times specified with call to setTimeFilter() |
isys::CProfilerExportConfig::CProfilerExportConfig | ( | ) |
Constructs object with default settings, as described with each method.
Python example: profiler_controller.py
std::string isys::CProfilerExportConfig::getAreaScopeAsStr | ( | ) | const |
Returns string, which can be used for setting of option '/Document/<file name>/ProfilerExport.Scope.AreaScope'.
std::string isys::CProfilerExportConfig::getAUXFilter | ( | ) | const |
Returns a list of IO ports to be exported.
Names of ports are separated by spaces.
std::string isys::CProfilerExportConfig::getContextFilter | ( | ) | const |
Returns context filter.
std::string isys::CProfilerExportConfig::getContextScopeAsStr | ( | ) | const |
Returns string, which can be used for setting of option '/Document/<file name>/ProfilerExport.Export.ContextScope'.
std::string isys::CProfilerExportConfig::getExportPartitionNameModeAsStr | ( | ) | const |
Returns string, which can be used for setting of option '/Document/<file name>/ProfilerExport.Export.ExportPartitionName'.
std::string isys::CProfilerExportConfig::getFunctionsFilter | ( | ) | const |
Returns a list of functions to be exported.
Function names are separated by spaces.
std::string isys::CProfilerExportConfig::getTimeScopeAsStr | ( | ) | const |
Returns string, which can be used for setting of option '/Document/<file name>/ProfilerExport.Scope.TimeScope'.
std::string isys::CProfilerExportConfig::getVariablesFilter | ( | ) | const |
Returns a list of variables to be exported.
Names of variables are separated by spaces.
bool isys::CProfilerExportConfig::isExportActiveAreasOnly | ( | ) | const |
Returns true, if only areas with recorded activity will be exported.
Returns false, if all configured areas will be exported.
bool isys::CProfilerExportConfig::isExportAUX | ( | ) | const |
Returns export flag for AUX area.
bool isys::CProfilerExportConfig::isExportData | ( | ) | const |
Returns export flag for data area.
bool isys::CProfilerExportConfig::isExportFunctions | ( | ) | const |
Returns export flag for functions area.
bool isys::CProfilerExportConfig::isExportLines | ( | ) | const |
bool isys::CProfilerExportConfig::isSaveInfo | ( | ) | const |
CProfilerExportConfigSPtr isys::CProfilerExportConfig::setAreaExportSections | ( | bool | isExportFunctions, |
bool | isExportData, | ||
bool | isExportAUX | ||
) |
If area scope is set to EAreaAll
(see method setAreaScope()), then this method defines better granularity, so that some types of areas are not exported.
If this method is not called, all flags are set to true
by default.
isExportFunctions | if true, function areas are exported. |
isExportData | if true, data areas are exported |
isExportAUX | if true, AUX data is exported |
CProfilerExportConfigSPtr isys::CProfilerExportConfig::setAreaExportSections | ( | bool | isExportFunctions, |
bool | isExportLines, | ||
bool | isExportData, | ||
bool | isExportAUX | ||
) |
CProfilerExportConfigSPtr isys::CProfilerExportConfig::setAreaScope | ( | EAreaScope | areaScope | ) |
Sets the area scope (default: EAreaAll).
Python example: profiler_controller.py
CProfilerExportConfigSPtr isys::CProfilerExportConfig::setAUXFilter | ( | const std::string & | namesOfIOPorts | ) |
Sets names of IO ports for which profiler measurements should be exported (default: empty).
This setting is used only if ara scope is set to EAreaFilter (see setAreaScope()).
namesOfIOPorts | names of IO ports from IO module for which profiler measurements should be exported to file. Names of the ports should be separated by spaces, for example 'port1 port2 port3' |
CProfilerExportConfigSPtr isys::CProfilerExportConfig::setContextFilter | ( | const std::string & | contextToExport | ) |
Sets context for which profiler measurements should be exported (default: empty).
Only one context may be specified at a time.
contextToExport | name of the context to export, for example 'TSK: InitTask' , or 'IRQ: Timer' . Prefix TSK should be used for tasks, IRQ for interrupts. |
CProfilerExportConfigSPtr isys::CProfilerExportConfig::setExportActiveAreasOnly | ( | bool | isExportActiveAreasOnly | ) |
Sets areas to export.
isExportActiveAreasOnly | if true, only areas with recorded activity are exported, otherwise all configured areas are exported. |
CProfilerExportConfigSPtr isys::CProfilerExportConfig::setFileName | ( | const std::string & | fileName | ) |
Sets the name of the exported file.
If this method is not called, or fileName
is empty string, then the existing export file name in winIDEA is used.
Python example: profiler_controller.py
CProfilerExportConfigSPtr isys::CProfilerExportConfig::setFormatter | ( | CProfilerFormatBaseSPtr & | formatter | ) |
Sets formatter object, which configures export file format.
If this method is not called, XML formatter with default settings is used. Example:
formatter = ic.CProfilerXMLExportFormat() formatter.setUseIndent(False).setTimelineBinary(False) exportCfg.setFormatter(formatter)
CProfilerExportConfigSPtr isys::CProfilerExportConfig::setFunctionsFilter | ( | const std::string & | namesOfFunctions | ) |
Sets names of functions for which profiler measurements should be exported (default: empty).
This setting is used only if ara scope is set to EAreaFilter (see setAreaScope()).
namesOfFunctions | names of functions for which profiler measurements should be exported to file. Functions names should be separated by spaces, for example 'func1 func2 func3' |
Python example: profiler_controller.py
CProfilerExportConfigSPtr isys::CProfilerExportConfig::setSaveInfo | ( | bool | isSaveInfo | ) |
CProfilerExportConfigSPtr isys::CProfilerExportConfig::setSaveTimeline | ( | bool | isSaveTimeline | ) |
If set to true
, time-line data is exported (default: false).
Python example: profiler_controller.py
CProfilerExportConfigSPtr isys::CProfilerExportConfig::setTimeFilter | ( | int64_t | startTime, |
int64_t | endTime | ||
) |
Sets time-frame for which profiler measurements should be exported (default: both times are set to 0, but are not used if setTimeScope(ETimeBetweenMarkers) is not called).
To export measurements before trigger, times must be negative. Trigger has timestamp 0.
startTime | start of measurements to export relative to trigger |
endTime | end of measurements to export. If greater than the timestamp of the last sample, all samples from startTime to the end are exported. |
CProfilerExportConfigSPtr isys::CProfilerExportConfig::setVariablesFilter | ( | const std::string & | namesOfVariables | ) |
Sets names of variables for which profiler measurements should be exported (default: empty).
This setting is used only if ara scope is set to EAreaFilter (see setAreaScope()).
namesOfVariables | names of variables for which profiler measurements should be exported to file. Names of variables should be separated by spaces, for example 'var1 var2 var3' |