aws-solutions / video-on-demand-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 18 units with 159 lines of code in units (4.0% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 1 medium size units (40 lines of code)
    • 3 small units (50 lines of code)
    • 14 very small units (69 lines of code)
0% | 0% | 25% | 31% | 43%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py0% | 0% | 30% | 24% | 45%
js0% | 0% | 0% | 64% | 35%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
source/mediainfo0% | 0% | 30% | 24% | 45%
source/input-validate0% | 0% | 0% | 100% | 0%
source/custom-resource0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 18 longest units
Unit# linesMcCabe index# params
def lambda_handler()
in source/mediainfo/lambda_function.py
40 7 2
startTime: moment()
in source/input-validate/index.js
18 1 0
def parse_common_attributes()
in source/mediainfo/lambda_function.py
16 5 1
def get_signed_url()
in source/mediainfo/lambda_function.py
16 1 2
def parse_video_attributes()
in source/mediainfo/lambda_function.py
10 1 1
def parse_audio_attributes()
in source/mediainfo/lambda_function.py
8 1 1
def parse_text_attributes()
in source/mediainfo/lambda_function.py
8 1 1
def parse_number()
in source/mediainfo/lambda_function.py
7 3 1
def parse_general_attributes()
in source/mediainfo/lambda_function.py
7 1 1
def run_bash_command()
in source/mediainfo/setup.py
6 2 1
def run_tests()
in source/mediainfo/setup.py
5 1 1
TimeStamp: moment()
in source/custom-resource/lib/metrics/index.js
4 1 0
await _deleteTemplates()
in source/custom-resource/lib/mediaconvert/index.js
3 2 3
Data: sanitizeData()
in source/custom-resource/lib/metrics/index.js
3 1 1
def initialize_options()
in source/mediainfo/setup.py
2 1 1
def finalize_options()
in source/mediainfo/setup.py
2 1 1
def run()
in source/mediainfo/setup.py
2 1 1
def compact()
in source/mediainfo/lambda_function.py
2 3 1