awslabs / aws-build-accumulator
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 150 units with 1,448 lines of code in units (39.9% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 6 medium complex units (158 lines of code)
    • 17 simple units (469 lines of code)
    • 127 very simple units (821 lines of code)
0% | 0% | 10% | 32% | 56%
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% | 0% | 10% | 32% | 56%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
lib0% | 0% | 10% | 32% | 56%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def job_sorter()
in lib/litani_report.py
18 14 2
def build()
in lib/ninja_syntax.py
30 13 9
def run_consistent_to_job()
in lib/run_printer.py
35 13 2
def _make_cmd_node()
in lib/graph.py
20 12 6
def __call__()
in lib/transform_jobs.py
29 11 2
def get_stats_groups()
in lib/litani_report.py
26 11 2
def add_stage_stats()
in lib/litani_report.py
25 10 3
def _single_job_schema()
in lib/validation.py
30 9 0
def rule()
in lib/ninja_syntax.py
21 9 11
def _get_cmd()
in lib/ninja.py
17 8 1
def __str__()
in lib/graph.py
23 8 1
def copy_output_artifact()
in lib/output_artifact.py
19 8 2
def add_run_stats()
in lib/litani_report.py
9 8 1
def _run_schema()
in lib/validation.py
77 7 0
def _get_default_outcome_dict()
in lib/job_outcome.py
35 7 1
def get_run()
in lib/litani_report.py
45 7 1
def render()
in lib/litani_report.py
52 7 3
def process_output()
in lib/ninja.py
22 6 1
def build()
in lib/graph.py
16 6 1
def _get_cache_dir()
in lib/litani.py
31 6 1