aws / sagemaker-spark-container
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 82 units with 692 lines of code in units (61.0% of code).
    • 0 very long units (0 lines of code)
    • 1 long units (64 lines of code)
    • 7 medium size units (196 lines of code)
    • 13 small units (178 lines of code)
    • 61 very small units (254 lines of code)
0% | 9% | 28% | 25% | 36%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py0% | 9% | 28% | 25% | 36%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
src/smspark0% | 9% | 28% | 25% | 36%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def run()
in src/smspark/job.py
64 7 4
def write_runtime_cluster_config()
in src/smspark/bootstrapper.py
42 6 1
def set_yarn_spark_resource_config()
in src/smspark/bootstrapper.py
30 3 1
def write_user_configuration()
in src/smspark/bootstrapper.py
29 5 1
def _get_list_of_files()
in src/smspark/cli.py
27 15 1
def write_config()
in src/smspark/config.py
25 4 1
def start_hadoop_daemons()
in src/smspark/bootstrapper.py
22 4 1
def start_history_server()
in src/smspark/history_server_utils.py
21 3 1
18 10 3
def copy_cluster_config()
in src/smspark/bootstrapper.py
18 1 1
def run()
in src/smspark/spark_event_logs_publisher.py
17 5 1
def __post_init__()
in src/smspark/config.py
16 9 1
def run()
in src/smspark/spark_executor_logs_watcher.py
14 4 1
def get_regional_configs()
in src/smspark/bootstrapper.py
14 4 1
def submit_main()
in src/smspark/cli.py
13 5 0
def deserialize_user_configuration_dict()
in src/smspark/bootstrapper.py
12 3 3
def env_serializer()
in src/smspark/config.py
12 4 1
def submit()
in src/smspark/cli.py
11 1 0
def _config_history_log_dir()
in src/smspark/history_server_utils.py
11 2 1
def copy_aws_jars()
in src/smspark/bootstrapper.py
11 3 1