Complexity

Concept

The Complexity KPI intends to assess the project’s risky components regarding their complexity metrics. The indicator takes into account several criteria.

SWAN complexity criteria
Figure 1. Complexity - Criteria

The Complexity indicator aggregates these metrics.

A Class or Function is considered as complex if at least half of these metrics do not respect the expected threshold. At project level, Squore provides a Complexity indicator based on the Volume and Distribution of the overall complexity.

SWAN complexity rating
Figure 2. Complexity - Rating

Formula

Distribution = (#Number of Complex "Function|Classes" / #Total "Function|Classes")

Volume = (#Size of Complex Function / #Size all Functions)

How to Track Complexity with Squore

Squore provides a treemap which distributes the modules according to their complexity.

SWAN complexity treemap
Figure 3. Complexity - Treemap

Squore also provides "complexity highlights" which sort modules by complexity.

  • List of all modules, sorted by complexity:

SWAN complexity highlights all modules
Figure 4. Complexity - Highlights: all modules
  • List of all "unstable" modules, sorted by complexity.

SWAN complexity highlights unstable modules
Figure 5. Complexity - Highlights: "unstable" modules

Squore combines the complexity and the Stability of the component over the Monitoring Period.