aws-samples / aws-cudos-framework-deployment
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 123 units with 1,623 lines of code in units (38.3% of code).
    • 1 very long units (114 lines of code)
    • 2 long units (123 lines of code)
    • 24 medium size units (730 lines of code)
    • 23 small units (346 lines of code)
    • 73 very small units (310 lines of code)
7% | 7% | 44% | 21% | 19%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py7% | 7% | 44% | 21% | 19%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
cid17% | 10% | 46% | 13% | 11%
cid/helpers0% | 5% | 44% | 26% | 23%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def create_datasets()
in cid/common.py
114 28 2
def deploy()
in cid/common.py
68 14 2
def create()
in cid/helpers/account_map.py
55 14 2
def create_dashboard()
in cid/helpers/quicksight.py
50 5 3
def create_data_source()
in cid/helpers/quicksight.py
45 6 1
def update()
in cid/common.py
44 12 3
def select_metadata_collection_method()
in cid/helpers/account_map.py
40 8 1
def create_dataset()
in cid/common.py
40 9 2
def discover_dashboard()
in cid/helpers/quicksight.py
36 13 2
def update_dashboard()
in cid/helpers/quicksight.py
36 4 3
def get_view_query()
in cid/common.py
34 18 2
def __init__()
in cid/plugin.py
33 10 2
def execute_query()
in cid/helpers/athena.py
30 7 3
def find_local_config()
in cid/helpers/quicksight.py
29 9 1
def create_view()
in cid/common.py
29 8 2
def create_account_mapping_sql()
in cid/helpers/account_map.py
28 5 2
def describe_dashboard()
in cid/helpers/quicksight.py
27 9 3
def run()
in cid/common.py
26 3 2
def discover_dashboards()
in cid/helpers/quicksight.py
25 5 2
def DatabaseName()
in cid/helpers/athena.py
24 12 1