aws / aws-connected-device-framework
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,570 units with 22,033 lines of code in units (38.2% of code).
    • 6 very long units (671 lines of code)
    • 38 long units (2,428 lines of code)
    • 263 medium size units (7,967 lines of code)
    • 414 small units (6,059 lines of code)
    • 849 very small units (4,908 lines of code)
3% | 11% | 36% | 27% | 22%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
ts3% | 11% | 35% | 27% | 22%
js0% | 0% | 47% | 41% | 11%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
source/packages/services4% | 13% | 42% | 26% | 13%
source/packages/libraries0% | 4% | 13% | 30% | 51%
source/common/scripts0% | 0% | 47% | 41% | 11%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
private identifyChangedRelations()
in source/packages/services/assetlibrary/src/types/types.full.dao.ts
120 45 2
public async validateRelationshipsByPath()
in source/packages/services/assetlibrary/src/types/types.full.dao.ts
119 18 2
public assembleAlert()
in source/packages/services/events-alerts/src/alerts/assembler.ts
119 18 1
private buildSearchTraverser()
in source/packages/services/assetlibrary/src/search/search.full.dao.ts
108 17 3
pk: createDelimitedAttribute()
in source/packages/services/events-processor/src/api/eventsources/eventsource.dao.ts
103 9 2
sk: createDelimitedAttribute()
in source/packages/services/events-processor/src/api/eventsources/eventsource.dao.ts
102 9 2
private async buildTargetList()
in source/packages/services/commands/src/commands/workflow/workflow.startjob.ts
91 27 3
public toGroupItem()
in source/packages/services/assetlibrary/src/groups/groups.assembler.ts
86 24 1
public toGroupItem()
in source/packages/services/assetlibrary-export/src/groups/groups.assembler.ts
86 24 1
sk: createDelimitedAttribute()
in source/packages/services/events-processor/src/api/events/event.dao.ts
83 8 2
public async getThing()
in source/packages/services/provisioning/src/things/things.service.ts
82 12 1
public async filter()
in source/packages/services/events-processor/src/filter/filter.service.ts
81 15 1
public async create()
in source/packages/services/assetlibrary/src/devices/devices.full.dao.ts
74 12 4
public async transform()
in source/packages/services/events-processor/src/transformers/ddbstream.transformer.ts
71 17 1
public async create()
in source/packages/libraries/core/deployment-helper/src/customResources/iotDeviceDefender.customResource.ts
71 4 1
private async fireSNSevent()
in source/packages/services/bulkcerts/src/certificates/certificatestask.service.ts
67 12 5
public async listRelated()
in source/packages/services/assetlibrary/src/data/common.full.dao.ts
65 12 8
public async listRelated()
in source/packages/services/assetlibrary-export/src/data/common.full.dao.ts
65 12 8
private setIdsToLowercase()
in source/packages/services/assetlibrary/src/devices/devices.full.service.ts
64 16 1
public toDeviceItem()
in source/packages/services/assetlibrary/src/devices/devices.assembler.ts
64 26 1