awslabs / aws-iot-greengrass-accelerators
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 3,649 units with 63,303 lines of code in units (62.1% of code).
    • 0 very complex units (0 lines of code)
    • 8 complex units (580 lines of code)
    • 134 medium complex units (5,032 lines of code)
    • 405 simple units (8,051 lines of code)
    • 3,102 very simple units (49,640 lines of code)
0% | <1% | 7% | 12% | 78%
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% | <1% | 8% | 12% | 77%
ts0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
v1/stream_manager/cdk/cr-create-iot-thing-cert-policy0% | <1% | 9% | 11% | 78%
v1/stream_manager/cdk/cr-greengrass-service-role0% | <1% | 8% | 12% | 78%
v1/stream_manager/cdk/cr-greengrass-manage-deployments0% | <1% | 8% | 11% | 79%
v1/stream_manager/cdk/cr-s3-delete-objects0% | <1% | 7% | 11% | 79%
v2/os_cmd/cdk/components0% | 0% | 18% | 0% | 81%
v1/machine_learning_inference/cfn/lambda_functions0% | 0% | 0% | 58% | 41%
v1/extract_transform_load/cfn/lambda_functions0% | 0% | 0% | 57% | 42%
v2/base/cdk/lib0% | 0% | 0% | 16% | 83%
v2/etl_simple/cdk/components0% | 0% | 0% | 54% | 45%
v2/etl_simple/cdk/lib0% | 0% | 0% | 26% | 73%
v2/os_cmd/cdk/lib0% | 0% | 0% | 30% | 69%
v1/stream_manager/cdk/lambda-gg-stream-aggregator0% | 0% | 0% | 37% | 62%
v2/base/docker0% | 0% | 0% | 44% | 55%
v1/stream_manager/cdk0% | 0% | 0% | 5% | 94%
v1/stream_manager/cdk/lambda-gg-sensor-source0% | 0% | 0% | 0% | 100%
v1/stream_manager/cdk/iot-analytics0% | 0% | 0% | 0% | 100%
v1/stream_manager/docker_compose_stack/app0% | 0% | 0% | 0% | 100%
v1/stream_manager/cdk/lambda-gg-stream-producer0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def parse_url()
in v1/stream_manager/cdk/cr-create-iot-thing-cert-policy/cr_iot_thing_cert_policy/urllib3/util/url.py
53 26 1
def send()
in v1/stream_manager/cdk/cr-create-iot-thing-cert-policy/cr_iot_thing_cert_policy/requests/adapters.py
92 26 7
def parse_url()
in v1/stream_manager/cdk/cr-greengrass-service-role/cr_greengrass_service_role/urllib3/util/url.py
53 26 1
def send()
in v1/stream_manager/cdk/cr-greengrass-service-role/cr_greengrass_service_role/requests/adapters.py
92 26 7
def parse_url()
in v1/stream_manager/cdk/cr-s3-delete-objects/cr_s3_delete_objects/urllib3/util/url.py
53 26 1
def send()
in v1/stream_manager/cdk/cr-s3-delete-objects/cr_s3_delete_objects/requests/adapters.py
92 26 7
def parse_url()
in v1/stream_manager/cdk/cr-greengrass-manage-deployments/cr_greengrass_manage_deployments/urllib3/util/url.py
53 26 1
def send()
in v1/stream_manager/cdk/cr-greengrass-manage-deployments/cr_greengrass_manage_deployments/requests/adapters.py
92 26 7
def valid_contexto()
in v1/stream_manager/cdk/cr-create-iot-thing-cert-policy/cr_iot_thing_cert_policy/idna/core.py
32 23 3
def build_digest_header()
in v1/stream_manager/cdk/cr-create-iot-thing-cert-policy/cr_iot_thing_cert_policy/requests/auth.py
80 23 3
def valid_contexto()
in v1/stream_manager/cdk/cr-greengrass-service-role/cr_greengrass_service_role/idna/core.py
32 23 3
def build_digest_header()
in v1/stream_manager/cdk/cr-greengrass-service-role/cr_greengrass_service_role/requests/auth.py
80 23 3
def valid_contexto()
in v1/stream_manager/cdk/cr-s3-delete-objects/cr_s3_delete_objects/idna/core.py
32 23 3
def build_digest_header()
in v1/stream_manager/cdk/cr-s3-delete-objects/cr_s3_delete_objects/requests/auth.py
80 23 3
def valid_contexto()
in v1/stream_manager/cdk/cr-greengrass-manage-deployments/cr_greengrass_manage_deployments/idna/core.py
32 23 3
def build_digest_header()
in v1/stream_manager/cdk/cr-greengrass-manage-deployments/cr_greengrass_manage_deployments/requests/auth.py
80 23 3
def print_()
in v1/stream_manager/cdk/cr-create-iot-thing-cert-policy/cr_iot_thing_cert_policy/urllib3/packages/six.py
52 22 2
def feed()
in v1/stream_manager/cdk/cr-create-iot-thing-cert-policy/cr_iot_thing_cert_policy/chardet/universaldetector.py
66 22 2
def resolve_redirects()
in v1/stream_manager/cdk/cr-create-iot-thing-cert-policy/cr_iot_thing_cert_policy/requests/sessions.py
69 22 10
def print_()
in v1/stream_manager/cdk/cr-greengrass-service-role/cr_greengrass_service_role/urllib3/packages/six.py
52 22 2