awslabs / aws-gov-cloud-import
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 124 units with 2,209 lines of code in units (63.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)
    • 5 simple units (169 lines of code)
    • 119 very simple units (2,040 lines of code)
0% | 0% | 0% | 7% | 92%
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
js0% | 0% | 0% | 7% | 92%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
browser/scripts0% | 0% | 0% | 14% | 85%
ec20% | 0% | 0% | 8% | 91%
lambda/snsPublish0% | 0% | 0% | 32% | 67%
lambda/ec2Run0% | 0% | 0% | 0% | 100%
lambda/importImageStatus0% | 0% | 0% | 0% | 100%
lambda/appStatus0% | 0% | 0% | 0% | 100%
lambda/importImage0% | 0% | 0% | 0% | 100%
lambda/makeVolume0% | 0% | 0% | 0% | 100%
lambda/listGovBuckets0% | 0% | 0% | 0% | 100%
lambda/removeS3Image0% | 0% | 0% | 0% | 100%
lambda/moveStatus0% | 0% | 0% | 0% | 100%
browser0% | 0% | 0% | 0% | 100%
lambda/initStepFunction0% | 0% | 0% | 0% | 100%
lambda/initS3Sync0% | 0% | 0% | 0% | 100%
lambda/snsSubscribe0% | 0% | 0% | 0% | 100%
lambda/listComBuckets0% | 0% | 0% | 0% | 100%
lambda/cleanUp0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
function constructMsg()
in lambda/snsPublish/index.js
21 10 1
async function refreshInstallStatusWest()
in browser/scripts/gov-cloud-import-browser.js
44 8 0
async function refreshInstallStatusEast()
in browser/scripts/gov-cloud-import-browser.js
44 8 0
$()
in browser/scripts/gov-cloud-import-browser.js
20 6 1
function findLetter()
in ec2/gov-cloud-import.js
40 6 1
function watchComCloudFormation()
in browser/scripts/gov-cloud-import-browser.js
25 5 3
function watchGovCloudFormation()
in browser/scripts/gov-cloud-import-browser.js
25 5 3
function setRegionAndKeys()
in browser/scripts/gov-cloud-import-browser.js
24 5 0
function snsPublish()
in lambda/importImageStatus/index.js
32 5 1
function terminateInst()
in browser/scripts/gov-cloud-import-browser.js
33 4 1
function gets3Objects()
in browser/scripts/gov-cloud-import-browser.js
22 4 2
function findLambdaFunction()
in browser/scripts/gov-cloud-import-browser.js
19 4 2
function govCloudFormationStatus()
in lambda/appStatus/index.js
32 4 1
function comCloudFormationStatus()
in lambda/appStatus/index.js
28 4 0
function findStateMchineArn()
in lambda/initStepFunction/index.js
21 4 0
function getSnapshotId()
in lambda/makeVolume/index.js
23 4 1
function findStateMchineArn()
in lambda/initS3Sync/index.js
21 4 0
async function syncS3()
in ec2/gov-cloud-import.js
69 4 0
function isEmpty()
in browser/scripts/gov-cloud-import-browser.js
7 3 1
function getS3Bucket()
in browser/scripts/gov-cloud-import-browser.js
18 3 1