amazon-connect / amazon-connect-call-quality-monitoring
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 894 units with 10,297 lines of code in units (91.9% of code).
    • 9 very long units (1,869 lines of code)
    • 13 long units (869 lines of code)
    • 70 medium size units (2,271 lines of code)
    • 139 small units (2,081 lines of code)
    • 663 very small units (3,207 lines of code)
18% | 8% | 22% | 20% | 31%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
js17% | 8% | 20% | 20% | 32%
ts28% | 15% | 50% | 0% | 5%
py0% | 0% | 48% | 31% | 20%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
monitoring-stack-cdk/resources/frontend16% | 8% | 20% | 21% | 33%
monitoring-stack-cdk/resources/custom-resources/kibana-config74% | 0% | 20% | 5% | 0%
deployment-stack-cdk/lib92% | 0% | 0% | 0% | 7%
monitoring-stack-cdk/lib0% | 22% | 73% | 0% | 3%
monitoring-stack-cdk/resources/custom-resources/sar-confirmer0% | 0% | 100% | 0% | 0%
monitoring-stack-cdk/resources/lambda-functions/sendAPIMetricReportvenv0% | 0% | 69% | 30% | 0%
monitoring-stack-cdk/resources/lambda-functions/sendSoftPhoneReportvenv0% | 0% | 50% | 31% | 18%
monitoring-stack-cdk/resources/lambda-functions/sendSoftPhoneMetricsvenv0% | 0% | 39% | 35% | 24%
monitoring-stack-cdk/resources/custom-resources/frontend-generator0% | 0% | 0% | 100% | 0%
monitoring-stack-cdk/resources/lambda-functions/generateSQSmessages0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
packetsCount: parseInt()
in monitoring-stack-cdk/resources/frontend/connect-rtc.js
741 60 1
RTCPeerConnection.prototype.setRemoteDescription = function()
in monitoring-stack-cdk/resources/frontend/connect-rtc.js
290 81 1
RTCPeerConnection.prototype.createOffer = function()
in monitoring-stack-cdk/resources/frontend/connect-rtc.js
141 43 0
var RtcSession = function()
in monitoring-stack-cdk/resources/frontend/connect-rtc.js
140 1 0
constructor()
in deployment-stack-cdk/lib/deployment-cdk-resources-stack.ts
116 1 3
async function configureHighCardinalityAnomalyDetection()
in monitoring-stack-cdk/resources/custom-resources/kibana-config/kibanaConfigurer.js
115 3 1
module.exports = function()
in monitoring-stack-cdk/resources/frontend/connect-rtc.js
111 24 2
bytesReceived: parseInt()
in monitoring-stack-cdk/resources/frontend/connect-rtc.js
108 32 1
async function createIndices()
in monitoring-stack-cdk/resources/custom-resources/kibana-config/kibanaConfigurer.js
107 1 1
RTCPeerConnection.prototype.createAnswer = function()
in monitoring-stack-cdk/resources/frontend/connect-rtc.js
83 22 0
impl = function()
in monitoring-stack-cdk/resources/frontend/connect-rtc.js
80 24 0
RTCPeerConnection.prototype.setLocalDescription = function()
in monitoring-stack-cdk/resources/frontend/connect-rtc.js
75 16 1
RTCPeerConnection.prototype.addIceCandidate = function()
in monitoring-stack-cdk/resources/frontend/connect-rtc.js
75 27 1
function transformSdp()
in monitoring-stack-cdk/resources/frontend/connect-rtc.js
73 23 2
value: function()
in monitoring-stack-cdk/resources/frontend/connect-rtc.js
69 17 0
value: function _buildMediaConstraints()
in monitoring-stack-cdk/resources/frontend/connect-rtc.js
67 20 0
constructor()
in monitoring-stack-cdk/lib/monitoring-stack.ts
63 15 2
SDPUtils.parseRtpEncodingParameters = function()
in monitoring-stack-cdk/resources/frontend/connect-rtc.js
62 14 1
var RTCPeerConnection = function()
in monitoring-stack-cdk/resources/frontend/connect-rtc.js
61 12 1
function makeInvokeMethod()
in monitoring-stack-cdk/resources/frontend/connect-rtc.js
55 16 3