microsoft / powerbi-visuals-globemap
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 170 units with 2,382 lines of code in units (81.4% of code).
    • 1 very complex units (214 lines of code)
    • 1 complex units (79 lines of code)
    • 8 medium complex units (271 lines of code)
    • 19 simple units (547 lines of code)
    • 141 very simple units (1,271 lines of code)
8% | 3% | 11% | 22% | 53%
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
ts11% | 4% | 12% | 22% | 49%
js0% | 0% | 5% | 23% | 70%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
src15% | 5% | 11% | 25% | 41%
src/geocoder0% | 0% | 16% | 16% | 66%
src/lib0% | 0% | 5% | 23% | 70%
src/UrlUtils0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
public static converter()
in src/globemap.ts
214 82 3
79 26 1
public getUrl()
in src/geocoder/geocoder.ts
49 16 0
private renderMagic()
in src/globemap.ts
44 15 0
private intersectBars()
in src/globemap.ts
51 15 0
10 14 1
public getResult()
in src/geocoder/geocoder.ts
33 11 1
33 11 8
public update()
in src/globemap.ts
27 11 1
function onTouchMove()
in src/lib/OrbitControls.js
24 11 1
private initRayCaster()
in src/globemap.ts
53 10 0
private initZoomControl()
in src/globemap.ts
23 9 0
function onMouseDown()
in src/lib/OrbitControls.js
22 9 1
function onTouchStart()
in src/lib/OrbitControls.js
25 9 1
private locationQuality()
in src/geocoder/geocoder.ts
18 8 1
private registerInMemory()
in src/geocoder/geocodingCache.ts
31 8 2
function onMouseMove()
in src/lib/OrbitControls.js
14 8 1
private complete()
in src/geocoder/geocoder.ts
15 7 2
33 7 3
25 7 1