aws-samples / sagemaker-studio-sparkmagic-lib
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 27 units with 333 lines of code in units (69.7% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 0 medium complex units (0 lines of code)
    • 2 simple units (76 lines of code)
    • 25 very simple units (257 lines of code)
0% | 0% | 0% | 22% | 77%
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% | 0% | 22% | 77%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
sagemaker_studio_sparkmagic_lib0% | 0% | 0% | 22% | 77%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def primary_node_private_dns_name()
in sagemaker_studio_sparkmagic_lib/emr.py
17 8 1
def get_krb_conf()
in sagemaker_studio_sparkmagic_lib/emr.py
59 8 1
def krb_hostname_override()
in sagemaker_studio_sparkmagic_lib/emr.py
8 5 1
def get_domain_search()
in sagemaker_studio_sparkmagic_lib/utils.py
15 4 1
def _get_boto3_session()
in sagemaker_studio_sparkmagic_lib/emr.py
25 3 2
def _get_instances()
in sagemaker_studio_sparkmagic_lib/emr.py
17 3 3
def _get_security_conf()
in sagemaker_studio_sparkmagic_lib/emr.py
26 3 2
def get_kinit_user_name()
in sagemaker_studio_sparkmagic_lib/emr.py
11 3 2
def _write_spark_magic_conf()
in sagemaker_studio_sparkmagic_lib/sparkmagic.py
33 3 4
def __init__()
in sagemaker_studio_sparkmagic_lib/emr.py
10 2 4
def _get_cluster()
in sagemaker_studio_sparkmagic_lib/emr.py
13 2 3
def is_krb_cluster()
in sagemaker_studio_sparkmagic_lib/emr.py
5 2 1
def is_external_kdc()
in sagemaker_studio_sparkmagic_lib/emr.py
8 2 1
def connect_to_emr()
in sagemaker_studio_sparkmagic_lib/cli.py
7 2 1
def get_emr_endpoint_url()
in sagemaker_studio_sparkmagic_lib/utils.py
4 2 1
def _get_realms()
in sagemaker_studio_sparkmagic_lib/kerberos.py
10 2 1
def _convert_to_krb_conf_format()
in sagemaker_studio_sparkmagic_lib/kerberos.py
5 2 2
def connect_to_emr_cluster()
in sagemaker_studio_sparkmagic_lib/sparkmagic.py
8 2 0
def _is_krb_cluster()
in sagemaker_studio_sparkmagic_lib/sparkmagic.py
2 2 2
def _get_region()
in sagemaker_studio_sparkmagic_lib/emr.py
2 1 1