aws-samples / amazon-qldb-kvs-nodejs
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 58 units with 1,294 lines of code in units (84.9% of code).
    • 0 very long units (0 lines of code)
    • 6 long units (362 lines of code)
    • 19 medium size units (584 lines of code)
    • 18 small units (262 lines of code)
    • 15 very small units (86 lines of code)
0% | 27% | 45% | 20% | 6%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
ts0% | 27% | 45% | 20% | 6%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
src0% | 27% | 45% | 20% | 6%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
72 8 7
66 8 6
async getValues()
in src/QLDBKVS.ts
61 9 2
export async function upsert()
in src/UpsertDocument.ts
57 10 5
54 6 3
async setValues()
in src/QLDBKVS.ts
52 10 3
constructor()
in src/QLDBKVS.ts
47 9 3
46 3 6
44 4 3
async uploadAsFile()
in src/QLDBKVS.ts
40 5 2
async downloadAsFile()
in src/QLDBKVS.ts
39 7 2
export async function getDocumentHistory()
in src/GetDocumentHistory.ts
34 9 6
33 3 4
async getMetadata()
in src/QLDBKVS.ts
30 5 1
async getHistory()
in src/QLDBKVS.ts
30 5 3
28 4 3
async getValue()
in src/QLDBKVS.ts
27 4 2
26 4 2
24 5 4
24 5 4