Prev  Next  Down  SDMetrics  the UML design measurement tool 
Metric: NumCls  Category: Size 
The number of classes in the package. Counts all classes, regardless of their visibility (public, protected, private, or package), or abstractness. 
Metric: NumCls_tc  Category: Size 
The number of classes in the package, its subpackages, and so on. This is the sum of metric NumCls for this package, and all its direct and indirect subpackages. 
Metric: NumOpsCls  Category: Size 
The number of operations in the classes of the package. This is the sum of metric NumOps, taken over all classes in this package, and more finegrained measure of the size of the package. 
Metric: NumInterf  Category: Size 
The number of interfaces in the package. Like metric NumCls, this counts all interfaces, regardless of their visibility. 
Metric: R  Category: Complexity 
The number of relationships between classes and interfaces in the package. There is a dependency from class or interface C to class or interface D if

Metric: H  Category: Cohesion 
Relational cohesion. This is the average number of internal relationships per class/interface, and is calculated as the ratio of R+1 to the number of classes and interfaces in the package.

Metric: Ca  Category: Coupling (export) 
Afferent coupling. The number of elements outside this package that depend on classes or interfaces in this package. The dependencies considered are the same ones listed with metric R.

Metric: Ce  Category: Coupling (import) 
Efferent coupling. The number of elements outside this package that classes or interfaces in this package depend on. The dependencies considered are the same ones listed with metric R.

Metric: I  Category: not specified 
Instability or ease of change. This is the ratio of efferent coupling (metric Ce) to total coupling (Ce+Ce). Values of metric I range between 0 and 1. A value close to 0 indicates a package that does not rely much on other packages, but is heavily relied upon by other packages. Such a package should be stable, because it is hard to change: changes to the package potentially have a large impact on the model ("ripple effects"). A value close to 1 indicates a package that mostly relies on other packages, but that itself is not much relied upon. Such a package can be unstable, because it is easy to change: changes to the package are not likely to have a large impact on the model. 
Metric: A  Category: not specified 
Abstractness (or generality) of the package. This is the ratio of abstract classes and interfaces in the package to the total number of interfaces and classes in the package. Values range from 0 to 1. Zero indicates packages without interfaces or abstract classes, 1 indicates a package consisting only interfaces and abstract classes.

Metric: D  Category: not specified 
Distance from the main sequence. Package design should aim to strike a balance between instability and abstractness of the packages. A stable package should be abstract, so that changes to the package are merely extensions that do not affect existing clients of the package. An unstable package is easy to change and can therefore be concrete. The StableAbstractionsPrinciple (SAP) says that a package should be as abstract as it is stable. With abstractness measured by metric A, and stability measured by metric I, the SAP demands that A+I be close to 1. If you plot A vs. I in a graph, the "main sequence" is the theoretical optimal line where A+I=1. Metric D is the distance of the package from the main sequence, and is calculated as (A+I1)*sqrt(2). Values range from sqrt(2) to +sqrt(2). Values close to zero indicate packages that adhere to the SAP. A large negative value indicates a package that is concrete and stable (A and I close to 0). Such a package can be "painful" because it is not extensible and prone to change. A large positive value indicates a package that is abstract and unstable. Such a package is extensible but has few dependents, and is therefore useless.

Metric: DN  Category: not specified 
Normalized distance D' from the main sequence. This is a variation of metric D that has been normalized to range between 0 and 1. It is calculated as A+I1. Values close to zero indicate packages that adhere to the SAP (see metric D).

Metric: Nesting  Category: Nesting 
Nesting level of the package in the package hierarchy. Top level packages have nesting level 0, their subpackages are at level 1, and so on. 
Metric: ConnComp  Category: Cohesion 
The connected components formed by the classes and interfaces of the package. The classes and interfaces of a package, and their dependencies, form a graph. This metric counts the number of connected components of that graph. Ideally, all classes and interfaces of the package should be related directly or indirectly, so that there is only one connected component. If there are two or more connected components, you may consider moving some classes or interfaces to other packages, or splitting up the package.

Metric: Dep_Out  Category: Coupling (import) 
The number of UML dependencies where the package is the client. See also Dep_Out for classes. 
Metric: Dep_In  Category: Coupling (export) 
The number of UML dependencies where the package is the supplier. See also Dep_In for classes. 
Metric: DepPack  Category: Coupling (import) 
The number of packages on which classes and interfaces of this package depend. A package P depends on a package P' if
This metric is similar to metric Ce, the difference is that Ce counts the individual classes or interfaces that are depended upon. 
Metric: MsgSent_Outside  Category: Coupling (import) 
The number of messages sent to instances of classes outside the package. The metric counts, for instances of classes of this package, the messages they send to instances of classes from other packages. That is, outgoing messages that cross the package boundary. Note that messages to unclassified instances are not counted here. 
Metric: MsgRecv_Outside  Category: Coupling (export) 
The number of messages received by classifier instances of classes outside the package. The metric counts, for instances of classes of this package, the messages they receive from instances of classes from other packages. That is, incoming messages that cross the package boundary. Note that messages from unclassified instances are not counted here. 
Metric: MsgSent_within  Category: Complexity 
The number of messages sent between classifier instances of classes in the package. The metric counts, for instances of classes of this package, the number of messages they send to themselves or other instances of classes from this package. Note that messages to unclassified instances are not counted here. 
Metric: Diags  Category: Diagram 
The number of times the package appears on a diagram. 
Prev  Up  Next 
Appendix B.2 "Interface Metrics"  Contents  Appendix B.4 "Interaction Metrics" 