You are on page 1of 30

08/01/2024

Review

Size and Complexity are a part of


CMU-CS 462: A. Product Metrics
B. Process Metrics
Software Measurement C. Project Metrics
D. None of the above
and Analysis Cost and Schedule are a part of
A. Product Metrics
B. Process Metrics
Spring 2023-2024 C. Project Metrics
D. None of the above
Nguyen Duc Man
E: mannd@duytan.edu.vn
T: 0904235945

1 2

1
08/01/2024

Review Contents
Software measure classification
Goal-based paradigms:
Goal-Question-Metrics (GQM)
Goal-Question-Indicator-Metrics (GQIM)
Applications of GQM and GQIM

3 4

2
08/01/2024

Goal-Based Measurement (GBM) GBM Process


◼ The primary question in goal-based measurement: ◼ Determining what to measure
◼ “What do we want to know or learn?”
◼ Identifying entities
instead of “What metrics should we use?”
◼ Because the answers depend on your goals, no fixed ◼ Classifying entries to be examined
set of metrics is universally appropriate. ◼ Determining relevant goals
◼ Instead of attempting to develop general-purpose
measures, one has to describe an adaptable process
that users can use to identify and define measures ◼ Determining how to measure
that provide insights into their own development
problem. ◼ Inquire about metrics
◼ Assign metrics

5 6

5 6

3
08/01/2024

Identifying Entities Process, Product, Resource


◼ Product, process, resource [Fenton’ 91]. ◼ Process
◼ Artifacts, activities, agents [Armitage’ 94]. ◼ A collection of software related activities usually
associated with some timescale.
◼ Both schemes are incomplete and haven’t enough ◼ Different SE processes: development, maintenance,
representational power. testing, reuse, configuration and management process,
etc.
◼ E.g., neither seems to deal with entities such as
“defects”. ◼ Product
◼ Any artifacts, deliverables or documents that result from
◼ Is a defect a product, a process, or a resource? a process activity.
◼ Is defect an artifact, activity, or agent? ◼ Resource
◼ Entities required by a process activity.

7 8

7 8

4
08/01/2024

Types of Attributes Sample Process Measures /1


Process Entities Attributes Possible Measures
◼ Internal attributes development elapsed time Calendar days, working days
process milestones Calendar dates
◼ Attributes that can be measured entirely in terms
development effort Staff-hours, days, or months
of the process, product or resource itself separate phase containment Percent of total defects
from its behaviour  e.g., size found in phase where
introduced
◼ External attributes process compliance Percent of tasks complying with
standard procedures or directives
◼ Attributes that can be measured with respect to performance Number of tests passed divided by
how the process, product or resource relates to its number of tests executed
test process volume Number of tests scheduled
environment through its behaviour Number of tests
progress
 e.g., quality executed Number of
tests passed

9 1
0
9 10

5
08/01/2024

Sample Process Measures /2 Sample Product Measures /1


Process Entities Attributes Possible Measures Product Entities Attributes Possible Measures
detailed elapsed time calendar days, working days system size number of modules
design defect density: number of design number of bubbles in a data-flow
design quality
defects found in down-stream diagram number of function points
activities divided by a measure of number of physical source lines of code
product size, such as function points number of memory bytes or words
or physical source lines of code. required (or allocated)
maintenance cost dollars per year defect density defects per KLOC
staff-hours per change request defects per function
Change number of change requests point
size
request awaiting service module length physical source lines of
backlog estimated effort (staff-hours) for code logical source
pending requests statements
percent reused ratio of unchanged physical lines to total
physical lines, comments and blanks
excluded
1 12
1
11 12

6
08/01/2024

Sample Product Measures /2 Sample Resource Measures


Product Entities Attributes Possible Measures Resource Entities Attributes Possible Measures

unit number of McCabe’s complexity Assigned staff team size number of people assigned
linearly
experience years of domain experience
independent
flowpaths years of programming
document length number of pages experience
line of code statement type type names CASE tools type name of type
how produced name of production method Is used? yes/no (a binary
programming language name
classification)
language
defect type type names time start date, due calendar dates
origin name of activity where introduced date
severity an ordered set of severity classes elapsed time days
effort to fix staff-hours Execution time CPU clocks

