The _delta.pl script included with Understand in SciTools\scripts\perl will compare two Understand projects that contain different versions of the same source code and can return the changed metrics for the following: Lines, Lines of Code, Comments, and number of functions.


This does require creating a new Understand project for each version of the source code, but it is something that can be done automatically as part of your build process, using the command line. To see all the options for the command line, run uperl.exe help from the command line.


To run the script from the command line and compare lines of code between projects use the following command:


uperl.exe _delta.pl -db project.udb -prev previousProject.udb -comp loc


All of the options for the script can be found in the script itself on lines 13-33.


More details on the Perl API and how to run scripts are available here: Getting Started with the Perl API


Good Luck and let us know if you run into any questions!