Software metrics
A software metric is a measure of software characteristics which are measurable or
countable. Software metrics are valuable for many reasons, including measuring
software performance, planning work items, measuring productivity, and many other
uses.
Within the software development process, many metrics are that are all connected.
Software metrics are similar to the four functions of management: Planning,
Organization, Control, or Improvement.
Characterstics
1. it is simple and computable.
2. Consistent and unambiguous.
3. It uses consistent units of measurement.
4. It is Independent of programming language means software is written in
whatever language it is measurable using software metrics.
5. Easy and cost effective to obtain.
6. Easy to calibrate and adaptable.
Classification of Software Metrics
1. Product Metrics: These are the measures of various characteristics of the software
product. The two important software characteristics are:
Size and complexity of software.
Quality and reliability of software.
Product metrics are software product measures at any stage of their development,
from requirements to established systems. Product metrics are related to software
features only.
Product metrics fall into two classes:
1. Dynamic metrics that are collected by measurements made from a
program in execution.
2. Static metrics that are collected by measurements made from system
representations such as design, programs, or documentation.
Dynamic metrics help in assessing the efficiency and reliability of a program while
static metrics help in understanding, understanding and maintaining the complexity
of a software system. Dynamic metrics are usually quite closely related to
software quality attributes. It is relatively easy to measure the execution time
required for particular tasks and to estimate the time required to start the system.
These are directly related to the efficiency of the system failures and the type of
failure can be logged and directly related to the reliability of the software. On the
other hand, static matrices have an indirect relationship with quality attributes.
2. Process Metrics: These are the measures of various characteristics of the software
development process. For example, the efficiency of fault detection. They are used to
measure the characteristics of methods, techniques, and tools that are used for
developing software.
3. 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.
Size oriented metrics
Size-oriented metrics are derived by normalizing quality and productivity
Point Metrics measures by considering the the size of the software that has
been produced. The organization builds a simple record of size measure for
the software projects. it is built on past experiences of organizations. It is a
direct measure of software. This metric measure is one of the simplest and
earliest metrics that is used for computer programs to measure size. Size
Oriented Metrics are also used for measuring and comparing the productivity
of programmers.
Advantages of Size-Oriented Metrics
This measure is dependent upon programming language.
This method is well designed upon programming language.
It does not accommodate non-procedural languages.
Sometimes, it is very difficult to estimate LOC in early stage of
development.
Though it is simple to measure but it is very hard to understand it for
users.
It cannot measure size of specification as it is defined on code.
Function-Oriented Metrics
Function-Oriented Metrics are also known as Function Point Model. This
model generally focuses on the functionality of the software application being
delivered. These methods are actually independent of the programming
language that is being used in software applications and based on
calculating the Function Point (FP). A function point is a unit of measurement
that measures the business functionality provided by the business product.
Function-Oriented Metrics are also known as Function Point Model. This
model generally focuses on the functionality of the software application being
delivered. These methods are actually independent of the programming
language that is being used in software applications and based on
calculating the Function Point (FP). A function point is a unit of measurement
that measures the business functionality provided by the business product.
After calculating the function point, various other measures can be calculated
as shown below :
Productivity = FP / person-month
Quality = Number of faults / FP
Cost = $ / FP
Documentation = Pages of documentation / FP
Measuring Software Quality using Quality
Metrics
There is a number of metrics available based on which software quality is
measured. But among them, there are a few most useful metrics which are
essential in software quality measurement. They are –
1. Code Quality
2. Reliability
3. Performance
4. Usability
5. Correctness
6. Maintainability
7. Integrity
8. Security
1. Code Quality – Code quality metrics measure the quality of code used for
software project development. Maintaining the software code quality by
writing Bug-free and semantically correct code is very important for good
software project development. In code quality, both Quantitative metrics like
the number of lines, complexity, functions, rate of bugs generation, etc, and
Qualitative metrics like readability, code clarity, efficiency, and
maintainability, etc are measured.
2. Reliability – Reliability metrics express the reliability of software in
different conditions. The software is able to provide exact service at the right
time or not checked. Reliability can be checked using Mean Time Between
Failure (MTBF) and Mean Time To Repair (MTTR).
3. Performance – Performance metrics are used to measure the
performance of the software. Each software has been developed for some
specific purposes. Performance metrics measure the performance of the
software by determining whether the software is fulfilling the user
requirements or not, by analyzing how much time and resource it is utilizing
for providing the service.
4. Usability – Usability metrics check whether the program is user-friendly or
not. Each software is used by the end-user. So it is important to measure
that the end-user is happy or not by using this software.
5. Correctness – Correctness is one of the important software quality
metrics as this checks whether the system or software is working correctly
without any error by satisfying the user. Correctness gives the degree of
service each function provides as per developed.
6. Maintainability – Each software product requires maintenance and up-
gradation. Maintenance is an expensive and time-consuming process. So if
the software product provides easy maintainability then we can say software
quality is up to mark. Maintainability metrics include the time required to
adapt to new features/functionality, Mean Time to Change (MTTC),
performance in changing environments, etc.
7. Integrity – Software integrity is important in terms of how much it is easy
to integrate with other required software which increases software
functionality and what is the control on integration from unauthorized
software’s which increases the chances of cyberattacks.
8. Security – Security metrics measure how secure the software is. In the
age of cyber terrorism, security is the most essential part of every software.
Security assures that there are no unauthorized changes, no fear of cyber
attacks, etc when the software product is in use by the end-user.
Software Reliability
Software reliability is the probability that the software will operate failure-free
for a specific period of time in a specific environment. It is measured per
some unit of time.
Software Reliability starts with many faults in the system when first
created.
After testing and debugging enter a useful life cycle.
Useful life includes upgrades made to the system which bring about new
faults.
The system needs to then be tested to reduce faults.
Software reliability cannot be predicted from any physical basis, since it
depends completely on the human factors in design.
Estimating the size of the Software
Estimation of the size of the software is an essential part of Software Project
Management. It helps the project manager to further predict the effort and
time that will be needed to build the project. Various measures are used in
project size estimation. Some of these are:
Lines of Code
Number of entities in the ER diagram
Total number of processes in detailed data flow diagram
Function points
1. Lines of Code (LOC): As the name suggests, LOC counts the total
number of lines of source code in a project. The units of LOC are:
KLOC- Thousand lines of code
NLOC- Non-comment lines of code
KDSI- Thousands of delivered source instruction
The size is estimated by comparing it with the existing systems of the same
kind. The experts use it to predict the required size of various components of
software and then add them to get the total size.
It’s tough to estimate LOC by analyzing the problem definition. Only after the
whole code has been developed can accurate LOC be estimated. This
statistic is less useful for project managers because project planning must
be completed before development activity can begin.
Two separate source files having a similar number of lines may not require
the same effort. A file with complicated logic would take longer to create than
one with simple logic. Proper estimation may not be attainable based on
LOC.
The length of time it takes to solve an issue is measured in LOC. This
statistic will differ greatly from one programmer to the next. A seasoned
programmer can write the same logic in fewer lines than a newbie coder.
Advantages
Universally accepted and is used in many models like COCOMO.
Estimation is closer to the developer’s perspective.
Both people throughout the world utilize and accept it.
At project completion, LOC is easily quantified.
It has a specific connection to the result.
Simple to use.
Disadvantages:
Different programming languages contain a different number of lines.
No proper industry standard exists for this technique.
It is difficult to estimate the size using this technique in the early stages of
the project.
When platforms and languages are different, LOC cannot be used to
normalize.