aws-samples / serverless-audio-indexing
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 11 units with 200 lines of code in units (26.5% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 4 medium size units (100 lines of code)
    • 6 small units (90 lines of code)
    • 1 very small units (10 lines of code)
0% | 0% | 50% | 45% | 5%
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% | 50% | 45% | 5%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
functions/get_comprehend_files0% | 0% | 100% | 0% | 0%
functions/get_comprehend_job_status0% | 0% | 100% | 0% | 0%
functions/load_es0% | 0% | 69% | 0% | 30%
functions/start_stateMachine0% | 0% | 100% | 0% | 0%
functions/start_comprehend_job0% | 0% | 0% | 100% | 0%
functions/get_transcribe_transcript0% | 0% | 0% | 100% | 0%
functions/start_transcribe_job0% | 0% | 0% | 100% | 0%
functions/get_transcribe_job_status0% | 0% | 0% | 100% | 0%
Alternative Visuals
Longest Units
Top 11 longest units
Unit# linesMcCabe index# params
def lambda_handler()
in functions/get_comprehend_files/app.py
28 1 2
def lambda_handler()
in functions/get_comprehend_job_status/app.py
26 9 2
def downloadObject_InsertES()
in functions/load_es/app.py
23 2 3
def lambda_handler()
in functions/start_stateMachine/app.py
23 2 2
def lambda_handler()
in functions/get_transcribe_transcript/app.py
19 1 2
def lambda_handler()
in functions/start_transcribe_job/app.py
17 1 2
def detect_keyphrases_job()
in functions/start_comprehend_job/app.py
15 1 4
def detect_entities_job()
in functions/start_comprehend_job/app.py
15 1 4
def lambda_handler()
in functions/start_comprehend_job/app.py
12 1 2
def lambda_handler()
in functions/get_transcribe_job_status/app.py
12 2 2
def lambda_handler()
in functions/load_es/app.py
10 1 2