mapillary / mapillary-js
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,828 units with 23,393 lines of code in units (74.2% of code).
    • 1 very complex units (148 lines of code)
    • 7 complex units (1,751 lines of code)
    • 36 medium complex units (3,142 lines of code)
    • 73 simple units (3,060 lines of code)
    • 1,711 very simple units (15,292 lines of code)
<1% | 7% | 13% | 13% | 65%
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
ts<1% | 7% | 13% | 13% | 65%
js0% | 0% | 0% | 11% | 88%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
src/component1% | 8% | 16% | 13% | 60%
src/viewer0% | 9% | 4% | 12% | 73%
src/graph0% | 12% | 26% | 20% | 40%
src/geo0% | 0% | 11% | 1% | 87%
src/render0% | 0% | 24% | 0% | 75%
src/state0% | 0% | 3% | 9% | 87%
src/util0% | 0% | 10% | 27% | 61%
src/api0% | 0% | 0% | 18% | 81%
src/tile0% | 0% | 0% | 11% | 88%
doc/src0% | 0% | 0% | 12% | 87%
src/error0% | 0% | 0% | 0% | 100%
ROOT0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 50 most complex units
Unit# linesMcCabe index# params
148 72 2
560 47 0
151 33 2
137 31 3
269 28 0
354 27 0
125 27 3
155 27 0
111 25 2
323 25 0
186 23 1
383 23 0
66 23 3
65 22 0
78 22 2
93 20 3
77 19 2
68 19 2
86 19 3
73 18 4
65 18 0
74 17 1
102 17 1
31 17 3
19 15 0
62 15 1
38 15 1
42 15 2
74 14 6
277 14 0
51 14 1
77 13 2
34 13 2
33 13 1
133 13 0
15 13 1
21 12 1
25 12 2
47 12 0
46 11 1
41 11 2
27 11 1
94 11 2
105 11 2
31 10 1
77 10 3
59 10 1
39 10 1
24 10 1
35 10 1