aws-solutions / amazon-cloudwatch-monitoring-framework
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 24 units with 1,305 lines of code in units (47.4% 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)
    • 2 simple units (50 lines of code)
    • 22 very simple units (1,255 lines of code)
0% | 0% | 0% | 3% | 96%
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% | 3% | 96%
rb0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
services/tagHandler/lib0% | 0% | 0% | 25% | 74%
resources/lib0% | 0% | 0% | 0% | 100%
services/dashboardHandler/lib0% | 0% | 0% | 0% | 100%
resources/lib/puma0% | 0% | 0% | 0% | 100%
resources/lib/apache0% | 0% | 0% | 0% | 100%
resources/lib/nginx0% | 0% | 0% | 0% | 100%
services/utils/metrics0% | 0% | 0% | 0% | 100%
services/utils/logger0% | 0% | 0% | 0% | 100%
services/utils/error0% | 0% | 0% | 0% | 100%
services/helper0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
static isTagValid()
in source/services/tagHandler/lib/EC2Helper.ts
32 8 1
static compareArrays()
in source/services/tagHandler/lib/EC2Helper.ts
18 6 2
static async getInstances()
in source/services/tagHandler/lib/EC2Helper.ts
78 5 2
static async getParameter()
in source/services/tagHandler/lib/SSMHelper.ts
35 5 1
static async getParameter()
in source/services/dashboardHandler/lib/SSMHelper.ts
35 5 1
async putDashboard()
in source/services/dashboardHandler/lib/CWHelperAbstract.ts
39 4 2
constructor()
in source/resources/lib/workload.infra.ts
348 3 3
static async putParameter()
in source/services/tagHandler/lib/SSMHelper.ts
30 3 2
private createFilterPattern()
in source/services/dashboardHandler/lib/CWWidgetFactory.ts
27 3 1
static async putParameter()
in source/services/dashboardHandler/lib/SSMHelper.ts
30 3 2
constructor()
in source/resources/lib/nginx/nginx.demo.ts
69 2 3
constructor()
in source/resources/lib/apache/apache.demo.ts
77 2 3
constructor()
in source/resources/lib/puma/puma.demo.ts
91 2 3
constructor()
in source/resources/lib/framework.infra.ts
176 2 2
async deleteDashboard()
in source/services/dashboardHandler/lib/CWHelperAbstract.ts
23 2 1
constructor()
in source/services/utils/error/index.ts
7 2 1
constructor()
in source/resources/lib/demo.infra.ts
124 1 2
generate_cloudwatch_log_json
in source/resources/lib/puma/puma.config/application_controller.rb
29 1 0
index
in source/resources/lib/puma/puma.config/page_controller.rb
3 1 0
measure_load_time
in source/resources/lib/puma/puma.config/page_controller.rb
5 1 0