facebook / fresco
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 4,432 units with 35,554 lines of code in units (63.7% of code).
    • 0 very complex units (0 lines of code)
    • 3 complex units (262 lines of code)
    • 45 medium complex units (2,120 lines of code)
    • 167 simple units (5,006 lines of code)
    • 4,217 very simple units (28,166 lines of code)
0% | <1% | 5% | 14% | 79%
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
java0% | <1% | 3% | 14% | 81%
c0% | 0% | 44% | 15% | 39%
cpp0% | 0% | 10% | 16% | 72%
kt0% | 0% | 8% | 9% | 82%
py0% | 0% | 17% | 13% | 69%
h0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
drawee0% | 2% | 5% | 15% | 76%
imagepipeline0% | <1% | 6% | 14% | 77%
vito0% | 1% | 2% | 16% | 79%
native-filters0% | 0% | 48% | 13% | 38%
animated-gif0% | 0% | 24% | 9% | 66%
imagepipeline-base0% | 0% | 5% | 15% | 78%
static-webp0% | 0% | 3% | 25% | 71%
animated-drawable0% | 0% | 7% | 14% | 78%
drawee-backends0% | 0% | 3% | 12% | 84%
ROOT0% | 0% | 17% | 13% | 69%
drawee-span0% | 0% | 8% | 0% | 91%
fbcore0% | 0% | 0% | 7% | 92%
native-imagetranscoder0% | 0% | 0% | 17% | 82%
tools0% | 0% | 0% | 21% | 78%
animated-base0% | 0% | 0% | 9% | 90%
imagepipeline-backends0% | 0% | 0% | 33% | 66%
animated-gif-lite0% | 0% | 0% | 12% | 87%
imagepipeline-native0% | 0% | 0% | 8% | 91%
imagepipeline-base-test0% | 0% | 0% | 5% | 94%
ui-common0% | 0% | 0% | 13% | 86%
memory-types0% | 0% | 0% | 0% | 100%
animated-webp0% | 0% | 0% | 0% | 100%
imagepipeline-test0% | 0% | 0% | 0% | 100%
middleware0% | 0% | 0% | 0% | 100%
viewport0% | 0% | 0% | 0% | 100%
soloader0% | 0% | 0% | 0% | 100%
mockito-config0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 50 most complex units
Unit# linesMcCabe index# params
60 50 1
111 49 3
91 26 4
37 25 1
38 21 8
72 21 1
94 20 4
93 20 6
86 18 1
28 18 0
81 18 5
72 18 4
18 17 1
82 16 4
25 15 1
54 15 0
52 14 2
20 14 1
67 14 5
40 13 2
77 13 2
49 13 1
64 13 4
61 13 1
68 13 5
33 13 1
16 12 1
17 12 0
54 12 6
49 12 3
63 12 7
38 12 1
34 12 1
50 12 4
31 12 2
27 11 2
35 11 2
46 11 2
30 11 2
37 11 2
36 11 3
67 11 4
43 11 2
38 11 4
26 11 2
32 11 4
15 11 0
25 11 3
56 10 1
32 10 2