aws-samples / aws-fargate-with-rstudio-open-source
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 41 units with 671 lines of code in units (15.3% of code).
    • 0 very long units (0 lines of code)
    • 2 long units (134 lines of code)
    • 7 medium size units (257 lines of code)
    • 15 small units (204 lines of code)
    • 17 very small units (76 lines of code)
0% | 19% | 38% | 30% | 11%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py0% | 21% | 35% | 32% | 11%
R0% | 0% | 100% | 0% | 0%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
rstudio_fargate0% | 100% | 0% | 0% | 0%
rstudio_fargate/rstudio0% | 100% | 0% | 0% | 0%
rstudio_fargate/rstudio/fargate0% | 0% | 100% | 0% | 0%
rstudio_fargate/rstudio/custom0% | 0% | 60% | 21% | 17%
ml_example/breast-cancer-prediction0% | 0% | 100% | 0% | 0%
rstudio_fargate/rstudio/ses0% | 0% | 38% | 54% | 7%
rstudio_fargate/datasync_trigger0% | 0% | 53% | 42% | 3%
rstudio_fargate/datalake0% | 0% | 0% | 100% | 0%
rstudio_fargate/network0% | 0% | 0% | 75% | 25%
rstudio_fargate/rstudio/datasync0% | 0% | 0% | 100% | 0%
rstudio_fargate/rstudio/route530% | 0% | 0% | 100% | 0%
rstudio_fargate/rstudio/ecs0% | 0% | 0% | 100% | 0%
rstudio_fargate/rstudio/kms0% | 0% | 0% | 100% | 0%
rstudio_fargate/rstudio/waf0% | 0% | 0% | 0% | 100%
rstudio_fargate/rstudio/efs0% | 0% | 0% | 0% | 100%
rstudio_fargate/rstudio/vpc0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def __init__()
in rstudio_fargate/rstudio_pipeline_stack.py
72 1 0
def __init__()
in rstudio_fargate/rstudio/rstudio_pipeline_stage.py
62 1 0
def __init__()
in rstudio_fargate/rstudio/fargate/shiny_stack.py
45 1 0
def __init__()
in rstudio_fargate/rstudio/fargate/rstudio_ec2_stack.py
39 1 0
def __init__()
in rstudio_fargate/rstudio/fargate/rstudio_fargate_stack.py
39 1 0
def main()
in rstudio_fargate/rstudio/custom/ssm_custom_resource_handler.py
39 4 2
server <- function()
in ml_example/breast-cancer-prediction/app.R
34 1 2
def main()
in rstudio_fargate/rstudio/ses/ses_custom_resource_handler.py
32 8 2
def lambda_handler()
in rstudio_fargate/datasync_trigger/trigger_datasync_handler.py
29 3 2
def __init__()
in rstudio_fargate/datalake/dl_resources_stage.py
18 1 0
def __init__()
in rstudio_fargate/rstudio/datasync/datasync_stack.py
17 1 0
def send_email()
in rstudio_fargate/rstudio/ses/ses_custom_resource_handler.py
16 1 4
def __init__()
in rstudio_fargate/rstudio/ses/ses_custom_resource.py
15 1 0
def __init__()
in rstudio_fargate/datalake/rstudio_s3_stack.py
14 1 0
def __init__()
in rstudio_fargate/rstudio/ses/rstudio_email_passwords_stack.py
14 1 0
def __init__()
in rstudio_fargate/rstudio/custom/ssm_custom_resource.py
14 1 0
def __init__()
in rstudio_fargate/rstudio/route53/rstudio_instance_domain_stack.py
14 1 0
def __init__()
in rstudio_fargate/rstudio/ecs/ecs_cluster_stack.py
13 1 0
def __init__()
in rstudio_fargate/datasync_trigger/datasync_trigger_lambda_stage.py
12 1 0
def __init__()
in rstudio_fargate/network/rstudio_route53_stack.py
12 1 0