The first step to measuring excessive complexity is to measure the complexity at every level of design breakout.

For C/C++, this means every function, type, module and "folder" is measured by the items and dependencies it immediately contains.

For example, the complexity of a file is a function of the set of (top-level) entities it contains, and the relationships between those entities.

Excess complexity is measured in terms of 2 metrics:


The next step is to define when complexity becomes over-complexity.