aws / aws-connected-device-framework
Conditional Complexity

The distribution of complexity of units (measured with McCabe index).

Intro
  • Conditional complexity (also called cyclomatic complexity) is a term used to measure the complexity of software. The term refers to the number of possible paths through a program function. A higher value ofter means higher maintenance and testing costs (infosecinstitute.com).
  • Conditional complexity is calculated by counting all conditions in the program that can affect the execution path (e.g. if statement, loops, switches, and/or operators, try and catch blocks...).
  • Conditional complexity is measured at the unit level (methods, functions...).
  • Units are classified in four categories based on the measured McCabe index: 1-5 (simple units), 6-10 (medium complex units), 11-25 (complex units), 26+ (very complex units).
Learn more...
Conditional Complexity Overall
  • There are 1,570 units with 22,033 lines of code in units (38.2% of code).
    • 0 very complex units (0 lines of code)
    • 4 complex units (339 lines of code)
    • 34 medium complex units (2,046 lines of code)
    • 126 simple units (4,042 lines of code)
    • 1,406 very simple units (15,606 lines of code)
0% | 1% | 9% | 18% | 70%
Legend:
51+
26-50
11-25
6-10
1-5
Alternative Visuals
Conditional Complexity per Extension
51+
26-50
11-25
6-10
1-5
ts0% | 1% | 9% | 18% | 70%
js0% | 0% | 0% | 35% | 64%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
source/packages/services0% | 2% | 11% | 19% | 66%
source/packages/libraries0% | 0% | 3% | 11% | 84%
source/common/scripts0% | 0% | 0% | 35% | 64%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
private identifyChangedRelations()
in source/packages/services/assetlibrary/src/types/types.full.dao.ts
120 45 2
private async buildTargetList()
in source/packages/services/commands/src/commands/workflow/workflow.startjob.ts
91 27 3
public toDeviceItem()
in source/packages/services/assetlibrary/src/devices/devices.assembler.ts
64 26 1
public toDeviceItem()
in source/packages/services/assetlibrary-export/src/devices/devices.assembler.ts
64 26 1
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
public async search()
in source/packages/services/assetlibrary/src/search/search.lite.service.ts
36 19 3
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
public async create()
in source/packages/services/assetlibrary/src/devices/devices.full.service.ts
57 17 2
private buildSearchTraverser()
in source/packages/services/assetlibrary/src/search/search.full.dao.ts
108 17 3
public async transform()
in source/packages/services/events-processor/src/transformers/ddbstream.transformer.ts
71 17 1
private setIdsToLowercase()
in source/packages/services/assetlibrary/src/devices/devices.full.service.ts
64 16 1
private buildQueryString()
in source/packages/services/assetlibrary/src/search/search.lite.dao.ts
58 16 1
export function handleError()
in source/packages/services/assetlibrary/src/utils/errors.ts
25 16 2
private validateCertInfo()
in source/packages/services/bulkcerts/src/certificates/certificatestask.service.ts
62 16 1
public toHttpQueryString()
in source/packages/libraries/clients/assetlibrary-client/src/client/search.model.ts
50 16 0
public toLambdaMultiValueQueryString()
in source/packages/libraries/clients/assetlibrary-client/src/client/search.model.ts
62 16 0
public async validateRelationshipsByPath()
in source/packages/services/assetlibrary/src/types/types.full.service.ts
40 15 2
public async filter()
in source/packages/services/events-processor/src/filter/filter.service.ts
81 15 1