facebookexperimental / MIRAI
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,124 units with 18,026 lines of code in units (50.1% of code).
    • 4 very complex units (1,697 lines of code)
    • 4 complex units (699 lines of code)
    • 36 medium complex units (4,129 lines of code)
    • 58 simple units (2,799 lines of code)
    • 1,022 very simple units (8,702 lines of code)
9% | 3% | 22% | 15% | 48%
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
rs10% | 4% | 25% | 17% | 42%
h0% | 0% | 0% | <1% | 99%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
checker/src10% | 4% | 26% | 17% | 40%
include0% | 0% | 0% | <1% | 99%
standard_contracts/src0% | 0% | 0% | 0% | 100%
checker0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 50 most complex units
Unit# linesMcCabe index# params
577 271 2
559 116 2
331 88 3
230 51 2
171 38 2
147 34 2
169 32 2
212 28 1
355 25 2
113 24 2
169 23 5
129 22 3
436 22 3
277 22 3
99 21 2
84 21 2
130 19 5
87 19 2
82 19 2
149 18 5
100 17 1
64 17 3
75 17 2
165 17 2
136 16 1
112 16 6
63 15 3
68 14 2
86 14 2
90 13 2
31 12 3
43 12 2
85 12 0
99 12 3
18 12 2
47 12 2
102 12 2
111 11 3
60 11 3
82 11 5
69 11 6
160 11 2
92 11 2
61 11 1
31 10 2
70 10 3
50 10 3
44 10 2
232 9 4
105 9 4