Online Eiffel Documentation
EiffelStudio

Predefined raw metrics

The environment should make it possible, for any project, to apply the elementary metrics in the following table, each with an associated unit and a one-identifier name. Each of the major divisions of the table starts with a raw metric, for example Classes, and, when appropriate, continues with selection criteria that yield derived metrics based on that raw metric, for example Deferred_classes.

Basic CountCriterionWhat to countUnit
ClassesClasses of a cluster or systemClass
DeferredDeferred classes (not completely implemented, as opposed to "effective", completely implemented).
Invariant equippedClasses having an invariant
ObsoleteClasses marked as superseded by newer alternatives
DependentsClasses on which a class depends, directly or indirectlyClass
ClientsDirect clients
HeirsDirect heirs in inheritance structure
ParentsDirect parents in inheritance structure
SuppliersDirect suppliers
Indirect clientsIndirect clients
Indirect heirsIndirect heirs in inheritance structure
Indirect parentsIndirect parents in inheritance structure
Indirect suppliersIndirect suppliers
SelfThe class itself (value always 1)
GroupsGroups of a system or sub-clusters of a clusterGroup
CompilationsCompilations since start of projectCompilation
All featuresInherited and immediate features of a classFeature
AttributesAttributes (features represented by fields in instances of the class, as opposed to routines, represented by algorithms)
DeferredDeferred routines (not implemented, as opposed to effective features, which are implemented)
ExportedFeatures available to all clients
FunctionsValue-returning routines
Postcondition equippedRoutines having a postcondition
Precondition equippedRoutines having a precondition
QueriesValue-returning features, including both attributes and functions (routines returning a result, as opposed to procedures)
InheritedFeatures obtained from a parent (possibly in a different form)
Immediate featuresImmediate features of a classFeature
AttributesAttributes (features represented by fields in instances of the class, as opposed to routines, represented by algorithms)
DeferredDeferred routines (not implemented, as opposed to effective features, which are implemented)
ExportedFeatures available to all clients
FunctionsValue-returning routines
Postcondition equippedRoutines having a postcondition
Precondition equippedRoutines having a precondition
QueriesValue-returning features, including both attributes and functions (routines returning a result, as opposed to procedures)
All feature assertionsClauses in routine's assertion, whether inherited or notAssertion
Postcondition clausesClauses in postcondition
Precondition clausesClauses in precondition
Immediate feature assertionsClauses in routine's assertion, not inheritedAssertion
Postcondition clausesClauses in postcondition
Precondition clausesClauses in precondition
Invariant clausesClauses in invariantAssertion
Formal genericsFormal generic parameters of a classGeneric
ConstrainedFormal parameters constrained by a type other than ANY
All formalsFormal argument of a routine whether inherited or notLocal
Immediate formalsFormal argument of a routine.Local
LinesSource linesLine
All localsLocal entities of feature whether inherited or not (excluding Result)Local
Immediate localsLocal entities of feature (excluding Result)Local

A few comments on specific entries:

All metrics listed are product metrics with one exception: Compilations, the only process metric, counting the number of compilations of the project. There is room for more process metrics, such as cost estimates; this requires standard formats letting project managers enter the appropriate information, a point that future versions of the metrics policy described here may develop further.

There is also room for elementary product metrics other than those in the preceding table. In fact, every syntactic construct is a candidate for an elementary metric that simply counts the number of its occurrences; but we should limit ourselves to those that we judge interesting. The metrics literature also suggests elementary metrics assessing complexity of the control structure through properties of the control graph (McCabe), or routine coherence through such properties as the number of attributes accessed by a routine; we should only add them if we can find convincing arguments for their theoretical soundness.