aws-samples / amazon-chime-media-capture-pipeline-demo
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 14 units with 326 lines of code in units (49.2% of code).
    • 1 very long units (126 lines of code)
    • 1 long units (56 lines of code)
    • 2 medium size units (62 lines of code)
    • 2 small units (34 lines of code)
    • 8 very small units (48 lines of code)
38% | 17% | 19% | 10% | 14%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
ts76% | 0% | 23% | 0% | 0%
py0% | 70% | 0% | 22% | 7%
js0% | 0% | 29% | 19% | 51%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
lib76% | 0% | 23% | 0% | 0%
src/processLambda/app0% | 70% | 0% | 22% | 7%
src/createLambda0% | 0% | 30% | 20% | 50%
client/src0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 14 longest units
Unit# linesMcCabe index# params
constructor()
in lib/media-capture-demo.ts
126 1 3
def handler()
in src/processLambda/app/app.py
56 8 2
export function addCorsOptions()
in lib/media-capture-demo.ts
38 1 1
async function putInfo()
in src/createLambda/create.js
24 2 1
def process_files()
in src/processLambda/app/app.py
18 3 4
async function getEvent()
in src/createLambda/create.js
16 2 1
await putInfo()
in src/createLambda/create.js
9 1 1
await putInfo()
in src/createLambda/create.js
9 1 1
ClientRequestToken: uuidv4()
in src/createLambda/create.js
7 1 0
def get_attendees()
in src/processLambda/app/app.py
6 1 1
ExternalUserId: uuidv4()
in src/createLambda/create.js
6 1 0
ExternalUserId: uuidv4()
in src/createLambda/create.js
6 1 0
function isEmppty()
in src/createLambda/create.js
3 1 1
await axios()
in client/src/App.js
2 2 1