awslabs / aws-service-catalog-puppet
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 631 units with 8,270 lines of code in units (49.6% of code).
    • 9 very long units (1,386 lines of code)
    • 15 long units (1,069 lines of code)
    • 77 medium size units (2,297 lines of code)
    • 95 small units (1,408 lines of code)
    • 435 very small units (2,110 lines of code)
16% | 12% | 27% | 17% | 25%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py16% | 12% | 27% | 17% | 25%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
servicecatalog_puppet/workflow/stack42% | 7% | 17% | 19% | 12%
servicecatalog_puppet/commands25% | 7% | 27% | 24% | 15%
servicecatalog_puppet/workflow/workspaces36% | 12% | 25% | 9% | 15%
servicecatalog_puppet/workflow/launch22% | 19% | 26% | 13% | 17%
servicecatalog_puppet12% | 12% | 28% | 16% | 30%
servicecatalog_puppet/workflow/portfolio12% | 8% | 36% | 12% | 29%
servicecatalog_puppet/workflow/manifest40% | 34% | 13% | 4% | 7%
servicecatalog_puppet/workflow/service_control_policies0% | 43% | 8% | 14% | 33%
servicecatalog_puppet/workflow/spoke_local_portfolios0% | 39% | 9% | 13% | 37%
servicecatalog_puppet/template_builder/hub0% | 90% | 0% | 0% | 9%
servicecatalog_puppet/workflow/general0% | 22% | 21% | 29% | 25%
servicecatalog_puppet/workflow0% | 0% | 23% | 32% | 43%
servicecatalog_puppet/workflow/simulate_policies0% | 0% | 65% | 0% | 34%
servicecatalog_puppet/workflow/generic0% | 0% | 49% | 24% | 26%
servicecatalog_puppet/workflow/generate0% | 0% | 41% | 19% | 38%
servicecatalog_puppet/workflow/codebuild_runs0% | 0% | 44% | 13% | 42%
servicecatalog_puppet/workflow/lambda_invocations0% | 0% | 45% | 12% | 41%
servicecatalog_puppet/workflow/assertions0% | 0% | 16% | 44% | 38%
servicecatalog_puppet/workflow/apps0% | 0% | 36% | 0% | 63%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def run()
in servicecatalog_puppet/workflow/workspaces/create_template_for_workspace_task.py
221 2 1
def run()
in servicecatalog_puppet/workflow/launch/provision_product_task.py
180 17 1
def rewrite_cfct()
in servicecatalog_puppet/manifest_utils.py
177 30 1
def run()
in servicecatalog_puppet/workflow/portfolio/portfolio_management/copy_into_spoke_local_portfolio_task.py
176 22 1
def run()
in servicecatalog_puppet/workflow/stack/provision_stack_task.py
146 24 1
def run()
in servicecatalog_puppet/workflow/stack/provision_stack_dry_run_task.py
136 16 1
def show_pipelines()
in servicecatalog_puppet/commands/show_pipelines.py
135 16 1
def wait_for_parameterised_run_to_complete()
in servicecatalog_puppet/commands/misc.py
114 16 1
def requires()
in servicecatalog_puppet/workflow/manifest/generate_manifest_with_ids_task.py
101 16 1
def run()
in servicecatalog_puppet/workflow/launch/provision_product_dry_run_task.py
96 10 1
def load()
in servicecatalog_puppet/manifest_utils.py
91 21 2
def run()
in servicecatalog_puppet/workflow/manifest/generate_manifest_with_ids_task.py
87 10 1
def requires()
in servicecatalog_puppet/workflow/spoke_local_portfolios/do_share_portfolio_with_spoke_task.py
86 6 1
def expand_manifest()
in servicecatalog_puppet/manifest_utils.py
84 27 2
def run()
in servicecatalog_puppet/workflow/workspaces/provision_workspace_task.py
79 5 1
def get_template()
in servicecatalog_puppet/template_builder/hub/bootstrap_region.py
74 1 2
def expand()
in servicecatalog_puppet/commands/manifest.py
74 10 4
def run()
in servicecatalog_puppet/workflow/launch/run_deploy_in_spoke_task.py
63 2 1
def run()
in servicecatalog_puppet/workflow/service_control_policies/service_control_policies_create_policies_task.py
61 14 1
def run()
in servicecatalog_puppet/workflow/portfolio/portfolio_management/import_into_spoke_local_portfolio_task.py
59 8 1