aws-amplify / maplibre-gl-js-amplify
Unit Size

The distribution of size of units (measured in lines of code).

Intro
  • Unit size measurements show the distribution of size of units of code (methods, functions...).
  • Units are classified in four categories based on their size (lines of code): 1-20 (small units), 20-50 (medium size units), 51-100 (long units), 101+ (very long units).
  • You should aim at keeping units small (< 20 lines). Long units may become "bloaters", code that have increased to such gargantuan proportions that they are hard to work with.
Learn more...
Unit Size Overall
  • There are 22 units with 228 lines of code in units (24.3% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 3 medium size units (72 lines of code)
    • 4 small units (57 lines of code)
    • 15 very small units (99 lines of code)
0% | 0% | 31% | 25% | 43%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
ts0% | 0% | 31% | 25% | 43%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
src0% | 0% | 31% | 25% | 43%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
forwardGeocode: async()
in src/AmplifyMapLibreGeocoder.ts
27 3 1
export function createDefaultIcon()
in src/createDefaultIcon.ts
23 1 0
reverseGeocode: async()
in src/AmplifyMapLibreGeocoder.ts
22 4 1
export function drawClusterLayer()
in src/drawClusterLayer.ts
20 1 0
constructor()
in src/AmplifyMapLibreRequest.ts
15 4 2
render: function()
in src/createMarker.ts
11 1 0
11 1 0
export function createMarker()
in src/createMarker.ts
10 4 1
function deselectPoint()
in src/drawUnclusteredLayer.ts
10 2 0
function addUnclusteredMarkerImages()
in src/drawUnclusteredLayer.ts
10 1 0
export function drawPoints()
in src/drawPoints.ts
10 1 0
8 4 1
export function createAmplifyGeocoder()
in src/AmplifyMapLibreGeocoder.ts
8 1 1
7 3 1
7 3 1
onAdd: function()
in src/createMarker.ts
6 1 0
export function drawGeofences()
in src/drawGeofences.ts
5 1 0
5 1 1
export function drawUnclusteredLayer()
in src/drawUnclusteredLayer.ts
4 1 0
3 1 1