awslabs / assisted-log-enabler-for-aws
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 37 units with 982 lines of code in units (81.0% of code).
    • 1 very long units (113 lines of code)
    • 4 long units (267 lines of code)
    • 13 medium size units (486 lines of code)
    • 3 small units (42 lines of code)
    • 16 very small units (74 lines of code)
11% | 27% | 49% | 4% | 7%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py11% | 27% | 49% | 4% | 7%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
subfunctions12% | 20% | 53% | 4% | 7%
ROOT0% | 96% | 0% | 0% | 3%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def s3_logs()
in subfunctions/ALE_single_account.py
113 15 3
def assisted_log_enabler()
in assisted_log_enabler.py
78 23 0
def r53_cleanup()
in subfunctions/ALE_cleanup_single.py
73 16 0
def create_bucket()
in subfunctions/ALE_single_account.py
64 3 1
def dryrun_s3_logs()
in subfunctions/ALE_dryrun_multi.py
52 14 3
def flow_log_activator()
in subfunctions/ALE_single_account.py
47 6 3
def route_53_query_logs()
in subfunctions/ALE_single_account.py
47 7 3
def dryrun_route_53_query_logs()
in subfunctions/ALE_dryrun_multi.py
46 7 3
def s3_cleanup()
in subfunctions/ALE_cleanup_single.py
44 13 0
def eks_logging()
in subfunctions/ALE_single_account.py
41 7 1
def dryrun_flow_log_activator()
in subfunctions/ALE_dryrun_multi.py
40 7 3
def check_cloudtrail()
in subfunctions/ALE_single_account.py
39 3 2
def dryrun_s3_logs()
in subfunctions/ALE_dryrun_single.py
37 13 2
def cloudtrail_cleanup()
in subfunctions/ALE_cleanup_single.py
36 9 0
def vpcflow_cleanup()
in subfunctions/ALE_cleanup_single.py
31 4 0
def dryrun_eks_logging()
in subfunctions/ALE_dryrun_multi.py
29 5 2
def dryrun_route_53_query_logs()
in subfunctions/ALE_dryrun_single.py
25 6 2
def dryrun_flow_log_activator()
in subfunctions/ALE_dryrun_single.py
24 6 2
def org_account_grab()
in subfunctions/ALE_dryrun_multi.py
14 3 0
def dryrun_check_cloudtrail()
in subfunctions/ALE_dryrun_single.py
14 3 1