facebookincubator / oomd
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 402 units with 5,620 lines of code in units (38.6% of code).
    • 0 very complex units (0 lines of code)
    • 1 complex units (224 lines of code)
    • 15 medium complex units (908 lines of code)
    • 42 simple units (1,233 lines of code)
    • 344 very simple units (3,255 lines of code)
0% | 3% | 16% | 21% | 57%
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% | 4% | 18% | 24% | 52%
h0% | 0% | 0% | 4% | 95%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
oomd0% | 16% | 8% | 20% | 54%
oomd/plugins0% | 0% | 27% | 22% | 50%
oomd/util0% | 0% | 13% | 18% | 68%
oomd/engine0% | 0% | 27% | 13% | 59%
oomd/config0% | 0% | 13% | 23% | 62%
oomd/dropin0% | 0% | 0% | 33% | 66%
oomd/plugins/systemd0% | 0% | 0% | 43% | 56%
oomd/include0% | 0% | 0% | 40% | 59%
oomd/fixtures0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 50 most complex units
Unit# linesMcCabe index# params
224 47 2
110 18 3
73 17 3
79 16 1
59 15 2
56 14 2
59 14 1
62 13 2
63 13 2
28 12 2
47 12 1
79 12 2
44 12 1
56 11 1
47 11 1
46 11 3
42 10 3
30 10 2
32 10 1
30 10 1
36 10 0
31 9 1
60 9 1
38 9 1
25 8 2
23 8 1
47 8 1
24 8 1
38 8 1
24 8 2
31 8 1
51 8 1
31 8 1
30 7 3
22 7 0
19 7 1
10 7 1
14 7 1
47 7 2
33 7 0
30 7 1
22 7 2
19 6 2
13 6 1
20 6 2
40 6 1
51 6 3
28 6 2
26 6 1
22 6 1