facebook / yoga
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,710 units with 13,328 lines of code in units (43.5% of code).
    • 3 very complex units (1,143 lines of code)
    • 8 complex units (1,277 lines of code)
    • 19 medium complex units (1,097 lines of code)
    • 33 simple units (817 lines of code)
    • 1,647 very simple units (8,994 lines of code)
8% | 9% | 8% | 6% | 67%
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
cpp12% | 16% | 14% | 7% | 49%
java14% | 0% | 5% | 7% | 72%
js7% | 14% | 7% | 5% | 65%
h0% | 0% | 0% | 1% | 98%
cs0% | 0% | 0% | 4% | 95%
m0% | 0% | 0% | 19% | 80%
cc0% | 0% | 0% | 0% | 100%
swift0% | 0% | 0% | 0% | 100%
c0% | 0% | 0% | 0% | 100%
py0% | 0% | 0% | 0% | 100%
hh0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
yoga15% | 19% | 14% | 7% | 42%
android40% | 0% | 0% | 10% | 49%
gentest14% | 0% | 2% | 1% | 81%
website0% | 30% | 13% | 8% | 46%
java0% | 0% | 9% | 3% | 86%
lib0% | 0% | 3% | 5% | 91%
csharp0% | 0% | 0% | 4% | 95%
javascript0% | 0% | 0% | 6% | 93%
YogaKit0% | 0% | 0% | 12% | 87%
benchmark0% | 0% | 0% | 0% | 100%
testutil0% | 0% | 0% | 0% | 100%
util0% | 0% | 0% | 0% | 100%
ROOT0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 50 most complex units
Unit# linesMcCabe index# params
736 141 15
234 109 3
173 58 7
173 43 14
234 38 15
175 35 17
176 34 11
176 31 14
113 31 0
141 30 3
89 29 2
67 19 13
62 17 3
100 16 4
42 15 7
82 15 13
68 15 5
74 14 4
126 13 5
30 13 1
61 12 7
91 12 0
29 12 1
92 11 10
30 11 4
26 11 1
28 11 2
31 11 1
25 11 2
33 11 2
14 10 1
51 10 4
32 10 2
29 10 4
32 9 2
39 9 2
16 9 3
56 9 4
13 9 1
13 9 1
12 9 2
17 8 1
12 8 5
26 8 1
30 8 2
35 8 1
30 7 5
20 7 5
26 7 4
26 7 6