awslabs / aws-config-rdklib
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 365 lines of code in units (76.0% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 2 medium size units (68 lines of code)
    • 9 small units (130 lines of code)
    • 34 very small units (167 lines of code)
0% | 0% | 18% | 35% | 45%
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% | 18% | 35% | 45%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
rdklib0% | 0% | 24% | 26% | 49%
rdklib/util0% | 0% | 18% | 38% | 42%
rdklibtest0% | 0% | 0% | 72% | 27%
ROOT0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def handle()
in rdklib/evaluator.py
37 13 3
def clean_up_old_evaluations()
in rdklib/util/evaluations.py
31 6 3
20 1 1
def process_periodic_evaluations_list()
in rdklib/util/evaluations.py
18 6 4
def process_evaluations()
in rdklib/util/external.py
15 6 3
def get_assume_role_credentials()
in rdklib/clientfactory.py
15 4 1
def is_valid()
in rdklib/evaluation.py
14 5 1
def process_event_evaluations_list()
in rdklib/util/evaluations.py
13 5 4
13 2 2
def get_execution_role_arn()
in rdklib/configrule.py
11 4 2
11 5 4
def __eq__()
in rdklib/evaluation.py
10 7 2
def get_json()
in rdklib/evaluation.py
10 2 1
def build_error_response()
in rdklib/util/service.py
9 1 4
def inflate_oversized_notification()
in rdklib/util/service.py
9 1 2
def build_client()
in rdklib/clientfactory.py
9 8 2
def get_resource_config_history()
in rdklib/util/service.py
8 1 2
def __init__()
in rdklib/evaluation.py
8 2 5
8 4 3
def init_event()
in rdklib/evaluator.py
7 2 2