awslabs / qldb-workbench
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 40 units with 990 lines of code in units (44.0% of code).
    • 2 very long units (400 lines of code)
    • 1 long units (94 lines of code)
    • 8 medium size units (250 lines of code)
    • 8 small units (127 lines of code)
    • 21 very small units (119 lines of code)
40% | 9% | 25% | 12% | 12%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
tsx52% | 12% | 16% | 11% | 7%
ts0% | 0% | 55% | 16% | 28%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
src/core45% | 0% | 28% | 12% | 13%
src/mode0% | 95% | 0% | 0% | 4%
src0% | 0% | 0% | 100% | 0%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
export default()
in src/core/DrawerItems.tsx
279 17 7
export default()
in src/core/Results.tsx
121 5 11
constructor()
in src/mode/PartiQLMode.tsx
94 1 0
42 8 3
function prepareIonView()
in src/core/Results.tsx
41 2 2
export function execute()
in src/core/Results.tsx
36 5 3
32 8 2
function prepareTableView()
in src/core/Results.tsx
27 1 1
export function openLedger()
in src/core/session.ts
26 2 1
25 3 3
render()
in src/core/Composer.tsx
21 1 0
19 3 0
export function flattenQueryStats()
in src/core/query-history.ts
19 1 1
function prepareQueryStatsView()
in src/core/Results.tsx
19 2 1
function TabPanel()
in src/core/Results.tsx
18 2 1
getCompletions: function()
in src/core/Composer.tsx
16 1 5
function findAllHeaders()
in src/core/Results.tsx
13 5 1
getCompletions: function()
in src/core/Composer.tsx
12 1 5
11 1 1
function append()
in src/core/query-history.ts
10 1 1