13 14

13 14

7
08/01/2024

GQM Approach /1 Basili’s GQM


◼ Goal-Question-Metric (GQM) approach to process ◼ Basili’s GQM process model
Phase Description
metrics provides a framework for deriving measures
from organization or business goals. 1 Developing a set of corporate, division and project goals
Generating questions that define those goals as completely as
◼ The “Goal-Question-Metric” (GQM) approach is 2
possible in a quantifiable way
a proven method for driving goal-oriented Specifying measures (metrics) needed to be collected to answer
3
measures throughout a software organization. those questions and to track process and product conformance to
the goals
With GQM, we start by defining the goals we are 4 Developing mechanisms for data collection
trying to achieve, then clarifying the questions we Collecting, validating and analyzing the data in real time to provide
are trying to answer with the data we collect. 5 feedback to projects for corrective action, to assess conformance
to the goals and make recommendations for future
improvements

15 16

15 16

8
08/01/2024

STTI-KL’s GQM STTI-KL’s GQM (cont’d)


No. Phase Description
◼ GQM process model defined by the Software
Production of the Defining the data collection procedures
Technology Transfer Initiative - Kaiserslautern measurement plan and checking whether the prescribed
4
(STTI-KL) in 1995 [Gresse 1995]. data collection procedures are
No. Phase Description consistent with the project plan
Prestudy The collection of information which is Collection and Collecting measurement data according
1 relevant to the introduction of a GQM- 5 validation of the data to the defined procedures; validated
based measurement program and stored data
Identification of Based on the prestudy, the GQM goals Analysis of the data Analyzing and interpreting of the
2 the GQM goals are derived from the informal 6
organizational improvement goals and
collected data by feedback sessions
project goals Packaging the Recording the results and
7
Production of Finding out the implicit knowledge of people experiences experiences gained by the
GQM plan with respect to the measurement goal by measurement program
3
interviewing; Merge the results; Refine a
GQM plan; Review the GQM plan
17 18

17 18

9
08/01/2024

Solingen’s GQM Solingen’s GQM (cont’d)


◼ GQM process model defined by Solingen
[Solingen et al. 1999] No. Phase Procedures
No. Phase Procedures Defining the data collection steps, forms, and
3 Data using tools; Data collection start up and
Establish GQM team; Select improvement area;
1 Planning Select application project and establish a project collection training; Building a measurement support
team; Create project plan; Training and system (MSS)
promotion Preparation of a feedback session; Holding a
4 Interpretation feedback session; Reporting interpretations of
Define measurement goals; Review or produce
software process models; Conduct GQM interviews; measurement results; Cost and benefits
2 Definition Define questions and hypotheses; Review questions analysis of a measurement program
and hypotheses; Define metrics; Check on metric
consistency and completeness; Produce a GQM plan;
Produce measurement plan; Produce analysis plan;
Review plans
19 20

19 20

10
08/01/2024

GQM Approach /3
GQM Approach /2
◼ Goal: List major goals of development or
maintenance project.
◼ Question: Derive from each goal the
questions that must be answered to determine
if the goals are being met.
◼ Metrics: Decide what must be measured in
order to be able to answer the questions
adequately.

21

21 22

11
08/01/2024

GQM Approach /3
GQM: Example /1

Example from Fenton’s Book

24

23 24

12
08/01/2024

GQM: Example /1 GQM: Example /1

Example from Fenton’s Book Example from Fenton’s Book

25 26

25 26

13
08/01/2024

GQM: Example /2 GQM: Example /3


◼ You are manager for a software development team ◼ Construct a GQM graph for the goal of “improving
and you have to decide upon the release time of maintainability of your developed software”.
your product. Construct a GQM tree related to this
goal.
Size of code
Questions:
Number of
What is reliability requirement? failures discovered

Number of test cases


Goal: suitable
Release time What is current reliability? Hours of use

Number of person days


Available for testing
What are time constraints?
Days till deadline

27 far@ucalgary.ca 28

27 28

14
08/01/2024

29 30

15
08/01/2024

GQM: Data Analysis


◼ Suppose that you propose to collect data to examine the effects
of programmer experience on development effort. You are
expecting that effort (staff-hours) will decrease as the
experience of the people assigned increases (Fig. a) but the
collected data shows effort increasing with increasing
experience (Fig. b). What may be wrong?

