Presentation is loading. Please wait.

Presentation is loading. Please wait.

Software Metrics Analysis Group 2. Description of the program used for the analysis Understand 2.0 is the tool we have chosen for the analysis.

Similar presentations


Presentation on theme: "Software Metrics Analysis Group 2. Description of the program used for the analysis Understand 2.0 is the tool we have chosen for the analysis."— Presentation transcript:

1 Software Metrics Analysis Group 2

2 Description of the program used for the analysis Understand 2.0 is the tool we have chosen for the analysis

3 Description of the program used for the analysis semantic change analysis advanced metrics multi-scenario source code maintenance estimation combined language analysis custom architecture creation creation of code analysis snapshots Understand helps programmers to quickly comprehend, measure, maintain and document their source code. For many, especially those working on large, multiple MSLOC projects, it has become an indispensable tool

4 Description of the program used for the analysis

5 Process manager code analysis We have chosen the process manager files to obtain some general metrics about this part of the MINIX 3 source code,according to the other projects.

6 Program Size Metrics CountDeclFile (Number of files) ------------------------> 13 CountDeclFunction (Number of functions) -------------> 76 CountLine (Number of all lines) ----------------------> 3.608 CountLineBlank (Number of blank lines) ---------------> 425 CountLineCode (Number of source code lines) -------->1.987 CountLineComment (Number of lines of comments) -->1.335 CountLineInactive (number of inactive from the view of the preprocessor) --------------------------------------------> 72 CountStmtDecl (Number of declarative statements) -->301 CountStmtExe (Number of executable statements) -->1.317 RatioCommentToCode (Ratio of number of comment lines to number of code lines) ----------------------------------> 0,67

7 Analysis of main.c We also took some particular metrics of the file main.c like cyclomatic complexity to have a deeper idea of the source code properties. This file contains the main program of the process manager and some related procedures. When MINIX starts up, the kernel runs for a little while, initializing itself and its tasks, and then it runs PM and FS. Both PM and FS initialize themselves as far as they can. PM asks the kernel for all free memory and starts serving requests.

8 About the cyclomatic complexity. The cyclomatic complexity of a section of source code is the count of the number of linearly independent paths through the source code. For instance, if the source code contained no decision points such as IF statements or FOR loops, the complexity would be 1, since there is only a single path through the code. If the code had a single IF statement containing a single condition there would be two paths through the code, one path where the IF statement is evaluated as TRUE and one path where the IF statement is evaluated as FALSE.

9 Results of metrics on main.c AvgCyclomatic -----------------------------------------------------> 6 (Average cyclomatic complexity for all nested functions or methods) MaxCyclomatic ----------------------------------------------------> 15 (Maximum cyclomatic complexity of all nested functions or methods) SumCyclomatic -----------------------------------------------------> 43 (Sum of cyclomatic complexity of all nested functions or methods)

10 Summarizing the results According to the table we could say that this file is part of a simple program because its average cyclomatic complexity of 6. It has a ratio comment to code of 67% that makes the code easier to understand.


Download ppt "Software Metrics Analysis Group 2. Description of the program used for the analysis Understand 2.0 is the tool we have chosen for the analysis."

Similar presentations


Ads by Google