Prev Up Next
code metrics give you a quick overview on certain system attributes
and allow you to identify code smells, that is, pieces of your code
that may require refactoring.
Bauhaus toolkit measures the following source code
N .B.: The reason why
we have implemented these metrics and no others is simply that this
collection was explicitly asked for by an industrial partner.
Generally, we follow the Goal-Question-Metric approach in which we
first elicit the goal to be achieved, then ask specific questions
related to the goal, and finally select the metrics to answer these
questions. It is interesting to note that we were able to implement
these three non-trivial metrics in just two person days.
- Lines of Code per
Function: the number of lines of code for a function
- Cyclomatic McCabe
Complexity: the number of decision nodes in the function body plus
one; a decision node is a predicate at which control flow
- Maximal Nesting:
the maximal syntactic nesting of statements in the body of a
Last modified: Tue Aug 26 11:38:40 MET DST 2003