aws-samples / aws-amplify-connect
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 37 units with 729 lines of code in units (42.9% of code).
    • 0 very long units (0 lines of code)
    • 2 long units (112 lines of code)
    • 15 medium size units (455 lines of code)
    • 6 small units (75 lines of code)
    • 14 very small units (87 lines of code)
0% | 15% | 62% | 10% | 11%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
js0% | 20% | 56% | 8% | 14%
py0% | 0% | 80% | 15% | 4%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
src/CCPData0% | 19% | 48% | 11% | 19%
amplify/backend/function/ConnectDialerJS/src0% | 38% | 61% | 0% | 0%
Python0% | 0% | 80% | 15% | 4%
src0% | 0% | 76% | 10% | 13%
amplify/backend/function/csvUploadStoreTrigger/src0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
function customerDataTable()
in src/CCPData/CCPDataTables.js
61 1 1
async function resetMaxAttempts()
in amplify/backend/function/ConnectDialerJS/src/index.js
51 4 0
async function callOutbound()
in amplify/backend/function/ConnectDialerJS/src/index.js
45 4 1
componentDidMount()
in src/CCPData/CCPData.js
45 3 0
def callOutbound()
in Python/ConnectDialer.py
38 5 5
async function queryDDB()
in amplify/backend/function/ConnectDialerJS/src/index.js
35 3 0
render()
in src/CCPData/CCPData.js
34 4 0
function registerValidSW()
in src/serviceWorker.js
33 8 2
def lambda_handler()
in Python/ConnectDialer.py
28 6 2
async onChange()
in src/CCPData/CCPData.js
28 1 1
def updateSuccessMetric()
in Python/ConnectDialerSuccessUpdate.py
26 1 2
def GetConnectMetric()
in Python/ConnectDialer.py
25 2 2
def resetMaxAttempts()
in Python/ConnectDialer.py
25 2 4
function checkValidServiceWorker()
in src/serviceWorker.js
25 4 2
render()
in src/CCPData/CCPData.js
23 2 0
componentDidMount()
in src/CCPData/CCPData.js
23 3 0
export function register()
in src/serviceWorker.js
22 5 1
def lambda_handler()
in Python/ConnectDialerSuccessUpdate.py
14 3 2
render()
in src/CCPData/CCPData.js
14 2 0
def queryDDB()
in Python/ConnectDialer.py
13 1 5