Skip to content

Metrics

Along with Architectural Smells, Arcan computes a set of software metrics. This page reports the complete list of the metrics that can be computed with Arcan.

Name Scope Definition Ref
Abstractness Package The number of abstract classes (and interfaces) divided by the total number of types in a package. This metric range is [0,1], where 0 indicates a completely concrete package and 1 indicates a completely abstract package. [1]
Instability Package The package’s resilience to change. This metric range is [0,1], where 0 indicates that the package is completely stable and 1 completely unstable. This metric range is [0,1], where 0 indicates that the package is directly on the main sequence whereas 1 indicates that the package is as far away as possible from the main sequence. Small numbers are indicators of good packaging design. [1]
Distance from main sequence Package The package’s balance between abstractness and stability. [1]
Fan In Package, Class The number of ingoing dependences of a class. [1]
Fan Out Package, Class The number of outgoing dependences of a class. [1]
Lines of code Package, Class The number of lines of code of a given class or package. The metric does not count blank lines and commented lines. -
Change has occurred (CHO) Package, Class Given the project history (Git commits), it measures whether a class or package has changed or not in the current commit with respect to the previous commit. [2]
Code churn (TACH) Package, Class Givent the history of a project (git commits), it is the sum of added lines of code, deleted lines, and twice the changed lines since the last commit for a given class or package. [2]
PageRank Package, Class Estimates whether an architectural smell is located in an important part of the project, where the importance is evaluated according to how many parts of a project depend on the one involved in the architectural smell. The metric is based on the one implemented by Brin and Page. [3]
Coupling between objects Class Number of classes to which a class is coupled, that is the number of classes that a class references. The coupling beetween classes should be low, otherwise it will difficult to make changes to the system without change a lot of classes. [4]
Depth of inheritance Class The depth of inheritance tree (DIT) is a code metric that is specific to object-oriented programming. It measures the maximum length between a node and the root node in a class hierarchy. The minimum value of DIT for a class is 1. The metric range is [0, infinite]. 0 indicates a root. The minimum value for a class is 1. A value > 1 indicates that there is code reuse through inheritance. If there is a majority of values below 2, it may represent poor exploitation of the advantages of OO design and inheritance. It is recommended a maximum value of 5 since deeper trees constitute greater design complexity. [4]
Number of children Class The number of classes inheriting from a given class. [4]
Number of architectural smells Project The total number of architectural smells detected by Arcan in the analysed project. -
Number of components Project The sum of number of classes and packages of the analysed project. -

[1] R. C. Martin, J. Grenning, S. Brown, K. Henney, and J. Gorman, Clean architecture: a craftsman’s guide to software structure and design. Prentice Hall, 2018.

[2] M. O. Elish and M. A. R. Al-Khiaty, “A suite of metrics for quantifying historical changes to predict future change-prone classes in object-oriented software,” Journal of software: Evolution and Process, vol. 25, pp. 407–437, may 2013.

[3] R. Roveda, F. A. Fontana, I. Pigazzini, and M. Zanoni, “Towards an architectural debt index,” in Proceedings - 44th Euromicro Conference on Software Engineering and Advanced Applications, SEAA 2018, pp. 408–416, IEEE, aug 2018.

[4] S. R. Chidamber and C. F. Kemerer, “A metrics suite for object oriented designa metrics suite for object oriented design,” PhD Proposal, vol. 1, pp. 476–493, 1992.