aws / aws-health-tools
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 44 units with 629 lines of code in units (13.1% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 9 medium size units (275 lines of code)
    • 17 small units (259 lines of code)
    • 18 very small units (95 lines of code)
0% | 0% | 43% | 41% | 15%
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% | 44% | 39% | 16%
js0% | 0% | 35% | 58% | 5%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
shd-notifier0% | 0% | 75% | 16% | 7%
automated-actions/AWS_RISK_CREDENTIALS_EXPOSED0% | 0% | 37% | 44% | 17%
automated-actions/AWS_EBS_VOLUME_LOST0% | 0% | 27% | 30% | 41%
coralogix-notifier0% | 0% | 100% | 0% | 0%
automated-actions/AWS_ELASTICLOADBALANCING_ENI_LIMIT_REACHED0% | 0% | 100% | 0% | 0%
high-availability-endpoint/python0% | 0% | 0% | 91% | 8%
automated-actions/AWS_EC2_INSTANCE_STORE_DRIVE_PERFORMANCE_DEGRADED0% | 0% | 0% | 90% | 9%
teams-notifier0% | 0% | 0% | 100% | 0%
slack-notifier0% | 0% | 0% | 100% | 0%
chime-notifier0% | 0% | 0% | 100% | 0%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def lambda_handler()
in shd-notifier/Health-Event-Chat-Post-LambdaFn.py
48 14 2
def lambda_handler()
in shd-notifier/Health-Event-Poller-LambdaFn.py
44 10 2
def get_event()
in automated-actions/AWS_EBS_VOLUME_LOST/stepbystep/alexa_skill.py
34 3 0
def chatMessage()
in shd-notifier/Health-Event-Chat-Post-LambdaFn.py
28 8 4
def lambda_handler()
in automated-actions/AWS_RISK_CREDENTIALS_EXPOSED/lambda_functions/notify_security.py
26 2 2
def lambda_handler()
in shd-notifier/Health-Event-Status-LambdaFn.py
25 5 2
def lambda_handler()
in coralogix-notifier/LambdaFunction.py
25 5 2
function deleteNetworkInterface()
in automated-actions/AWS_ELASTICLOADBALANCING_ENI_LIMIT_REACHED/LambdaFunction.js
24 4 2
def lambda_handler()
in automated-actions/AWS_RISK_CREDENTIALS_EXPOSED/lambda_functions/lookup_cloudtrail_events.py
21 3 2
def lambda_handler()
in teams-notifier/LambdaFunction.py
20 3 2
def on_intent()
in automated-actions/AWS_EBS_VOLUME_LOST/stepbystep/alexa_skill.py
19 8 2
def get_events()
in automated-actions/AWS_RISK_CREDENTIALS_EXPOSED/lambda_functions/lookup_cloudtrail_events.py
18 2 3
def getLatestPhdEvent()
in automated-actions/AWS_EBS_VOLUME_LOST/stepbystep/alexa_skill.py
18 3 0
def lambda_handler()
in slack-notifier/LambdaFunction.py
17 3 2
def describe_events()
in high-availability-endpoint/python/main.py
17 5 0
def lambda_handler()
in shd-notifier/Health-Event-Iterator-LambdaFn.py
16 6 2
def eventDetailedDesc()
in shd-notifier/Health-Event-Chat-Post-LambdaFn.py
16 3 1
def lambda_handler()
in chime-notifier/LambdaFunction.py
15 3 2
def lambda_handler()
in automated-actions/AWS_RISK_CREDENTIALS_EXPOSED/lambda_functions/delete_access_key_pair.py
15 1 2
function getMatchingInstances()
in automated-actions/AWS_EC2_INSTANCE_STORE_DRIVE_PERFORMANCE_DEGRADED/LambdaFunction.js
15 4 1