Sie sind auf Seite 1von 29

Software Metrics

Presentation by: AmNisar

Objectives:

Metrics (Definition) What are Software Metrics? Why Measure Software? What Should Be Measured? Software Entities Product v/s Process Software Metrics Steps Software Measurement Methods Summary

Definitions

Measure - quantitative indication of extent, amount, dimension, capacity, or size of some attribute of a product or process. - E.g., No of errors

Metrics - quantitative measure of degree to which a system, component or process possesses a given attribute. - E.g., No. of errors per line

What are Software Metrics?

The continuous application of measurement-based techniques to the software development process and its products to supply meaningful and timely management information, together with the use of those techniques to improve that process and its products.

...

There is no engineering without measurements ...

What are Software Metrics


Measurement Based Techniques
Applied To

Software Processes, Products & Services

To Supply

To Improve

Engineering & Management Information

Why Measure Software?


Software metrics are fundamental to: Plan Predict Monitor Control Evaluate

Why Measure Software?

Metrics can help us Understand more about our software products, and processes. Metrics can be used to Evaluate our software products. Metrics can be used to Predict attributes of software entities in the future. Metrics can provide the information that can Control resources and processes used to produce our software. --Estimate the cost & schedule of future projects.

What Should Be Measured?

We measure attributes of entities Attributes of software entities

Process
Product Measurement

Process Metrics
Product Metrics

Software Entities

Process: any activity related to software development.

Product: any artifact produced during software development.

Resource: money, people, hardware, software required.

Product Entities and Attributes

Product v/s Process

Process Metrics Insights of process paradigm, software engineering tasks or milestones Lead to long term process improvement Product Metrics Assesses the state of the project Track potential risks Uncover problem areas Evaluate teams ability to control quality

Software Metrics Steps


Step 1 - Identify Metrics Customers Step 2 - Target Goals Step 3 - Ask Questions Step 4 - Select Metrics Step 5 - Standardize Definitions Step 6 - Choose a Model Step 7 - Establish Counting Criteria Step 8 - Decide On Decision Criteria Step 9 - Define Reporting Mechanisms

Step 1 - Identify Metrics Customers


Who needs the information? Whos going to use the metrics? If the metric does not have a customer -do not use it. The customer of the metric is the person (or people) who will be making decisions or taking action based upon the metric; the person/people who needs the information supplied by the metric.

E.g. Specialists, Customers/Users, Software Programmers etc

Step 2 Target Goals

Software metrics programs must be designed to provide the specific information necessary to manage software projects. To improve software engineering processes. Goals are defined:

Organizational Goals -Be the low cost provider -Maintaining a high level of customer satisfaction Project Goals -Deliver the product on time -Finish the project within budget

Step 3 Ask Questions

To define the questions that need to be answered in order to ensure that each goal is being obtained.

For example, if our goal was to ship only defectfree software, we might select the questions: Is the software product adequately tested? How many defects are still undetected? Are all known defects corrected?

Step 4 Select Metrics


To select metrics that provide the information needed to answer the questions. Software metrics act as indicators and provide information for decisions and intelligent choices. A requirements statement for each metric can be formally defined in terms of one of these four functions: understand attribute evaluate in order achieve To the of the goal(s) control to entity predict

Goal-Question-Metric Approach (Above 3 described steps)

Step 5 - Standardize Definitions

The fifth step is to agree to standard definitions for the entities and their measured attributes. e.g. The terms defect report, problem report, incident report, fault report, or customer call report may be used by various organizations to mean the same thing, but unfortunately they may also refer to different entities.

Step 6 - Choose a Measurement Function

The measurement function defines how we are going to calculate the metric. Metric primitives:

-are measured directly and their measurement function typically consists of a single variable. For example, Hours Spent Preparing , Hours Spent Inspecting etc. Other Metrics: - are modeled using mathematical combinations (e.g., equations or algorithms) of base metrics or other derived metrics. E.g. Preparation Rate = loc / prep hrs.

Model selection: Use an existing model or create a new one.

Step 7 Establish a Measurement Method

The seventh step in designing a metric is to break the function down into its lowest level metric primitives.

Measurement methods are established by using standardized units of measure (e.g., inches, feet, pounds, liters, dollars, hours, days).
The measurement method defines the mapping system that is used to assign numbers to the attributes.

Step 8 Define Decision Criteria

Decision criteria is defined. Once it s decided what to measure and how to measure it, we have to decide what to do with the results. Decision criteria are the thresholds, targets, or patterns used to determine the need for action or further investigation, or to describe the level of confidence in a given result

Step 9 - Define Reporting Mechanisms


160

Open Jan-97 Feb-97 Mar-97 Apr-97 23 27 18 12

Fixed 13 24 26 18

Resolved 3 11 15 27

120

80

40

0 1st Qtr 2nd Qtr 3rd Qtr 4th Qtr

120

80

100 80 60 40 20 0 Jan

40

0 0 20 40 60 80 100 120

Mar

May

July

Software Measurement Methods

Common software measurements include:

Balanced

scorecard Bugs per line of code COCOMO DSQI (design structure quality index) Number of lines of code (SLOC) Robert Cecil Martins software package metrics Weighted Micro Function Points

Software Measurement Methods


Balanced scorecard The Balanced Scorecard (BSC) is a structured report that is used by managers to keep track of the execution of activities by the staff within their control and to monitor the consequences arising from these actions. Constructive Cost Model (COCOMO) Developed by Barry W. Boehm. Uses a basic regression formula with parameters that are derived from historical project data and current project data.

Software Measurement Methods


Source Lines Of Code (SLOC) Used to measure the size of a software program by counting the number of lines in the text of the program's source code. DSQI (design structure quality index) A metric used to evaluate a computer program's design structure and the efficiency of its modules. The metric was developed by the United States Air Force Systems Command.

Software Measurement Methods


Robert Cecil Martins software package metrics Different types of metrics methods are used.

Weighted Micro Function Points Modern software algorithm invented by Logical Solutions Software cost estimation model.

Summary

A metrics program that is based on the goals of an organization will help communicate, measure progress towards, and eventually attain those goals. People will work to accomplish what they believe to be important. Well-designed metrics with documented objectives can help an organization obtain the information it needs to continue to improve its software products, processes, and services while maintaining a focus on what is important. A practical, systematic, start-to-finish method of selecting, designing, and implementing software metrics is a valuable aid.

Any Questions?

Thank You

Das könnte Ihnen auch gefallen