aws-samples / amazon-detective-multiaccount-scripts
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 18 units with 280 lines of code in units (61.1% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 7 medium size units (166 lines of code)
    • 5 small units (66 lines of code)
    • 6 very small units (48 lines of code)
0% | 0% | 59% | 23% | 17%
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% | 59% | 23% | 17%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
ROOT0% | 0% | 59% | 23% | 17%
Alternative Visuals
Longest Units
Top 18 longest units
Unit# linesMcCabe index# params
def setup_command_line()
in enableDetective.py
35 3 1
def setup_command_line()
in disableDetective.py
26 4 1
def assume_role()
in enableDetective.py
21 3 2
def get_members()
in enableDetective.py
21 12 2
def create_members()
in enableDetective.py
21 2 6
def assume_role()
in disableDetective.py
21 3 2
def get_members()
in disableDetective.py
21 12 2
def read_accounts_csv()
in disableDetective.py
17 5 1
def read_accounts_csv()
in enableDetective.py
15 4 1
def enable_detective()
in enableDetective.py
12 5 3
def get_regions()
in disableDetective.py
11 2 2
def delete_members()
in disableDetective.py
11 3 4
def get_regions()
in enableDetective.py
10 2 2
def accept_invitations()
in enableDetective.py
10 3 4
def get_graphs()
in enableDetective.py
7 2 1
def chunked()
in enableDetective.py
7 3 2
def get_graphs()
in disableDetective.py
7 2 1
def chunked()
in disableDetective.py
7 3 2