aws-samples / amazon-kinesis-data-analytics-for-pyflink-applications
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 12 units with 114 lines of code in units (76.0% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 2 medium size units (45 lines of code)
    • 4 small units (55 lines of code)
    • 6 very small units (14 lines of code)
0% | 0% | 39% | 48% | 12%
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% | 39% | 48% | 12%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
PythonKafkaSink0% | 0% | 47% | 22% | 29%
lambda-functions0% | 0% | 33% | 66% | 0%
Alternative Visuals
Longest Units
Top 12 longest units
Unit# linesMcCabe index# params
def main()
in PythonKafkaSink/main.py
23 1 0
def send()
in lambda-functions/kfpLambdaCustomMSKConfig.py
22 2 5
def lambda_handler()
in lambda-functions/kfpLambdaStreamProducer.py
16 2 2
def lambda_handler()
in lambda-functions/kfpLambdaCustomMSKConfig.py
16 3 2
def lambda_handler()
in lambda-functions/kfpLambdaConsumerSNS.py
12 3 2
def app_properties()
in PythonKafkaSink/main.py
11 2 0
def property_map()
in PythonKafkaSink/main.py
4 3 2
def create_table_input()
in PythonKafkaSink/main.py
2 1 3
def create_table_output_kafka()
in PythonKafkaSink/main.py
2 1 3
def create_table_output_s3()
in PythonKafkaSink/main.py
2 1 2
def insert_stream_sns()
in PythonKafkaSink/main.py
2 1 2
def insert_stream_s3()
in PythonKafkaSink/main.py
2 1 2