awslabs / aws-iam-generator
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 9 units with 254 lines of code in units (43.2% of code).
    • 0 very long units (0 lines of code)
    • 1 long units (92 lines of code)
    • 4 medium size units (111 lines of code)
    • 2 small units (39 lines of code)
    • 2 very small units (12 lines of code)
0% | 36% | 43% | 15% | 4%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py0% | 36% | 43% | 15% | 4%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
pipeline0% | 40% | 37% | 17% | 5%
ROOT0% | 0% | 100% | 0% | 0%
Alternative Visuals
Longest Units
Top 9 longest units
Unit# linesMcCabe index# params
def main()
in pipeline/iam_generator_deploy.py
92 3 2
def deploy_stack()
in pipeline/iam_generator_deploy.py
35 5 4
def build_clients()
in pipeline/iam_generator_deploy.py
27 1 4
27 1 2
def outside_lambda_handler()
in pipeline/iam_generator_deploy.py
22 1 0
def boto3_agent_from_sts()
in pipeline/iam_generator_deploy.py
20 4 4
def wait_for_stacks()
in pipeline/iam_generator_deploy.py
19 3 1
def determine_region()
in pipeline/iam_generator_deploy.py
10 2 1
def lambda_handler()
in pipeline/iam_generator_deploy.py
2 1 2