Technology factor? under-staffing? Cognitive overload? Rapidly changing


requirements? staff morale? team-work problems?

32

31 32

16
08/01/2024

Case Study: AT&T’s GQM AT&T’s GQM /1


◼ Goal: Better code base inspection GA: Code inspection: Plan
Q1: How much does the inspection process cost?
◼ Subgoals: ◼

◼ M1-1: Average effort per KLOC


◼ Better inspection planning: [Plan] ◼ M1-2: Percentage of re-inspection
◼ Better monitor and control of the code: [Control] ◼ Q2: How much calendar time does the inspection process
◼ Improving code inspection: [Improve] take?
◼ M2-1: Average effort per KLOC
◼ M2-2: Total KLOC inspected

33

33 34

17
08/01/2024

AT&T’s GQM /2 AT&T’s GQM /3


GB: Code inspection: Monitor & control GC: Code inspection: Improve
◼ Q1: What is the quality of the inspection software? ◼ Q1: How effective is the inspection process?
◼ M1-1: Average fault detected per KLOC ◼ M1-1: Defect removal efficiency
◼ M1-2: Average inspection rate ◼ M1-2: Average fault detected per KLOC
◼ M1-3: Average preparation rate ◼ M1-3: Average inspection rate
◼ Q2: To what degree did the staff conform to procedure? ◼ M1-4: Average preparation rate
◼ M2-1: Average inspection rate ◼ M1-5: Average lines of code inspected
◼ M2-2: Average preparation rate ◼ Q2: What is the productivity of the inspection process?
◼ M2-3: Average lines of code inspected ◼ M2-1: Average effort per fault detected
◼ M2-4: Percentage of re-inspection ◼ M2-2: Average inspection rate
◼ Q3: What is the status of the inspection process? ◼ M2-3: Average preparation rate
◼ M3: Total KLOC inspected ◼ M2-4: Average lines of code inspected

35 36

18
08/01/2024

Case Study: HP’s GQM Example: HP’s GQM-A /1


Three goals: GA: Maximize customer satisfaction.
◼ QA1: What are the attributes of customer satisfaction?
◼ A: Maximize customer satisfaction ◼ MA1: Functionality, usability, reliability, performance,

supportability.
◼ B: Minimize engineering effort and schedule
◼ QA2: What are the key indicators of customer satisfaction?
◼ C: Minimize defects ◼ MA2: Survey, quality function deployment (QFD).

◼ QA3: What aspects result in customer satisfaction?


◼ MA3: Survey, QFD.

◼ QA4: How satisfied are customers?


◼ MA4: Survey, interview record, number of customers
severely affected by defects.
◼ QA5: How many customers are affected by a problem?
◼ MA5: Number of duplicate defects by severity

37 38

19
08/01/2024

Example: HP’s GQM-A /2 Example: HP’s GQM-A /2


GA: Maximize customer satisfaction. GA: Maximize customer satisfaction.
◼ QA6: How many problems are affecting the customer?
◼ MA6-1: Incoming defect rate ◼ QA8: How does installing a fix affect the customer?
◼ MA6-2: Open critical and serious defects
◼ MA8-1: Time customers operation is down
◼ MA6-3: Defect report/fix ratio
◼ MA8-2: Customers effort required during installation
◼ MA6-4: Post-release defect density
◼ QA7: How long does it take to fix a problem?
◼ MA7-1: Mean time to acknowledge problem ◼ QA9: Where are the bottlenecks?
◼ MA7-2: Mean time to deliver solution ◼ MA9: Backlog status, time spent doing different

◼ MA7-3: Scheduled vs. actual delivery activities


◼ MA7-4: Customer expectation of time to fix

39 40

20
08/01/2024

Example: HP’s GQM-B /1 Example: HP’s GQM-B /2


GB: Minimize engineering effort & schedule. GB: Minimize engineering effort & schedule.
◼ QB1: Where are the worst rework loops in the process? ◼ QB4: How maintainable is the product as changes

◼ MB1: Person-months by product-component-activity. occur?


