aws / sagemaker-rl-container
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 176 units with 1,463 lines of code in units (52.5% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 1 medium complex units (67 lines of code)
    • 15 simple units (338 lines of code)
    • 160 very simple units (1,058 lines of code)
0% | 0% | 4% | 23% | 72%
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% | 4% | 23% | 72%
c0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
src/vw-serving/src0% | 0% | 4% | 23% | 72%
lib0% | 0% | 0% | 0% | 100%
src/vw-serving0% | 0% | 0% | 0% | 100%
ROOT0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def invocations()
in src/vw-serving/src/vw_serving/serve.py
67 13 0
def _dict_to_item()
in src/vw-serving/src/vw_serving/dynamodb_client_wrapper.py
27 10 1
def _item_to_dict_helper()
in src/vw-serving/src/vw_serving/dynamodb_client_wrapper.py
23 10 1
def load_vars()
in src/vw-serving/src/vw_serving/serve.py
22 9 1
def _load_pre_worker_entry_points()
in src/vw-serving/src/vw_serving/serve.py
25 8 1
def _query_num_gpus()
in src/vw-serving/src/vw_serving/sagemaker/gpu.py
23 8 0
def get_num_gpus()
in src/vw-serving/src/vw_serving/sagemaker/gpu.py
26 8 2
def pretty_number_validator()
in src/vw-serving/src/vw_serving/sagemaker/integration.py
16 8 1
def serve()
in src/vw-serving/src/vw_serving/model_manager.py
34 7 1
def __init__()
in src/vw-serving/src/vw_serving/vw_model.py
18 7 5
def convert_to_customer_data_errors()
in src/vw-serving/src/vw_serving/sagemaker/exceptions.py
27 7 3
def send_records()
in src/vw-serving/src/vw_serving/firehose_producer.py
17 6 3
def start()
in src/vw-serving/src/vw_serving/vw_model.py
17 6 1
def get_list()
in src/vw-serving/src/vw_serving/sagemaker/config/config_helper.py
18 6 4
def pretty_validation_message()
in src/vw-serving/src/vw_serving/sagemaker/integration.py
36 6 1
def start()
in src/vw-serving/src/vw_serving/sagemaker/utils.py
9 6 1
def get_model()
in src/vw-serving/src/vw_serving/model_manager.py
14 5 3
def _post_worker_init()
in src/vw-serving/src/vw_serving/serve.py
18 5 1
def parse_content_type()
in src/vw-serving/src/vw_serving/serve.py
13 5 2
def _score_json()
in src/vw-serving/src/vw_serving/serve.py
33 5 3