facebookincubator / fizz
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,709 units with 19,842 lines of code in units (59.3% of code).
    • 1 very complex units (438 lines of code)
    • 3 complex units (895 lines of code)
    • 43 medium complex units (2,454 lines of code)
    • 121 simple units (3,439 lines of code)
    • 1,541 very simple units (12,616 lines of code)
2% | 4% | 12% | 17% | 63%
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
cpp4% | 8% | 15% | 17% | 54%
py0% | 0% | 13% | 26% | 59%
h0% | 0% | 3% | 5% | 90%
c0% | 0% | 0% | 33% | 66%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
fizz/tool18% | 13% | 18% | 11% | 38%
fizz/server0% | 20% | 7% | 9% | 63%
fizz/record0% | 4% | 23% | 2% | 69%
build/fbcode_builder0% | 0% | 13% | 26% | 59%
fizz/protocol0% | 0% | 8% | 15% | 75%
fizz/client0% | 0% | 11% | 26% | 62%
fizz/extensions0% | 0% | 10% | 17% | 71%
fizz/crypto0% | 0% | 6% | 14% | 79%
fizz/experimental0% | 0% | 7% | 19% | 72%
fizz/util0% | 0% | 0% | 9% | 90%
build0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 50 most complex units
Unit# linesMcCabe index# params
438 59 1
501 41 1
329 36 1
65 31 1
76 25 4
53 25 1
49 23 1
62 22 1
125 22 1
91 21 8
45 21 0
40 19 2
73 19 2
118 19 0
37 17 5
41 17 1
42 17 2
65 17 2
59 17 1
55 16 4
44 16 3
52 16 1
41 15 2
23 15 1
33 15 1
52 15 1
59 15 11
66 14 2
45 14 2
57 14 1
96 14 0
128 13 3
49 13 1
40 13 1
51 13 0
31 12 3
50 12 4
9 12 2
37 12 1
27 12 1
73 12 6
27 12 1
85 12 16
115 12 1
31 11 4
31 11 2
71 11 2
24 10 3
23 10 4
29 10 3