aws / aws-parallelcluster-cookbook
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 201 units with 1,873 lines of code in units (26.1% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 2 medium complex units (120 lines of code)
    • 11 simple units (256 lines of code)
    • 188 very simple units (1,497 lines of code)
0% | 0% | 6% | 13% | 79%
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% | 6% | 13% | 80%
rb0% | 0% | 6% | 14% | 79%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
cookbooks/aws-parallelcluster-install0% | 0% | 31% | 23% | 44%
cookbooks/aws-parallelcluster-scheduler-plugin0% | 0% | 13% | 0% | 86%
cookbooks/aws-parallelcluster-config0% | 0% | 0% | 20% | 79%
cookbooks/aws-parallelcluster-test0% | 0% | 0% | 30% | 69%
libraries0% | 0% | 0% | 8% | 91%
cookbooks/aws-parallelcluster-slurm0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
build_env
in cookbooks/aws-parallelcluster-scheduler-plugin/resources/execute_event_handler.rb
55 14 0
def main()
in cookbooks/aws-parallelcluster-install/files/default/ec2_udev_rules/attachVolume.py
65 12 0
def main()
in cookbooks/aws-parallelcluster-install/files/default/ec2_udev_rules/ec2_dev_2_volid.py
49 10 0
def select_configs_for_feature()
in cookbooks/aws-parallelcluster-config/files/default/cloudwatch_agent/write_cloudwatch_agent_json.py
19 10 1
check_imds_access
in cookbooks/aws-parallelcluster-test/libraries/helpers.rb
19 8 2
def _get_session_token()
in cookbooks/aws-parallelcluster-config/files/default/dcv/pcluster_dcv_authenticator.py
36 8 2
check_run_level_script
in cookbooks/aws-parallelcluster-test/libraries/helpers.rb
23 7 3
allow_gpu_acceleration
in cookbooks/aws-parallelcluster-config/recipes/dcv.rb
34 7 0
validate_os_type
in libraries/helpers.rb
13 7 0
find_rhel_minor_version
in libraries/helpers.rb
16 7 0
check_directories_in_path
in cookbooks/aws-parallelcluster-test/libraries/helpers.rb
15 6 2
def do_GET()
in cookbooks/aws-parallelcluster-config/files/default/dcv/pcluster_dcv_authenticator.py
22 6 1
def _check_auth()
in cookbooks/aws-parallelcluster-config/files/default/dcv/pcluster_dcv_authenticator.py
10 6 3
build_dynamic_env
in cookbooks/aws-parallelcluster-scheduler-plugin/resources/execute_event_handler.rb
20 5 2
build_hash_from_node
in cookbooks/aws-parallelcluster-scheduler-plugin/resources/execute_event_handler.rb
5 5 3
ami_bootstrapped?
in libraries/helpers.rb
14 5 0
def _sleep_remaining_loop_time()
in cookbooks/aws-parallelcluster-scheduler-plugin/files/default/clusterstatusmgtd/clusterstatusmgtd.py
8 4 2
def _log_exception()
in cookbooks/aws-parallelcluster-scheduler-plugin/files/default/clusterstatusmgtd/clusterstatusmgtd.py
13 4 1
def manage_cluster_status()
in cookbooks/aws-parallelcluster-scheduler-plugin/files/default/clusterstatusmgtd/clusterstatusmgtd.py
19 4 1
def _run_clusterstatusmgtd()
in cookbooks/aws-parallelcluster-scheduler-plugin/files/default/clusterstatusmgtd/clusterstatusmgtd.py
20 4 1