aws / aws-parallelcluster
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 2,507 units with 24,191 lines of code in units (55.5% of code).
    • 0 very complex units (0 lines of code)
    • 4 complex units (657 lines of code)
    • 41 medium complex units (1,753 lines of code)
    • 198 simple units (5,031 lines of code)
    • 2,264 very simple units (16,750 lines of code)
0% | 2% | 7% | 20% | 69%
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% | 2% | 7% | 20% | 69%
rb0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
cli/src0% | 3% | 5% | 18% | 73%
api/client0% | 3% | 7% | 30% | 58%
awsbatch-cli/src0% | 0% | 21% | 14% | 63%
util0% | 0% | 15% | 7% | 77%
scheduler_plugins/slurm0% | 0% | 0% | 0% | 100%
cloudformation/utils0% | 0% | 0% | 0% | 100%
awsbatch-cli0% | 0% | 0% | 0% | 100%
cli0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def check_validations()
in api/client/src/pcluster_client/model_utils.py
120 39 4
def configure()
in cli/src/pcluster/cli/commands/configure/easyconfig.py
143 30 1
def _add_head_node()
in cli/src/pcluster/templates/cluster_stack.py
307 27 1
def request()
in api/client/src/pcluster_client/rest.py
87 26 9
def __init_from_stack()
in awsbatch-cli/src/awsbatch/common.py
50 20 3
def validate_and_convert_types()
in api/client/src/pcluster_client/model_utils.py
76 18 6
def get_oneof_instance()
in api/client/src/pcluster_client/model_utils.py
50 18 4
def _add_imagebuilder_components()
in cli/src/pcluster/templates/imagebuilder_stack.py
172 17 3
def __init_from_config()
in awsbatch-cli/src/awsbatch/common.py
48 16 4
def _upload_and_get_command()
in awsbatch-cli/src/awsbatch/awsbsub.py
29 16 6
def model_to_dict()
in api/client/src/pcluster_client/model_utils.py
30 16 2
def __print_log_stream()
in awsbatch-cli/src/awsbatch/awsbout.py
44 15 6
def _validate_parameters()
in awsbatch-cli/src/awsbatch/awsbsub.py
17 15 1
def deserialize_primitive()
in api/client/src/pcluster_client/model_utils.py
40 15 3
def call_with_http_info()
in api/client/src/pcluster_client/api_client.py
66 15 2
def _add_resources()
in cli/src/pcluster/templates/cluster_stack.py
71 15 1
def main()
in util/upload-cookbook.py
42 14 0
def _add_fsx_storage()
in cli/src/pcluster/templates/cluster_stack.py
66 14 3
def _compare_section()
in cli/src/pcluster/config/config_patch.py
36 14 5
def main()
in awsbatch-cli/src/awsbatch/awsbsub.py
47 13 0