Submit and vote on feature ideas.

Welcome to the new Parasoft forums! We hope you will enjoy the site and try out some of the new features, like sharing an idea you may have for one of our products or following a category.

C/C++test Data Flow Analysis Performance Debugging Log

Billy McMullin
Billy McMullin Posts: 64 admin
edited December 2016 in C/C++test

To get information about how long it takes to process each file and how long it takes to do each of the Data Flow (Bug Detective) analysis phase, set up the following flags in the Parasoft > Preferences > Technical Support > Advanced options (make sure Advanced options are enabled):
CPPTEST_TIME_STATISTICS_PER_FILE=true
CPPTEST_TIME_STATISTICS_PER_PHASE=true

Results will be displayed on the C++test console after the analysis finishes.

To achieve that in the CLI run, set up the following options in the localsettings properties file:

techsupport.advanced=true
techsupport.advanced.options=CPPTEST_TIME_STATISTICS_PER_FILE\=true
CPPTEST_TIME_STATISTICS_PER_PHASE\=true

and make sure you use "-appconsole stdout|" option specified in the cpptestcli command line.

With these options we will know which phase takes the most time (collecting data building graphs / running rules) and whether there are some files that we take most of the time (you could consider disabling testing of such files in the first place).

To get detailed profiling information about the BD analysis (including time spent processing each of the rules), enable verbose logging in GUI (Parasoft > Preferences > Technical Support > Enable verbose logging) or in the CLI with the following localsettings properties option:

techsupport.verbose=true

and use the following flags in the cpptestcli command line:

-J-DFA_DEV=true -J-DFA_DEV_LOG_DIR="PATH_TO_A_DIR_TO_STORE_PROFILING_INFO_IN"

Specified directory will be filled with data after the analysis finishes. It will contain e.g. profiler.dat file, where you can find detailed profiler information. To find information about the rules, look for lines line this:

: complete|.......

E.g.:

BD-TRS-LOCK: complete|196|0.488|0.0|0.487|0.002

means that rule BD-TRS-LOCK was invoked 196 times with the total time: 0.488sec, min time: 0.0sec, max time: 0.487sec, avg time: 0.002sec

Comments

  • Andrey Madan
    Andrey Madan Posts: 388 ✭✭✭

    Another way to collect profiling data, but at different granularity is:

    you need add one line to both c.psrc and cpp.psrc files located in your C++ Test installation directory:

    <Install_dir_of_C++Test>/engine/etc/compilers//*.psrc (both c.psrc and cpp.psrc):

    pscom.profile true

    //Please, also remember to remove this entry after the profiling run is done.

    The xtest debug log that can be found at your workspace in .metadata.plugins\com.parasoft.xtest.logging.eclipse.core\xtest_logs_\xtest.log