Software Metrics-5
Software Metrics-5
Software Metrics-5
College experience
Travel
Time to drive from home to the airport
Amount of miles traveled today
Cost of meals and lodging for yesterday
Software Quality
Reliability
The amount of time that the software is available for use
Usability
The degree to which the software is easy to use
Efficiency
The degree to which the software makes optimal use of system resources
Maintainability
The ease with which repair and enhancement may be made to the software
Portability
The ease with which the software can be transposed from one environment to another
A Framework for
Product Metrics
These three terms are often used interchangeably, but they can have
subtle differences
Measure
Provides a quantitative indication of the extent, amount, dimension,
capacity, or size of some attribute of a product or process
Measurement
The act of determining a measure
Metric
(IEEE) A quantitative measure of the degree to which a system, component,
or process possesses a given attribute
Indicator
A metric or combination of metrics that provides insight into the software
process, a software project, or the product itself
9
10
Formulation
The derivation (i.e., identification) of software measures and metrics
appropriate for the representation of the software that is being considered
Collection
The mechanism used to accumulate data required to derive the formulated
metrics
Analysis
The computation of metrics and the application of mathematical tools
Interpretation
The evaluation of metrics in an effort to gain insight into the quality of the
representation
Feedback
Recommendations derived from the interpretation of product metrics and
passed on to the software development team
11
12
13
14
Goal-oriented Software
Measurement (continued)
16
17
Functionality delivered
Provides an indirect measure of the functionality that is packaged within the
software
System size
Measures the overall size of the system defined in terms of information available
as part of the analysis model
Specification quality
Provides an indication of the specificity and completeness of a requirements
specification
19
Architectural metrics
Provide an indication of the quality of the architectural design
Component-level metrics
Measure the complexity of software components and other characteristics that
have a bearing on quality
20
Complexity metrics
Measure the logical complexity of source code (can also be applied to
component-level design)
Length metrics
Provide an indication of the size of the software
Defect-related metrics
Focus on defects (i.e., bugs) found, rather than on the tests themselves
In-process metrics
Process related metrics that can be determined as testing is conducted
22
Estimate the cost or effort required to design, code, and test the software
Predict the number of errors that will be encountered during testing
Forecast the number of components and/or the number of projected source
code lines in the implemented system
24
25
26
3)
Evaluate and sum up the adjustment factors (see the next two slides)
4)
Associate a weighting factor (i.e., complexity value) with each count based
on criteria established by the software development organization
Fi refers to 14 value adjustment factors, with each ranging in value from
0 (not important) to 5 (absolutely essential)
Information
Domain Value
External Inputs
External Outputs
External Inquiries
Internal Logical Files
External Interface Files
Count total
Count
_____
_____
_____
_____
_____
x
x
x
x
x
Weighting Factor
Simple Average Complex
3
4
6
= _____
4
5
7
= _____
3
4
6
= _____
7
10
15
= _____
5
7
10
= _____
________
27
28
29
Count
3
2
2
1
4
x
x
x
x
x
Weighting Factor
Simple Average Complex
3
4
6
= 9
4
5
7
= 8
3
4
6
= 6
7
10
15
= 7
5
7
10
= 20
50
30
This data can help project managers revise their earlier estimates
This data can also help software engineers estimate the overall
implementation size of their code and assess the completeness of their
review and testing activities
31
33
Data complexity
D(i) = v(i)/[fout(i) + 1], where v(i) is the number of input and output
variables that are passed to and from module i
System complexity
C(i) = S(i) + D(i)
34
Shape complexity
size = n + a, where n is the number of nodes and a is the number of
arcs
Allows different program software architectures to be compared in a
straightforward manner
35
Size
Population: a static count of all classes and methods
Volume: a dynamic count of all instantiated objects at a given time
Length: the depth of an inheritance tree
Coupling
The number of collaborations between classes or the number of methods
called between objects
Cohesion
The cohesion of a class is the degree to which its set of properties is part
of the problem or design domain
Primitiveness
The degree to which a method in a class is atomic (i.e., the method cannot
be constructed out of a sequence of other methods provided by the class)
36
37
Measures the number of collaborations a class has with any other classes
Higher coupling decreases the reusability of a class
Higher coupling complicates modifications and testing
Coupling should be kept as low as possible
38
40