aws-samples / aws-glue-crawler-utilities
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 10 units with 135 lines of code in units (68.2% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 3 medium size units (72 lines of code)
    • 3 small units (41 lines of code)
    • 4 very small units (22 lines of code)
0% | 0% | 53% | 30% | 16%
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% | 53% | 30% | 16%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
boto3_sample0% | 0% | 53% | 30% | 16%
Alternative Visuals
Longest Units
Top 10 longest units
Unit# linesMcCabe index# params
def set_sns_topic_policy()
in boto3_sample/s3_event_notifications_crawler_setup.py
28 2 3
def set_s3_notification_sns()
in boto3_sample/s3_event_notifications_crawler_setup.py
22 2 3
def set_sqs_policy()
in boto3_sample/s3_event_notifications_crawler_setup.py
22 1 4
def create_s3_bucket()
in boto3_sample/s3_event_notifications_crawler_setup.py
18 4 2
def get_sqs_queue_arn()
in boto3_sample/s3_event_notifications_crawler_setup.py
12 2 2
def subscribe_to_sns_topic()
in boto3_sample/s3_event_notifications_crawler_setup.py
11 2 4
def create_sns_topic()
in boto3_sample/s3_event_notifications_crawler_setup.py
9 2 2
def create_sqs_queue()
in boto3_sample/s3_event_notifications_crawler_setup.py
9 2 2
def print_error()
in boto3_sample/s3_event_notifications_crawler_setup.py
2 1 1
def create_s3_bucket_folder()
in boto3_sample/s3_event_notifications_crawler_setup.py
2 1 3