awslabs / aws-service-catalog-puppet
Conditional Complexity

The distribution of complexity of units (measured with McCabe index).

Intro
  • Conditional complexity (also called cyclomatic complexity) is a term used to measure the complexity of software. The term refers to the number of possible paths through a program function. A higher value ofter means higher maintenance and testing costs (infosecinstitute.com).
  • Conditional complexity is calculated by counting all conditions in the program that can affect the execution path (e.g. if statement, loops, switches, and/or operators, try and catch blocks...).
  • Conditional complexity is measured at the unit level (methods, functions...).
  • Units are classified in four categories based on the measured McCabe index: 1-5 (simple units), 6-10 (medium complex units), 11-25 (complex units), 26+ (very complex units).
Learn more...
Conditional Complexity Overall
  • There are 631 units with 8,270 lines of code in units (49.6% of code).
    • 0 very complex units (0 lines of code)
    • 2 complex units (261 lines of code)
    • 11 medium complex units (1,217 lines of code)
    • 40 simple units (1,431 lines of code)
    • 578 very simple units (5,361 lines of code)
0% | 3% | 14% | 17% | 64%
Legend:
51+
26-50
11-25
6-10
1-5
Alternative Visuals
Conditional Complexity per Extension
51+
26-50
11-25
6-10
1-5
py0% | 3% | 14% | 17% | 64%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
servicecatalog_puppet0% | 17% | 6% | 15% | 60%
servicecatalog_puppet/commands0% | 0% | 29% | 23% | 46%
servicecatalog_puppet/workflow/stack0% | 0% | 42% | 24% | 32%
servicecatalog_puppet/workflow/launch0% | 0% | 22% | 13% | 63%
servicecatalog_puppet/workflow/portfolio0% | 0% | 12% | 22% | 64%
servicecatalog_puppet/workflow/manifest0% | 0% | 40% | 34% | 25%
servicecatalog_puppet/workflow/service_control_policies0% | 0% | 23% | 19% | 56%
servicecatalog_puppet/workflow/simulate_policies0% | 0% | 31% | 0% | 68%
servicecatalog_puppet/workflow/spoke_local_portfolios0% | 0% | 0% | 39% | 60%
servicecatalog_puppet/workflow/general0% | 0% | 0% | 34% | 65%
servicecatalog_puppet/workflow/codebuild_runs0% | 0% | 0% | 27% | 72%
servicecatalog_puppet/workflow0% | 0% | 0% | 6% | 93%
servicecatalog_puppet/workflow/workspaces0% | 0% | 0% | 2% | 97%
servicecatalog_puppet/workflow/generic0% | 0% | 0% | 0% | 100%
servicecatalog_puppet/workflow/generate0% | 0% | 0% | 0% | 100%
servicecatalog_puppet/workflow/assertions0% | 0% | 0% | 0% | 100%
servicecatalog_puppet/workflow/lambda_invocations0% | 0% | 0% | 0% | 100%
servicecatalog_puppet/template_builder/hub0% | 0% | 0% | 0% | 100%
servicecatalog_puppet/workflow/apps0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def rewrite_cfct()
in servicecatalog_puppet/manifest_utils.py
177 30 1
def expand_manifest()
in servicecatalog_puppet/manifest_utils.py
84 27 2
def run()
in servicecatalog_puppet/workflow/stack/provision_stack_task.py
146 24 1
def run()
in servicecatalog_puppet/workflow/portfolio/portfolio_management/copy_into_spoke_local_portfolio_task.py
176 22 1
def load()
in servicecatalog_puppet/manifest_utils.py
91 21 2
def run()
in servicecatalog_puppet/workflow/launch/provision_product_task.py
180 17 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/stack/provision_stack_dry_run_task.py
136 16 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/simulate_policies/do_execute_simulate_policy_task.py
41 14 1
def validate()
in servicecatalog_puppet/commands/manifest.py
36 11 1
def expand()
in servicecatalog_puppet/commands/manifest.py
74 10 4
def run()
in servicecatalog_puppet/workflow/launch/provision_product_dry_run_task.py
96 10 1
def run()
in servicecatalog_puppet/workflow/service_control_policies/get_or_create_policy_task.py
52 10 1
def run()
in servicecatalog_puppet/workflow/manifest/generate_manifest_with_ids_task.py
87 10 1
def get_sharing_policies_by_region()
in servicecatalog_puppet/manifest_utils.py
36 9 1
def graph()
in servicecatalog_puppet/commands/graph.py
25 9 1
def ensure_stack_is_in_complete_status()
in servicecatalog_puppet/workflow/stack/provision_stack_task.py
51 9 1