aws-cloudformation / custom-resource-helper
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 49 units with 359 lines of code in units (82.3% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 5 medium size units (146 lines of code)
    • 5 small units (75 lines of code)
    • 39 very small units (138 lines of code)
0% | 0% | 40% | 20% | 38%
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% | 42% | 21% | 36%
pyi0% | 0% | 0% | 0% | 100%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
crhelper0% | 0% | 40% | 20% | 38%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def __init__()
in crhelper/resource_helper.py
41 4 7
def _send_response()
in crhelper/utils.py
33 8 4
def format()
in crhelper/log_helper.py
25 8 2
def __call__()
in crhelper/resource_helper.py
24 10 3
def _crhelper_init()
in crhelper/resource_helper.py
23 4 3
def _send()
in crhelper/resource_helper.py
18 4 4
def _remove_polling()
in crhelper/resource_helper.py
17 6 1
def _put_targets()
in crhelper/resource_helper.py
16 1 2
def _polling_init()
in crhelper/resource_helper.py
13 7 2
def setup()
in crhelper/log_helper.py
11 4 4
def _add_permission()
in crhelper/resource_helper.py
10 1 2
def __init__()
in crhelper/log_helper.py
10 1 2
def _cfn_response()
in crhelper/resource_helper.py
8 5 2
def _wait_for_cwlogs()
in crhelper/resource_helper.py
7 3 2
def _log_setup()
in crhelper/resource_helper.py
7 2 3
def _wrap_function()
in crhelper/resource_helper.py
7 3 2
def _put_rule()
in crhelper/resource_helper.py
7 1 1
def generate_physical_id()
in crhelper/resource_helper.py
6 1 2
def _setup_polling()
in crhelper/resource_helper.py
6 1 1
def _get_func()
in crhelper/resource_helper.py
5 2 1