aws-samples / aws-data-lake-solution-cn
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,228 units with 16,121 lines of code in units (63.0% of code).
    • 2 very complex units (623 lines of code)
    • 8 complex units (569 lines of code)
    • 34 medium complex units (1,250 lines of code)
    • 87 simple units (2,627 lines of code)
    • 1,097 very simple units (11,052 lines of code)
3% | 3% | 7% | 16% | 68%
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
js3% | 3% | 7% | 16% | 68%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
source/api/services7% | 3% | 6% | 21% | 61%
source/console/app2% | 3% | 9% | 14% | 70%
source/resources/access-validator0% | 0% | 42% | 7% | 50%
source/resources/helper0% | 0% | 0% | 8% | 91%
source/resources/loader0% | 0% | 0% | 0% | 100%
source/cli/core0% | 0% | 0% | 0% | 100%
source/api/authorizer0% | 0% | 0% | 0% | 100%
deployment/manifest-generator0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
function build()
in source/console/app/lib/aws-ui/AWS-UI-Components/components.js
196 120 11
function processRequest()
in source/api/services/admin/lib/index.js
427 85 3
function processRequest()
in source/api/services/package/lib/index.js
206 48 3
function setAttributes()
in source/console/app/lib/aws-ui/AWS-UI-Components/components.js
39 33 5
define()
in source/console/app/document/Working-with-my-profile.Chn_files/text.js
54 33 2
define()
in source/console/app/document/Working-with-settings.Chn_files/text.js
54 33 2
define()
in source/console/app/document/Working-with-my-cart.Chn_files/text.js
54 33 2
define()
in source/console/app/document/Searching-in-the-data-lake.Chn_files/text.js
54 33 2
define()
in source/console/app/document/Working-with-packages.Chn_files/text.js
54 33 2
define()
in source/console/app/document/Data-Lake-Solution.Chn_files/text.js
54 33 2
function m()
in source/console/app/lib/aws-ui/AWS-UI-Components/components.js
34 24 0
m.route = function()
in source/console/app/lib/aws-ui/AWS-UI-Components/components.js
42 19 0
function processRequest()
in source/api/services/cart/lib/index.js
89 17 3
function ajax()
in source/console/app/lib/aws-ui/AWS-UI-Components/components.js
32 17 1
Select.prototype.bindKeys = function()
in source/console/app/lib/aws-ui/AWS-UI-Components/components.js
61 17 0
getManifestImportedDatasetsList()
in source/api/services/package/lib/content-package.js
67 15 4
(function()()
in source/console/app/document/Working-with-my-profile.Chn_files/main.js
4 14 1
(function()()
in source/console/app/document/Working-with-settings.Chn_files/main.js
4 14 1
(function()()
in source/console/app/document/Working-with-my-cart.Chn_files/main.js
4 14 1
(function()()
in source/console/app/document/Searching-in-the-data-lake.Chn_files/main.js
4 14 1