p4
p4
2
Metrics for the
Analysis Model
Function Points
Introduction to Function Points(FP)
• First proposed by Albrecht in 1979; hundreds of books and papers have
been written on functions points since then
• Can be used effectively as a means for measuring the functionality
delivered by a system
• Using historical data, function points can be used to
• 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
• Derived using an empirical relationship based on
1) Countable (direct) measures of the software’s information domain
2) Assessments of the software’s complexity
4
Information Domain Values
• Number of external inputs
• Each external input originates from a user or is transmitted from another
application
• They provide distinct application-oriented data or control information
• They are often used to update internal logical files
• They are not inquiries (those are counted under another category)
• Number of external outputs
• Each external output is derived within the application and provides information
to the user
• This refers to reports, screens, error messages, etc.
• Individual data items within a report or screen are not counted separately
6
Function Point Computation
1) Identify/collect the information domain values
2) Complete the table shown below to get the count total
• Associate a weighting factor (i.e., complexity value) with each count based
on criteria established by the software development organization
3) Evaluate and sum up the adjustment factors (see the next two slides)
• “Fi” refers to 14 value adjustment factors, with each ranging in value from
0 (not important) to 5 (absolutely essential)
4) Compute the number of function points (FP)
FP = count total * [0.65 + 0.01 * sum(Fi)]
9
Function Point Example
Information Weighting Factor
Domain Value Count Simple Average Complex
External Inputs 3 x 3 4 6= 9
External Outputs 2 x 4 5 7= 8
External Inquiries 2 x 3 4 6= 6
Internal Logical Files 1 x 7 10 15 = 7
External Interface Files 4 x 5 7 10 = 20
Count total 50
10
FP another example
• It is given that the complexity weighting factors for I, O, E, F and N are
4, 5, 4, 10 and 7, respectively. It is also given that, out of fourteen
value adjustment factors that influence the development effort, four
factors are not applicable, each of the other four factors have value 3,
and each of the remaining factors have value 4. Compute the value of
function point metric.
1:0,2:0,3:0,4:0,
5:3,6:3,7:3,8:3
9-14:4
VAF = (0+0+0+0+3+3+3+3+4+4+4+4+4+4)
The value of function point metric = UPF (count total) * VAF
Here,
UPF: Unadjusted Function Point (UFP) count
VAF: Value Adjustment Factor no of external inputs:30, O:60, E:23. F:8,N:2
FP = UPF * VAF
= 1.01 * 606
= 612.06
Hierarchical Architecture Metrics
• Fan out: the number of modules immediately subordinate to the module i,
that is, the number of modules directly invoked by module i
• Structural complexity
• S(i) = f2out(i), where fout(i) is the “fan out” of module i
• 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)
• As each of these complexity values increases, the overall architectural
complexity of the system also increases
• This leads to greater likelihood that the integration and testing effort will also
increase
13
• 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
• Connectivity density (i.e., the arc-to-node ratio)
• r = a/n
• May provide a simple indication of the coupling in the software architecture
14
• size = 17 + 18 = 35
• arc-to-node ratio, r = a/n
r = 18/17 = 1.06
• Cyclomatic complexity = E - N + 2p
E - number of edges in graph
N - number of nodes in graph
p - number of connected components (often 1)
• The graph shows seven shapes(nodes), seven lines(edges), hence
cyclomatic complexity is 7-7+2 = 2
E.g. Structural complexity of a module
• Structural complexity of a module p is Cp
Cp = (fan-in * fan-out)^2
Where,
Fan-in – no. of calls to a module and # of global data variables accessed by a module
Fan-out – no. of modules called by a module and # of global data variables modified by a
module
Example:
Module x Module y Module z
Fan-in 3 5 1
Fan-out 2 7 4
Cx = (3*2)^2 = 36
Cy = (5*7)^2 = 1175
Cz = (1*4)^2 = 16
20
Metrics in the Process Domain
• We measure the effectiveness of a process by deriving a set of metrics based on outcomes of the
process such as
• Errors uncovered before release of the software
• Defects delivered to and reported by the end users
• Work products delivered
• Human effort expended
• Calendar time expended
• Conformance to the schedule
• Time and effort to complete each generic activity
21
Metrics in the Project Domain
• Project metrics enable a software project manager to
• Assess the status of an ongoing project
• Track potential risks
• Uncover problem areas before their status becomes critical
• Adjust work flow or tasks
• Evaluate the project team’s ability to control quality of software work products
• Many of the same metrics are used in both the process and project domain
• Project metrics are used for making tactical decisions
• They are used to adapt project workflow and technical activities
22
• In summary
• As quality improves, defects are minimized
• As defects go down, the amount of rework required during the project is also
reduced
• As rework goes down, the overall project cost is reduced
23
Software Measurement
• Two categories of software measurement
• Direct measures of the
• Software process (cost, effort, etc.)
• Software product (lines of code produced, execution speed, defects reported over time, etc.)
• Indirect measures of the
• Software product (functionality, quality, complexity, efficiency, reliability, maintainability, etc.)
• Project metrics can be consolidated to create process metrics for an organization
24
Size-oriented Metrics
• Derived by normalizing quality and/or productivity measures by
considering the size of the software produced
• Thousand lines of code (KLOC) are often chosen as the normalization
value
• Metrics include
• Errors per KLOC - Errors per person-month
• Defects per KLOC - KLOC per person-month
• Dollars per KLOC - Dollars per page of documentation
• Pages of documentation per KLOC
25
Defect Removal Efficiency
• Defect removal efficiency provides benefits at both the project and process
level
• It is a measure of the filtering ability of QA activities as they are applied
throughout all process framework activities
• It indicates the percentage of software errors found before software release
• It is defined as DRE = E / (E + D)
• E is the number of errors found before delivery of the software to the end user
• D is the number of defects found after delivery
• As D increases, DRE decreases (i.e., becomes a smaller and smaller fraction)
• The ideal value of DRE is 1, which means no defects are found after delivery
• DRE encourages a software team to institute techniques for finding as many
errors as possible before delivery
26
Software Project Scheduling
• Project schedule simply means a mechanism that is used to
communicate and know about that tasks are needed and has to be
done or performed and which organizational resources will be given
or allocated to these tasks and in what time duration or time frame
work is needed to be performed.
40-20-40 Distribution of Effort
40 20 40
29
Task Network
• A task set is the work breakdown structure for the project
• Also called an activity network
• It is a graphic representation of the task flow for a project
• It depicts task length, sequence, concurrency, and dependency
• Points out inter-task dependencies to help the manager ensure
continuous progress toward project completion
• The critical path
– A single path leading from start to finish in a task network
– It contains the sequence of tasks that must be completed on schedule if
the project as a whole is to be completed on schedule
30
Example Task Network
Task N
2
Task A
3 Task C Task E Task I Task J
7 8 4 5
Task M
0
Task D
5 Task K Task L
3 10
Task N
2
Task A
3 Task C Task E Task I Task J
7 8 4 5
Task M
0
Task D
5 Task K Task L
3 10
Jan Feb Mar Apr May Jun Jul Aug Sep Oct
37
Determining Earned Value
• Compute the budgeted cost of work scheduled (BCWS) for each work task
i in the schedule
– The BCWS is the effort planned; work is estimated in person-hours or
person-days for each task
– To determine progress at a given point along the project schedule, the value
of BCWS is the sum of the BCWSi values of all the work tasks that should have
been completed by that point of time in the project schedule
• Sum up the BCWS values for all work tasks to derive the budget at
completion (BAC)
• Compute the value for the budgeted cost of work performed (BCWP)
– BCWP is the sum of the BCWS values for all work tasks that have actually been
completed by a point of time on the project schedule
38
Example 1:
If it is February 12 today, and a task is scheduled to last from February 10 to February
20, then the task should be 20% complete today.
If the Task Budget (Planned Cost) is $10,000, then the BCWS for the task is:
Task BCWS = 20% x $10,000 = $2,000
Example 2:
A project has a budget of $30 000 USD. It starts on June 1 (Project Start Date) and finishes
on December 1(Project Finish Date). Total Project Duration is 183 days (about 6 months).
Suppose that today is September 1, i.e. halfway point of the project when the project should
be 50 % complete according to the plan. At this point BCWS (Budgeted Cost of Work
Scheduled) is as follows:
However, in fact, the project has been only 30% complete by September 1, i.e. halfway
point. So project BCWS (Budgeted Cost of Work Scheduled) is as follows:
40 ☺
END OF CHAPTER