aws-samples / apigateway-vpcendpoints
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 35 units with 347 lines of code in units (44.9% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 3 medium size units (84 lines of code)
    • 10 small units (149 lines of code)
    • 22 very small units (114 lines of code)
0% | 0% | 24% | 42% | 32%
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% | 28% | 41% | 30%
go0% | 0% | 0% | 51% | 48%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
global-apigw/global_apigw0% | 0% | 60% | 40% | 0%
ec2-provider/ec2_provider0% | 0% | 23% | 42% | 33%
apigw-vpce-helpers/apigw_vpce_helpers0% | 0% | 44% | 20% | 34%
apigw-vpce-helpers/apigw_vpce_helpers/custom_resource0% | 0% | 0% | 77% | 22%
ecs-provider/image0% | 0% | 0% | 51% | 48%
ecs-provider/ecs_provider0% | 0% | 0% | 39% | 60%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def __init__()
in global-apigw/global_apigw/global_apigw_stack.py
30 1 4
def _create_autoscaling_group()
in ec2-provider/ec2_provider/todo_app_stack.py
28 1 2
def _create_custom_resource()
in apigw-vpce-helpers/apigw_vpce_helpers/vpce_helpers.py
26 1 3
def _create_vpc()
in ec2-provider/ec2_provider/vpc_stack.py
20 1 1
def _create_vpc()
in global-apigw/global_apigw/global_apigw_stack.py
20 1 1
def __init__()
in ec2-provider/ec2_provider/todo_app_stack.py
18 1 5
def _handle_create()
in apigw-vpce-helpers/apigw_vpce_helpers/custom_resource/handler.py
17 3 2
def __init__()
in ecs-provider/ecs_provider/ecs_provider_stack.py
15 1 5
func chooseDog()
in ecs-provider/image/server.go
13 2 2
def get_env()
in apigw-vpce-helpers/apigw_vpce_helpers/helpers.py
12 2 1
def _create_sg()
in ec2-provider/ec2_provider/todo_app_stack.py
12 1 1
def main_handler()
in apigw-vpce-helpers/apigw_vpce_helpers/custom_resource/handler.py
11 3 2
func main()
in ecs-provider/image/server.go
11 2 0
def setup_vpce_integration()
in apigw-vpce-helpers/apigw_vpce_helpers/vpce_helpers.py
10 1 0
def _create_dynamodb_table()
in ec2-provider/ec2_provider/todo_app_stack.py
10 1 1
def _get_image()
in ec2-provider/ec2_provider/todo_app_stack.py
10 1 1
def send()
in apigw-vpce-helpers/apigw_vpce_helpers/custom_resource/cfnresponse.py
8 1 0
def _create_vpce_service()
in ec2-provider/ec2_provider/todo_app_stack.py
8 1 3
def _create_vpce_service()
in ecs-provider/ecs_provider/ecs_provider_stack.py
8 1 3
func dogs()
in ecs-provider/image/server.go
8 2 2