facebook / prophet
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 144 units with 2,971 lines of code in units (71.0% of code).
    • 0 very complex units (0 lines of code)
    • 1 complex units (143 lines of code)
    • 18 medium complex units (1,049 lines of code)
    • 25 simple units (733 lines of code)
    • 100 very simple units (1,046 lines of code)
0% | 4% | 35% | 24% | 35%
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
py0% | 4% | 35% | 24% | 35%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
python/prophet0% | 5% | 37% | 24% | 32%
python0% | 0% | 0% | 37% | 62%
python/scripts0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 50 most complex units
Unit# linesMcCabe index# params
143 42 2
62 22 7
67 21 3
60 19 2
38 18 3
72 17 2
62 17 2
42 16 1
36 16 1
40 15 1
118 15 11
82 15 5
52 15 2
40 15 5
36 14 4
35 13 6
88 13 2
49 13 3
70 13 3
61 10 3
48 9 6
27 9 5
38 9 3
23 9 4
28 9 3
29 9 7
26 9 2
26 8 1
27 8 4
26 8 5
36 8 1
21 7 1
17 7 1
28 7 4
25 7 2
30 7 3
24 6 6
25 6 6
23 6 4
22 6 4
22 6 5
38 6 2
23 6 5
40 6 1
7 5 1
35 5 2
126 5 2
29 5 2
23 5 2
23 5 2