facebook / wangle
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,315 units with 12,587 lines of code in units (57.7% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 19 medium complex units (998 lines of code)
    • 95 simple units (2,586 lines of code)
    • 1,201 very simple units (9,003 lines of code)
0% | 0% | 7% | 20% | 71%
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% | 0% | 14% | 26% | 59%
cpp0% | 0% | 5% | 22% | 71%
h0% | 0% | 0% | 6% | 93%
c0% | 0% | 0% | 33% | 66%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
build/fbcode_builder0% | 0% | 13% | 26% | 59%
wangle/ssl0% | 0% | 8% | 16% | 74%
wangle/acceptor0% | 0% | 3% | 16% | 80%
wangle/codec0% | 0% | 23% | 56% | 20%
wangle/example0% | 0% | 0% | 17% | 82%
wangle/client0% | 0% | 0% | 19% | 80%
wangle/channel0% | 0% | 0% | 6% | 93%
wangle/bootstrap0% | 0% | 0% | 9% | 90%
wangle/util0% | 0% | 0% | 22% | 77%
wangle/service0% | 0% | 0% | 0% | 100%
build0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 50 most complex units
Unit# linesMcCabe index# params
76 25 4
62 22 1
40 19 2
73 19 2
37 17 5
41 17 1
55 16 4
44 16 3
65 15 4
41 15 2
82 14 7
59 13 2
128 13 3
43 12 2
31 12 3
50 12 4
9 12 2
31 11 4
31 11 2
52 10 6
49 10 4
45 10 0
24 10 3
23 10 4
29 10 3
43 10 2
26 10 6
25 10 3
15 10 3
44 9 2
50 9 4
14 9 1
44 9 4
26 9 0
36 9 2
29 9 2
27 9 2
41 9 1
34 9 3
46 8 1
47 8 2
31 8 0
37 8 1
28 8 3
43 8 2
46 8 2
17 8 2
25 8 1
16 8 2
23 8 3