View
218
Download
3
Category
Preview:
Citation preview
page 1
Sponsored by the U.S. Department of Defense © 2006 by Carnegie Mellon University
Dan Burton and Watts Humphrey
Software Engineering Institute
Carnegie Mellon University
Mining PSP Data
© 2006 by Carnegie Mellon University 2
AgendaOverview – the PSP and PSP data
Defect-removal analysis
Language-impact analysis
Summary and conclusions
SM Personal Software Process and PSP are service marks of Carnegie-Mellon University.
SM
© 2006 by Carnegie Mellon University 3
Overview - PSPThe Personal Software Process (PSP) is a processframework to guide developers in• defining their own processes• planning and tracking their own work• managing the quality of the products they produce
PSP principles• Project success is governed by team performance.• Team performance depends on member performance.• Member performance is determined by member
practices.• To consistently improve, developers must use defined
and measured processes.
© 2006 by Carnegie Mellon University 4
The PSP Course
PSP0•Current process•Basic measures
PSP1•Size estimating
•Test report
PSP2•Code reviews
•Design reviews
Team Software Process
•Teambuilding •Risk management
•Project planning and tracking
PSP2.1 Design templates
PSP1.1•Task planning
• Schedule planning
PSP0.1•Coding standard
•Process improvementproposal
•Size measurement
Introduces process disciplineand measurement2 or 3 programs
Introduces estimating andplanning
2 or 3 programs
Introduces qualitymanagement and design
4 programs
© 2006 by Carnegie Mellon University 5
Overview – PSP CourseIn the PSP course, developers write 8 to 10 programs.
The standard PSP programs are 1 or 2 size counters and7 or 8 statistical calculations.
Average program size is 107.8 lines of code.
Average development time is 3.98 hours per program.
© 2006 by Carnegie Mellon University 6
Overview - PSP Data - 1When using the PSP, developers gather and use data.
Time data• The time in minutes spent by development task• Interruption time is not counted.
Size data• Product size in db elements, pages, LOC, etc.• Categories: base, added, deleted, modified, reused
Defect data• All defects removed in compile, test, review, etc.• Type, phases injected & removed, fix time, description
© 2006 by Carnegie Mellon University 7
Overview - PSP Data - 2The PSP course has now been taught for more than tenyears.
The SEI has course data on• 31,140 programs• 3,355,882 lines of code• 123,996.53 hours of work• 221,346 defects
A great deal can be learned from analyzing these data.
© 2006 by Carnegie Mellon University 8
PSP Data AnalysesThe following charts show summary analyses of• defect injection and removal rates• productivity• development time
Many more analyses can be made.
Based on their PSP data, developers can determine• where and how to improve personal practices• how and when to best find defects• the amount of time required to do a job• the likely number of defects to be found in test
© 2006 by Carnegie Mellon University 9
PSP Data by Language
Language Programs LOC Hours DefectsC 4,984 532,529 21,460.8 36,426C++ 3,255 448,517 14,913.4 30,785C# 1,213 163,233 3,696.6 6,661VB 1,353 144,621 5,108.5 7,405Java 1,383 199,493 6,311.0 11,131Ada 286 33,060 1,869.0 3,477Total 12,474 1,521,453 53,359.2 95,885
© 2006 by Carnegie Mellon University 10
Coding Defects Injected per Hour
020406080
100120140160180200
Def
ects
In
ject
ed p
er H
ou
r in
C
od
ing
C C++ C# VB Java Ada
Prog. 1
Prog. 10
© 2006 by Carnegie Mellon University 11
Defect Fix Time vs. SizeMinutes per Test Defect vs. Program Size
02468
1012141618
0 - 100 100 - 200 200 - 300 300 - 400 400+
Program Size Range (LOC)
Tes
t T
ime
per
Def
ect
(min
ute
s)
© 2006 by Carnegie Mellon University 12
Unit Test Time vs. Quality
0
5
10
15
20
25
30
35
0 0 - 0.1 0.1 - 0.2 0.2 - 0.3 0.3 - 0.4 0.4 - 0.5 0.5 - 1.0
PQI
Tim
e p
er D
efec
t -
Min
ute
s
© 2006 by Carnegie Mellon University 13
Language Impact AnalysisThis analysis looks at the data separated by the followinglanguages and sample sizes.
Language Sample SizeC 455 to 521C++ 271 to 343C# 107 to 127VB 119 to 146Java 129 to 144
© 2006 by Carnegie Mellon University 14
Program Size
Average LOC
0
50
100
150
200
250
300
1 2 3 4 5 6 7 8 9 10
Program Number
LO
C
C++
C
C#
Java
VB
© 2006 by Carnegie Mellon University 15
Development Time
Average Development Time
0
50
100
150
200
250
300
350
400
450
500
1 2 3 4 5 6 7 8 9 10
Program Number
Dev
elo
pm
ent M
inu
tes
C++
C
C#
Java
VB
© 2006 by Carnegie Mellon University
Total DefectsAverage Total Defects
0
2
4
6
8
10
12
14
1 2 3 4 5 6 7 8 9 10
Program Number
Def
ects
C++
C
C#
VB
Java
© 2006 by Carnegie Mellon University
ProductivityAverage Productivity
0
10
20
30
40
50
60
70
80
1 2 3 4 5 6 7 8 9 10
Program Number
Lo
c/H
ou
r C++
C
C#
Java
VB
© 2006 by Carnegie Mellon University
Total Defect DensityAverage Total Def/KLOC
0
20
40
60
80
100
120
140
1 2 3 4 5 6 7 8 9 10
Program Number
Def
/KL
OC
C++
C
C#
Java
VB
© 2006 by Carnegie Mellon University
Compile Defect DensityAverage Defects/KLOC Removed in Compile
0
10
20
30
40
50
60
70
80
90
1 2 3 4 5 6 7 8 9 10
Program Number
Def
/KL
OC
C++
C
C#
Java
VB
© 2006 by Carnegie Mellon University
Test Defect DensityAverage Defects/KLOC Removed in Test
0
10
20
30
40
50
60
70
1 2 3 4 5 6 7 8 9 10
Program Number
Def
/KL
OC
C++
C
C#
Java
VB
© 2006 by Carnegie Mellon University 21
Defects/Hour Injected in Design
Average Defects/Hour Injected in Design
0
1
2
3
4
5
6
7
1 2 3 4 5 6 7 8 9 10
Program Number
Def
/Ho
ur C++
C
C#
Java
VB
© 2006 by Carnegie Mellon University 22
Defects/Hour Injected in Code
Average Defects/Hour Injected in Code
0
1
2
3
4
5
6
7
8
9
10
1 2 3 4 5 6 7 8 9 10
Program Number
Def
/Ho
ur C++
C
C#
Java
VB
© 2006 by Carnegie Mellon University 23
Defects/Hour Removed in Design Review
Average Defects/Hour Removed in Design Review
0
0.5
1
1.5
2
2.5
3
3.5
4
4.5
1 2 3 4 5 6 7 8 9 10
Program Number
Def
/Ho
ur C++
C
C#
Java
VB
© 2006 by Carnegie Mellon University 24
Defects/Hour Removed in Code Review
Average Defects/Hour Removed in Code Review
0
1
2
3
4
5
6
7
8
9
1 2 3 4 5 6 7 8 9 10
Program Number
Def
/Ho
ur C++
C
C#
Java
VB
© 2006 by Carnegie Mellon University 25
Compile + Test Time as % Total
Average Compile + Test Time as % Total Time
0
5
10
15
20
25
30
35
40
1 2 3 4 5 6 7 8 9 10
Program Number
Per
cen
t
C++
C
C#
Java
VB
© 2006 by Carnegie Mellon University 26
YieldAverage Yield
0
10
20
30
40
50
60
1 2 3 4 5 6 7 8 9 10
Program Number
Yie
ld
C++
C
C#
Java
VB
© 2006 by Carnegie Mellon University 27
ConclusionsThe Personal Software Process (PSP), when properly usedprovides comprehensive data.
Developers and their teams can use these data to managetheir work.
With the aid of PSP data, teams have improved theirproductivity and shortened development time.
The large volume of PSP data provides a valuable source ofinformation on software engineering practice.
© 2006 by Carnegie Mellon University 28
For More InformationVisit the PSP/TSP web site
http://www.sei.cmu.edu/tsp
Contact a TSP transition partner http://www.sei.cmu.edu/collaborating/partners/trans.part.psp.html
Contact SEI customer relationsPhone, voice mail, and on-demand FAX: 412/268-5800E-mail: customer-relations@sei.cmu.edu
See the booksPSP: A Self-Improvement Process for Software Engineers, by WattsHumphrey, Addison-Wesley, 2005.Winning with Software, by Watts Humphrey, Addison-Wesley, 2002TSP: Leading a Development Team, by Watts Humphrey, Addison-Wesley, 2006.TSP: Coaching Development Teams, by Watts Humphrey, Addison-Wesley, 2006.
Recommended