How do I set the Base Directory?
To do this highlight a project, and choose the Preferences/Project Preferences command. This will pop up a window, which will allow you to input the base directory. The concept of the base directory is as follows, assuming that you are comparing two version of the same source code then the filenames of the two versions will be the same relative to some base directory for each version. For example if the old version of the code is stored in:
c:\source_code\old_version
and the new version of the code is stored in:
c:\source_code\new_version
then in Krakatau two projects should be created each with the contents of one of these directory and the base directory of the old project set to "c:\source_code\old_version" and the base directory of the new project set to "c:\source_code\new_version".
How do I compare two projects?
To compare projects, create two projects as described in the previous steps and then right click on the older version, this will pop up a menu, choose the "Set as old" command (the old project will be highlighted as yellow). Once this is done simply click on the new version of the project and select the "Compare Projects" command from the toolbar.
Note: Depending on the size of the source code the parse/analyzing stage may take some time.
What do the results mean?
There are several points to note in the results:
For each project there are several tabs along the top of the results screen corresponding to the types of symbols in the project (e.g. project, file, method etc). Under each section there are a list of the symbols of that type, there are also tabs to view the state of the symbols between the versions. The states are Changed, Unchanged, Deleted, New. By clicking on these tabs you can quickly view sections of the code that are changing between versions.
Under the Project tab there is a hierarchical view of the project - this allows you navigate your code, and by selecting individual symbols view the metric results. Again in this view you can quickly check the state of a symbol by the color that it is shown in:
- Black - Unchanged
- Red - Changed
- Green - New
- Blue - Deleted
The metric values of the changed symbols will be +- values depending on whether metric has increased or decreased, the values of the new, deleted and unchanged symbols will be the metric values for that symbol.
As well as the changes in the metric values Krakatau PM also gives three additional metrics: CHG_SLOC, ADD_SLOC, and DEL_SLOC. These so called "churn" metrics show changed, added, and deleted source lines of code respectively.