awslabs / aws-virtual-application-management
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 3,203 units with 31,369 lines of code in units (39.0% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 15 medium complex units (882 lines of code)
    • 105 simple units (3,453 lines of code)
    • 3,083 very simple units (27,034 lines of code)
0% | 0% | 2% | 11% | 86%
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% | 2% | 11% | 86%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
components/base-workflow0% | 0% | 9% | 6% | 83%
components/base-ui0% | 0% | 4% | 18% | 76%
components/base0% | 0% | 2% | 11% | 85%
components/vam-api0% | 0% | 1% | 7% | 90%
components/base-workflow-ui0% | 0% | <1% | 8% | 90%
components/base-rest-api0% | 0% | 0% | 22% | 77%
components/base-auth-cognito0% | 0% | 0% | 37% | 62%
components/appstream-image-builder0% | 0% | 0% | 9% | 90%
components/vam-ui0% | 0% | 0% | 1% | 98%
components/base-ui-public-hosting0% | 0% | 0% | 12% | 87%
components/base-workflow-api0% | 0% | 0% | 0% | 100%
components/base-cicd0% | 0% | 0% | 0% | 100%
components/eventbridge0% | 0% | 0% | 0% | 100%
components/base-post-deployment0% | 0% | 0% | 0% | 100%
main/packages0% | 0% | 0% | 0% | 100%
components/base-scripts0% | 0% | 0% | 0% | 100%
components/vam-silky-smooth-deployments0% | 0% | 0% | 0% | 100%
components/vam-sample-applications0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
async authorize()
in components/vam-api/packages/vam-services/lib/appstream/appstream-authz-service.js
40 24 6
item()
in components/base/packages/api-testing-framework/support/aws/services/db-helpers/updater.js
46 22 1
item()
in components/base/packages/services/lib/db/updater.js
46 22 1
function cfnCustomizer()
in components/base/packages/assembly-tasks/lib/helpers/cfn-merge-helper.js
23 18 3
async function handler()
in components/base-workflow/packages/base-workflow-core/lib/runner/handler.js
188 16 5
render()
in components/base-ui/packages/base-ui/lib/parts/helpers/fields/DropDown.js
78 16 0
async processDecisionQueue()
in components/base-workflow/packages/workflow-engine/lib/step/step-loop.js
64 15 0
function fetchJson()
in components/base-ui/packages/base-ui/lib/helpers/api.js
82 15 3
async assemble()
in components/base/packages/serverless-solution-commands/lib/serverless-solution-commands.js
60 12 0
render()
in components/base-workflow-ui/packages/base-workflow-ui/src/parts/workflows/drafts/edit/WorkflowDraftEditor.js
24 11 0
async saveStepAttribs()
in components/base-workflow/packages/base-workflow-core/lib/workflow/workflow-instance-service.js
62 11 2
async processStepDecision()
in components/base-workflow/packages/workflow-engine/lib/step/step-loop.js
41 11 1
async tick()
in components/base-workflow/packages/workflow-engine/lib/workflow-loop.js
34 11 0
renderDetailViewButtons()
in components/base-ui/packages/base-ui/lib/parts/users/UpdateUser.js
71 11 0
async authorizeUpdateAttributes()
in components/base/packages/services/lib/user/user-authz-service.js
23 11 4
get steps()
in components/base-workflow-ui/packages/base-workflow-ui/src/models/workflows/Workflow.js
44 10 0
async tick()
in components/base-workflow/packages/workflow-engine/lib/step/step-loop.js
30 10 0
render()
in components/base-ui/packages/base-ui/lib/parts/Login.js
113 10 0
async getDomainValidationOptions()
in components/base/packages/custom-domains-cfn-resource/lib/dns-validation.js
31 10 3
async waitForNotInUse()
in components/base/packages/custom-domains-cfn-resource/lib/certificate-raw.js
27 10 2