aws-samples / siem-on-amazon-opensearch-service
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 253 units with 4,776 lines of code in units (84.1% of code).
    • 1 very long units (706 lines of code)
    • 9 long units (627 lines of code)
    • 52 medium size units (1,617 lines of code)
    • 82 small units (1,191 lines of code)
    • 109 very small units (635 lines of code)
14% | 13% | 33% | 24% | 13%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py14% | 13% | 33% | 24% | 13%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
cdk/mysiem86% | 8% | 0% | 0% | 4%
lambda/es_loader/siem0% | 12% | 36% | 32% | 18%
cdk-deployment-samples/deployment_samples0% | 48% | 50% | 0% | <1%
lambda/deploy_es0% | 12% | 44% | 27% | 16%
lambda/es_loader0% | 0% | 55% | 39% | 5%
lambda/geoip_downloader0% | 0% | 58% | 41% | 0%
cdk-deployment-samples/lambda0% | 0% | 100% | 0% | 0%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def __init__()
in source/cdk/mysiem/aes_siem_stack.py
706 33 4
def __init__()
in source/cdk-deployment-samples/deployment_samples/deployment_samples_stack.py
88 1 4
def transform()
in source/lambda/es_loader/siem/sf_cloudtrail.py
83 32 1
def transform()
in source/lambda/es_loader/siem/sf_deepsecurity.py
79 18 1
def __init__()
in source/cdk-deployment-samples/deployment_samples/deployment_samples_stack.py
71 2 4
def rename_config_field_name()
in source/lambda/es_loader/siem/sf_config_snapshot.py
71 23 1
def validate_cdk_json()
in source/cdk/mysiem/aes_siem_stack.py
69 19 1
def transform()
in source/lambda/es_loader/siem/sf_okta.py
62 15 1
def upsert_role_mapping()
in source/lambda/deploy_es/index.py
53 14 6
def convert_dict_to_list()
in source/lambda/es_loader/siem/sf_config_snapshot.py
51 13 1
def __init__()
in source/cdk-deployment-samples/deployment_samples/deployment_samples_stack.py
50 1 4
def create_logconfig()
in source/lambda/es_loader/index.py
50 8 1
def transform()
in source/lambda/es_loader/siem/sf_securityhub.py
47 13 1
def __init__()
in source/cdk-deployment-samples/deployment_samples/deployment_samples_stack.py
46 1 4
def convert_lograw_to_dict()
in source/lambda/es_loader/siem/fileformat_winevtxml.py
44 12 3
def bulkloads_into_opensearch()
in source/lambda/es_loader/index.py
41 7 2
def transform()
in source/lambda/es_loader/siem/sf_rds_postgresql.py
41 10 1
def transform()
in source/lambda/es_loader/siem/sf_rds_mysql_error.py
41 8 1
def aes_domain_poll_create()
in source/lambda/deploy_es/index.py
41 12 2
def transform_to_ecs()
in source/lambda/es_loader/siem/__init__.py
40 14 1