aws / sagemaker-tensorflow-extensions
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 93 units with 867 lines of code in units (45.1% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 1 medium complex units (76 lines of code)
    • 2 simple units (66 lines of code)
    • 90 very simple units (725 lines of code)
0% | 0% | 8% | 7% | 83%
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% | 14% | 0% | 85%
cpp0% | 0% | 0% | 22% | 77%
h0% | 0% | 0% | 0% | 100%
hpp0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
benchmarking/pipemode_benchmark0% | 0% | 20% | 0% | 79%
src/pipemode_op/RecordReader0% | 0% | 0% | 40% | 59%
src/pipemode_op/Dataset/src0% | 0% | 0% | 0% | 100%
benchmarking/pipemode_benchmark/docker0% | 0% | 0% | 0% | 100%
src/sagemaker_tensorflow0% | 0% | 0% | 0% | 100%
ROOT0% | 0% | 0% | 0% | 100%
src/pipemode_op/include0% | 0% | 0% | 0% | 100%
src/pipemode_op/PipeStateManager0% | 0% | 0% | 0% | 100%
src/pipemode_op/include/tensorflow0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def benchmark()
in benchmarking/pipemode_benchmark/benchmark.py
76 14 6
bool TextLineRecordReader::ReadRecord()
in src/pipemode_op/RecordReader/TextLineRecordReader.cpp
30 9 1
bool TFRecordReader::ReadRecord()
in src/pipemode_op/RecordReader/TFRecordReader.cpp
36 7 1
def get_role_arn()
in benchmarking/pipemode_benchmark/benchmark.py
15 5 1
def main()
in benchmarking/pipemode_benchmark/benchmark.py
64 5 1
def _upload_to_s3()
in benchmarking/pipemode_benchmark/dataset.py
24 5 1
def __init__()
in src/sagemaker_tensorflow/pipemode.py
22 5 9
Status GetNextInternal()
in src/pipemode_op/Dataset/src/pipemode_dataset_op_kernel.cpp
31 5 3
std::size_t RecordReader::Read()
in src/pipemode_op/RecordReader/RecordReader.cpp
18 5 2
def main()
in benchmarking/pipemode_benchmark/local_benchmark.py
39 4 1
bool RecordIOReader::ReadRecord()
in src/pipemode_op/RecordReader/RecordIOReader.cpp
21 4 1
def find_files()
in setup.py
5 4 6
def run()
in setup.py
9 4 1
def repository()
in benchmarking/pipemode_benchmark/repo_helper.py
35 3 1
def bucket()
in benchmarking/pipemode_benchmark/bucket_helper.py
14 3 1
def build()
in benchmarking/pipemode_benchmark/dataset.py
7 3 2
def _input_fn()
in benchmarking/pipemode_benchmark/docker/gpu_pipeline_script.py
15 3 0
def _input_fn()
in benchmarking/pipemode_benchmark/docker/input_only_script.py
18 3 0
def _validate_input_data_config()
in src/sagemaker_tensorflow/pipemode.py
5 3 1
void MakeDataset()
in src/pipemode_op/Dataset/src/pipemode_dataset_op_kernel.cpp
27 3 2