◼ QB2: What are the total life-cycle maintenance and ◼ MB4-1: Incoming problem rate
support costs for the product? ◼ MB4-2: detect density
MB4-3: Code stability
◼ MB2-1: Person-months by product-component-activity.

◼ MB4-4: Complexity
◼ MB2-2: Person-months by corrective, adaptive,
◼ MB4-5: Number of modules changed to fix one detect
perfective maintenance. ◼ QB5: What will process monitoring cost and where
◼ QB3: What development methods affect maintenance
are the costs distributed?
costs? ◼ MB5: Person-months and costs
◼ MB3: Pre-release records of methods and post-release
◼ QB6: What will maintenance requirements be?
MB6-1: Code stability, complexity, size
costs. ◼

◼ MB6-2: Pre-release defect density

41 42

21
08/01/2024

Example: HP’s GQM-B /3 Example: HP’s GQM-B /4


GB: Minimize engineering effort & schedule. GB: Minimize engineering effort & schedule.
◼ QB7: How can we predict cycle time, reliability, and ◼ QB8: What practices yield best results?

◼ MB8: Correlations between pre-release practices


effort?
and customer satisfaction data
◼ MB7-1: Calendar time
◼ QB9: How much do the maintenance phase activities
◼ MB7-2: Person-month cost?
◼ MB7-3: Defect density ◼ MB9: Personal-months and cost

◼ MB7-4: Number of detects to fix ◼ QB10: What are major cost components?

◼ MB7-5: Defect report/fix ratio ◼ MB10: Person-months by product-component-

◼ MB7-6: Code stability


activity
◼ QB11: How do costs change over time?
◼ MB7-7: Complexity
◼ MB11: Track cost components over entity
◼ MB7-8: Number of lines to change maintenance life- cycle.

43 44

22
08/01/2024

Example: HP’s GQM-C /1 Example: HP’s GQM-C /2


GC: Minimize defects GC: Minimize defects
◼ QC1: What are key Indicators of process health and how ◼ QC4: What is the post-release quality of each module?
are we doing? ◼ MC4: Defect density, critical and serious detects.

MC1: Release schedule met, trends of defect density, serious and



◼ QC5: What are we doing right?
critical detects.
◼ MC5-1: Defect removal efficiency
◼ QC2: What are high-leverage opportunities for
◼ MC5-2: Defect report/fix ratio
preventive maintenance?
◼ MC2-1: Defect categorization ◼ QC6: How do we know when to release?
◼ MC2-2: Code stability ◼ MC6-1: Predicted defect detection and remaining

◼ QC3: Are fixes effective with less side effects? defects.


◼ MC3: Defect report/fix ratio ◼ MC6-2: Test coverage.

45 46

23
08/01/2024

Example: HP’s GQM-C /3 Exercise 4 :GQM /1


GC: Minimize defects ◼ Suppose that company X’s main business goal is to “find a
way to deal with fragile customer requirements” – that is,
◼ QC7: How effective is the development process in customer requirements that may be incomplete or that may
preventing defects? change during the software development process. For this
◼ MC7: Post-release detect density project, we want to create a measurement plan using GQM
◼ QC8: What can we predict will happen post-release technique. During the step of “identify what we want to
know or learn” we must specify the followings:
based on pre-release data?
◼ Persons affected
◼ MC8: Corrections between pre-release
◼ Products and by-products
complexity, defect density, stability, and ◼ Inputs and resources
customer survey data. ◼ Internal artifacts
◼ QC9: What defects are getting through and there causes? ◼ Activities and flowpaths

◼ MC9: Detect categorization

47 48

24
08/01/2024

Exercise 4 :GQM /2 Exercise 4 :GQM /3


◼ Identify at least 3 relevant candidates for
◼ Ask at least one question for each of the (a) -
each of the (a) - (e) for this project.
(e) that will contribute to the goal.
a) Persons affected: Who are the people that will be affected by this goal?
Customers; Project Managers; Programmers; Document personnel;
a) Persons affected: Who are the people that will be Testers
affected by this goal? b) Products and by-products:What are the products covered by this goal?
b) Products and by-products: What are the products covered by Documents; Working system; Budget
this goal? c) Inputs and resources: What resources are potentially involved?
c) Inputs and resources: What resources are potentially People; Computers and development environment; Customers
involved? d) Internal artifacts: What are the artifactsaffected?
d) Internal artifacts: What are the artifacts affected? Prototype applications; Change requests; Project history and previous
e) Activities and flowpaths: What activities are involved? metrics
e) Activities and flowpaths: What activities are involved?
Developing; Requirements gathering; Acceptance testing

