aws-samples / amazon-chime-sdk-amazon-connect-integration-demo
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 30 units with 333 lines of code in units (24.5% of code).
    • 0 very long units (0 lines of code)
    • 1 long units (52 lines of code)
    • 1 medium size units (48 lines of code)
    • 8 small units (126 lines of code)
    • 20 very small units (107 lines of code)
0% | 15% | 14% | 37% | 32%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
js0% | 15% | 14% | 37% | 32%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
customer/src/customer0% | 30% | 28% | 28% | 12%
agent/src/agent0% | 0% | 0% | 54% | 45%
agent/src/meeting-operations0% | 0% | 0% | 62% | 37%
customer/src0% | 0% | 0% | 0% | 100%
agent/src0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
function successHandler()
in customer/src/customer/index.js
52 7 1
$()
in customer/src/customer/index.js
48 3 1
chatSession.incomingItemDecorator = function()
in customer/src/customer/index.js
20 5 1
export async function endMeeting()
in agent/src/meeting-operations/meeting.js
20 3 1
async function initializeMeetingSession()
in customer/src/customer/index.js
18 2 0
18 1 0
function leave()
in agent/src/agent/index.js
14 2 0
async function handleVideoToggleButton()
in agent/src/agent/index.js
13 4 1
function getMeetingInfo()
in agent/src/agent/index.js
12 4 1
function resetForm()
in customer/src/customer/index.js
11 1 0
function endCurrentMeetingSession()
in customer/src/customer/index.js
10 2 0
function initCCP()
in agent/src/agent/index.js
10 1 0
function initButtons()
in agent/src/agent/index.js
9 2 0
async function handleContactEnded()
in agent/src/agent/index.js
9 2 1
9 1 0
function sendMessage()
in agent/src/agent/index.js
7 1 2
export function domShow()
in customer/src/utils.js
5 1 1
export function domHide()
in customer/src/utils.js
5 1 1
export function domShow()
in agent/src/utils.js
5 1 1
export function domHide()
in agent/src/utils.js
5 1 1