aws-samples / amazon-comprehend-medical-enrich-custom-models
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 8 units with 121 lines of code in units (40.3% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 2 medium size units (44 lines of code)
    • 3 small units (54 lines of code)
    • 3 very small units (23 lines of code)
0% | 0% | 36% | 44% | 19%
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% | 36% | 44% | 19%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
files/lambda_code0% | 0% | 36% | 44% | 19%
Alternative Visuals
Longest Units
Top 8 longest units
Unit# linesMcCabe index# params
def call_comprehehend_medical()
in files/lambda_code/call_cm_other_models_lambda.py
23 5 2
def search_raw_text_for_breast_cancer_genes()
in files/lambda_code/call_cm_other_models_lambda.py
21 2 1
def get_match_score()
in files/lambda_code/call_cm_other_models_lambda.py
19 2 3
def search_dict_for_breast_cancer_genes()
in files/lambda_code/call_cm_other_models_lambda.py
19 5 1
def lambda_handler()
in files/lambda_code/call_cm_other_models_lambda.py
16 1 2
def put_file_in_s3()
in files/lambda_code/call_cm_other_models_lambda.py
9 1 3
def call_custom_comprehend_model()
in files/lambda_code/call_cm_other_models_lambda.py
8 1 2
def read_in_file_from_s3()
in files/lambda_code/call_cm_other_models_lambda.py
6 1 2