awslabs / sagemaker-debugger-rulesconfig
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 57 units with 307 lines of code in units (57.9% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 1 medium size units (26 lines of code)
    • 3 small units (43 lines of code)
    • 53 very small units (238 lines of code)
0% | 0% | 8% | 14% | 77%
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% | 8% | 14% | 77%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
smdebug_rulesconfig/profiler_rules0% | 0% | 22% | 21% | 56%
ROOT0% | 0% | 0% | 100% | 0%
smdebug_rulesconfig/debugger_rules0% | 0% | 0% | 0% | 100%
smdebug_rulesconfig/actions0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def __init__()
in smdebug_rulesconfig/profiler_rules/rules.py
26 5 3
18 1 1
def get_rules()
in smdebug_rulesconfig/profiler_rules/rules.py
13 1 1
def __init__()
in smdebug_rulesconfig/profiler_rules/rules.py
12 1 4
def _get_rule_list()
in smdebug_rulesconfig/debugger_rules/_utils.py
10 3 1
def _get_config_for_group()
in smdebug_rulesconfig/debugger_rules/_utils.py
10 4 1
def _get_rule_config()
in smdebug_rulesconfig/debugger_rules/_utils.py
9 3 1
def _get_collection_config()
in smdebug_rulesconfig/debugger_rules/_utils.py
9 3 1
def __init__()
in smdebug_rulesconfig/profiler_rules/rules.py
8 1 0
def __init__()
in smdebug_rulesconfig/profiler_rules/rules.py
8 1 5
def __init__()
in smdebug_rulesconfig/profiler_rules/rules.py
8 2 5
def __init__()
in smdebug_rulesconfig/actions/actions.py
8 3 2
def serialize()
in smdebug_rulesconfig/actions/actions.py
8 2 1
def __init__()
in smdebug_rulesconfig/profiler_rules/rules.py
7 1 0
def __init__()
in smdebug_rulesconfig/profiler_rules/rules.py
7 1 0
def __init__()
in smdebug_rulesconfig/profiler_rules/rules.py
7 1 0
def validate_training_job_prefix()
in smdebug_rulesconfig/actions/utils.py
7 3 2
def validate_action_str()
in smdebug_rulesconfig/actions/utils.py
7 2 2
def __init__()
in smdebug_rulesconfig/actions/actions.py
6 2 2
def validate_phone_number()
in smdebug_rulesconfig/actions/utils.py
6 3 2