RSM
Configuration Management
Integration
for Metrics Differentials
RSM is a command line based tool that lends is functionality to Configuration Control tool scripts. RSM is typically used to determine the metrics difference between baselines. This is performed with the RSM work files. The following scenario details how to use RSM in a general CM task.
The RSM configuration file has several option for work files, they are:
# The following path location specifies where work files
# are to be created. The path must be a location with write
# permissions. RSM will create work files in the current
# directory if no path is specified.
Work file location path :
# The following parameter, when set to Yes will include
# files that are the "same" in metrics differential reports.
# The number of files with no difference can be large
# therefore, the default setting is No.
Differential reports include equal files: Yes
# Work file generation normally calculates the functional
# cyclomatic complexity. This turns on functional analysis
# in the report output. You can turn off this metric with
# the following setting.
Include cyclo complexity in work files : Yes
# The following parameter, when set to Yes will cause
# the files stored into work files to be relative to the
# location where RSM began processing.
Relative Work Files : Yes
|
One must consider if you are only interested in those files that have changed. In this case set the configuration setting to not report the equal files.
# The following parameter, when set to Yes will include
# files that are the "same" in metrics differential reports.
# The number of files with no difference can be large
# therefore, the default setting is No.
Differential reports include equal files: No
|
The following is a general step by step to create a metrics differential report.
Assume you have two baselines of code in the following tree hierarchies
Click to
download the following example
d:\cm_code\baseline1
|
+- cpp
| +- fibonacci.cpp
+- java
+- Fibon_v1.java
|
d:\cm_code\baseline2
|
+- cpp
| +- fibonacci.cpp
+- java
+- Fibonacci.java
|
Visual analysis shows us that the file "Fibon_v1.java" has been removed from the latest baseline, basline2 and a new file has been added "Fibonacci.java". The exisiting file "fibonacci.cpp" may be the same between baselines or it may have been modified by the content.
We write an DOS batch file or script file to run RSM to
perform metrics between the two baselines. This type of script can be
trigger from your CM tool or run manually. A software manager could run
this type of script on different portions of their baseline to gain insight to
the productivity of the teams on the software project.
File: rsm_differentials.bat
rem rsm_differentials.bat
d:
cd cm_code
cd baseline1
rsm -O metrics.txt -wc -r h,cpp,java .
cd ..
cd baseline2
rsm -O metrics.txt -wc -r h,cpp,java .
cd ..
rsm -O rsm_differential.htm -H -wx .\baseline1\workfile.dat .\baseline2\workfile.dat
|
The script file is run from the directory or folder d:\cm_code
Click on the following link to see the resultant RSM
Report:
Example of Baseline Differentials