aws-samples / amazon-kinesis-analytics-realtime-anomaly-detection
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 4 units with 193 lines of code in units (76.0% of code).
    • 1 very long units (144 lines of code)
    • 0 long units (0 lines of code)
    • 1 medium size units (28 lines of code)
    • 1 small units (18 lines of code)
    • 1 very small units (3 lines of code)
74% | 0% | 14% | 9% | 1%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py74% | 0% | 14% | 9% | 1%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
article_anomaly_detection_data_streams100% | 0% | 0% | 0% | 0%
producer0% | 0% | 90% | 0% | 9%
dataProcessingFunction0% | 0% | 0% | 100% | 0%
Alternative Visuals
Longest Units
Top 4 longest units
Unit# linesMcCabe index# params
def __init__()
in article_anomaly_detection_data_streams/article_anomaly_detection_data_streams_stack.py
144 1 4
def main()
in producer/producer.py
28 4 1
def main()
in dataProcessingFunction/lambda-handler.py
18 3 2
def get_random_string()
in producer/producer.py
3 2 1