Scope of Software Metrics
Scope of Software Metrics
are quantifiable or countable. Software metrics are important for many reasons, including
measuring software performance, planning work items, measuring productivity, and many
other uses.
Within the software development process, there are many metrics that are all related to
each other. Software metrics are related to the four functions of management:
Planning, Organization, Control, or Improvement.
Software metrics is a standard of measure that contains many activities which involve
some degree of measurement. It can be classified into three categories: product metrics,
process metrics, and project metrics.
• Product metrics describe the characteristics of the product such as size,
complexity, design features, performance, and quality level.
• Process metrics can be used to improve software development and maintenance.
Examples include the effectiveness of defect removal during development, the
pattern of testing defect arrival, and the response time of the fix process.
• Project metrics describe the project characteristics and execution. Examples
include the number of software developers, the staffing pattern over the life cycle
of the software, cost, schedule, and productivity.
Some metrics belong to multiple categories. For example, the in-process quality metrics
of a project are both process metrics and project metrics.
Scope of Software Metrics
Software metrics contains many activities which include the following −
3. Data Collection
The quality of any measurement program is clearly dependent on careful data
collection. Data collected can be distilled into simple charts and graphs so that the
managers can understand the progress and problem of the development. Data
collection is also essential for scientific investigation of relationships and trends.
4. Quality Models and Measures
Quality models have been developed for the measurement of quality of the product
without which productivity is meaningless. These quality models can be combined
with productivity model for measuring the correct productivity. These models are
usually constructed in a tree-like fashion. The upper branches hold important high
level quality factors such as reliability and usability.
The notion of divide and conquer approach has been implemented as a standard
approach to measuring software quality.
5. Reliability Models
Most quality models include reliability as a component factor, however, the need to
predict and measure reliability has led to a separate specialization in reliability
modeling and prediction. The basic problem in reliability theory is to predict when a
system will eventually fail.
6.Performance Evaluation and Models
It includes externally observable system performance characteristics such as response
times and completion rates, and the internal working of the system such as the
efficiency of algorithms. It is another aspect of quality.
7. Structural and Complexity Metrics
Here we measure the structural attributes of representations of the software, which
are available in advance of execution. Then we try to establish empirically predictive
theories to support quality assurance, quality control, and quality prediction.
8. Capability Maturity Assessment
This model can assess many different attributes of development including the use of
tools, standard practices and more. It is based on the key practices that every good
contractor should be using.
9. Management by Metrics
For managing the software project, measurement has a vital role. For checking
whether the project is on track, users and developers can rely on the measurement-
based chart and graph. The standard set of measurements and reporting methods are
especially important when the software is embedded in a product where the
customers are not usually well-versed in software terminology.
10. Evaluation of Methods and Tools
This depends on the experimental design, proper identification of factors likely to
affect the outcome and appropriate measurement of factor attributes.
Halstead's Complexity Measures
In 1977, Mr. Maurice Howard Halstead introduced metrics to measure software
complexity. Halstead’s metrics depends upon the actual implementation of program
and its measures, which are computed directly from the operators and operands from
source code, in static manner. It allows to evaluate testing time, vocabulary, size,
difficulty, errors, and efforts for C/C++/Java source code.
According to Halstead, “A computer program is an implementation of an algorithm
considered to be a collection of tokens which can be classified as either operators or
operands”. Halstead metrics think a program as sequence of operators and their
associated operands.
He defines various indicators to check complexity of module.
Parameter Meaning
When we select source file to view its complexity details in Metric Viewer, the
following result is seen in Metric Report:
n Vocabulary n1 + n2
N Size N1 + N2
If we compare two programs of same size, the one with more decision-making
statements will be more complex as the control of program jumps frequently.
Draw an arc
Draw an arc.
V(G) = e – n + 2
e = 10 , n=8
Cyclomatic Complexity = 10 - 8 + 2 =4
Function Point
It is widely used to measure the size of software. Function Point concentrates on
functionality provided by the system. Features and functionality of the system are
used to measure the software complexity.
Function point counts on five parameters, named as External Input, External Output,
Logical Internal Files, External Interface Files, and External Inquiry. To consider the
complexity of software each parameter is further categorized as simple, average or
complex.
Parameters of function point:
External Input
Every unique input to the system, from outside, is considered as external input.
Uniqueness of input is measured, as no two inputs should have same formats. These
inputs can either be data or control parameters.
• Simple - if input count is low and affects less internal files
• Complex - if input count is high and affects more internal files
• Average - in-between simple and complex.
External Output
All output types provided by the system are counted in this category. Output is
considered unique if their output format and/or processing are unique.
• Simple - if output count is low
• Complex - if output count is high
• Average - in between simple and complex.
Logical Internal Files
Every software system maintains internal files in order to maintain its functional
information and to function properly. These files hold logical data of the system. This
logical data may contain both functional data and control data.
• Simple - if number of record types are low
• Complex - if number of record types are high
• Average - in between simple and complex.
External Interface Files
Software system may need to share its files with some external software or it may
need to pass the file for processing or as parameter to some function. All these files
are counted as external interface files.
• Simple - if number of record types in shared file are low
• Complex - if number of record types in shared file are high
• Average - in between simple and complex.
External Inquiry
An inquiry is a combination of input and output, where user sends some data to
inquire about as input and the system responds to the user with the output of inquiry
processed. The complexity of a query is more than External Input and External
Output. Query is said to be unique if its input and output are unique in terms of
format and data.
• Simple - if query needs low processing and yields small amount of output data
• Complex - if query needs high process and yields large amount of output data
• Average - in between simple and complex.
Each of these parameters in the system is given weightage according to their class
and complexity. The table below mentions the weightage given to each parameter:
Inputs 3 4 6
Outputs 4 5 7
Enquiry 3 4 6
Files 7 10 15
Interfaces 5 7 10
The table above yields raw Function Points. These function points are adjusted
according to the environment complexity. System is described using fourteen
different characteristics:
• Data communications
• Distributed processing
• Performance objectives
• Operation configuration load
• Transaction rate
• Online data entry,
• End user efficiency
• Online update
• Complex processing logic
• Re-usability
• Installation ease
• Operational ease
• Multiple sites
• Desire to facilitate changes
These characteristics factors are then rated from 0 to 5, as mentioned below:
• No influence
• Incidental
• Moderate
• Average
• Significant
• Essential
All ratings are then summed up as N. The value of N ranges from 0 to 70 (14 types of
characteristics x 5 types of ratings). It is used to calculate Complexity Adjustment
Factors (CAF), using the following formulae:
Then,