aws-samples / hcls-data-lake
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 43 units with 696 lines of code in units (50.7% of code).
    • 0 very long units (0 lines of code)
    • 1 long units (98 lines of code)
    • 12 medium size units (332 lines of code)
    • 8 small units (119 lines of code)
    • 22 very small units (147 lines of code)
0% | 14% | 47% | 17% | 21%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py0% | 14% | 47% | 17% | 21%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
old_reference0% | 48% | 43% | 0% | 7%
ingest_er7_service0% | 0% | 67% | 20% | 11%
lib0% | 0% | 47% | 17% | 34%
ROOT0% | 0% | 100% | 0% | 0%
er7_to_json_service0% | 0% | 31% | 16% | 51%
staging_service0% | 0% | 0% | 100% | 0%
auth_service0% | 0% | 0% | 56% | 43%
core_infrastructure0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def lambda_handler()
in old_reference/er7_to_json.py
98 7 2
def lambda_handler()
in ingest_er7_service/ingest_er7_lambda.py
44 5 2
def main()
in deploy_services.py
40 4 0
31 4 4
29 1 5
def __publish_to_topic()
in ingest_er7_service/ingest_er7_lambda.py
27 1 4
26 6 3
def __store_message()
in ingest_er7_service/ingest_er7_lambda.py
26 1 6
def get_global_id()
in old_reference/er7_to_json.py
23 4 1
def get_pid_codes()
in old_reference/er7_to_json.py
22 4 1
def lambda_handler()
in old_reference/hl7_retrieve_msg.py
22 4 2
def add_child_element()
in old_reference/er7_to_json.py
21 9 2
def __add_child_element()
in er7_to_json_service/parse_er7_lambda.py
21 8 2
def lambda_handler()
in staging_service/staging_lambda.py
20 1 2
def sync_lambda_function()
in lib/lambda_util.py
20 7 2
def deploy()
in ingest_er7_service/ingest_er7_setup.py
16 4 4
def __get_credentials()
in ingest_er7_service/ingest_er7_lambda.py
14 1 4
def deploy()
in staging_service/staging_setup.py
13 4 2
def __set_attribute_map()
in auth_service/auth_setup.py
13 1 1
def get_random_password()
in lib/cognito_util.py
12 2 1