aws-samples / amazon-translate-video-subtitles-captions-translation
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 31 units with 418 lines of code in units (56.9% of code).
    • 0 very long units (0 lines of code)
    • 1 long units (56 lines of code)
    • 5 medium size units (171 lines of code)
    • 7 small units (94 lines of code)
    • 18 very small units (97 lines of code)
0% | 13% | 40% | 22% | 23%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py0% | 13% | 40% | 22% | 23%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
translate_captions0% | 14% | 43% | 20% | 21%
deployment0% | 0% | 0% | 57% | 42%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def processRequest()
in translate_captions/translate_job_event_handler.py
56 15 1
def TranslateCaptions()
in translate_captions/captions_helper.py
50 6 3
def processRequest()
in translate_captions/s3_event_handler.py
43 8 1
def lambda_handler()
in translate_captions/translate_job_event_handler.py
29 4 2
def getFileNames()
in translate_captions/helper.py
27 7 5
def srtToCaptions()
in translate_captions/captions_helper.py
22 3 2
def vttToCaptions()
in translate_captions/captions_helper.py
18 3 2
def handler()
in deployment/s3_folder_create.py
15 2 2
def lambda_handler()
in translate_captions/s3_event_handler.py
14 1 2
def getFilteredFileNames()
in translate_captions/helper.py
13 3 4
def DelimitedToWebCaptions()
in translate_captions/captions_helper.py
12 2 5
def formatTimeSRT()
in translate_captions/captions_helper.py
11 1 2
def formatTimeVTT()
in translate_captions/captions_helper.py
11 1 2
def getClient()
in translate_captions/helper.py
10 2 3
def getResource()
in translate_captions/helper.py
10 2 3
def captionsToSRT()
in translate_captions/captions_helper.py
9 2 2
def formatTimeVTTtoSeconds()
in translate_captions/captions_helper.py
7 1 2
def create()
in deployment/s3_folder_create.py
7 1 2
def ConvertToDemilitedFiles()
in translate_captions/captions_helper.py
6 1 2
def captionsToVTT()
in translate_captions/captions_helper.py
6 2 2