Software Metrics
Muhammad Azeem Akbar
LUT University, Finland
Why is it important “MEASURE”?
• Software Process
• To improve it on a continuous basis
• Software Project
• During the estimation, quality control, productivity assessment, and project
control
• Measurement can be used by software engineers in decision making.
Definition
• Measure: Quantitative indication of the extent, amount, dimension, capacity or size of
some attribute of a product or process
• Example: Number of defects found in component testing. LOC of each component
• Measurement: The act to collect a measure
• Example: Collecting the defect counts. Counting LOC.
• Metric: A quantitative measure of the degree to which a system, component, or process
possesses a given attribute
• Example: defects found in component testing/LOC of code tested
• IEEE Standard Glossary of Software Engineering Terms
• Indicator: metric or combination of metrics that provide insight into the software process,
a software project or the product itself.
What does MEASURE mean?
• Quality of the product.
• Productivity assessment of the people who produce the product
• Benefits assessment derived from new software engineering methods and
tools
• Estimation baseline
• Requests justification for new tools or additional training
What does MEASURE mean?
Measures are
• collected by SW engineers
• used by SW managers.
5
Not only one METRIC category
• Process Metrics
• Product Metrics
• Project Metrics
Not only one METRIC category
• Process Metrics
• These measures used to quantify characteristics of the SW process.
• Usually related to events or things that occur.
• Examples: # defects found in test, # requirements changes, # days to complete task
...
• Project Metrics
• Used to manage the SW project “Tactic”.
• Estimating cost is the first application of Project Metrics
• Examples: estimates of SW development time based on past projects.
Not only one METRIC category
• Product Metrics
• These measurements relate to SW product and all related artifacts.
• Examples: code, design docs, test plan, user manual ...LOC, # of objects, # of pages,
# of files.
• Measures can also be used to evaluate the SW quality:
• Cyclomatic complexity: a way to measure the complexity of a module.
Process Metrics
• Process metrics are measures of the software development process, such
as
• Overall development time
• Type of methodology used
• Collected across all projects and over long periods of time.
• To provide indicators that lead to long- term software process improvement
Process Metrics
How?
• Measure Specific attributes of the process
• Derive meaningful metrics from these attributes.
• Use these metrics to provide indicators.
• The indicators lead to a strategy for improvement.
Process Metrics
• effectiveness of a software process indirectly
• set of metrics based on the outcomes that can be derived from the
process.
• outcomes include
• Errors uncovered before release of the software
• Defects delivered to and reported by end-users
• Work products delivered (productivity)
• Human effort expended
• Calendar time expended etc.
• Conformance to schedule
Process Metrics
• Private Metrics
• measures of an individual's software process.
• private to the individual or team.
• to improve an individual's performance or personal software process.
• Example: defect rate for an individual.
• Public Metrics
• measures at a team level
• public to the organization.
• to improve an organizations process maturity.
• Example: defects found after release per KLOC.
Project Metrics
• used to monitor and control the project.
• they enable a software project manager to:
• minimize the development time by making the adjustments necessary to
avoid delays and potential problems and risks.
• assess product quality on an ongoing basis
• modify the technical approach to improve quality.
Project Metrics
• measures of the software product at any stage of its development, from
requirements to installed system.
• Product metrics may measure:
• the complexity of the software design
• the size of the final program
• the number of pages of documentation produced
Software Measurement
• Direct measures
• E.g. Cost, Effort, Lines of codes (LOC), Execution Speed, Memory size,
Defects etc.
• Direct measures
• More difficult to assess
• Quality, Functionality, Complexity, Reliability, Efficiency, Maintainability etc.
Function-Oriented Metrics
• Based on “functionality” delivered by the software
• Functionality is measured indirectly using a measure called function point.
• Empirical relationship based on countable measures of software &
assessments of software complexity
Software Meaurement
• Size Oriented Metrics
• Derived from the size of the software (KLOC)
• Errors per KLOC
• Defects per KLOC
• $ Per LOC
• Errors per person
• LOC per Person-per-Mont