facebookexperimental / libunifex
Conditional Complexity

The distribution of complexity of units (measured with McCabe index).

Intro
  • Conditional complexity (also called cyclomatic complexity) is a term used to measure the complexity of software. The term refers to the number of possible paths through a program function. A higher value ofter means higher maintenance and testing costs (infosecinstitute.com).
  • Conditional complexity is calculated by counting all conditions in the program that can affect the execution path (e.g. if statement, loops, switches, and/or operators, try and catch blocks...).
  • Conditional complexity is measured at the unit level (methods, functions...).
  • Units are classified in four categories based on the measured McCabe index: 1-5 (simple units), 6-10 (medium complex units), 11-25 (complex units), 26+ (very complex units).
Learn more...
Conditional Complexity Overall
  • There are 1,328 units with 9,067 lines of code in units (40.5% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 10 medium complex units (443 lines of code)
    • 77 simple units (1,269 lines of code)
    • 1,241 very simple units (7,355 lines of code)
0% | 0% | 4% | 13% | 81%
Legend:
51+
26-50
11-25
6-10
1-5
Alternative Visuals
Conditional Complexity per Extension
51+
26-50
11-25
6-10
1-5
cpp0% | 0% | 18% | 24% | 56%
hpp0% | 0% | 2% | 12% | 85%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
include/unifex0% | 0% | 2% | 12% | 84%
source/linux0% | 0% | 27% | 22% | 49%
source/win320% | 0% | 23% | 21% | 54%
source0% | 0% | 0% | 29% | 70%
include/unifex/linux0% | 0% | 0% | 9% | 90%
include/unifex/win320% | 0% | 0% | 8% | 91%
include/unifex/detail0% | 0% | 0% | 14% | 85%
include/unifex/win32/detail0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 50 most complex units
Unit# linesMcCabe index# params
32 24 1
32 24 1
96 18 1
30 17 0
60 16 1
52 14 0
13 13 1
17 12 2
56 12 0
55 12 0
12 10 3
72 10 0
13 10 3
57 10 0
5 9 0
12 9 3
29 9 0
40 9 0
40 9 0
10 9 3
22 9 2
10 8 0
5 8 0
9 8 0
10 8 0
10 8 0
33 8 2
7 8 0
9 8 3
36 8 2
15 8 1
53 8 0
5 7 0
15 7 2
14 7 2
10 7 3
9 7 1
6 7 0
18 7 2
10 7 0
6 7 3
11 7 3
13 7 0
10 7 0
4 7 0
13 7 3
15 7 0
5 7 0
11 7 1
22 7 1