4.3) Measurement and Metrics Flashcards
(9 cards)
What is a metric?
A metric is a function that determines a numerical value for the results of measuring a test object.
What is the objective when using metrics?
The objective to be achieved with the use of metrics is the quality control and improvement of results and processes.
What are some examples of aspects that can be measures in a software process?
Examples of aspects to be measured in a software process are:
* the resources consumed (time, money, personnel)
* number of errors identified in the project
* duration of individual activities
* mean correction time of identified errors
* or the number of changes to a system component
What are examples of aspects that are measured for results?
Aspects that are measured for results are, for example:
- scope (number of pages, LOC, number of model elements)
- complexity
- quality (number of identified functional errors, number of identified formal errors)
- stability (extent of changes in a given period of time)
- style (adherence to conventions, readability, freedom from redundancy).
What was the Halstead metrics developed for?
It was developed to determine the complexity of software components.
Please list the basic Halstead metrics and what they are used for.
n1
- Number of distinct operatorsn2
- Number of distinct operandsN1
- Sum of operators usedN2
- Sum of operands usedn = n1 + n2
- Size of vocabularyN = N1 + N2
- Length of implementation
What metric can be used to determine the structural complexity of components?
Fan-in and fan-out metrics
Please explain how the fan-in and fan-out metric works.
- Fan-in: metric for a component that determines the number of functions outside a component that access the functions of the component under consideration.
- Fan-out: metric for a component that returns the number of functions accessed from the component under consideration to other components. It is used as a call graph based metric.
Please list examples of metrics for object-oriented systems.
-
DIT (depth of inheritance tree)
DIT measures the depth of an inheritance tree. That is, it measures the length of the maximum path in the inheritance hierarchy from the root to the class under consideration. -
NOC (number of children)
NOC measures the number of children in a class. It is therefore examined whether subclasses exist in the inheritance hierarchy. The greater the number of subclasses, the higher degree of reuse. -
CBO (coupling between objects)
CBO is a metric for measuring relationships between classes (coupling). Two classes are coupled if methods of one class call or use methods or variables of the other class. CBO counts the number of classes that are coupled to the measured class. The higher the coupling of an object, the more difficult it is to test and reuse. -
RFC (response for a class)
RFC measures the number of potentially executable methods of a class. This includes all methods that can be called directly as well as methods from other classes that can be reached by linkage. RFC is used to determine an upper bound of the number of test cases required.