awslabs / diagram-maker-plugin-minimap
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 69 units with 839 lines of code in units (53.2% of code).
    • 0 very long units (0 lines of code)
    • 2 long units (154 lines of code)
    • 8 medium size units (214 lines of code)
    • 15 small units (241 lines of code)
    • 44 very small units (230 lines of code)
0% | 18% | 25% | 28% | 27%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
ts0% | 22% | 22% | 24% | 30%
tsx0% | 0% | 50% | 43% | 6%
js0% | 0% | 0% | 60% | 39%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
integ/WideMinimap0% | 88% | 0% | 0% | 11%
integ/TallMinimap0% | 88% | 0% | 0% | 11%
integ0% | 0% | 31% | 34% | 34%
src/component0% | 0% | 50% | 43% | 6%
src/state0% | 0% | 48% | 37% | 13%
ROOT0% | 0% | 0% | 60% | 39%
src/service0% | 0% | 0% | 40% | 59%
cypress/common0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
export function renderDiagramMaker()
in integ/WideMinimap/render.ts
77 4 0
export function renderDiagramMaker()
in integ/TallMinimap/render.ts
77 4 0
public render()
in src/component/minimap/Minimap.tsx
38 2 0
export function handleMinimapEvent()
in src/state/minimapActionDispatcher.ts
32 12 2
28 2 1
26 4 2
private getMinimapNode()
in src/component/minimap/Minimap.tsx
23 1 2
23 4 2
23 2 2
21 2 2
private getCanvasSize()
in src/component/minimap/Minimap.tsx
19 2 3
19 4 2
public render()
in src/component/mininode/MiniNode.tsx
18 1 0
18 4 2
18 4 2
18 1 2
apply()
in DeclarationBundlePlugin.js
17 1 1
17 4 2
17 3 1
private renderMinimapNodes()
in src/component/minimap/Minimap.tsx
16 1 2