amazon-connect / amazon-connect-streams
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 1,523 units with 17,931 lines of code in units (77.9% of code).
    • 9 very long units (2,057 lines of code)
    • 29 long units (2,028 lines of code)
    • 150 medium size units (4,496 lines of code)
    • 265 small units (3,824 lines of code)
    • 1,070 very small units (5,526 lines of code)
11% | 11% | 25% | 21% | 30%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
js11% | 11% | 25% | 21% | 30%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
src11% | 11% | 25% | 20% | 30%
src/mediaControllers0% | 0% | 47% | 22% | 29%
src/agent-app0% | 0% | 0% | 62% | 37%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
718 211 2
(function ()()
in src/api.js
281 6 1
visit: function()
in src/aws-client.js
209 61 2
195 101 1
152 28 2
150 58 3
(function ()()
in src/event.js
129 2 1
114 16 1
(function(exports)()
in src/aws-client.js
109 3 1
function parseHeaders()
in src/aws-client.js
97 12 1
97 2 2
(function ()()
in src/core.js
86 2 1
85 8 0
success: function()
in src/api.js
83 26 1
81 15 0
function formatValue()
in src/aws-client.js
80 31 3
(function()()
in src/client.js
78 2 1
78 19 4
led: function()
in src/aws-client.js
78 22 2
function encode()
in src/aws-client.js
75 15 1