awslabs / aws-crt-builder
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 255 units with 2,666 lines of code in units (73.2% of code).
    • 0 very complex units (0 lines of code)
    • 2 complex units (176 lines of code)
    • 16 medium complex units (694 lines of code)
    • 24 simple units (453 lines of code)
    • 213 very simple units (1,343 lines of code)
0% | 6% | 26% | 16% | 50%
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% | 6% | 26% | 16% | 50%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
builder/core0% | 6% | 21% | 19% | 53%
builder0% | 39% | 21% | 0% | 38%
builder/actions0% | 0% | 54% | 16% | 28%
builder/imports0% | 0% | 14% | 16% | 68%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def produce_config()
in builder/core/project.py
100 35 5
def parse_args()
in builder/main.py
76 29 0
def __init__()
in builder/core/env.py
67 21 2
def print_release_notes()
in builder/actions/release.py
106 19 1
def install()
in builder/imports/jdk.py
60 19 2
def run()
in builder/actions/install.py
51 18 2
def default_compiler()
in builder/core/toolchain.py
36 17 2
def current_host()
in builder/core/host.py
34 16 0
def __init__()
in builder/core/spec.py
36 16 2
def _get_git_branch()
in builder/core/env.py
42 16 0
def __init__()
in builder/core/toolchain.py
38 16 2
def run()
in builder/actions/script.py
36 15 2
def find_project()
in builder/core/project.py
27 14 2
def _build_project()
in builder/actions/cmake.py
55 12 5
def main()
in builder/main.py
41 12 0
def where()
in builder/core/util.py
22 11 3
def find_msvc()
in builder/core/toolchain.py
21 11 1
def _project_from_path()
in builder/core/project.py
22 11 2
def replace_variables()
in builder/core/util.py
14 10 2
def _resolve_projects()
in builder/core/project.py
17 10 2