facebookincubator / FCR
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 533 units with 4,402 lines of code in units (60.9% of code).
    • 0 very complex units (0 lines of code)
    • 19 complex units (1,002 lines of code)
    • 39 medium complex units (947 lines of code)
    • 21 simple units (490 lines of code)
    • 454 very simple units (1,963 lines of code)
0% | 22% | 21% | 11% | 44%
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% | 22% | 21% | 11% | 44%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
if/py/gen-py/fbnet/command_runner_asyncio/CommandRunner0% | 28% | 24% | 12% | 34%
fbnet/command_runner0% | 0% | 8% | 7% | 84%
Most Complex Units
Top 50 most complex units
Unit# linesMcCabe index# params
77 45 2
83 43 2
83 43 2
50 37 2
55 34 2
55 33 2
50 31 2
66 30 2
50 30 2
50 30 2
46 30 2
60 28 2
38 28 2
41 27 2
41 27 2
39 27 2
38 26 2
40 26 2
40 26 2
34 25 2
34 23 2
34 23 2
26 23 2
26 23 2
34 23 2
37 21 2
26 21 2
26 21 2
31 19 2
31 19 2
31 19 2
31 19 2
24 18 2
24 18 2
24 18 2
24 18 2
24 18 2
22 18 2
33 17 1
25 17 1
25 17 2
25 17 2
25 17 2
21 16 2
22 14 2
14 14 2
14 14 2
14 14 2
14 14 2
14 14 2