49 50

25
08/01/2024

Exercise /5 Entity-Question List (Part 1)


◼ Your organization has just completed a software process ◼ Inputs and Resources
assessment. One of the findings was that your projects are
delivering software functions and documentation on time, People Are our people qualified to produce the results the customer
wants?
but customers are not as satisfied as you would like them to
Is personnel turnover hampering product quality?
be.
Subcontractors Are the practices of our subcontractors consistent with those of
◼ The process improvement team has identified “improving the activities they support?
customer satisfaction” as one of its primary goals. Computers Is the target system meeting its performance requirements?
◼ You are a project manager, and you need a set of measures Is the target system reliable?
that will help your project make progress toward this goal. Customer Do customer change requests contain the information that we
◼ Devise subgoals to achieve this goal. change requests must have to produce timely and effective changes?

Start with asking questions about entities of interest (i.e., inputs and
resources; internal artefacts; activities and flows; products and by-
products)

51 52

26
08/01/2024

Entity-Question List (Part 2) Entity-Question List (Part 3)


◼ Internal Artifacts ◼ Activities and Flowpaths

Customer How large is our backlog of customer change requests? Development Is development progress visible to the customer?
change Where are the backlogs occurring? Testing Are our testing procedures adequate for the operational use of the
requests system?
(work in process) Does the customer accept the testing procedure and test results?
Fixing Is the response time for fixing bugs compatible with customer
constraints?
Is change control adhered to?
Are high-priority changes getting implemented in a timely fashion?
Are status and progress visible to the customer?

53 54

27
08/01/2024

Entity-Question List (Part 4) Grouping /1


◼ Products and By-products Grouping #1 Are the documents we produce readable?
Documents Are the documents we produce readable? (documents) Is it possible to trace system features from one document to the next?
Is it possible to trace system features from one document to the next? Are documents concise and complete?
Are documents concise and complete? Is the terminology correct?
Is the terminology correct?
Grouping #2 Is the source code consistent with the documents?
Source code Is the source code consistent with the documents? (software Is the source code error free?
& compiled Is the source code error free?
products product) Does source code follow programming standards?
Does source code follow programming standards?
Is the system response time adequate?
Is the system response time adequate?
Is the man-machine interface satisfactory? Is the man-machine interface satisfactory?
Is the target system meeting its performance requirements?
Plans Are plans consistent with customer constraints?
Are they kept up to date? Is the target system reliable?
Are plans and changes communicated to the customer? Is change control adhered to?
Budget Are budgets consistent with plans? Are testing procedures adequate for operational use of the system?
Are budgets consistent with customer constraints?

55 56

28
08/01/2024

Grouping /2 Grouping /3
Grouping #3 Are plans consistent with customer constraints? Grouping #5 Are plans and changes communicated to the customer?
(project Are they kept up to date? (communications) Is development progress visible to the customer?
management) Are budgets consistent with plans? Does the customer accept the testing procedure and test
Are budgets consistent with customer constraints? results?
Grouping #4 Do customer change requests contain the information that we must Are status and progress of change requests visible to the
have to produce timely and effective changes? customer?
(change
management) How large is our backlog of customer change requests? Other Are our people qualified to produce the results the customer
Is the response time for fixing bugs compatible with customer wants?
constraints? Is personnel turnover hampering product quality?
Is change control adhered to? Are the practices of our subcontractors consistent with those of
Are high-priority changes getting implemented in a timely the activities they support?
fashion?

57 58

29
08/01/2024

Derived Subgoals
Subgoal #1 Improve readability and traceability of
documents.
Subgoal #2 Improve reliability and performance of released
code.
Subgoal #3 Improve monitoring of plans and budgets.
Subgoal #4 Improve performance of the change management
process.
Subgoal #5 Improve communications with the customer.
Subgoal #6 Assess qualification of the personnel.
#6 not directly related to the project manager

59 60

30

You might also like