aws-samples / iot-secure-tunneling-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 7 units with 112 lines of code in units (44.4% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 3 medium size units (88 lines of code)
    • 0 small units (0 lines of code)
    • 4 very small units (24 lines of code)
0% | 0% | 78% | 0% | 21%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
ts0% | 0% | 100% | 0% | 0%
js0% | 0% | 48% | 0% | 51%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
cdk/lib0% | 0% | 100% | 0% | 0%
device-agent/src0% | 0% | 48% | 0% | 51%
cdk/lib/constructs0% | 0% | 100% | 0% | 0%
Alternative Visuals
Longest Units
Top 7 longest units
Unit# linesMcCabe index# params
constructor()
in cdk/lib/aws-iot-sec-tunnel-stack.ts
42 1 2
constructor()
in cdk/lib/constructs/thing-construct.ts
23 1 3
function getInstanceName()
in device-agent/src/index.js
23 2 0
getLogger: function()
in device-agent/src/logger.js
10 1 1
function getInstanceIdentityDocument()
in device-agent/src/index.js
7 1 0
function()
in device-agent/src/index.js
5 1 0
format: combine()
in device-agent/src/logger.js
2 1 1