awslabs / aws-service-catalog-factory
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 221 units with 3,759 lines of code in units (46.0% of code).
    • 0 very complex units (0 lines of code)
    • 1 complex units (171 lines of code)
    • 4 medium complex units (356 lines of code)
    • 8 simple units (702 lines of code)
    • 208 very simple units (2,530 lines of code)
0% | 4% | 9% | 18% | 67%
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% | 4% | 9% | 18% | 67%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
servicecatalog_factory/commands0% | 15% | 23% | 15% | 45%
servicecatalog_factory/workflow0% | 0% | 11% | 11% | 77%
servicecatalog_factory/template_builder0% | 0% | 0% | 29% | 70%
servicecatalog_factory0% | 0% | 0% | 0% | 100%
servicecatalog_factory/utilities0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def show_pipelines()
in servicecatalog_factory/commands/show_pipelines.py
171 34 2
def run()
in servicecatalog_factory/workflow/portfolios/create_product_task.py
96 16 1
def generate_launch_constraints()
in servicecatalog_factory/commands/portfolios.py
147 15 1
def import_product_set()
in servicecatalog_factory/commands/portfolios.py
62 13 3
def fix_issues_for_portfolio()
in servicecatalog_factory/commands/portfolios.py
51 11 1
def nuke_product_version()
in servicecatalog_factory/commands/portfolios.py
45 8 3
def build()
in servicecatalog_factory/template_builder/builders.py
422 7 6
def list_resources()
in servicecatalog_factory/commands/list_resources.py
34 6 0
def ensure_code_commit_repo()
in servicecatalog_factory/commands/portfolios.py
58 6 1
def update_provisioned_product()
in servicecatalog_factory/commands/portfolios.py
40 6 5
def resources()
in servicecatalog_factory/workflow/tasks.py
12 6 1
def run()
in servicecatalog_factory/workflow/portfolios/create_version_pipeline_task.py
38 6 1
def run()
in servicecatalog_factory/workflow/portfolios/create_version_pipeline_template_task.py
53 6 1
def check_for_external_definitions_for()
in servicecatalog_factory/commands/portfolios.py
36 5 3
def add_product_to_portfolio()
in servicecatalog_factory/commands/portfolios.py
18 5 3
def get_product_from_portfolio()
in servicecatalog_factory/commands/portfolios.py
7 5 2
def get_source_for_pipeline()
in servicecatalog_factory/commands/portfolios.py
24 5 2
def generate()
in servicecatalog_factory/commands/portfolios.py
48 5 2
def get_initialiser_stack_tags()
in servicecatalog_factory/config.py
30 5 0
def run()
in servicecatalog_factory/workflow/codecommit/create_code_repo_task.py
53 5 1