aws-samples / aws-network-firewall-automation-examples
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 19 units with 388 lines of code in units (11.2% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 14 medium size units (337 lines of code)
    • 2 small units (31 lines of code)
    • 3 very small units (20 lines of code)
0% | 0% | 86% | 7% | 5%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
js0% | 0% | 91% | 4% | 4%
py0% | 0% | 75% | 16% | 7%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
Abuse.ch/src0% | 0% | 100% | 0% | 0%
NfwSlackIntegartion/src0% | 0% | 75% | 16% | 7%
TLSFingerprint/src0% | 0% | 67% | 16% | 15%
SpamHaus/src0% | 0% | 100% | 0% | 0%
EmergingThreats/src0% | 0% | 100% | 0% | 0%
TorProject/src0% | 0% | 100% | 0% | 0%
Alternative Visuals
Longest Units
Top 19 longest units
Unit# linesMcCabe index# params
def get_secret()
in NfwSlackIntegartion/src/slack-lambda.py
33 6 0
def isPublishable()
in NfwSlackIntegartion/src/slack-lambda.py
29 14 1
async function getDomains()
in Abuse.ch/src/ANFAbuseHostfile.js
26 1 0
function fetchCert()
in TLSFingerprint/src/TLSFingerprint.js
25 1 1
function fetchIPs()
in TorProject/src/TorProjectIPFiltering.js
24 1 0
def lambda_handler()
in NfwSlackIntegartion/src/slack-lambda.py
23 3 2
async function updateRuleGroup()
in Abuse.ch/src/ANFAbuseHostfile.js
23 3 2
async function updateRuleGroup()
in TLSFingerprint/src/TLSFingerprint.js
23 3 1
function fetchIPs()
in SpamHaus/src/SpamHauseEDropIPFiltering.js
23 1 0
function fetchIPs()
in SpamHaus/src/SpamHauseDropIPFiltering.js
23 1 0
function fetchIPs()
in EmergingThreats/src/EmergingThreats.js
22 1 0
function fetchRules()
in Abuse.ch/src/AbuseCHJA3.js
21 1 0
function fetchRules()
in Abuse.ch/src/AbuseCH.js
21 1 0
function fetchRules()
in EmergingThreats/src/EmergingBotCC.js
21 1 0
def post_slack_Message()
in NfwSlackIntegartion/src/slack-lambda.py
19 2 4
async function getDomains()
in TLSFingerprint/src/TLSFingerprint.js
12 2 1
def convertText2Json()
in NfwSlackIntegartion/src/slack-lambda.py
9 4 1
checkServerIdentity: function()
in TLSFingerprint/src/TLSFingerprint.js
8 2 2
function genSid()
in TLSFingerprint/src/TLSFingerprint.js
3 1 0