awslabs / speke-reference-server
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 475 lines of code in units (75.6% of code).
    • 0 very long units (0 lines of code)
    • 2 long units (119 lines of code)
    • 2 medium size units (80 lines of code)
    • 10 small units (152 lines of code)
    • 29 very small units (124 lines of code)
0% | 25% | 16% | 32% | 26%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py0% | 25% | 16% | 32% | 26%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
src0% | 39% | 11% | 30% | 17%
cloudformation0% | 0% | 38% | 29% | 31%
spekev2_verification_testsuite0% | 0% | 0% | 42% | 57%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def fill_request()
in src/key_server_common.py
62 11 1
def fixup_document()
in src/key_server_common.py
57 6 5
def create_endpoint()
in cloudformation/mediapackage_speke_endpoint.py
45 3 4
def fixup_document()
in src/key_server_common.py
35 14 5
def retrieve_content_id_secret()
in src/key_generator.py
20 4 2
def send()
in cloudformation/resource_tools.py
20 3 5
def server_handler()
in src/key_server.py
19 4 2
def event_handler()
in cloudformation/mediapackage_speke_endpoint.py
15 5 2
def __init__()
in src/key_server_common.py
14 1 4
def get_response()
in src/key_server_common.py
14 2 1
def get_response()
in src/key_server_common.py
13 2 1
def insert_encrypted_value()
in src/key_server_common.py
13 3 4
def get_aws_auth()
in spekev2_verification_testsuite/utils.py
12 1 1
def count_tags()
in spekev2_verification_testsuite/utils.py
12 3 1
def update_endpoint()
in cloudformation/mediapackage_endpoint_common.py
10 3 4
def delete_endpoint()
in cloudformation/mediapackage_endpoint_common.py
9 2 3
def __init__()
in src/key_generator.py
8 1 1
def speke_v2_request()
in spekev2_verification_testsuite/utils.py
7 1 2
def retrieve_local_secret()
in src/key_generator.py
6 1 2
def stack_name()
in cloudformation/resource_tools.py
6 2 1