0% found this document useful (0 votes)
2 views

Scope of Software Metrics

Software metrics are quantifiable measures of software characteristics that aid in performance measurement, productivity assessment, and project management. They can be categorized into product, process, and project metrics, with various activities such as cost estimation, data collection, and quality evaluation involved in software measurement. Additionally, specific models like Halstead's Complexity Measures and Function Points are used to assess software complexity and functionality.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

Scope of Software Metrics

Software metrics are quantifiable measures of software characteristics that aid in performance measurement, productivity assessment, and project management. They can be categorized into product, process, and project metrics, with various activities such as cost estimation, data collection, and quality evaluation involved in software measurement. Additionally, specific models like Halstead's Complexity Measures and Function Points are used to assess software complexity and functionality.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 10

Software metrics: Software metric is a measure of software characteristics which

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 −

1. Cost and effort estimation


2. Productivity measures and model
3. Data collection
4. Quantity models and measures
5. Reliability models
6. Performance and evaluation models
7. Structural and complexity metrics
8. Capability – maturity assessment
9. Management by metrics
10. Evaluation of methods and tools
Software measurement is a diverse collection of these activities that range from models
predicting software project costs at a specific stage to measures of program structure.
1.Cost and Effort Estimation
Effort is expressed as a function of one or more variables such as the size of the program,
the capability of the developers and the level of reuse. Cost and effort estimation models
have been proposed to predict the project cost during early phases in the software life
cycle. The different models proposed are −

• Boehm’s COCOMO model


• Putnam’s slim model
• Albrecht’s function point model

2. Productivity Model and Measures


Productivity can be considered as a function of the value and the cost. Each can be
decomposed into different measurable size, functionality, time, money, etc. Different
possible components of a productivity model can be expressed in the following
diagram.

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

n1 Number of unique operators

n2 Number of unique operands

N1 Number of total occurrence of operators

N2 Number of total occurrence of operands

When we select source file to view its complexity details in Metric Viewer, the
following result is seen in Metric Report:

Metric Meaning Mathematical Representation

n Vocabulary n1 + n2

N Size N1 + N2

V Volume Length * Log2 Vocabulary

D Difficulty (n1/2) * (N1/n2)

E Efforts Difficulty * Volume

B Errors Volume / 3000

T Testing time Time = Efforts / S, where S=18 seconds.


Cyclomatic Complexity Measures
Every program encompasses statements to execute in order to perform some task and
other decision-making statements that decide, what statements need to be executed.
These decision-making constructs change the flow of the program.

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.

McCabe, in 1976, proposed Cyclomatic Complexity Measure to quantify complexity


of a given software. It is graph driven model that is based on decision-making
constructs of program such as if-else, do-while, repeat-until, switch-case and go to
statements.

Process to make flow control graph:

• Break program in smaller blocks, delimited by decision-making constructs.


• Create nodes representing each of these nodes.
• Connect nodes as follows:
o If control can branch from block i to block j

Draw an arc

o From exit node to entry node

Draw an arc.

To calculate Cyclomatic complexity of a program module, we use the formula -

V(G) = e – n + 2

Where e is total number of edges ,n is total number of nodes


The Cyclomatic complexity of the above module is

e = 10 , n=8
Cyclomatic Complexity = 10 - 8 + 2 =4

According to P. Jorgensen, Cyclomatic Complexity of a module should not exceed


10.

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:

Parameter Simple Average Complex

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:

CAF = 0.65 + 0.01N

Then,

Delivered Function Points (FP)= CAF x Raw FP

This FP can then be used in various metrics, such as:


Cost = $ / FP
Quality = Errors / FP
Productivity = FP / person-month

You might also like