DependencyMetrics

Description

Computes dependency numbers from a dependency graph, such as number of nodes, number of entering vertices, and number of exiting vertices.

This is a simple tally of how many dependencies there are in a graph. It can give you a rough idea of the complexity of a given codebase, but it is not as powerful as the metrics computed by OOMetrics.

Parameters

Attribute Description Required
srcfile filename of the XML document containing the dependency graph. Yes
validate validate the input XML against its DTD. No
destfile where to write the output. If the file does not exists, it is created. If it already exists, its content is overwritten. Yes
scopeincludes the name of a package, class, or feature must match the regular expressions for it to be included in the query's focus. No
scopeexcludes the name of a package, class, or feature must NOT match the regular expressions for it to be included in the query's focus. No
packagescope select packages as part of the query's focus. No
packagescopeincludes the name of a package must match the regular expressions for it to be included in the query's focus. No
packagescopeexcludes the name of a package must NOT match the regular expressions for it to be included in the query's focus. No
classscope select classes (with their package) as part of the query's focus. No
classscopeincludes the name of a class must match the regular expressions for it to be included in the query's focus. No
classscopeexcludes the name of a class must NOT match the regular expressions for it to be included in the query's focus. No
featurescope select features (with their class and package) as part of the query's focus. No
featurescopeincludes the name of a feature must match the regular expressions for it to be included in the query's focus. No
featurescopeexcludes the name of a feature must NOT match the regular expressions for it to be included in the query's focus. No
filterincludes the name of a package, class, or feature at the other end of the dependency must match the regular expressions for the dependency to be included in the results. No
filterexcludes the name of a package, class, or feature at the other end of the dependency must NOT match the regular expressions for the dependency to be included in the results. No
packagefilter show dependencies to and/or from packages. No
packagefilterincludes the name of a package at the other end of the dependency must match the regular expressions for the dependency to be included in the results. No
packagefilterexcludes the name of a package at the other end of the dependency must NOT match the regular expressions for the dependency to be included in the results. No
classfilter show dependencies to and/or from classes. No
classfilterincludes the name of a class at the other end of the dependency must match the regular expressions for the dependency to be included in the results. No
classfilterexcludes the name of a class at the other end of the dependency must NOT match the regular expressions for the dependency to be included in the results. No
featurefilter show dependencies to and/or from features. No
featurefilterincludes the name of a feature at the other end of the dependency must match the regular expressions for the dependency to be included in the results. No
featurefilterexcludes the name of a feature at the other end of the dependency must NOT match the regular expressions for the dependency to be included in the results. No
all shortcut for packagescope, classscope, featurescope, packagefilter, classfilter, and featurefilter. No
p2p shortcut for packagescope and packagefilter. No
c2p shortcut for classscope and packagefilter. No
c2c shortcut for classscope and classfilter. No
f2f shortcut for featurescope and featurefilter. No
includes shortcut for scopeincludes and filterincludes. No
excludes shortcut for scopeexcludes and filterexcludes. No
list lists the packages, classes, and features analyzed. No
chartclassesperpackage shows distribution of classes per package. No
chartfeaturesperclass shows distribution of features per class. No
chartinboundsperpackage shows distribution of explicit inbound dependencies to packages. In a raw or minimized graph, this will show zero. No
chartoutboundsperpackage Shows distribution of explicit outbound dependencies from packages. In a raw or minimized graph, this will show zero. No
chartinboundsperclass shows distribution of explicit inbound dependencies to classes. No
chartoutboundsperclass shows distribution of explicit outbound dependencies from classes. No
chartinboundsperfeature shows distribution of explicit inbound dependencies to features. No
chartoutboundsperfeature shows distribution of explicit outbound dependencies from features. No
chartinbounds shortcut for chartinboundsperpackage, chartinboundsperclass, and chartinboundsperfeature. No
chartoutbounds shortcut for chartoutboundsperpackage, chartoutboundsperclass, and chartoutboundsperfeature. No
chartpackages shortcut for chartclassesperpackage, chartinboundsperpackage, and chartoutboundsperpackage. No
chartclasses shortcut for chartfeaturesperclass, chartinboundsperclass, and chartoutboundsperclass. No
chartfeatures shortcut for chartinboundsperfeature, and chartoutboundsperfeature. No
chartall shortcut for chartclassesperpackage, chartfeaturesperclass, chartinboundsperpackage, chartoutboundsperpackage, chartinboundsperclass, chartoutboundsperclass, chartinboundsperfeature, and chartoutboundsperfeature. No

Nested elements

None

Examples

To analyze the graph in df.xml and save the metrics report to df.metrics.txt:

  <dependencymetrics srcfile="df.xml"
                     destfile="df.metrics.txt"
                     all="yes"/>

To analyze the graph in df.xml and save the metrics report to df.metrics.txt, including value distributions:

  <dependencymetrics srcfile="df.xml"
                     destfile="df.metrics.txt"
                     all="yes"/>
                     chartall="yes"/>

Copyright © 2001-2003 Jean Tessier. All rights reserved.