aws-samples / amazon-ivs-chime-messaging-ugc-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 40 units with 975 lines of code in units (54.2% of code).
    • 1 very long units (107 lines of code)
    • 1 long units (96 lines of code)
    • 14 medium size units (449 lines of code)
    • 19 small units (288 lines of code)
    • 5 very small units (35 lines of code)
10% | 9% | 46% | 29% | 3%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
js10% | 9% | 46% | 29% | 3%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
src16% | 14% | 56% | 11% | 1%
src/chimeapi0% | 0% | 25% | 66% | 8%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
render()
in src/App.js
107 2 0
function AWSIVSPlayer()
in src/channel.js
96 8 1
async getMessages()
in src/chat.js
47 3 0
async initSession()
in src/chat.js
45 4 0
render()
in src/channelList.js
43 3 0
42 2 1
36 2 1
render()
in src/myChannels.js
35 3 0
async function sendChannelMessage()
in src/chimeapi/chime.js
30 3 4
async function listChannelMessages()
in src/chimeapi/chime.js
28 4 3
27 2 0
25 3 0
24 1 3
async componentDidMount()
in src/myChannels.js
23 2 0
23 1 5
constructor()
in src/chat.js
21 1 1
constructor()
in src/myChannels.js
19 1 1
async function createChannel()
in src/chimeapi/chime.js
19 1 5
async function listChannelBans()
in src/chimeapi/chime.js
17 1 4
async function updateChannel()
in src/chimeapi/chime.js
17 1 4