SDMetrics home page
The Software Design Metrics tool for the UML
Sitemap

SDMetrics currently features the following UML design metrics. The metrics cover information collected from class, package, object, and composition structure diagrams, communication and sequence diagrams, statechart and activity diagrams, as well as use case, deployment, and component diagrams.

The list shows the metrics for UML2. The metrics for UML1.3/1.4 are largely the same, or have equivalent counterparts, where applicable. Click on the name of a metric for a more detailed description of the metric.

Class metrics
MetricCategoryDescription
NumAttrSizeThe number of attributes in the class.
NumOpsSizeThe number of operations in a class.
NumPubOpsSizeThe number of public operations in a class.
SettersSizeThe number of operations with a name starting with 'set'.
GettersSizeThe number of operations with a name starting with 'get', 'is', or 'has'.
NestingThe nesting level of the class (for inner classes).
IFImplInheritanceThe number of interfaces the class implements.
NOCInheritanceThe number of children of the class (UML Generalization).
NumDescInheritanceThe number of descendents of the class (UML Generalization).
NumAncInheritanceThe number of ancestors of the class.
DITInheritanceThe depth of the class in the inheritance hierarchy.
CLDInheritanceClass to leaf depth.
OpsInhInheritanceThe number of inherited operations.
AttrInhInheritanceThe number of inherited attributes.
Dep_OutCoupling (import)The number of elements on which this class depends.
Dep_InCoupling (export)The number of elements that depend on this class.
NumAssEl_sscCouplingThe number of associated elements in the same scope (namespace) as the class.
NumAssEl_sbCouplingThe number of associated elements in the same scope branch as the class.
NumAssEl_nsbCouplingThe number of associated elements not in the same scope branch as the class.
EC_AttrCoupling (export)The number of times the class is externally used as attribute type.
IC_AttrCoupling (import)The number of attributes in the class having another class or interface as their type.
EC_ParCoupling (export)The number of times the class is externally used as parameter type.
IC_ParCoupling (import)The number of parameters in the class having another class or interface as their type.
ConnectorsComplexityThe number of connectors owned by the class.
InstSpecThe number of instance specification where the class is a classifier.
LLInstThe number of lifelines that represent a property of which this class is the type.
MsgSentCoupling (import)The number of messages sent.
MsgRecvCoupling (export)The number of messages received.
MsgSelfComplexityThe number of messages sent to instances of the same class.
DiagsDiagramThe number of times the class appears on a diagram.
Interface metrics
MetricCategoryDescription
NumOpsSizeThe number of operations in the interface.
EC_AttrCoupling (export)The number of times the interface is used as attribute type.
EC_ParCoupling (export)The number of times the interface is used as parameter type.
IC_ParCoupling (import)The number of parameters in the interface having an interface or class as their type.
AssocCouplingThe number of elements the interface has an association with.
NumDirClientsThe number of elements directly implementing the interface.
NumIndClientsThe number of elements implementing a descendent of the interface.
NumAncInheritanceThe number of ancestors of the interface.
NumDescInheritanceThe number of descendents of the interface.
DiagsDiagramThe number of times the interface appears on a diagram.
Package metrics
MetricCategoryDescription
NumClsSizeThe number of classes in the package.
NumCls_tcSizeThe number of classes in the package, its subpackages, and so on.
NumOpsClsSizeThe number of operations in the classes of the package.
NumInterfSizeThe number of interfaces in the package.
RComplexityThe number of relationships between classes and interfaces in the package.
HCohesionRelational cohesion.
CaCoupling (export)Afferent coupling.
CeCoupling (import)Efferent coupling.
IInstability or ease of change.
AAbstractness (or generality) of the package.
DDistance from the main sequence.
DNNormalized distance D' from the main sequence.
NestingNestingNesting level of the package in the package hierarchy.
ConnCompCohesionThe connected components formed by the classes and interfaces of the package.
Dep_OutCoupling (import)The number of UML dependencies where the package is the client.
Dep_InCoupling (export)The number of UML dependencies where the package is the supplier.
DepPackCoupling (import)The number of packages on which classes and interfaces of this package depend.
MsgSent_OutsideCoupling (import)The number of messages sent to instances of classes outside the package.
MsgRecv_OutsideCoupling (export)The number of messages received by classifier instances of classes outside the package.
MsgSent_withinComplexityThe number of messages sent between classifier instances of classes in the package.
DiagsDiagramThe number of times the package appears on a diagram.
Interaction metrics
MetricCategoryDescription
LifeLinesSizeThe number of lifelines participating in the interaction.
MessagesComplexityThe number of messages sent within the interaction.
SelfMessagesThe number of messages that objects in the interaction send to themselves.
CombinedFragmentsSizeThe number of combined fragments in the interaction.
OperandsSizeThe number of interaction operands of the combined fragments in the interaction.
HeightThe maximum number of messages on any of the lifelines of interaction.
CombinedFragmentNestingThe maximum nesting level of combined fragments in the interaction.
Usecase metrics
The following use case metrics are collected from use case diagrams. If use case details are described with activity or sequence diagrams, these diagrams can be used to better measure the size or complexity of the use cases.
MetricCategoryDescription
NumAssThe number of associations the use case participates in.
ExtPtsThe number of extension points of the use case.
IncludingCoupling (import)The number of use cases which this one includes.
IncludedCoupling (export)The number of use cases which include this one.
ExtendedThe number of use cases which extend this one.
ExtendingThe number of use cases which this one extends.
DiagsDiagramThe number of times the use case appears on a diagram.
Statemachine metrics
MetricCategoryDescription
TransComplexityThe number of transitions in the state machine.
TEffectsComplexityThe number of transitions with an effect in the state machine.
TGuardComplexityThe number of transitions with a guard in the state machine.
TTriggerComplexityThe number of triggers of the transitions of the state machine.
StatesSizeThe number of states in the state machine.
SActivitySizeThe number of activities defined for the states of the state machine.
CCComplexityThe cyclomatic complexity of the state-transition graph.
Activity metrics
MetricCategoryDescription
ActionsSizeThe number of actions of the activity.
ObjectNodesSizeThe number of object nodes of the activity.
PinsSizeThe number of pins on nodes of the activity.
ControlNodesSizeThe number of control nodes of the activity.
PartitionsSizeThe number of activity partitions in the activity.
GroupsSizeThe number of activity groups or regions of the activity.
ControlFlowsComplexityThe number of control flows of the activity.
ObjectFlowsComplexityThe number of object flows of the activity.
GuardsComplexityThe number of guards defined on object and control flows of the activity.
ExcHandlersComplexityThe number of exception handlers of the activity.
Component metrics
MetricCategoryDescription
NumOpsSizeThe number of operations of the component.
NumCompSizeThe number of subcomponents of the component.
NumPackSizeThe number of packages of the component.
NumClsSizeThe number of classes of the component.
NumInterfSizeThe number of interfaces of the component.
NumManifestThe number of artifacts of which this component is a manifestation.
ConnectorsComplexityThe number of connectors owned by the component.
ProvidedIFInheritanceThe number of interfaces the component provides.
RequiredIFThe number of interfaces the component requires.
Dep_OutCoupling (import)The number of outgoing UML dependencies (component is the client).
Dep_InCoupling (export)The number of incoming UML dependencies (component is the supplier).
Assoc_OutCoupling (import)The number of associated elements via outgoing associations.
Assoc_InCoupling (import)The number of associated elements via incoming associations.
DiagsDiagramThe number of times the component appears on a diagram.
Node metrics
MetricCategoryDescription
TypeThe type of node (regular, execution environment, or device).
NumOpsSizeThe number of operations of the node.
NumCompSizeThe number of components located on the node.
NumNodesSizeThe number of subnodes of the node.
NumArtSizeThe number of artifacts deployed on the node.
NumPackSizeThe number of packages of the node.
AssElCouplingThe number of elements the node is associated with.
DiagsDiagramThe number of times the node appears on a diagram.
Diagram metrics
The following set of metrics may be useful if design diagrams are to be made the subject of reviews or inspections.
MetricCategoryDescription
TypeThe type of diagram (class diagram, sequence diagram, etc.
ElementsSizeThe total number of design elements on the diagram.
ClassesSizeThe number of classes on the diagram.
InterfcSizeThe number of interfaces on the diagram.
PackagesSizeThe number of packages on the diagram.
AssocComplexityThe number of associations on the diagram.
GenrsComplexityThe number of generalizations on the diagram.
DepsComplexityThe number of UML dependencies and UML usage dependencies on the diagram.
IfRealizeComplexityThe number of interface realizations on the diagram.
InstSpecSizeThe number of instance specifications on the diagram.
LifelinesSizeThe number of lifelines on the diagram.
ConnectorsComplexityThe number of connectors on the diagram.
MessagesComplexityThe number of messages on the diagram.
ActorsSizeThe number of actors on the diagram.
UseCaseSizeThe number of use cases on the diagram.
ExtPtsSizeThe number of extension points on the diagram.
ExtendsComplexityThe number of use case extensions on the diagram.
IncludesComplexityThe number of use case includes on the diagram.