aws-samples / pyflink-getting-started
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 28 units with 287 lines of code in units (63.8% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 5 medium size units (160 lines of code)
    • 1 small units (13 lines of code)
    • 22 very small units (114 lines of code)
0% | 0% | 55% | 4% | 39%
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% | 55% | 4% | 39%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
pyflink-examples/StreamingFileSink0% | 0% | 55% | 0% | 44%
pyflink-examples/UDF0% | 0% | 61% | 0% | 38%
pyflink-examples/SlidingWindows0% | 0% | 54% | 22% | 23%
pyflink-examples/TumblingWindows0% | 0% | 57% | 0% | 42%
pyflink-examples/GettingStarted0% | 0% | 65% | 0% | 34%
datagen0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def main()
in pyflink-examples/StreamingFileSink/streaming-file-sink.py
33 3 0
def main()
in pyflink-examples/UDF/udf.py
33 3 0
def main()
in pyflink-examples/TumblingWindows/tumbling-windows.py
32 3 0
def main()
in pyflink-examples/SlidingWindows/sliding-windows.py
32 3 0
def main()
in pyflink-examples/GettingStarted/getting-started.py
30 2 0
def perform_sliding_window_aggregation()
in pyflink-examples/SlidingWindows/sliding-windows.py
13 1 1
def perform_tumbling_window_aggregation()
in pyflink-examples/StreamingFileSink/streaming-file-sink.py
10 1 1
def perform_tumbling_window_aggregation()
in pyflink-examples/TumblingWindows/tumbling-windows.py
10 1 1
def generate()
in datagen/stock.py
8 2 2
def get_application_properties()
in pyflink-examples/StreamingFileSink/streaming-file-sink.py
8 2 0
def get_application_properties()
in pyflink-examples/TumblingWindows/tumbling-windows.py
8 2 0
def get_application_properties()
in pyflink-examples/GettingStarted/getting-started.py
8 2 0
def get_application_properties()
in pyflink-examples/UDF/udf.py
8 2 0
def get_application_properties()
in pyflink-examples/SlidingWindows/sliding-windows.py
8 2 0
def to_upper()
in pyflink-examples/UDF/udf.py
7 1 1
def get_data()
in datagen/stock.py
5 1 0
def property_map()
in pyflink-examples/StreamingFileSink/streaming-file-sink.py
4 3 2
def property_map()
in pyflink-examples/TumblingWindows/tumbling-windows.py
4 3 2
def property_map()
in pyflink-examples/GettingStarted/getting-started.py
4 3 2
def property_map()
in pyflink-examples/UDF/udf.py
4 3 2