- <is the type of report for comparisonreport_name>
- <is a directory where your first result file is locatedresult1_path>
- <is a directory where your second result file is locatedresult2_path>
-report hotspots -r r001hs -r r002hsvtune
Function Module Result 1:CPU Time Result 2:CPU Time Difference:CPU Time algorithm_1 matrix 1.225 1.222 0.003 algorithm_2 matrix 3.280 1.602 1.678 main matrix 0 0.010 -0.010
Generate a Difference Report for Regression Testing
- Create a baseline.
- Run thetool to analyze your target using a particular analysis type. For example:vtuneOn Linux*-collect hotspots -- samplevtuneOn Windows*:-collect hotspots -- sample.exevtuneThe command runs a Hotspots analysis on thesampleorsample.exetarget and writes the result to the current working directory. A Summary report is written tostdout.
- Generate a report to use as a baseline for further analysis. For example:-report hotspots -result-dir r001hsvtuneThis creates a Hotspots report that shows the CPU time for each function of thesampleorsample.exetarget.
- Update your source code to optimize the target application.
- Create and run the script that:
- On Linux: Sets the path to theinstallation foldervtune
- On Windows: Invokessep-vars.cmdin theIntel® VTune™installation folder to set up the environment.ProfilerThe default installation path for the VTuneProfilervaries with the product shipment:
- Starts thecommand to collect performance data.vtune
- Runs thecommand to compare the current result with the initial baseline result and displays the difference. For example:vtune-R hotspots -r r001hs -r r002hsvtuneThis example compares CPU time for each function in resultsr001hsandr002hsand displays both results side-by-side with the calculated difference. The positive difference between the performance values indicates an improvement for result 2. The negative difference indicates a regression.You can compare results of the same analysis type or performance metrics only.
- The test is passed if no regressions found.
- Repeat steps 2-4 on a regular basis.