aws / amazon-braket-ocean-plugin-python
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 27 units with 178 lines of code in units (40.0% 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)
    • 1 simple units (32 lines of code)
    • 26 very simple units (146 lines of code)
0% | 0% | 0% | 17% | 82%
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% | 0% | 17% | 82%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
src/braket/ocean_plugin0% | 0% | 0% | 17% | 82%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def sample_qubo_quantum_task()
in src/braket/ocean_plugin/braket_sampler.py
32 9 5
def parameters()
in src/braket/ocean_plugin/braket_sampler.py
12 4 1
def parameters()
in src/braket/ocean_plugin/braket_dwave_sampler.py
13 4 1
def _process_solver_kwargs()
in src/braket/ocean_plugin/braket_dwave_sampler.py
11 4 2
def properties()
in src/braket/ocean_plugin/braket_sampler.py
8 3 1
def edgelist()
in src/braket/ocean_plugin/braket_sampler.py
4 3 1
def _check_kwargs_solver()
in src/braket/ocean_plugin/braket_sampler.py
4 3 2
def _result_to_response_hook()
in src/braket/ocean_plugin/braket_sampler.py
21 3 1
def properties()
in src/braket/ocean_plugin/braket_dwave_sampler.py
8 3 1
def _access_optimized_edgelist()
in src/braket/ocean_plugin/braket_sampler.py
6 2 1
def _create_solver_kwargs()
in src/braket/ocean_plugin/braket_sampler.py
10 2 2
def _vartype_from_problem_type()
in src/braket/ocean_plugin/braket_sampler.py
5 2 1
def get_metadata_by_arn()
in src/braket/ocean_plugin/braket_solver_metadata.py
4 2 1
def __init__()
in src/braket/ocean_plugin/braket_sampler.py
6 1 5
def nodelist()
in src/braket/ocean_plugin/braket_sampler.py
2 1 1
def _access_optimized_nodelist()
in src/braket/ocean_plugin/braket_sampler.py
2 1 1
def sample_ising()
in src/braket/ocean_plugin/braket_sampler.py
2 1 0
def sample_ising_quantum_task()
in src/braket/ocean_plugin/braket_sampler.py
2 1 0
def sample_qubo()
in src/braket/ocean_plugin/braket_sampler.py
4 1 5
def get_task_sample_set()
in src/braket/ocean_plugin/braket_sampler.py
3 1 2