aws-samples / audio-to-notes-demo-ai
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 12 units with 97 lines of code in units (17.5% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 0 medium size units (0 lines of code)
    • 4 small units (54 lines of code)
    • 8 very small units (43 lines of code)
0% | 0% | 0% | 55% | 44%
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% | 0% | 55% | 44%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
lambda_textract0% | 0% | 0% | 68% | 31%
web_app0% | 0% | 0% | 64% | 35%
lambda_polly0% | 0% | 0% | 35% | 64%
Alternative Visuals
Longest Units
Top 12 longest units
Unit# linesMcCabe index# params
def show_audio_files()
in web_app/app.py
20 4 0
def lambda_handler()
in lambda_polly/lambda_function.py
12 1 2
def extract_text()
in lambda_textract/lambda_function.py
11 1 3
def lambda_handler()
in lambda_textract/lambda_function.py
11 1 2
def upload_image()
in web_app/app.py
9 3 0
def change_text_to_audio()
in lambda_polly/lambda_function.py
9 1 2
def extract_information()
in lambda_textract/lambda_function.py
7 3 1
def send_audio_to_s3()
in lambda_polly/lambda_function.py
6 2 4
def change_audio_stream()
in lambda_polly/lambda_function.py
4 1 2
def aws_connection()
in lambda_textract/lambda_function.py
3 1 2
def aws_connection()
in lambda_polly/lambda_function.py
3 1 2
def index()
in web_app/app.py
2 1 0