awslabs / athena-glue-service-logs
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 112 units with 1,102 lines of code in units (88.0% of code).
    • 1 very long units (101 lines of code)
    • 1 long units (100 lines of code)
    • 9 medium size units (306 lines of code)
    • 15 small units (225 lines of code)
    • 86 very small units (370 lines of code)
9% | 9% | 27% | 20% | 33%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py9% | 9% | 27% | 20% | 33%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
athena_glue_service_logs10% | 10% | 30% | 18% | 30%
athena_glue_service_logs/partitioners0% | 0% | 0% | 41% | 58%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def _build_storage_descriptor()
in athena_glue_service_logs/cloudtrail.py
101 3 2
def _build_storage_descriptor()
in athena_glue_service_logs/cloudtrail.py
100 5 2
def _build_storage_descriptor()
in athena_glue_service_logs/s3_access.py
43 4 2
def _build_storage_descriptor()
in athena_glue_service_logs/cloudfront.py
42 5 2
def _build_storage_descriptor()
in athena_glue_service_logs/s3_access.py
40 5 2
def _build_storage_descriptor()
in athena_glue_service_logs/cloudfront.py
39 5 2
def _build_storage_descriptor()
in athena_glue_service_logs/elb_classic.py
36 4 2
def _columns()
in athena_glue_service_logs/alb.py
30 1 0
def _columns()
in athena_glue_service_logs/alb.py
30 1 0
def __init__()
in athena_glue_service_logs/job.py
24 4 2
def run()
in athena_glue_service_logs/converter.py
22 4 1
def find_recent_partitions()
in athena_glue_service_logs/partitioners/grouped_date_partitioner.py
19 10 2
def _apply_mappings()
in athena_glue_service_logs/alb.py
17 5 2
def _build_storage_descriptor()
in athena_glue_service_logs/alb.py
17 4 2
def get_regions_in_partition()
in athena_glue_service_logs/utils.py
17 4 3
def _columns()
in athena_glue_service_logs/vpc_flow.py
17 1 0
def _build_storage_descriptor()
in athena_glue_service_logs/vpc_flow.py
17 5 2
def _columns()
in athena_glue_service_logs/vpc_flow.py
17 1 0
def _build_storage_descriptor()
in athena_glue_service_logs/alb.py
15 5 2
def _build_storage_descriptor()
in athena_glue_service_logs/vpc_flow.py
15 5 2