aws-samples / busy-engineers-document-bucket
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 735 units with 3,712 lines of code in units (48.9% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 4 medium size units (98 lines of code)
    • 51 small units (791 lines of code)
    • 680 very small units (2,823 lines of code)
0% | 0% | 2% | 21% | 76%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
js0% | 0% | 10% | 61% | 28%
java0% | 0% | 1% | 14% | 83%
ts0% | 0% | 4% | 53% | 41%
py0% | 0% | 0% | 1% | 98%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
exercises/node-javascript0% | 0% | 10% | 61% | 28%
exercises/java0% | 0% | 1% | 14% | 83%
exercises/node-typescript0% | 0% | 5% | 53% | 40%
cdk/lib0% | 0% | 0% | 38% | 61%
dev/cloud9-generator0% | 0% | 0% | 100% | 0%
exercises/python0% | 0% | 0% | 1% | 98%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
public DocumentBundle retrieve()
in exercises/java/encryption-context-complete/src/main/java/sfw/example/esdkworkshop/Api.java
30 3 3
function retrieve()
in exercises/node-javascript/encryption-context-complete/retrieve.js
26 5 3
async function store()
in exercises/node-javascript/encryption-context-complete/store.js
21 3 2
export async function store()
in exercises/node-typescript/encryption-context-complete/src/store.ts
21 3 2
constructor()
in dev/cloud9-generator/lib/cloud9-stack.ts
20 1 3
async function store()
in exercises/node-javascript/encryption-context-start/store.js
19 3 2
async function store()
in exercises/node-javascript/multi-cmk-start/store.js
19 3 2
async function store()
in exercises/node-javascript/add-esdk-start/store.js
19 3 2
async function store()
in exercises/node-javascript/multi-cmk-complete/store.js
19 3 2
async function store()
in exercises/node-javascript/add-esdk-complete/store.js
19 3 2
export async function store()
in exercises/node-typescript/encryption-context-start/src/store.ts
19 3 2
export async function store()
in exercises/node-typescript/multi-cmk-start/src/store.ts
19 3 2
export async function store()
in exercises/node-typescript/add-esdk-start/src/store.ts
19 3 2
export async function store()
in exercises/node-typescript/multi-cmk-complete/src/store.ts
19 3 2
export async function store()
in exercises/node-typescript/add-esdk-complete/src/store.ts
19 3 2
async function list()
in exercises/node-javascript/encryption-context-start/list.js
16 1 2
async function search()
in exercises/node-javascript/encryption-context-start/search.js
16 1 3
async function list()
in exercises/node-javascript/multi-cmk-start/list.js
16 1 2
async function search()
in exercises/node-javascript/multi-cmk-start/search.js
16 1 3
async function list()
in exercises/node-javascript/encryption-context-complete/list.js
16 1 2