aws-samples / amazon-transcribe-comprehend-podcast
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 38 units with 833 lines of code in units (48.8% of code).
    • 0 very long units (0 lines of code)
    • 4 long units (311 lines of code)
    • 10 medium size units (330 lines of code)
    • 7 small units (97 lines of code)
    • 17 very small units (95 lines of code)
0% | 37% | 39% | 11% | 11%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py0% | 37% | 39% | 11% | 11%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
src0% | 40% | 40% | 9% | 9%
cfn-custom-resource/es-cognito0% | 0% | 33% | 37% | 28%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def lambda_handler()
in src/process_transcription_paragraph.py
97 11 2
def lambda_handler()
in src/process_podcast_rss.py
85 25 2
def lambda_handler()
in src/process_podcast_item.py
67 20 2
def chunk_up_transcript()
in src/process_transcription_full_text.py
62 24 2
def lambda_handler()
in src/create_transcribe_vocabulary.py
47 4 2
def lambda_handler()
in src/podcast_transcribe.py
44 14 2
def process_transcript()
in src/process_transcription_full_text.py
41 6 3
def create_episode_index()
in src/elasticsearch_createindex.py
37 1 0
def lambda_handler()
in src/download_podcast.py
36 5 2
def index_episode()
in src/upload_to_elasticsearch.py
27 3 3
def index_keywords()
in src/upload_to_elasticsearch.py
27 5 3
def lambda_handler()
in src/random_string.py
26 4 2
def parse_detected_entities_response()
in src/process_transcription_full_text.py
23 13 2
def add_user()
in cfn-custom-resource/es-cognito/main.py
22 1 4
def clean_up_entity_results()
in src/process_transcription_full_text.py
19 7 1
def parse_detected_key_phrases_response()
in src/process_transcription_full_text.py
17 7 1
def configure_cognito_lambda_handler()
in cfn-custom-resource/es-cognito/main.py
14 4 2
def find_duplicate_person()
in src/common_lib.py
13 7 1
def send_response()
in src/random_string.py
12 5 4
def get_user_credentials()
in cfn-custom-resource/es-cognito/main.py
11 5 1