aws-samples / amazon-translate-json-document-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 21 units with 255 lines of code in units (48.3% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 4 medium size units (130 lines of code)
    • 4 small units (60 lines of code)
    • 13 very small units (65 lines of code)
0% | 0% | 50% | 23% | 25%
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% | 23% | 25%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
translate_json0% | 0% | 56% | 19% | 23%
deployment0% | 0% | 0% | 57% | 42%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def processRequest()
in translate_json/translate_job_event_handler.py
43 17 1
def processRequest()
in translate_json/s3_event_handler.py
31 7 1
def lambda_handler()
in translate_json/translate_job_event_handler.py
29 4 2
def getFileNames()
in translate_json/helper.py
27 7 5
def startTranslationJob()
in translate_json/s3_event_handler.py
20 2 4
def handler()
in deployment/s3_folder_create.py
15 2 2
def lambda_handler()
in translate_json/s3_event_handler.py
14 1 2
def getFilteredFileNames()
in translate_json/helper.py
11 3 4
def getClient()
in translate_json/helper.py
10 2 3
def getResource()
in translate_json/helper.py
10 2 3
def create()
in deployment/s3_folder_create.py
7 1 2
def getS3BucketRegion()
in translate_json/helper.py
5 1 1
def renameObject()
in translate_json/helper.py
5 1 4
def writeToS3()
in translate_json/helper.py
4 1 4
def readFromS3()
in translate_json/helper.py
4 1 3
def deleteObject()
in translate_json/helper.py
4 1 3
def getFileNameAndExtension()
in translate_json/helper.py
4 1 1
def getFileName()
in translate_json/helper.py
4 1 1
def getFileExtenstion()
in translate_json/helper.py
4 1 1
def update()
in deployment/s3_folder_create.py
2 1 2