aws-samples / cdk-stepfunctions-redshift
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 105 units with 1,261 lines of code in units (79.8% of code).
    • 2 very long units (270 lines of code)
    • 3 long units (208 lines of code)
    • 11 medium size units (333 lines of code)
    • 13 small units (183 lines of code)
    • 76 very small units (267 lines of code)
21% | 16% | 26% | 14% | 21%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
ts40% | 31% | 21% | 1% | 4%
py0% | 0% | 31% | 28% | 39%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
src100% | 0% | 0% | 0% | 0%
src/machines0% | 52% | 37% | 2% | 7%
lambda/python/cfn_example_functions0% | 0% | 48% | 17% | 33%
lambda/python/rs_integration_function/ddb0% | 0% | 49% | 34% | 16%
lambda/python/rs_integration_function0% | 0% | 18% | 39% | 41%
lambda/python/rs_integration_function/callback_sources0% | 0% | 25% | 25% | 49%
lambda/python/rs_integration_function/step_function0% | 0% | 0% | 100% | 0%
lambda/python/rs_integration_function/redshift_data0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
constructor()
in src/index.ts
163 13 3
constructor()
in src/integ.default.ts
107 1 0
RETURNS varchar()
in src/machines/cancelling_statement.ts
82 1 1
constructor()
in src/machines/cancelling_statement.ts
75 1 2
constructor()
in src/machines/polling.ts
51 1 2
constructor()
in src/machines/success_and_fail.ts
43 1 2
constructor()
in src/machines/single_success.ts
41 1 2
constructor()
in src/machines/single_failure.ts
40 1 2
def handler()
in lambda/python/cfn_example_functions/manage_user.py
34 3 2
def mark_statement_name_as_handled()
in lambda/python/rs_integration_function/ddb/ddb_state_table.py
29 1 3
def send()
in lambda/python/cfn_example_functions/cfnresponse.py
26 3 6
def send()
in lambda/python/rs_integration_function/callback_sources/cfnresponse.py
26 3 6
def finished_data_api_request_record_handler()
in lambda/python/rs_integration_function/index.py
26 5 1
def handler()
in lambda/python/cfn_example_functions/create_drop.py
24 5 2
function createSlowSync()
in src/machines/parallel_no_concurrency.ts
22 1 2
def get_callback_source_for_statement_name()
in lambda/python/rs_integration_function/ddb/ddb_state_table.py
22 2 2
def _handler()
in lambda/python/rs_integration_function/index.py
20 12 2
def get_latest_statement_name_for_execution_arn()
in lambda/python/rs_integration_function/ddb/ddb_state_table.py
20 3 2
def register_execution_start()
in lambda/python/rs_integration_function/ddb/ddb_state_table.py
16 2 3
def __init__()
in lambda/python/cfn_example_functions/manage_user.py
15 3 10