aws / connect-rtc-js
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,196 units with 11,315 lines of code in units (93.8% of code).
    • 6 very long units (1,531 lines of code)
    • 16 long units (1,067 lines of code)
    • 63 medium size units (2,079 lines of code)
    • 149 small units (2,232 lines of code)
    • 962 very small units (4,406 lines of code)
13% | 9% | 18% | 19% | 38%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
js13% | 9% | 18% | 19% | 38%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
release16% | 8% | 20% | 20% | 33%
src/js0% | 9% | 10% | 16% | 64%
ROOT0% | 100% | 0% | 0% | 0%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
packetsCount: parseInt()
in release/connect-rtc.js
741 60 1
290 81 1
141 43 0
var RtcSession = function()
in release/connect-rtc.js
140 1 0
module.exports = function()
in release/connect-rtc.js
111 24 2
bytesReceived: parseInt()
in release/connect-rtc.js
108 32 1
83 22 0
81 1 1
impl = function()
in release/connect-rtc.js
80 24 0
75 16 1
75 27 1
function transformSdp()
in release/connect-rtc.js
73 23 2
value: function()
in release/connect-rtc.js
69 17 0
_buildMediaConstraints()
in src/js/rtc_session.js
67 20 0
67 20 0
62 14 1
var RTCPeerConnection = function()
in release/connect-rtc.js
61 12 1
58 13 2
async getStats()
in src/js/rtc_session.js
55 10 0
function makeInvokeMethod()
in release/connect-rtc.js
55 16 3