## 基本概念

``````    产品：软件开发过程中所生成的各种文档和程序

过程：与软件开发有关的各种活动，如软件设计等

资源：软件开发过程中所需支持，如人员、费用等

定量描述,而不是定性描述

简单属性,无需参照其它属性便可直接获得定量描述
``````

**软件测量(Measure)**是对软件产品、软件开发过程和资源复杂属性的定量描述，它 是简单属性度量值的函数，软件测量用于事后或实时状态, 如软件可靠性

``````注意点

定量描述,而不是定性描述

复杂属性-不可直接获得、需参照其它属性的度量值

实时或者事后状态,用于对历史进行评估
``````

``````任何工程化的工作都需要度量，软件工程也不例外

``````

``````辅助制定软件项目的计划

``````

``````提供软件开发的可视性

``````

``````对项目的实施情况进行评估

``````

Software Metrics Classification **软件度量的分类**

Types of Entities **实体种类：过程、产品、资源**

Types of Attributes **属性种类：内部属性、外部属性**

Types of Metrics **度量种类**

**三个方面：过程、产品、资源**

**两个层次：**

**内部属性**

``````易于度量
``````

**外部属性**

``````难以度量，但由内部属性所决定
``````

## Function Points

The function point of a software is the product of Unadjusted Function Count (UFC) and Value Adjustment Factor (VAF).软件的功能的是未调节功能计数与值调节因子的乘积。

UFC

Calculation of UFC involves physical counting of structural elements (on absolute scale) and choosing the weighting factors (on ordinal scale) according to the complexity level. The count and the weighting factor are multiplied to determine the function count.计算UFC涉及到结构元素的物理计数(绝对尺度)，和根据复杂程度选择权重因子(序列尺度)，计数和权重的乘积决定了功能的计数。

Number of user inputs: Every user input that offer clear application related data to the software is included.输入

Number of user outputs: Each user output that offers application related information to the user is identified.输出

Number of enquiries: An enquiry is described as an on-line input that produces an immediate software response via an on-line output.查询

Number of files: Each logic master file, for instance a logical group of data that might be a section of a database ort an individual file.文件

Number of external interfaces: All machine-readable interfaces (e.g. data files on disk or tape) that pass information to another system.外部接口

VAF**：**These factors are evaluated on a scale (ordinal scale) that runs from 0 to 5。共涉及14个方面的问题，序列尺度从0-5选值。

FP=UFC*VAF,Productivity = FP/PM;Documentation = pages/FP;

## Steps to Useful Software Metrics

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 10 – Determine Additional Qualifiers 决定限定词

Step 11 – Collect Data 搜集数据

Step 12 – Consider Human Factors 考虑认为因素