aws-samples / sagemaker-studio-sparkmagic-lib
Unit Size

The distribution of size of units (measured in lines of code).

Intro
  • Unit size measurements show the distribution of size of units of code (methods, functions...).
  • Units are classified in four categories based on their size (lines of code): 1-20 (small units), 20-50 (medium size units), 51-100 (long units), 101+ (very long units).
  • You should aim at keeping units small (< 20 lines). Long units may become "bloaters", code that have increased to such gargantuan proportions that they are hard to work with.
Learn more...
Unit Size Overall
  • There are 27 units with 333 lines of code in units (69.7% of code).
    • 0 very long units (0 lines of code)
    • 1 long units (59 lines of code)
    • 3 medium size units (84 lines of code)
    • 6 small units (89 lines of code)
    • 17 very small units (101 lines of code)
0% | 17% | 25% | 26% | 30%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py0% | 17% | 25% | 26% | 30%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
sagemaker_studio_sparkmagic_lib0% | 17% | 25% | 26% | 30%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def get_krb_conf()
in sagemaker_studio_sparkmagic_lib/emr.py
59 8 1
def _write_spark_magic_conf()
in sagemaker_studio_sparkmagic_lib/sparkmagic.py
33 3 4
def _get_security_conf()
in sagemaker_studio_sparkmagic_lib/emr.py
26 3 2
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 primary_node_private_dns_name()
in sagemaker_studio_sparkmagic_lib/emr.py
17 8 1
def _get_libdefaults()
in sagemaker_studio_sparkmagic_lib/kerberos.py
16 1 1
def get_domain_search()
in sagemaker_studio_sparkmagic_lib/utils.py
15 4 1
def _get_cluster()
in sagemaker_studio_sparkmagic_lib/emr.py
13 2 3
def get_kinit_user_name()
in sagemaker_studio_sparkmagic_lib/emr.py
11 3 2
def __init__()
in sagemaker_studio_sparkmagic_lib/emr.py
10 2 4
def generate_kerb_conf_str()
in sagemaker_studio_sparkmagic_lib/kerberos.py
10 1 1
def _get_realms()
in sagemaker_studio_sparkmagic_lib/kerberos.py
10 2 1
def krb_hostname_override()
in sagemaker_studio_sparkmagic_lib/emr.py
8 5 1
def is_external_kdc()
in sagemaker_studio_sparkmagic_lib/emr.py
8 2 1
def main()
in sagemaker_studio_sparkmagic_lib/cli.py
8 1 0
def connect_to_emr_cluster()
in sagemaker_studio_sparkmagic_lib/sparkmagic.py
8 2 0
def connect_to_emr()
in sagemaker_studio_sparkmagic_lib/cli.py
7 2 1
def write_krb_conf()
in sagemaker_studio_sparkmagic_lib/kerberos.py
6 1 2
def is_krb_cluster()
in sagemaker_studio_sparkmagic_lib/emr.py
5 2 1