aws-samples / aws-iot-device-provisioning-via-sideload-reg-codes-with-s3-upload
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 45 units with 679 lines of code in units (75.3% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 10 medium size units (283 lines of code)
    • 22 small units (314 lines of code)
    • 13 very small units (82 lines of code)
0% | 0% | 41% | 46% | 12%
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% | 41% | 46% | 12%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
client0% | 0% | 37% | 50% | 12%
api/runtime0% | 0% | 80% | 19% | 0%
api/infrastructure/stacks0% | 0% | 0% | 66% | 33%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def upload_files()
in api/runtime/app.py
35 1 0
35 6 1
def __init__()
in client/iot_client.py
34 1 1
def init_app_mqtt_client()
in client/iot_client.py
32 4 2
def get_certificate()
in api/runtime/app.py
27 9 0
def init_thing_with_reg_api()
in client/iot_client.py
27 6 1
def job_detail_callback()
in client/iot_client.py
24 4 4
def get_sts_credentials()
in client/iot_client.py
24 1 1
def sign_all_the_things()
in client/aws_auth.py
24 2 4
def __init__()
in client/aws_auth.py
21 3 6
def init_thing_with_boto()
in client/iot_client.py
20 1 1
def upload_file_to_s3()
in client/iot_client.py
20 2 2
def init_thing_in_iot()
in client/iot_client.py
18 4 3
def init_jobs_client()
in client/iot_client.py
17 1 1
def demo_connectivity_issues()
in client/iot_client.py
17 5 1
def _create_credential_provider_role()
in api/infrastructure/stacks/chaliceapp.py
16 2 1
def execute_job()
in client/iot_client.py
16 5 2
def sort_querystrings()
in client/aws_auth.py
15 5 1
def post()
in client/aws_auth.py
15 5 4
def _create_ddb_table()
in api/infrastructure/stacks/chaliceapp.py
14 1 1