Saturday, July 16, 2011

Continuous Integration Build Metrics

Continuous Integration Build Metrics provide insight into the Build Optimization aspects, Health of the Source Code, Health of the Test Code, System Size. These indicators can greatly help in taking certain corrective and preventive action based on the continuous integration build results. Below are some of the key metrics indicators that can be obtained from CI -

1) Number of Source Lines of Code (SLOC) - This indicates the total software or system size in LOC. (Unit of Measurement - LOC)

2) Number of Test Code Lines of Code -This indicates the total test code size in LOC. (Unit of Measurement - LOC)

3) Compilation Time -Total Compilation time taken by the build. (Unit of Measurement - Hours / Minutes/ Seconds)

4) Total Test Execution -Time Total time taken to execute the Unit Test, Functional Test, Non Functional Test. (Unit of Measurement - Hours / Minutes/ Seconds )

5) Total Inspection -Time Total Time taken to execute the inspection tools. (Unit of Measurement - Hours / Minutes/ Seconds )

6) Total Deployment -Time Total Time taken to deploy the product / software into the target environment from the continuous integration machine. (Unit of Measurement - Hours / Minutes/ Seconds )

7) Total Build Time --Indicates the total time taken to run all the builds (including inspection , functional, non functional build) . (Unit of Measurement - Hours / Minutes/ Seconds )

8)Successful Build Rate -It is the division of the total number of successful build by the total builds at a give time interval. (Unit of Measurement - Percentage (%) )

9) Build Repair Rate -It indicates the time taken to repair a failed build. (Unit of Measurement - Hours / Minutes/ Seconds)


10) Version Control System Load Time -Indicates the time taken to check out/ update the project from the continuous integration build. It gives pointers about the network bandwidth, processor, memory, disk drive sufficiency and the peak time load of the version control system. (Unit of Measurement - Hours / Minutes/ Seconds )

11) Number of Errors open in the Source Code -Total Numbers of Static Tool Errors open in the test code of the Latest Build . The number of rules can be configured in the rules file of the tool. (Example- PC Lint, Checkstyle, PMD, Findbugs etc). (Unit of Measurement - Number )

12) Number of Errors open in the Test Code-Total Numbers of Static Tool Errors open in the source code of the Latest Build . The number of rules can be configured in the rules file of the tool. (Example- PC Lint, Checkstyle, PMD, Findbugs etc). (Unit of Measurement - Number )

13) Unit Testing Line Coverage -Indicates the total lines of source code covered through the unit testing. (Unit of Measurement - Percentage (%))

14) Unit Testing Function Coverage -Indicates whether the function (or subroutine) in the program been called through the unit testing. (Unit of Measurement - Percentage (%) )

15) Unit Testing Branch Coverage -Indicates the branch coverage through unit testing. (Unit of Measurement - Percentage (%) )

16) Functional Testing Line Coverage -Indicates the total lines of source code covered through the functional testing.(Unit of Measurement - Percentage (%))

17) Functional Testing Function Coverage -Indicates whether the function (or subroutine) in the program been called through the functional testing. (Unit of Measurement - Percentage (%))

18) Functional Testing Branch Coverage -Indicates the branch coverage through functional testing. (Unit of Measurement - Percentage (%) )

19) % of Duplicate Code Duplicate Code -Threshold can be set for block of code and Tools like Simian checks the duplication in percentage for the block of code set as threshold. It Ignores whitespace, curly braces, comments, imports, includes, package declarations, etc. (Unit of Measurement - Percentage (%)" )

20) Average Code Complexity -Indicates the average code complexity value of all the functions. (Unit of Measurement - Number)

21) Max Code Complexity -Indicates the maximum code complexity value among all the functions. (Unit of Measurement - Number )

No comments: