aws-samples / aws-serverless-workshops-kr
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,205 units with 15,504 lines of code in units (49.3% of code).
    • 5 very complex units (2,031 lines of code)
    • 4 complex units (202 lines of code)
    • 68 medium complex units (2,616 lines of code)
    • 132 simple units (2,775 lines of code)
    • 996 very simple units (7,880 lines of code)
13% | 1% | 16% | 17% | 50%
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
js13% | 1% | 17% | 17% | 49%
py0% | 0% | 72% | 27% | 0%
go0% | 0% | 0% | 28% | 72%
ts0% | 0% | 0% | 17% | 82%
rb0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
MultiRegion/2_UI14% | 1% | 17% | 17% | 48%
ImageProcessing/src0% | 0% | 62% | 23% | 13%
DataProcessing/guide0% | 0% | 7% | 12% | 80%
WebApplication/5_OAuth0% | 0% | 0% | 46% | 53%
DataProcessing/client0% | 0% | 0% | 28% | 72%
MultiRegion/1_API0% | 0% | 0% | 60% | 39%
WebApplication/1_StaticWebHosting0% | 0% | 0% | 0% | 100%
WebApplication/3_ServerlessBackend0% | 0% | 0% | 0% | 100%
WebApplication0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
(function (global)()
in MultiRegion/2_UI/src/assets/js/aws/aws-cognito-sdk.js
712 210 1
Url.prototype.resolveObject = function()
in MultiRegion/2_UI/src/assets/js/aws/aws-cognito-sdk.js
195 101 1
var CognitoUser = function()
in MultiRegion/2_UI/src/assets/js/aws/amazon-cognito-identity.js
765 96 0
visit: function()
in MultiRegion/2_UI/src/assets/js/aws/aws-cognito-sdk.js
209 61 2
Url.prototype.parse = function()
in MultiRegion/2_UI/src/assets/js/aws/aws-cognito-sdk.js
150 58 3
(function()()
in MultiRegion/2_UI/src/assets/js/amazon-login.js
15 49 1
XMLNode.prototype.element = function()
in MultiRegion/2_UI/src/assets/js/aws/aws-cognito-sdk.js
63 37 3
function formatValue()
in MultiRegion/2_UI/src/assets/js/aws/aws-cognito-sdk.js
80 31 3
Url.prototype.format = function()
in MultiRegion/2_UI/src/assets/js/aws/aws-cognito-sdk.js
44 30 0
function utf8Slice()
in MultiRegion/2_UI/src/assets/js/aws/aws-cognito-sdk.js
63 24 3
XMLElement.prototype.toString = function()
in MultiRegion/2_UI/src/assets/js/aws/aws-cognito-sdk.js
56 24 2
function byteLength()
in MultiRegion/2_UI/src/assets/js/aws/aws-cognito-sdk.js
40 22 2
function slowToString()
in MultiRegion/2_UI/src/assets/js/aws/aws-cognito-sdk.js
46 22 3
function utf8ToBytes()
in MultiRegion/2_UI/src/assets/js/aws/aws-cognito-sdk.js
60 22 2
led: function()
in MultiRegion/2_UI/src/assets/js/aws/aws-cognito-sdk.js
78 22 2
function baseIsEqualDeep()
in MultiRegion/2_UI/src/assets/js/aws/aws-cognito-sdk.js
50 22 7
error: function error()
in MultiRegion/2_UI/src/assets/js/aws/aws-cognito-sdk.js
29 21 2
DomXmlParser.prototype.parse = function()
in MultiRegion/2_UI/src/assets/js/aws/aws-cognito-sdk.js
64 21 2
nud: function()
in MultiRegion/2_UI/src/assets/js/aws/aws-cognito-sdk.js
74 21 1
function equalObjects()
in MultiRegion/2_UI/src/assets/js/aws/aws-cognito-sdk.js
43 20 7