aws-samples / aws-emr-apache-ranger
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,197 lines of code in units (94.8% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 4 medium complex units (869 lines of code)
    • 4 simple units (100 lines of code)
    • 16 very simple units (228 lines of code)
0% | 0% | 72% | 8% | 19%
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
py0% | 0% | 83% | 9% | 7%
js0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
aws_emr_blog_v2/code/launch-cluster0% | 0% | 85% | 8% | 6%
aws_emr_blog_v3/code/launch-cluster0% | 0% | 79% | 11% | 8%
aws_emr_blog_v2/code/amilookup-win0% | 0% | 0% | 0% | 100%
aws_emr_blog_v3/code/amilookup-win0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def create()
in aws_emr_blog_v2/code/launch-cluster/cremr.py
488 22 2
def create()
in aws_emr_blog_v3/code/launch-cluster/cremr.py
293 17 2
def cfn_handler()
in aws_emr_blog_v2/code/launch-cluster/crhelper.py
44 14 7
def cfn_handler()
in aws_emr_blog_v3/code/launch-cluster/crhelper.py
44 14 7
def log_config()
in aws_emr_blog_v2/code/launch-cluster/crhelper.py
19 8 3
def send()
in aws_emr_blog_v2/code/launch-cluster/crhelper.py
31 8 7
def log_config()
in aws_emr_blog_v3/code/launch-cluster/crhelper.py
19 8 3
def send()
in aws_emr_blog_v3/code/launch-cluster/crhelper.py
31 8 7
exports.handler = function()
in aws_emr_blog_v2/code/amilookup-win/amilookup-win.js
39 4 2
exports.handler = function()
in aws_emr_blog_v3/code/amilookup-win/amilookup-win.js
39 4 2
def update_num_retries()
in aws_emr_blog_v2/code/launch-cluster/crhelper.py
7 3 2
def update_num_retries()
in aws_emr_blog_v3/code/launch-cluster/crhelper.py
7 3 2
function sendResponse()
in aws_emr_blog_v2/code/amilookup-win/amilookup-win.js
37 1 4
def timeout()
in aws_emr_blog_v2/code/launch-cluster/crhelper.py
4 1 3
def relaunch_lambda()
in aws_emr_blog_v2/code/launch-cluster/crhelper.py
3 1 2
def update()
in aws_emr_blog_v2/code/launch-cluster/cremr.py
4 1 2
def delete()
in aws_emr_blog_v2/code/launch-cluster/cremr.py
15 1 2
def handler()
in aws_emr_blog_v2/code/launch-cluster/cremr.py
5 1 2
function sendResponse()
in aws_emr_blog_v3/code/amilookup-win/amilookup-win.js
37 1 4
def timeout()
in aws_emr_blog_v3/code/launch-cluster/crhelper.py
4 1 3