aws-samples / amazon-textract-comprehend-a2i
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 10 units with 400 lines of code in units (20.2% of code).
    • 0 very long units (0 lines of code)
    • 4 long units (283 lines of code)
    • 2 medium size units (71 lines of code)
    • 2 small units (32 lines of code)
    • 2 very small units (14 lines of code)
0% | 70% | 17% | 8% | 3%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py0% | 70% | 17% | 8% | 3%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
source/lambda_handlers0% | 70% | 17% | 8% | 3%
Alternative Visuals
Longest Units
Top 10 longest units
Unit# linesMcCabe index# params
def lambda_handler()
in source/lambda_handlers/03-HumanReviewCompleted.py
90 17 2
def lambda_handler()
in source/lambda_handlers/05-CERTrainingCompleteCheck.py
69 25 2
def lambda_handler()
in source/lambda_handlers/04-NewEntityCheck.py
68 11 2
def lambda_handler()
in source/lambda_handlers/01-TextractComprehend.py
56 2 2
def lambda_handler()
in source/lambda_handlers/02-ComprehendA2I.py
49 10 2
def detect_new_entities()
in source/lambda_handlers/03-HumanReviewCompleted.py
22 7 3
def check_for_new_entities()
in source/lambda_handlers/04-NewEntityCheck.py
20 8 2
def get_entity_types()
in source/lambda_handlers/04-NewEntityCheck.py
12 5 1
def get_s3_bucket_and_key()
in source/lambda_handlers/05-CERTrainingCompleteCheck.py
7 4 1
def prepend_to_s3_file_name()
in source/lambda_handlers/05-CERTrainingCompleteCheck.py
7 2 3