aws-samples / amazon-sagemaker-feature-store-streaming-aggregation
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 14 units with 207 lines of code in units (35.3% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 3 medium size units (94 lines of code)
    • 5 small units (74 lines of code)
    • 6 very small units (39 lines of code)
0% | 0% | 45% | 35% | 18%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py0% | 0% | 45% | 35% | 18%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
src/lambda/InvokeFraudEndpointLambda0% | 0% | 51% | 30% | 17%
src/lambda/StreamingIngestAggFeatures0% | 0% | 0% | 69% | 30%
Alternative Visuals
Longest Units
Top 14 longest units
Unit# linesMcCabe index# params
def lookup_features()
in src/lambda/InvokeFraudEndpointLambda/lambda_function.py
37 4 2
def lambda_handler()
in src/lambda/InvokeFraudEndpointLambda/lambda_function.py
30 5 2
def dump_stats()
in src/lambda/InvokeFraudEndpointLambda/lambda_function.py
27 8 5
def lambda_handler()
in src/lambda/StreamingIngestAggFeatures/lambda_function.py
18 2 2
def calc_ratios_for_inference()
in src/lambda/InvokeFraudEndpointLambda/lambda_function.py
16 5 6
def retrieve_aggregated_features()
in src/lambda/InvokeFraudEndpointLambda/lambda_function.py
15 4 3
def featurestore_get_record()
in src/lambda/InvokeFraudEndpointLambda/lambda_function.py
13 4 2
def assemble_features()
in src/lambda/InvokeFraudEndpointLambda/lambda_function.py
12 2 2
def eval_cutoff_window()
in src/lambda/InvokeFraudEndpointLambda/lambda_function.py
9 3 1
def invoke_endpoint()
in src/lambda/InvokeFraudEndpointLambda/lambda_function.py
9 1 2
def update_agg()
in src/lambda/StreamingIngestAggFeatures/lambda_function.py
8 1 4
def decode_payload()
in src/lambda/InvokeFraudEndpointLambda/lambda_function.py
6 1 1
def calc_trans_time_delay()
in src/lambda/InvokeFraudEndpointLambda/lambda_function.py
5 1 1
def get_feature_value()
in src/lambda/InvokeFraudEndpointLambda/lambda_function.py
2 1 2