aws-solutions / media-exchange-on-aws
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 7 units with 415 lines of code in units (10.7% of code).
    • 1 very long units (124 lines of code)
    • 3 long units (200 lines of code)
    • 2 medium size units (78 lines of code)
    • 1 small units (13 lines of code)
    • 0 very small units (0 lines of code)
29% | 48% | 18% | 3% | 0%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py29% | 48% | 18% | 3% | 0%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
tools/mediasync/lambda90% | 0% | 0% | 9% | 0%
tools/autoingest/lambda0% | 100% | 0% | 0% | 0%
tools/autoacl/lambda0% | 100% | 0% | 0% | 0%
tools/fixity/lambda0% | 39% | 60% | 0% | 0%
Alternative Visuals
Longest Units
Top 7 longest units
Unit# linesMcCabe index# params
def lambda_handler()
in tools/mediasync/lambda/driver/app.py
124 22 2
def lambda_handler()
in tools/autoingest/lambda/driver/app.py
77 21 2
def lambda_handler()
in tools/autoacl/lambda/driver/app.py
72 3 2
def s3_batch_handler()
in tools/fixity/lambda/driver/app.py
51 10 2
def _submit_job()
in tools/fixity/lambda/driver/app.py
49 12 2
def api_handler()
in tools/fixity/lambda/driver/app.py
29 6 2
def is_can_submit_jobs()
in tools/mediasync/lambda/driver/app.py
13 1 0