aws / chalice
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 1,229 units with 10,806 lines of code in units (82.5% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 12 medium complex units (372 lines of code)
    • 55 simple units (1,229 lines of code)
    • 1,162 very simple units (9,205 lines of code)
0% | 0% | 3% | 11% | 85%
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% | 3% | 11% | 84%
pyi0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
chalice0% | 0% | 3% | 12% | 84%
chalice/deploy0% | 0% | 3% | 9% | 86%
chalice/vendored/botocore0% | 0% | 24% | 29% | 46%
chalice/cli0% | 0% | 3% | 14% | 81%
chalice/cli/filewatch0% | 0% | 0% | 0% | 100%
chalice/cdk0% | 0% | 0% | 0% | 100%
chalice/templates/6001-cdk-ddb0% | 0% | 0% | 0% | 100%
chalice/api0% | 0% | 0% | 0% | 100%
ROOT0% | 0% | 0% | 0% | 100%
chalice/templates/0007-lambda-only0% | 0% | 0% | 0% | 100%
chalice/templates/0002-s3-event-handler0% | 0% | 0% | 0% | 100%
chalice/templates/0009-legacy0% | 0% | 0% | 0% | 100%
chalice/templates/0000-rest-api0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def _download_dependencies()
in chalice/deploy/packager.py
43 18 4
def service_principal()
in chalice/awsclient.py
33 16 4
def _endpoint_for_partition()
in chalice/vendored/botocore/regions.py
24 15 5
def __init__()
in chalice/local.py
16 14 5
def handle_request()
in chalice/local.py
38 14 5
def _is_compatible_wheel_filename()
in chalice/deploy/packager.py
15 12 3
def load_chalice_app()
in chalice/cli/factory.py
23 12 3
def authorize()
in chalice/local.py
54 12 4
def _install_purelib_and_platlib()
in chalice/deploy/packager.py
15 11 3
def _create_rest_api_model()
in chalice/deploy/appgraph.py
57 11 5
def _update_function_config()
in chalice/awsclient.py
34 11 12
def match_route()
in chalice/local.py
20 11 2
def visit_Call()
in chalice/analyzer.py
30 10 2
def _generate_lambdafunction()
in chalice/package.py
46 10 3
def _create_lambda_event_resources()
in chalice/deploy/appgraph.py
46 9 4
52 9 3
def create_function()
in chalice/awsclient.py
43 9 15
def lambda_python_version()
in chalice/config.py
11 9 1
def _generate_lambdafunction()
in chalice/package.py
44 9 3
def _get_matching_sub_namespace()
in chalice/analyzer.py
9 8 3