facebookincubator / FBOpenSSH
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 251 units with 5,333 lines of code in units (5.1% of code).
    • 3 very complex units (840 lines of code)
    • 1 complex units (175 lines of code)
    • 7 medium complex units (416 lines of code)
    • 20 simple units (836 lines of code)
    • 220 very simple units (3,066 lines of code)
15% | 3% | 7% | 15% | 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
c16% | 3% | 7% | 15% | 56%
cc0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
openbsd-compat61% | 0% | 7% | 3% | 26%
regress61% | 32% | 0% | 5% | 0%
ROOT0% | 0% | 9% | 20% | 70%
regress/misc/fuzz-harness0% | 0% | 0% | 0% | 100%
openbsd-compat/regress0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 50 most complex units
Unit# linesMcCabe index# params
328 116 8
321 92 4
191 70 1
175 48 1
62 16 8
53 16 7
115 16 8
23 15 1
39 12 2
62 12 6
62 11 8
33 10 7
29 10 2
39 10 7
16 9 2
59 9 2
59 9 2
48 9 5
49 8 3
44 8 2
29 8 1
24 7 3
24 7 3
38 7 3
57 7 2
57 7 2
32 7 6
85 7 6
34 6 5
29 6 8
51 6 2
22 5 7
39 5 5
28 5 6
27 5 6
19 5 2
26 5 2
10 5 1
20 5 3
20 5 2
33 5 4
16 5 3
25 5 7
18 5 2
13 5 3
51 5 6
8 4 5
14 4 2
14 4 2
12 4 1