amazon-connect / amazon-connect-snippets
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 129 units with 1,948 lines of code in units (21.8% of code).
    • 3 very long units (344 lines of code)
    • 3 long units (187 lines of code)
    • 19 medium size units (597 lines of code)
    • 29 small units (449 lines of code)
    • 75 very small units (371 lines of code)
17% | 9% | 30% | 23% | 19%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
js20% | 11% | 33% | 13% | 20%
ts89% | 0% | 0% | 0% | 10%
py0% | 11% | 25% | 47% | 15%
go0% | 0% | 100% | 0% | 0%
tsx0% | 0% | 24% | 33% | 42%
java0% | 0% | 0% | 100% | 0%
cs0% | 0% | 0% | 100% | 0%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
tools/CCPConnectivityTestTools37% | 20% | 10% | 11% | 20%
javascript/programmatically-create-task-example54% | 0% | 26% | 9% | 8%
projects/ContextRouting0% | 66% | 33% | 0% | 0%
tools/CCPLogParser0% | 0% | 74% | 11% | 14%
tools/ConnectCloudwatchDashboard0% | 0% | 72% | 0% | 27%
python/syncinstances0% | 0% | 43% | 32% | 24%
go/GetQueueAvailableAgents0% | 0% | 100% | 0% | 0%
python/contactflowhelper0% | 0% | 34% | 34% | 30%
javascript/customAgentDesktop-AzureSSO0% | 0% | 21% | 30% | 48%
go/StartOutboundVoiceContact0% | 0% | 100% | 0% | 0%
python/remote-control-center0% | 0% | 13% | 77% | 8%
python/multiaccountmetrics0% | 0% | 0% | 83% | 16%
javascript/restrict-deskphone-in-ccp0% | 0% | 0% | 100% | 0%
java/OutboundExample0% | 0% | 0% | 100% | 0%
python/LexDefaultIntentUtterance0% | 0% | 0% | 100% | 0%
dotnet/OutboundExample0% | 0% | 0% | 100% | 0%
projects/WisdomAPI0% | 0% | 0% | 0% | 100%
python/holidaycheck0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
function detectDesktopOS()
in tools/CCPConnectivityTestTools/scripts/detectRTC.js
120 11 0
function checkDeviceSupport()
in tools/CCPConnectivityTestTools/scripts/detectRTC.js
115 43 1
constructor()
in javascript/programmatically-create-task-example/lib/amazon_connect_tasks_cloud_formation_template-stack.ts
109 1 3
function getBrowserInfo()
in tools/CCPConnectivityTestTools/scripts/detectRTC.js
78 18 0
def lambda_handler()
in projects/ContextRouting/Lambda/Python/ctrProcessor.py
56 18 2
function getIPs()
in tools/CCPConnectivityTestTools/scripts/detectRTC.js
53 19 2
def perform_sync()
in python/syncinstances/sync_instances.py
46 12 5
function detectPrivateMode()
in tools/CCPConnectivityTestTools/scripts/detectRTC.js
44 14 1
func main()
in go/GetQueueAvailableAgents/main.go
42 6 0
export default function interpolate()
in tools/CCPLogParser/src/utils/interpolator.js
42 11 7
export function buildIndex()
in tools/CCPLogParser/src/utils/findExtras.js
40 7 0
function send()
in tools/ConnectCloudwatchDashboard/index.js
37 3 6
function registerValidSW()
in tools/CCPLogParser/src/serviceWorker.js
33 8 2
function startTask()
in javascript/programmatically-create-task-example/src/lambdaFunctions/CreateTaskHandler.js
32 3 5
function betterGetContactFlowsInInstance()
in tools/ConnectCloudwatchDashboard/index.js
30 3 0
def lambda_handler()
in python/contactflowhelper/lambda_function.py
29 11 2
async componentDidMount()
in javascript/customAgentDesktop-AzureSSO/webApp/src/components/Ccp/Ccp.tsx
28 2 0
def lambda_handler()
in projects/ContextRouting/Lambda/Python/trackerCheck.py
28 2 2
let wrapper = function()
in tools/ConnectCloudwatchDashboard/index.js
27 3 1
func main()
in go/StartOutboundVoiceContact/main.go
26 3 0