Prev - Next - Down | SDMetrics - the UML design measurement tool |
Metric: NumAttr | Category: Size |
The number of attributes in the class. The metric counts all properties regardless of their type (data type, class or interface), visibility, changeability (read only or not), and owner scope (class-scope, i.e. static, or instance attribute). Not counted are inherited properties, and properties that are members of an association, i.e., that represent navigable association ends.
|
Metric: NumOps | Category: Size |
The number of operations in a class. Includes all operations in the class that are explicitly modeled (overriding operations, constructors, destructors), regardless of their visibility, owner scope (class-scope, i.e., static), or whether they are abstract or not. Inherited operations are not counted. |
Metric: NumPubOps | Category: Size |
The number of public operations in a class. Same as metric NumOps, but only counts operations with public visibility. Measures the size of the class in terms of its public interface.
|
Metric: Setters | Category: Size |
The number of operations with a name starting with 'set'. Note that this metric does not always yield accurate results. For example, an operation
|
Metric: Getters | Category: Size |
The number of operations with a name starting with 'get', 'is', or 'has'. Note that this metric does not always yield accurate results. For example, an operation
|
Metric: Nesting | Category: not specified |
The nesting level of the class (for inner classes). Measures how deeply a class is nested within other classes. Classes not defined in the context of another class have nesting level 0, their inner classes have nesting level 1, etc. Nesting levels deeper than 1 are unusual; an excessive nesting structure is difficult to understand, and should be revised. |
Metric: IFImpl | Category: Inheritance |
The number of interfaces the class implements. This only counts direct interface realization links from the class to the interface. For example, if a class C implements an interface I, which extends some other interfaces, only interface I will be counted, but not the interfaces that I extends (even though class c implements those interfaces, too). |
Metric: NOC | Category: Inheritance |
The number of children of the class (UML Generalization). Similar to export coupling, NOC indicates the potential influence a class has on the design. If a class has a large number of children, it may require more testing of the methods in that class. A large number of child classes may indicate improper abstraction of the parent class.
|
Metric: NumDesc | Category: Inheritance |
The number of descendents of the class (UML Generalization). Counts the number of children of the class, their children, and so on. |
Metric: NumAnc | Category: Inheritance |
The number of ancestors of the class. Counts the number of parents of the class, their parents, and so on. If multiple inheritance is not used, the metric yields the same values as DIT. |
Metric: DIT | Category: Inheritance |
The depth of the class in the inheritance hierarchy. This is calculated as the longest path from the class to the root of the inheritance tree. The DIT for a class that has no parents is 0. Classes with high DIT inherit from many classes and thus are more difficult to understand. Also, classes with high DIT may not be proper specializations of all of their ancestor classes.
|
Metric: CLD | Category: Inheritance |
Class to leaf depth. The longest path from the class to a leaf node in the inheritance hierarchy below the class. |
Metric: OpsInh | Category: Inheritance |
The number of inherited operations. This is calculated as the sum of metric NumOps taken over all ancestor classes of the class. |
Metric: AttrInh | Category: Inheritance |
The number of inherited attributes. This is calculated as the sum of metric NumAttr taken over all ancestor classes of the class.
|
Metric: Dep_Out | Category: Coupling (import) |
The number of elements on which this class depends. This metric counts outgoing plain UML dependencies and usage dependencies (shown as dashed arrows in class diagrams, usage with 'use' stereotype). |
Metric: Dep_In | Category: Coupling (export) |
The number of elements that depend on this class. This metric counts incoming plain UML dependencies and usage dependencies (shown as dashed arrows in class diagrams, usage with 'use' stereotype). |
Metric: NumAssEl_ssc | Category: Coupling |
The number of associated elements in the same scope (namespace) as the class. For instance, for a class that is defined in a package p, this counts only associations with classes, interfaces, etc. in the same package p. Such associations are encouraged, because they do not cross the package boundary, and contribute to the cohesion of the package. This metric does not distinguish plain, aggregate, or composite associations, as well as incoming, outgoing, or bidirectional associations; all such associations are counted. |
Metric: NumAssEl_sb | Category: Coupling |
The number of associated elements in the same scope branch as the class. For instance, for a class that is defined in a package p, this metric only counts associations with model elements
|
Metric: NumAssEl_nsb | Category: Coupling |
The number of associated elements not in the same scope branch as the class. For a class that is defined in a package p, this counts only associations with model elements in packages that neither contain p nor are contained by p. These are the least desirable associations, because they couple otherwise unrelated packages. Such associations cannot be avoided, but their use should be minimized.
|
Metric: EC_Attr | Category: Coupling (export) |
The number of times the class is externally used as attribute type. This is the number of attributes in other classes that have this class as their type.
|
Metric: IC_Attr | Category: Coupling (import) |
The number of attributes in the class having another class or interface as their type. |
Metric: EC_Par | Category: Coupling (export) |
The number of times the class is externally used as parameter type. This is the number of parameters defined outside this class, that have this class as their type.
|
Metric: IC_Par | Category: Coupling (import) |
The number of parameters in the class having another class or interface as their type.
|
Metric: Connectors | Category: Complexity |
The number of connectors owned by the class. |
Metric: InstSpec | Category: not specified |
The number of instance specification where the class is a classifier. Similar to export coupling, the more instances of the class there are, the larger the role of the class in the system. |
Metric: LLInst | Category: not specified |
The number of lifelines that represent a property of which this class is the type. Similar to export coupling, the more lifelines there are of the class, the larger the role of the class in the system. |
Metric: MsgSent | Category: Coupling (import) |
The number of messages sent. Counts the number of messages that instances of this class send to instances of other classes, or unclassified instances.
|
Metric: MsgRecv | Category: Coupling (export) |
The number of messages received. Counts the number of messages that instances of this class receive from instances of other classes or unclassified instances.
|
Metric: MsgSelf | Category: Complexity |
The number of messages sent to instances of the same class. Counts the number of messages that instances of this class send to themselves or to other instances of the same class.
|
Metric: Diags | Category: Diagram |
The number of times the class appears on a diagram. |
Prev | Up | Next |
Appendix B: "List of Design Metrics" | Contents | Appendix B.2 "Interface Metrics" |