aws / aws-iot-device-sdk-js-v2
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 60 units with 906 lines of code in units (65.7% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 32 medium size units (712 lines of code)
    • 2 small units (25 lines of code)
    • 26 very small units (169 lines of code)
0% | 0% | 78% | 2% | 18%
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% | 78% | 2% | 18%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
lib/iotshadow0% | 0% | 85% | 0% | 14%
lib/iotjobs0% | 0% | 84% | 0% | 15%
lib/iotidentity0% | 0% | 81% | 0% | 18%
lib/greengrass0% | 0% | 0% | 39% | 60%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
23 2 4
async subscribeToUpdateJobExecutionRejected()
in lib/iotjobs/iotjobsclient.ts
23 2 4
async subscribeToUpdateJobExecutionAccepted()
in lib/iotjobs/iotjobsclient.ts
23 2 4
23 2 4
async subscribeToGetNamedShadowRejected()
in lib/iotshadow/iotshadowclient.ts
23 2 4
async subscribeToDeleteNamedShadowRejected()
in lib/iotshadow/iotshadowclient.ts
23 2 4
async subscribeToGetNamedShadowAccepted()
in lib/iotshadow/iotshadowclient.ts
23 2 4
async subscribeToNamedShadowUpdatedEvents()
in lib/iotshadow/iotshadowclient.ts
23 2 4
async subscribeToDeleteNamedShadowAccepted()
in lib/iotshadow/iotshadowclient.ts
23 2 4
async subscribeToUpdateNamedShadowRejected()
in lib/iotshadow/iotshadowclient.ts
23 2 4
async subscribeToNamedShadowDeltaUpdatedEvents()
in lib/iotshadow/iotshadowclient.ts
23 2 4
async subscribeToUpdateNamedShadowAccepted()
in lib/iotshadow/iotshadowclient.ts
23 2 4
async subscribeToRegisterThingRejected()
in lib/iotidentity/iotidentityclient.ts
22 2 4
async subscribeToRegisterThingAccepted()
in lib/iotidentity/iotidentityclient.ts
22 2 4
async subscribeToJobExecutionsChangedEvents()
in lib/iotjobs/iotjobsclient.ts
22 2 4
22 2 4
22 2 4
22 2 4
22 2 4
22 2 4