aws-samples / amazon-neptune-ml-use-cases
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 32 units with 549 lines of code in units (94.0% of code).
    • 1 very long units (111 lines of code)
    • 0 long units (0 lines of code)
    • 6 medium size units (206 lines of code)
    • 10 small units (130 lines of code)
    • 15 very small units (102 lines of code)
20% | 0% | 37% | 23% | 18%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py20% | 0% | 37% | 23% | 18%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
credit-card-fraud-detection20% | 0% | 37% | 23% | 18%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def setup_pretrained_endpoints()
in credit-card-fraud-detection/neptune_ml_utils.py
111 31 7
def __process_ratings_users()
in credit-card-fraud-detection/neptune_ml_utils.py
46 12 1
def __process_movies_genres()
in credit-card-fraud-detection/neptune_ml_utils.py
45 7 1
def delete_pretrained_data()
in credit-card-fraud-detection/neptune_ml_utils.py
43 11 5
def __run_create_model()
in credit-card-fraud-detection/neptune_ml_utils.py
26 1 8
def get_node_to_idx_mapping()
in credit-card-fraud-detection/neptune_ml_utils.py
25 10 4
def delete_pretrained_endpoints()
in credit-card-fraud-detection/neptune_ml_utils.py
21 12 1
def __run_create_endpoint_config()
in credit-card-fraud-detection/neptune_ml_utils.py
18 1 7
def signed_request()
in credit-card-fraud-detection/neptune_ml_utils.py
16 2 6
def delete_endpoint()
in credit-card-fraud-detection/neptune_ml_utils.py
13 3 2
def __create_model()
in credit-card-fraud-detection/neptune_ml_utils.py
13 1 3
def get_export_service_host()
in credit-card-fraud-detection/neptune_ml_utils.py
12 4 0
def setup_pretrained_endpoints()
in credit-card-fraud-detection/neptune_ml_utils.py
12 2 6
def get_predictions()
in credit-card-fraud-detection/neptune_ml_utils.py
12 4 3
def __download_and_unzip()
in credit-card-fraud-detection/neptune_ml_utils.py
12 4 1
def get_neptune_ml_job_output_location()
in credit-card-fraud-detection/neptune_ml_utils.py
11 2 2
def get_performance_metrics()
in credit-card-fraud-detection/neptune_ml_utils.py
11 3 2
def load_configuration()
in credit-card-fraud-detection/neptune_ml_utils.py
10 2 0
def get_embeddings()
in credit-card-fraud-detection/neptune_ml_utils.py
10 3 2
def __process_users()
in credit-card-fraud-detection/neptune_ml_utils.py
10 2 1