GQM1
GQM1
Measurement Framework
A Goal-Based Software Measurement
Framework
1. Classifying software measures
2. Determining what to measure
2
Classifying Software Measures
In software there are three such classes
Processes: Collection of software-related activities.
Products: Artifacts, deliverables or documents that
result from a process activity.
Resources: Entities required by a process activity.
Internal and External Attributes
• An internal attribute can be measured by examining
the product, process, or resource on its own,
separate from its behavior. (Program size,
complexity, dependencies).
10
GQM
The Goal/Question/Metric (GQM) framework for
software measurement is goal-oriented.
Firstly, the goals need to be described clearly so that it
can be measured during the software development. It
consists of the following 3 basis elements:
• Goal
• Question
• Metric
GQM
• hierarchical model that follows a top-down
approach where first the goals are specified, then
questions are written and collected, and finally,
metrics are associated with each question
GQM
• Goal – improve Products, Processes or
Resources (Conceptual level)
• Question – should be specific to the goal
(Operational level)
• Metric – quantitative way in which data can
be collected to address the question you are
asking (Quantitative level)
• What is the purpose of GQM?
To ensure that you use metrics effectively
Example of GQM Approach :
A goal should specify the following things in it :
Its purpose
A process (or object)
A viewpoint
A quality issue
• Objective metrics
Based on data that does not rely on anyone’s
individual viewpoint or interpretation
Examples
Number of product downloads, processing time,
LOC, size of module, size of program
• Subjective metrics
Are those that could depend on interpretation
Examples
Product ratings by users, code quality
Example for GQM
Say you are developing a software product and you want
to know your product is “Done Right”
• Goal (G):Customer Satisfaction
Few question to address the goal
• Questions(Q):
How much of my product’s code is covered by unit tests?
How much defects are in my product?
• Metric(M):
--percentage of rejections to acceptances
--number of bugs that are placed in your product backlog
at any given time
Example 2
A Goal-Based Software Measurement Framework
Questions Who is using standard? What is coder productivity? What is code quality?
18
A Goal-Based Software Measurement Framework
• GQM example 2 – AT&T goals, questions, metrics
Goal Questions Metrics
Plan How much does the inspection process Average effort per KLOC
cost? Percentage of reinspections
Average effort per KLOC
How much calendar time does the Total KLOC inspected
inspection process take?
Monitor and What is the quality of the inspected Average faults detected per KLOC
control software? Average inspection rate
Average preparation rate
To what degree did the staff conform to Average inspection rate
the procedures? Average preparation rate
Average lines of code inspected
What is the status of the inspection Total KLOC inspected
process?
Improve How effective is the inspection process? Defect removal efficiency
Average number of faults detected
per KLOC
Average inspection rate
Average preparation rate
Average lines of code inspected
What is the productivity of the inspection Average effort per fault detected
process? Average inspection rate
Average preparation rate
Average lines of code inspected 19
A Goal-Based Software Measurement Framework
• Templates for goal definition
– Purpose – to (characterize, evaluate, predict, motivate, etc.) the (process,
product, model, metric, etc.) in order to (understand, assess, manage,
engineer, learn, improve, etc.) it.
• Example – To evaluate the maintenance process in
order to improve it.
– Perspective – Examine the (cost, effectiveness, correctness, defects,
changes, product measures, etc.) from the viewpoint of the (developer,
manager, customer, user, etc.)
• Example – Examine the cost from the viewpoint of
the manager
– Environment – The environment consists mainly of the following: process
factors, people factors, problem factors, methods, tools, constraints, etc.
• Example – the maintenance staff are poorly
motivated programmers who have limited access to
tools.
20
Sample Goal Trees (1/2)
Project planning Improve software Project tracking goal area:
goal area: Predict Evaluate the project in
the process in order process predictability Execute order to manage it
to manage it
successful project
Improve quality
Improve productivity Minimize schedule
Maximize reuse
Defect prevention goal area:
Characterize defects in order to
prevent them
Characterize the process to
understand it Prevent defects
(minimize defect fixing costs,
improve product quality)
22
Sample GQM Map for Inspections
Organizational Process Improvement Inspection Process
Goal Increase quality Increase productivity Efficiently use
inspections to
improve process
24
Determining what to measure
• The SEI has suggested that there are five levels of process ranging from ad
hoc, repeatable, defined, managed and optimizing.
• The SEI distinguishes one level from another in terms of key process
activities going on at each level.
Overview of process maturity and measurement
Maturity level Characteristics Type of metrics to use
5. Optimizing Improvement feedback to Process plus feedback for
the process changing the process
4. Managed Measured process Process plus feedback for
control
3. Defined Process defined and Product
institutionalized
2. Repeatable Process dependent on Project management
individuals
1. Initial Ad hoc Baseline 25
Level 1 : Initial
- Inputs to the process are ill-defined; while outputs are expected, the
transitions from inputs to outputs is undefined and uncontrolled.
- Similar projects may vary widely in their productivity and quality
characteristics because of lack of adequate structure and control.
- Baseline measurements are needed to provide starting point for measuring
improvement as maturity increases.
26
Level 2: Repeatable
- It identifies the inputs and outputs of the process, the constraints and the
resources used in the final product.
- The process is repeatable: proper inputs, proper outputs, but there is no
visibility into how the outputs are produced
Control
(Budget Schedule
Standards)
Input Construct the Output code
Requirements system Documentation
Resources
(Staff Tools)
A Repeatable process
27
Level 3 : Defined
- The defined process provides visibility into the “construct the system” box
- In this level the intermediate activities are defined and their inputs and
outputs are known and understood.
- All process can be examined, measured and assessed.
A defined process
28
Level 4: Managed
- You can compare contrast, the effects of changes in one activity can be traced in
the others.
- You can evaluate the effectiveness of process activities: how effective are
reviews? Configuration management? Quality assurance?.
29
Level 5 : Optimizing
- Here measure from activities are used to improve process, possibly by removing
and adding process activities, and changing the structure dynamically in response
to measurement feedback.
30
•Combining GQM with process maturity
For example
Is the set of requirements are maintainable?
Level 1: ? – ill defined requirements
Level 2 : ? – well defined and you can collect additional requirements
Level 3 :? – your visibility into the process is improved
Level 4: ?
Level 5: ?
31
Applying the framework
• In high level view of software measurement and its
objectives, many of the activities may have seemed
unrelated.
32
(Contd)
– Cost and effort estimation
– Productivity measures and models
– Data collection
– Quality models and measures
– Reliability models
– Performance evaluation and models
– Structural and complexity metrics
– Capability-maturity assessment
– Management by metrics
– Evaluation of methods and tools
33
1. Cost and effort estimation
34
(Contd)
• Where a and b are parameters determined by the
type of software to be developed.
• The model is intended for use during requirements
capture, when estimates of effort are needed.
• To use this model we need to determine the
parameters a and b.
• Bohem provides three choices for these constants,
- Determine the type of software system it is classified
it to be;
- Determine the size S of the eventual system;
- Since the system has yet to be built, we must predict
S in order to predict E.
35
• Thus it is more correct to view COCOMO as a
prediction system rather than as a model.
• Cost models often reflect a variety of attributes,
representing all of the entity types.
• For example, for more advanced versions of
COCOMO as well as other cost estimation
approaches, the inference procedure involves
numerous internal and external attributes of the
requirement specification (product) , together
with process and resource attributes subjectively
provided by users.
36
2. Productivity measures and
models
37
3. Data Collection
38
4. Quality models and measures
• Quality models usually involve product
measurement, as their ultimate goal is
predicting product quality.
• In chapter 1, we saw the cost and productivity
depends on the quality of products output
during various process.
39
5. Reliability models
40
6. Performance evaluation and models
• Measuring efficiency and product
attribute(time efficiency , space efficiency).
• Algorithmic algorithm:-high level algorithm
determine good predictor of efficiency of the
• implemented code , time efficiency
• predictor
41
7. Structural and Complexity metrics
•Single internal attribute representing
complexity can be accurate predictor of many
external quality attribute as well as process
attribute like cost and effort.
• Predictor
42
8. Capability – maturity assessment
43
9. Management by metrics
•Management use metrics to set targets for
their development projects.
• Target derived from best practice.
• E.g.->Existing project
44
10. Measurement of Methods and
Tools
•Investing new method or tools but hesitate
because of uncertainty about cost , utility,
effectiveness.
• Proposed tool tried in small project and result
are evaluated and used for later project.
45
11. A Mathematician View of Metrics
• In mathematical analysis ,a metric has a very
specific meaning: it is a rule use to describe how
far two points
• Metric is a function m defined on pairs of objects
x and y such that m(x,y) represents the distance
between x and y.
• It should satisfy some properties:
• – M(x,y)=0
• – M(x , y)=m(y , x)
• – M(x,z)<=m(x,y)+m(y,z)
46