aws-solutions / aws-crr-monitor
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 48 units with 1,274 lines of code in units (89.8% of code).
    • 4 very long units (603 lines of code)
    • 1 long units (69 lines of code)
    • 9 medium size units (285 lines of code)
    • 13 small units (194 lines of code)
    • 21 very small units (123 lines of code)
47% | 5% | 22% | 15% | 9%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py47% | 5% | 22% | 15% | 9%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
CRRMonitor64% | 21% | 0% | 14% | 0%
CRRMonitorHousekeeping89% | 0% | 0% | 5% | 4%
CRRdeployagent33% | 0% | 38% | 16% | 11%
CRRHourlyMaint82% | 0% | 0% | 9% | 7%
CRRMonitorTrailAlarm0% | 0% | 52% | 27% | 20%
solution-helper0% | 0% | 69% | 0% | 30%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def message_handler()
in source/CRRMonitor/CRRMonitor.py
201 21 1
def lambda_handler()
in source/CRRMonitorHousekeeping/CRRMonitorHousekeeping.py
188 12 2
def agent_creator()
in source/CRRdeployagent/CRRdeployagent.py
110 12 5
def lambda_handler()
in source/CRRHourlyMaint/CRRHourlyMaint.py
104 13 2
def queue_handler()
in source/CRRMonitor/CRRMonitor.py
69 16 2
def agent_deleter()
in source/CRRdeployagent/CRRdeployagent.py
45 10 5
def wrap_user_handler()
in source/CRRMonitorTrailAlarm/cfn_resource.py
43 6 2
def wrap_user_handler()
in source/CRRdeployagent/cfn_resource.py
43 6 2
def get_agent_regions()
in source/CRRdeployagent/CRRdeployagent.py
36 8 0
def put_metric_alarm()
in source/CRRMonitorTrailAlarm/CRRMonitorTrailAlarm.py
29 3 2
def send()
in source/solution-helper/solution-helper.py
23 3 6
def put_metric_data()
in source/CRRMonitorTrailAlarm/CRRMonitorTrailAlarm.py
23 3 1
def put_event_selectors()
in source/CRRMonitorTrailAlarm/CRRMonitorTrailAlarm.py
22 2 2
def delete_trail_alarm()
in source/CRRMonitorTrailAlarm/CRRMonitorTrailAlarm.py
21 3 2
def send_anonymous_usage_metric()
in source/CRRMonitor/CRRMonitor.py
20 4 1
def create_agent()
in source/CRRdeployagent/CRRdeployagent.py
19 8 2
def delete_agent()
in source/CRRdeployagent/CRRdeployagent.py
19 7 2
def create_trail()
in source/CRRMonitorTrailAlarm/CRRMonitorTrailAlarm.py
17 2 2
def get_buckets()
in source/CRRMonitorTrailAlarm/CRRMonitorTrailAlarm.py
16 5 0
def get_replica_buckets()
in source/CRRdeployagent/CRRdeployagent.py
16 5 1