Software Metrics
Software Metrics
Types of Metrics
Internal metrics: Internal metrics are the metrics used for measuring properties that are viewed to be
of greater importance to a software developer. For example, Lines of Code (LOC) measure.
External metrics: External metrics are the metrics used for measuring properties that are viewed to
be of greater importance to the user, e.g., portability, reliability, functionality, usability, etc.
Hybrid metrics: Hybrid metrics are the metrics that combine product, process, and resource metrics.
For example, cost per FP where FP stands for Function Point Metric.
Project metrics: Project metrics are the metrics used by the project manager to check the project's
progress. Data from the past projects are used to collect various metrics, like time and cost; these
estimates are used as a base of new software. Note that as the project proceeds, the project manager
will check its progress from time-to-time and will compare the effort, cost, and time with the original
effort, cost and time. Also understand that these metrics are used to decrease the development costs,
time efforts and risks. The project quality can also be improved. As quality improves, the number of
errors and time, as well as cost required, is also reduced.
Advantage of Software Metrics
Comparative study of various design methodology of software systems.
For analysis, comparison, and critical study of different programming language concerning their
characteristics.
In comparing and evaluating the capabilities and productivity of people involved in software
development.
In the preparation of software quality specifications.
In the verification of compliance of software systems requirements and specifications.
In making inference about the effort to be put in the design and development of the software systems.
In getting an idea about the complexity of the code.
AD
In taking decisions regarding further division of a complex module is to be done or not.
In guiding resource manager for their proper utilization.
In comparison and making design tradeoffs between software development and maintenance cost.
In providing feedback to software managers about the progress and quality during various phases of
the software development life cycle.
In the allocation of testing resources for testing the code.
AD
AD
Disadvantage of Software Metrics
The application of software metrics is not always easy, and in some cases, it is difficult and costly.
The verification and justification of software metrics are based on historical/empirical data whose
validity is difficult to verify.
These are useful for managing software products but not for evaluating the performance of the
technical staff.
The definition and derivation of Software metrics are usually based on assuming which are not
standardized and may depend upon tools available and working environment.
Most of the predictive models rely on estimates of certain variables which are often not known
precisely.
LOC Metrics
It is one of the earliest and simpler metrics for calculating the size of the computer program.
It is generally used in calculating and comparing the productivity of programmers. These
metrics are derived by normalizing the quality and productivity measures by considering the
size of the product as a metric.
Based on the LOC/KLOC count of software, many other metrics can be computed:
a. Errors/KLOC.
b. $/ KLOC.
c. Defects/KLOC.
d. Pages of documentation/KLOC.
e. Errors/PM.
g. $/ Page of documentation.
Advantages of LOC
1. Simple to measure
Disadvantage of LOC
1. It is defined on the code. For example, it cannot measure the size of the specification.
2. It characterizes only one specific view of size, namely length, it takes no account of
functionality or complexity
3. Bad software design may cause an excessive line of code
4. It is language dependent
5. Users cannot easily understand it
13. All these parameters are then individually assessed for complexity.
14. The FPA functional units are shown in Fig:
15.
16. 2. FP characterizes the complexity of the software system and hence can be
used to depict the project time and the manpower requirement.
17. 3. The effort required to develop the project depends on what the software
does.
18. 4. FP is programming language independent.
19. 5. FP method is used for data processing systems, business systems like
information systems.
20. 6. The five parameters mentioned above are also known as information
domain characteristics.
21. 7. All the parameters mentioned above are assigned some weights that have
been experimentally determined and are shown in Table
22. Weights of 5-FP Attributes
25. Here that weighing factor will be simple, average, or complex for a
measurement parameter type.
b. When ∑(fi) = 70 then CAF = 0.65 + (0.01 * 70) = 0.65 + 0.7 = 1.35
a. Errors/FP
b. $/FP.
c. Defects/FP
d. Pages of documentation/FP
e. Errors/PM.
g. $/Page of Documentation.
8. LOCs of an application can be estimated from FPs. That is, they are
interconvertible. This process is known as backfiring. For example, 1 FP is equal to
about 100 lines of COBOL code.
10. But the function points obtained above are unadjusted function points (UFPs).
These (UFPs) of a subsystem are further adjusted by considering some more General
System Characteristics (GSCs). It is a set of 14 GSCs that need to be considered. The
procedure for adjusting UFPs is as follows:
c. Then Value Adjustment Factor (VAF) is computed from TDI by using the
formula: VAF = (TDI * 0.01) + 0.65
Remember that the value of VAF lies within 0.65 to 1.35 because
c. VAF is then multiplied with the UFP to get the final FP count: FP = VAF * UFP
Solution:
FP LOC