aws-samples / sitewise-data-ingestion-demo
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 26 units with 796 lines of code in units (53.5% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 0 medium complex units (0 lines of code)
    • 0 simple units (0 lines of code)
    • 26 very simple units (796 lines of code)
0% | 0% | 0% | 0% | 100%
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% | 0% | 0% | 0% | 100%
js0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
lib/asset-models0% | 0% | 0% | 0% | 100%
lib/lambda0% | 0% | 0% | 0% | 100%
lib/stacks0% | 0% | 0% | 0% | 100%
misc/data-generator0% | 0% | 0% | 0% | 100%
lib/assets0% | 0% | 0% | 0% | 100%
lib/kinesis0% | 0% | 0% | 0% | 100%
lib/iot-rules0% | 0% | 0% | 0% | 100%
lib/timestream0% | 0% | 0% | 0% | 100%
lib/util0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
public nextValue()
in misc/data-generator/src/data-generator.ts
19 5 0
constructor()
in lib/lambda/data-lake-ingestion-fork-lambda-construct.ts
61 3 3
constructor()
in lib/stacks/data-lake-stack.ts
91 3 3
constructor()
in lib/assets/wind-farm-asset.ts
24 2 3
async function getMapping()
in lib/lambda/functions/data-lake-ingestion-fork-lambda/index.js
9 2 0
private randomOperation()
in misc/data-generator/src/data-generator.ts
3 2 0
constructor()
in lib/timestream/timestream-asset-data-target-construct.ts
15 1 3
constructor()
in lib/kinesis/data-lake-ingestion-stream-construct.ts
7 1 3
constructor()
in lib/kinesis/firehose-to-s3-delivery-stream-construct.ts
42 1 3
constructor()
in lib/assets/turbine-asset-construct.ts
35 1 3
public vend()
in lib/util/uid.ts
3 1 0
private composeLogicalId()
in lib/asset-models/wind-farm-asset-model-construct.ts
3 1 1
constructor()
in lib/asset-models/wind-farm-asset-model-construct.ts
97 1 3
private composeLogicalId()
in lib/asset-models/turbine-asset-model-construct.ts
3 1 1
constructor()
in lib/asset-models/turbine-asset-model-construct.ts
187 1 3
const successPayload = function()
in lib/lambda/functions/asset-mapper/index.js
14 1 1
const failPayload = function()
in lib/lambda/functions/asset-mapper/index.js
12 1 2
constructor()
in lib/lambda/asset-mapper-lambda-construct.ts
48 1 3
constructor()
in lib/iot-rules/send-to-data-lake-rule-construct.ts
38 1 3
constructor()
in lib/stacks/asset-model-stack.ts
7 1 3