| Metric |
Description |
 |
 |
 |
 |
 |
 |
 |
 |
| modules |
Number of Modules in an Assembly. |
|
|
|
|
|
|
|
|
| impTypes |
Number of Types that can have implementations. This is the sum
of classes and structs. |
|
|
|
|
|
|
|
|
| abstracts |
Number of defined interfaces and abstract classes.
|
|
|
|
|
|
|
|
|
| eCouplings |
Efferent Couplings. The number of types inside the "subject" module/assembly that depend on types in other modules/assemblies.
|
|
|
|
|
|
|
|
|
| aCouplings |
Afferent Couplings. The number of types in other modules/assemblies that depend on types within the "subject" module/assembly.
|
|
|
|
|
|
|
|
|
| abstractness |
Abstractness. The percentage of all types that are abstract. Abstract types include Interfaces and Abstract Classes.
|
|
|
|
|
|
|
|
|
| instability |
Instability. This is the result of eCouplings / (eCouplings + aCouplings). A value of '0' indicates stability, and '1' indicates instability. The more a "subject" module depends on other modules, relative to the extent that other modules depend on the "subject" module, the more Instable the module.
|
|
|
|
|
|
|
|
|
| distance |
Distance. The balance between Instability and Abstractness, and is computed as "|(Abstractness + Instability - 1)/2|". The optimal number is "0", as "0" represents a balance between Abstractness and Instability.
|
|
|
|
|
|
|
|
|
| classes |
Number of classes. |
|
|
|
|
|
|
|
|
| interfaces |
Number of defined interfaces. |
|
|
|
|
|
|
|
|
| enumerations |
Number of enumerations. |
|
|
|
|
|
|
|
|
| structs |
Number of structs. |
|
|
|
|
|
|
|
|
| types |
Number of Types. This is the sum of classes, enumerations,
interfaces, and structs. |
|
|
|
|
|
|
|
|
| LOC |
Lines of Code - not source code, but IL (Intermediate
Language) instructions. |
|
|
|
|
|
|
|
|
| dead |
Number of IL instructions within methods and constructors that are
unreachable. |
|
|
|
|
|
|
|
|
| events |
Number of events. |
|
|
|
|
|
|
|
|
| impInterfaces |
Number of interfaces implemented by a class or struct, or inherited
from for an interface. |
|
|
|
|
|
|
|
|
| WMC |
Weighted Methods per Class. This is the sum of Cyclomatic
Complexity of all methods and constructors in a class or struct. |
|
|
|
|
|
|
|
|
| DIT |
Depth in Tree. Inheritence depth. System.Object has a
depth of 0. All others will have a depth of 1 or more. |
|
|
|
|
|
|
|
|
| CBO |
Coupling Between Objects. Number of other classes on which a
given class depends. Classes in the base-class libraries are not counted. |
|
|
|
|
|
|
|
|
| LCOM |
Lack of Cohesion of Methods. Extent to which instance methods
use the instance fields of a class/struct. Static methods and fields,
and all forms of constructors are not counted. The range is 0 to 1, with 0
indicating no lack of cohesion, and 1 indicating a total lack of cohesion. A
lower number is generally more desirable. This implementation of LCOM only
looks at instance fields and methods and ignores statics. Also, abstract
classes are ignored, as are classes that inherit from anything other than
System.Object. This constraint is limiting, however - computing LCOM on
inherited methods/fields also leads to many odd and unmeaningful results.
Vil limits applicability of LCOM to cases where LCOM's meaning is clear and applicable.
|
|
|
|
|
|
|
|
|
| RFC |
Response for a Class. Total number of methods in the
class added with the total number of methods called by methods in the
class. |
|
|
|
|
|
|
|
|
| NOC |
Number of Children. Number of classes that directly inherit
from this class. |
|
|
|
|
|
|
|
|
| properties |
Number of properties defined in the class/struct. |
|
|
|
|
|
|
|
|
| constructors |
Number of constructors for a Type. |
|
|
|
|
|
|
|
|
| methods |
Number of methods defined within a class/struct/interface. |
|
|
|
|
|
|
|
|
| imps |
Number of implementations. Implementations are defined as
constructors and methods. |
|
|
|
|
|
|
|
|
| fields |
Number of fields within a Type. |
|
|
|
|
|
|
|
|
| CC |
Cyclomatic Complexity. Number of paths though a method.
The higher the number, the more testing effort will be required to cover all
paths. A method with no conditional constructs will have a CC of 1.
If a method/constructor has a "switch" statement, the CC metric may return a number
that is a few(2-3) higher than it would intuitively be - depending on the compiler that was used.
This is because some .Net compilers generate "odd" IL code to implement the "switch". |
|
|
|
|
|
|
|
|
| params |
Number of parameters of a method. |
|
|
|
|
|
|
|
|
| maxStack |
Maximum size of the evaluation stack of a method or
constructor at runtime. Vil does not use the maxstack that is
generated by compilers and persisted in .Net assemblies/modules. Vil
computes maxstack independently. |
|
|
|
|
|
|
|
|
| locals |
Number of local variables used within a method or constructor. |
|
|
|
|
|
|
|
|
| tryblocks |
Number of "try" blocks within a method/constructor. |
|
|
|
|
|
|
|
|